Skip to content

Commit 2a8ea19

Browse files
committed
UI: Alphabetically sort actions and limits menus, and tweak limit dialog.
1 parent f74f7fe commit 2a8ea19

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

htdocs/js/pages/PageUtils.class.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,13 +1461,13 @@ Page.PageUtils = class PageUtils extends Page.Base {
14611461
var btn = (idx > -1) ? ['check-circle', "Accept"] : ['plus-circle', "Add Limit"];
14621462

14631463
if (!limit) {
1464-
if (!find_object(this.limits, { type: 'time' })) limit = { type: 'time' };
1465-
else if (!find_object(this.limits, { type: 'job' })) limit = { type: 'job' };
1464+
if (!find_object(this.limits, { type: 'job' })) limit = { type: 'job' };
1465+
else if (!find_object(this.limits, { type: 'queue' })) limit = { type: 'queue' };
1466+
else if (!find_object(this.limits, { type: 'retry' })) limit = { type: 'retry' };
1467+
else if (!find_object(this.limits, { type: 'time' })) limit = { type: 'time' };
14661468
else if (!find_object(this.limits, { type: 'log' })) limit = { type: 'log' };
14671469
else if (!find_object(this.limits, { type: 'mem' })) limit = { type: 'mem' };
14681470
else if (!find_object(this.limits, { type: 'cpu' })) limit = { type: 'cpu' };
1469-
else if (!find_object(this.limits, { type: 'retry' })) limit = { type: 'retry' };
1470-
else if (!find_object(this.limits, { type: 'queue' })) limit = { type: 'queue' };
14711471
else if (!find_object(this.limits, { type: 'file' })) limit = { type: 'file' };
14721472
else limit = { type: 'day' };
14731473
limit.enabled = true;

internal/ui.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,32 +1223,32 @@
12231223
{ "id": "alert_cleared", "title": "Alert Cleared", "icon": "check-circle-outline" }
12241224
],
12251225

1226-
"action_type_menu": [
1227-
{ "id": "email", "title": "Send Email", "icon": "email-arrow-right-outline" },
1228-
{ "id": "web_hook", "title": "Web Hook", "icon": "webhook" },
1229-
{ "id": "run_event", "title": "Run Event", "icon": "calendar-clock" },
1226+
"action_type_menu": [
1227+
{ "id": "tag", "title": "Apply Tags", "icon": "tag-plus-outline" },
1228+
{ "id": "ticket", "title": "Create Ticket", "icon": "text-box-plus-outline" },
1229+
{ "id": "delete", "title": "Delete Event", "icon": "trash-can-outline" },
1230+
{ "id": "disable", "title": "Disable Event", "icon": "cancel" },
1231+
{ "id": "fetch", "title": "Fetch Bucket", "icon": "export" },
12301232
{ "id": "channel", "title": "Notify Channel", "icon": "bullhorn-outline" },
1231-
{ "id": "snapshot", "title": "Take Snapshot", "icon": "monitor-screenshot" },
1233+
{ "id": "plugin", "title": "Plugin", "icon": "power-plug" },
1234+
{ "id": "run_event", "title": "Run Event", "icon": "calendar-clock" },
1235+
{ "id": "email", "title": "Send Email", "icon": "email-arrow-right-outline" },
12321236
{ "id": "store", "title": "Store Bucket", "icon": "import" },
1233-
{ "id": "fetch", "title": "Fetch Bucket", "icon": "export" },
1234-
{ "id": "ticket", "title": "Create Ticket", "icon": "text-box-plus-outline" },
12351237
{ "id": "suspend", "title": "Suspend Job", "icon": "motion-pause-outline" },
1236-
{ "id": "tag", "title": "Apply Tags", "icon": "tag-plus-outline" },
1237-
{ "id": "disable", "title": "Disable Event", "icon": "cancel" },
1238-
{ "id": "delete", "title": "Delete Event", "icon": "trash-can-outline" },
1239-
{ "id": "plugin", "title": "Plugin", "icon": "power-plug" }
1238+
{ "id": "snapshot", "title": "Take Snapshot", "icon": "monitor-screenshot" },
1239+
{ "id": "web_hook", "title": "Web Hook", "icon": "webhook" }
12401240
],
12411241

1242-
"limit_type_menu": [
1243-
{ "id": "time", "title": "Max Run Time", "icon": "timer-remove-outline" },
1242+
"limit_type_menu": [
12441243
{ "id": "job", "title": "Max Concurrent Jobs", "icon": "traffic-light-outline" },
1245-
{ "id": "log", "title": "Max Output Size", "icon": "file-remove-outline" },
1246-
{ "id": "mem", "title": "Max Memory Limit", "icon": "memory" },
12471244
{ "id": "cpu", "title": "Max CPU % Limit", "icon": "chip" },
1248-
{ "id": "retry", "title": "Max Retry Limit", "icon": "redo-variant" },
1249-
{ "id": "queue", "title": "Max Queue Limit", "icon": "tray-full" },
1245+
{ "id": "day", "title": "Max Daily Limit", "icon": "calendar-cursor-outline" },
12501246
{ "id": "file", "title": "Max File Limit", "icon": "file-multiple-outline" },
1251-
{ "id": "day", "title": "Max Daily Limit", "icon": "calendar-cursor-outline" }
1247+
{ "id": "mem", "title": "Max Memory Limit", "icon": "memory" },
1248+
{ "id": "log", "title": "Max Output Size", "icon": "file-remove-outline" },
1249+
{ "id": "queue", "title": "Max Queue Limit", "icon": "tray-full" },
1250+
{ "id": "retry", "title": "Max Retry Limit", "icon": "redo-variant" },
1251+
{ "id": "time", "title": "Max Run Time", "icon": "timer-remove-outline" }
12521252
],
12531253

12541254
"workflow_node_types": [

0 commit comments

Comments
 (0)