-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add is_deprecated flag to Tool model * Add field to mark release retired and add deprecation message * Disable open tool button * Handle retired and deprecated tools in the frontend - If a tool is depcrecated, show the deprecation message when it is selected - If a tool is retired, hide it and show a message that user must upgrade * Display deprecation message as a warning * Show retired message as a warning * Disable buttons based on selected release If a deployed release is selected, enable open and restart button. If a undeployed release is selected, enable deploy button only. * Replace image_tag property with model field * Add image_tag to the release detail, create pages Use the value stored in the DB when deploying the tool * Make tool description a required field * Fix queryset when looking form related tool Previously all restricted tools were excluded. However, allowing tools to be deprecated means we can update this logic. As some restricted tools may not be deprecated, so should not display an "unsupported" message. * Fix bug finding tools using rc chart version * Filter tool releases by status in superuser view * Add status tag in release admin, and allow filtering by status
- Loading branch information
1 parent
93561bc
commit 7044c8b
Showing
22 changed files
with
602 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Generated by Django 5.1.2 on 2024-11-29 16:25 | ||
|
||
# Third-party | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0049_alter_feedback_suggestions"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="tool", | ||
name="is_deprecated", | ||
field=models.BooleanField(default=False), | ||
), | ||
migrations.AddField( | ||
model_name="tool", | ||
name="deprecated_message", | ||
field=models.TextField( | ||
blank=True, help_text="If no message is provided, a default message will be used." | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="tool", | ||
name="is_retired", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.1.2 on 2024-12-10 09:01 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0050_tool_is_deprecated"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="tool", | ||
name="image_tag", | ||
field=models.CharField(blank=True, max_length=100, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 5.1.2 on 2024-12-10 09:01 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def add_image_tag(apps, schema_editor): | ||
Tool = apps.get_model("api", "Tool") | ||
for tool in Tool.objects.all(): | ||
chart_image_key_name = tool.chart_name.split("-")[0] | ||
values = tool.values or {} | ||
image_tag = values.get("{}.tag".format(chart_image_key_name)) or values.get( | ||
"{}.image.tag".format(chart_image_key_name) | ||
) | ||
tool.image_tag = image_tag | ||
tool.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0051_tool_image_tag"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(code=add_image_tag, reverse_code=migrations.RunPython.noop), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 5.1.2 on 2024-12-10 09:05 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0052_add_image_tag_value"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="tool", | ||
name="image_tag", | ||
field=models.CharField(default="", max_length=100), | ||
preserve_default=False, | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
controlpanel/api/migrations/0054_alter_tool_description.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.1.2 on 2024-12-11 14:44 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0053_alter_tool_image_tag"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="tool", | ||
name="description", | ||
field=models.TextField(), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.