Skip to content

Commit 8888028

Browse files
authored
Merge pull request #6597 from opsmill/pog-action-menu-order-weights
Switch order weights in action schema
2 parents 87ecf26 + e05469b commit 8888028

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

backend/infrahub/actions/schema.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@
2828
kind="Text",
2929
description="The name of the trigger rule",
3030
unique=True,
31-
order_weight=1000,
31+
order_weight=100,
3232
),
3333
Attr(
3434
name="description",
3535
kind="Text",
3636
description="A longer description to define the purpose of this trigger",
3737
optional=True,
38-
order_weight=2000,
38+
order_weight=200,
3939
),
4040
Attr(
4141
name="active",
4242
kind="Boolean",
4343
description="Indicates if this trigger is enabled or if it's just prepared, could be useful as you are setting up a trigger",
4444
optional=False,
4545
default_value=True,
46-
order_weight=2000,
46+
order_weight=200,
4747
),
4848
Attr(
4949
name="branch_scope",
@@ -52,7 +52,7 @@
5252
choices=BranchScope.available_types(),
5353
default_value=BranchScope.DEFAULT_BRANCH.value.name,
5454
optional=False,
55-
order_weight=2000,
55+
order_weight=200,
5656
allow_override=AllowOverrideType.NONE,
5757
),
5858
],
@@ -65,7 +65,7 @@
6565
kind=RelKind.ATTRIBUTE,
6666
cardinality=Cardinality.ONE,
6767
optional=False,
68-
order_weight=10000,
68+
order_weight=1000,
6969
),
7070
],
7171
)
@@ -89,14 +89,14 @@
8989
description="Short descriptive name",
9090
kind="Text",
9191
unique=True,
92-
order_weight=1000,
92+
order_weight=100,
9393
),
9494
Attr(
9595
name="description",
9696
description="A detailed description of the action",
9797
kind="Text",
9898
optional=True,
99-
order_weight=2000,
99+
order_weight=200,
100100
),
101101
],
102102
relationships=[
@@ -108,7 +108,7 @@
108108
cardinality=Cardinality.MANY,
109109
identifier="core_action__core_triggerrule",
110110
optional=True,
111-
order_weight=10000,
111+
order_weight=1000,
112112
),
113113
],
114114
)
@@ -132,7 +132,7 @@
132132
cardinality=Cardinality.ONE,
133133
optional=False,
134134
identifier="core_node_trigger_match__core_trigger_rule",
135-
order_weight=10000,
135+
order_weight=1000,
136136
),
137137
],
138138
)
@@ -161,7 +161,7 @@
161161
cardinality=Cardinality.ONE,
162162
identifier="core_generator_action__generator_definition",
163163
optional=False,
164-
order_weight=4000,
164+
order_weight=400,
165165
),
166166
],
167167
)
@@ -188,7 +188,7 @@
188188
unique=False,
189189
optional=False,
190190
default_value=True,
191-
order_weight=3000,
191+
order_weight=300,
192192
),
193193
],
194194
relationships=[
@@ -200,7 +200,7 @@
200200
cardinality=Cardinality.ONE,
201201
identifier="core_action__group",
202202
optional=False,
203-
order_weight=4000,
203+
order_weight=400,
204204
),
205205
],
206206
)
@@ -227,7 +227,7 @@
227227
description="The kind of node to match against",
228228
unique=False,
229229
optional=False,
230-
order_weight=3000,
230+
order_weight=300,
231231
),
232232
Attr(
233233
name="mutation_action",
@@ -236,7 +236,7 @@
236236
enum=NodeAction.available_types(),
237237
unique=False,
238238
optional=False,
239-
order_weight=4000,
239+
order_weight=400,
240240
),
241241
],
242242
relationships=[
@@ -248,7 +248,7 @@
248248
cardinality=Cardinality.MANY,
249249
optional=True,
250250
identifier="core_node_trigger_match__core_trigger_rule",
251-
order_weight=8000,
251+
order_weight=800,
252252
),
253253
],
254254
)
@@ -270,23 +270,23 @@
270270
description="The attribue to match against",
271271
unique=False,
272272
optional=False,
273-
order_weight=1000,
273+
order_weight=100,
274274
),
275275
Attr(
276276
name="value",
277277
kind="Text",
278278
description="The value the attribute is updated to",
279279
unique=False,
280280
optional=True,
281-
order_weight=2000,
281+
order_weight=200,
282282
),
283283
Attr(
284284
name="value_previous",
285285
kind="Text",
286286
description="The previous value of the targeted attribute",
287287
unique=False,
288288
optional=True,
289-
order_weight=3000,
289+
order_weight=300,
290290
),
291291
Attr(
292292
name="value_match",
@@ -295,7 +295,7 @@
295295
choices=ValueMatch.available_types(),
296296
default_value=ValueMatch.VALUE.value.name,
297297
optional=False,
298-
order_weight=5000,
298+
order_weight=500,
299299
),
300300
],
301301
relationships=[],
@@ -318,7 +318,7 @@
318318
description="The name of the relationship to match against",
319319
unique=False,
320320
optional=False,
321-
order_weight=1000,
321+
order_weight=100,
322322
),
323323
Attr(
324324
name="added",
@@ -327,15 +327,15 @@
327327
unique=False,
328328
optional=False,
329329
default_value=True,
330-
order_weight=2000,
330+
order_weight=200,
331331
),
332332
Attr(
333333
name="peer",
334334
kind="Text",
335335
description="The node_id of the relationship peer to match against",
336336
unique=False,
337337
optional=True,
338-
order_weight=3000,
338+
order_weight=300,
339339
),
340340
],
341341
relationships=[],
@@ -364,7 +364,7 @@
364364
unique=False,
365365
optional=False,
366366
default_value=True,
367-
order_weight=3000,
367+
order_weight=300,
368368
),
369369
],
370370
relationships=[
@@ -376,7 +376,7 @@
376376
cardinality=Cardinality.ONE,
377377
identifier="core_group_trigger__group",
378378
optional=False,
379-
order_weight=4000,
379+
order_weight=400,
380380
),
381381
],
382382
)

0 commit comments

Comments
 (0)