From 03880b05a142507e4cf7dabe5d358f2818bb9937 Mon Sep 17 00:00:00 2001 From: Rahul-538 Date: Wed, 3 Apr 2024 12:45:33 +0530 Subject: [PATCH 1/3] added some new columns to Queued task in Admin --- .../container/Admin/QueuedTasksDetails.jsx | 95 +++++++++---------- 1 file changed, 45 insertions(+), 50 deletions(-) diff --git a/src/ui/pages/container/Admin/QueuedTasksDetails.jsx b/src/ui/pages/container/Admin/QueuedTasksDetails.jsx index 6069a64bd..3ad6b49e8 100644 --- a/src/ui/pages/container/Admin/QueuedTasksDetails.jsx +++ b/src/ui/pages/container/Admin/QueuedTasksDetails.jsx @@ -55,6 +55,16 @@ const QueuedTasksDetails = (props) => { return { uuid:el.uuid, name:el.name, + received:el.received, + sent:el.sent|| "No", + started:el.started, + rejected:el.rejected|| "No", + succeeded:el.succeeded, + failed:el.failed || "No", + exception:el.exception || "No", + traceback:el.traceback|| "No", + worker:el.worker, + result:el.result, state:el.state, args:el.args, args:el.kwargs, @@ -91,56 +101,41 @@ const QueuedTasksDetails = (props) => { }); }; - const columns = [ - { - name: "uuid", - label: "Id", - options: { - display: false, - filter: false, - sort: false, - align: "center", - }, - }, - { - name: "name", - label: "Name", - options: { - filter: false, - sort: false, - align: "center", - }, - }, - { - name: "state", - label: "State", - options: { - filter: false, - sort: false, - align: "center", - }, - }, - { - name: "args", - label: "Args", - options: { - filter: false, - sort: false, - align: "center", - setCellProps: () => ({ style: { paddingLeft: "30px" } }), - }, - }, - { - name: "kwargs", - label: "KwArgs", - options: { - filter: false, - sort: false, - align: "center", - setCellProps: () => ({ style: { paddingLeft: "30px" } }), - }, - }, - ]; + const defaultOptions = { + filter: false, + sort: false, + align: "center", + setCellProps: () => ({ style: { paddingLeft: "30px" } }), +}; + +function createColumn(name, label, options = {}) { + return { + name, + label, + options: { + ...defaultOptions, + ...options + } + }; +} + +const columns = [ + createColumn("uuid", "Id", { display: true }), + createColumn("name", "Name"), + createColumn("state", "State"), + createColumn("args", "Args"), + createColumn("kwargs", "KwArgs"), + createColumn("received", "Received", { display: true }), + createColumn("sent", "Sent", { display: true }), + createColumn("started", "Started", { display: true }), + createColumn("rejected", "Rejected", { display: true }), + createColumn("succeeded", "Succeeded", { display: true }), + createColumn("failed", "Failed", { display: true }), + createColumn("exception", "Exception", { display: true }), + createColumn("traceback", "Traceback", { display: true }), + createColumn("worker", "Worker", { display: true }), + createColumn("result", "Result", { display: true }), +]; const options = { textLabels: { From ed5057a9b0d1bd6a4d7abec8e77b6a89aa5f9b87 Mon Sep 17 00:00:00 2001 From: Kartik Virendra Rajput <88619994+kartikvirendrar@users.noreply.github.com> Date: Thu, 4 Apr 2024 14:11:22 +0530 Subject: [PATCH 2/3] sorted labels alphabetically --- .../container/Label-Studio/labelConfigJSX.js | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/ui/pages/container/Label-Studio/labelConfigJSX.js b/src/ui/pages/container/Label-Studio/labelConfigJSX.js index d60c97dde..d9faec984 100644 --- a/src/ui/pages/container/Label-Studio/labelConfigJSX.js +++ b/src/ui/pages/container/Label-Studio/labelConfigJSX.js @@ -4,48 +4,48 @@ export const labelConfigJS = ` hotkey="shift+f" minlength="0" placeholder="Filter Labels" /> - From 3ccd264a596969c7d282455accfee0059af6945d Mon Sep 17 00:00:00 2001 From: Kartik Virendra Rajput <88619994+kartikvirendrar@users.noreply.github.com> Date: Fri, 5 Apr 2024 19:10:27 +0530 Subject: [PATCH 3/3] made color of figure label more evident --- src/ui/pages/container/Label-Studio/labelConfigJSX.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/pages/container/Label-Studio/labelConfigJSX.js b/src/ui/pages/container/Label-Studio/labelConfigJSX.js index d9faec984..eb0a567cb 100644 --- a/src/ui/pages/container/Label-Studio/labelConfigJSX.js +++ b/src/ui/pages/container/Label-Studio/labelConfigJSX.js @@ -10,7 +10,7 @@ export const labelConfigJS = `