-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into topic/vlad/gh_actions
- Loading branch information
Showing
25 changed files
with
532 additions
and
147 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
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
56 changes: 56 additions & 0 deletions
56
scram/route_manager/migrations/0027_websocketmessage_websocketsequenceelement.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,56 @@ | ||
# Generated by Django 3.2.13 on 2024-01-06 21:48 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("route_manager", "0026_alter_client_hostname"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="WebSocketMessage", | ||
fields=[ | ||
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | ||
("msg_type", models.CharField(max_length=50, verbose_name="The type of the message")), | ||
( | ||
"msg_data", | ||
models.JSONField(default=dict, verbose_name="The JSON payload. See also msg_data_route_field."), | ||
), | ||
( | ||
"msg_data_route_field", | ||
models.CharField( | ||
max_length=25, | ||
verbose_name="The key in the JSON payload whose value will contain the route being acted on.", | ||
), | ||
), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name="WebSocketSequenceElement", | ||
fields=[ | ||
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | ||
( | ||
"order_num", | ||
models.SmallIntegerField( | ||
default=0, | ||
verbose_name="Sequences are sent from the smallest order_num to the highest. Messages with the same order_num could be sent in any order", | ||
), | ||
), | ||
("verb", models.CharField(choices=[("A", "Add"), ("C", "Check"), ("R", "Remove")], max_length=1)), | ||
( | ||
"action_type", | ||
models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="route_manager.actiontype"), | ||
), | ||
( | ||
"websocketmessage", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, to="route_manager.websocketmessage" | ||
), | ||
), | ||
], | ||
), | ||
] |
25 changes: 25 additions & 0 deletions
25
scram/route_manager/migrations/0028_default_websocket_messages.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,25 @@ | ||
from django.db import migrations | ||
|
||
|
||
def create(apps, schema_editor): | ||
ActionType = apps.get_model("route_manager", "ActionType") | ||
at = ActionType.objects.get(name="block") | ||
|
||
WebSocketMessage = apps.get_model("route_manager", "WebSocketMessage") | ||
wsm = WebSocketMessage(msg_type="translator_add", msg_data_route_field="route") | ||
wsm.save() | ||
|
||
WebSocketSequenceElement = apps.get_model("route_manager", "WebSocketSequenceElement") | ||
wsse = WebSocketSequenceElement(websocketmessage=wsm, verb="A", action_type=at) | ||
wsse.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("route_manager", "0027_websocketmessage_websocketsequenceelement"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(create), | ||
] |
22 changes: 22 additions & 0 deletions
22
scram/route_manager/migrations/0029_alter_websocketmessage_msg_data_route_field.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,22 @@ | ||
# Generated by Django 3.2.13 on 2024-01-09 16:45 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("route_manager", "0028_default_websocket_messages"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="websocketmessage", | ||
name="msg_data_route_field", | ||
field=models.CharField( | ||
default="route", | ||
max_length=25, | ||
verbose_name="The key in the JSON payload whose value will contain the route being acted on.", | ||
), | ||
), | ||
] |
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.