Skip to content
Snippets Groups Projects
Commit a6506b59 authored by Valentin Rigal's avatar Valentin Rigal Committed by Erwan Rouchet
Browse files

Add a description field on workers

parent f9591409
No related branches found
No related tags found
1 merge request!2177Add a description field on workers
......@@ -102,7 +102,7 @@ class WorkerConfigurationInline(admin.StackedInline):
class WorkerAdmin(admin.ModelAdmin):
list_display = ('id', 'name', 'slug', 'type', 'repository')
fields = ('id', 'name', 'slug', 'type', 'repository', 'public')
fields = ('id', 'name', 'slug', 'type', 'description', 'repository', 'public')
readonly_fields = ('id', )
inlines = [WorkerVersionInline, UserMembershipInline, GroupMembershipInline, WorkerConfigurationInline]
......
# Generated by Django 4.1.7 on 2023-11-09 08:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('process', '0021_workerrun_created_updated'),
]
operations = [
migrations.AddField(
model_name='worker',
name='description',
field=models.TextField(blank=True, default=''),
),
]
......@@ -624,6 +624,7 @@ class Worker(models.Model):
name = models.CharField(max_length=100)
slug = models.CharField(max_length=100)
type = models.ForeignKey('process.WorkerType', on_delete=models.PROTECT, related_name='type')
description = models.TextField(default='', blank=True)
# Repository can be left blank for a custom worker.
# Its versions will not be created automatically from Git nor be linked to a revision.
repository = models.ForeignKey(
......
......@@ -65,6 +65,7 @@ SELECT "process_worker"."id",
"process_worker"."name",
"process_worker"."slug",
"process_worker"."type_id",
"process_worker"."description",
"process_worker"."repository_id",
"process_worker"."public"
FROM "process_worker"
......@@ -139,6 +140,7 @@ SELECT "process_worker"."id",
"process_worker"."name",
"process_worker"."slug",
"process_worker"."type_id",
"process_worker"."description",
"process_worker"."repository_id",
"process_worker"."public"
FROM "process_worker"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment