Skip to content

Commit

Permalink
HPCC-29005 ECL Watch DFU workunit list should show timings
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Clements <[email protected]>
  • Loading branch information
jeclrsg committed Jul 5, 2023
1 parent b6f02c5 commit 31e7315
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 9 deletions.
27 changes: 25 additions & 2 deletions esp/src/eclwatch/GetDFUWorkunitsWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,13 @@ define([

initWorkunitsGrid: function () {
var context = this;
var filter = this.filter.toObject();
filter.includeTimings = true;
filter.includeTransferRate = true;
var store = this.params.searchResults ? this.params.searchResults : new ESPDFUWorkunit.CreateWUQueryStore();
this.workunitsGrid = new declare([ESPUtil.Grid(true, true, false, false, "GetDFUWorkunitsWidget")])({
store: store,
query: this.filter.toObject(),
query: filter,
columns: {
col1: selector({
width: 27,
Expand Down Expand Up @@ -418,7 +421,24 @@ define([
domClass.add(node, "justify-right");
node.innerText = Utility.valueCleanUp(object.PercentDone);
}
},
TimeStarted: { label: this.i18n.TimeStarted, width: 150, sortable: true },
TimeStopped: { label: nlsHPCC.TimeStopped, width: 150, sortable: true },
KbPerSec: {
label: nlsHPCC.TransferRate, width: 120,
renderCell: function (object, value, node, options) {
node.innerText = Utility.convertedSize(object.KbPerSec * 1024) + " / sec";
}
},
/*
// KbPerSecAve seems to never be different than KbPerSec at the moment, see HPCC-29894
KbPerSecAve: {
label: nlsHPCC.TransferRateAvg, width: 90,
renderCell: function (object, value, node, options) {
node.innerText = Utility.convertedSize(object.KbPerSecAve * 1024) + " / sec";
}
}
*/
}
}, this.id + "WorkunitsGrid");

Expand Down Expand Up @@ -459,7 +479,10 @@ define([
},

refreshGrid: function (clearSelection) {
this.workunitsGrid.set("query", this.filter.toObject());
var filter = this.filter.toObject();
filter.includeTimings = true;
filter.includeTransferRate = true;
this.workunitsGrid.set("query", filter);
if (clearSelection) {
this.workunitsGrid.clearSelection();
}
Expand Down
1 change: 1 addition & 0 deletions esp/src/src-react/components/DFUWorkunitDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export const DFUWorkunitDetails: React.FunctionComponent<DFUWorkunitDetailsProps
"command": { label: nlsHPCC.Command, type: "string", value: FileSpray.CommandMessages[workunit?.Command], readonly: true },
"state": { label: nlsHPCC.State, type: "string", value: FileSpray.States[workunit?.State], readonly: true },
"timeStarted": { label: nlsHPCC.TimeStarted, type: "string", value: workunit?.TimeStarted, readonly: true },
"secondsLeft": { label: nlsHPCC.SecondsRemaining, type: "number", value: workunit?.SecsLeft, readonly: true },
"timeStopped": { label: nlsHPCC.TimeStopped, type: "string", value: workunit?.TimeStopped, readonly: true },
"percentDone": { label: nlsHPCC.PercentDone, type: "progress", value: workunit?.PercentDone.toString(), readonly: true },
"progressMessage": { label: nlsHPCC.ProgressMessage, type: "string", value: workunit?.ProgressMessage, readonly: true },
Expand Down
33 changes: 26 additions & 7 deletions esp/src/src-react/components/DFUWorkunits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ function formatQuery(_filter): { [id: string]: any } {
if (filter.Type === true) {
filter.Type = "archived workunits";
}
filter.includeTimings = true;
filter.includeTransferRate = true;
return filter;
}

Expand Down Expand Up @@ -92,7 +94,7 @@ export const DFUWorkunits: React.FunctionComponent<DFUWorkunitsProps> = ({
}),
isProtected: {
headerIcon: "LockSolid",
width: 25,
width: 18,
sortable: false,
formatter: React.useCallback(function (_protected) {
if (_protected === true) {
Expand All @@ -103,7 +105,7 @@ export const DFUWorkunits: React.FunctionComponent<DFUWorkunitsProps> = ({
},
ID: {
label: nlsHPCC.ID,
width: 180,
width: 130,
formatter: React.useCallback(function (ID, idx) {
const wu = ESPDFUWorkunit.Get(ID);
return <>
Expand All @@ -115,7 +117,7 @@ export const DFUWorkunits: React.FunctionComponent<DFUWorkunitsProps> = ({
},
Command: {
label: nlsHPCC.Type,
width: 117,
width: 110,
formatter: React.useCallback(function (command) {
if (command in FileSpray.CommandMessages) {
return FileSpray.CommandMessages[command];
Expand All @@ -124,15 +126,32 @@ export const DFUWorkunits: React.FunctionComponent<DFUWorkunitsProps> = ({
}, [])
},
User: { label: nlsHPCC.Owner, width: 90 },
JobName: { label: nlsHPCC.JobName, width: 500 },
ClusterName: { label: nlsHPCC.Cluster, width: 126 },
StateMessage: { label: nlsHPCC.State, width: 72 },
JobName: { label: nlsHPCC.JobName, width: 220 },
ClusterName: { label: nlsHPCC.Cluster, width: 70 },
StateMessage: { label: nlsHPCC.State, width: 70 },
PCTDone: {
label: nlsHPCC.PctComplete, width: 90, sortable: true,
label: nlsHPCC.PctComplete, width: 80, sortable: true,
formatter: React.useCallback(function (value, row) {
return Utility.valueCleanUp(row.PercentDone);
}, [])
},
TimeStarted: { label: nlsHPCC.TimeStarted, width: 100, sortable: true },
TimeStopped: { label: nlsHPCC.TimeStopped, width: 100, sortable: true },
KbPerSec: {
label: nlsHPCC.TransferRate, width: 90,
formatter: React.useCallback(function (value, row) {
return Utility.convertedSize(row.KbPerSec * 1024) + " / sec";
}, [])
},
/*
// KbPerSecAve seems to never be different than KbPerSec at the moment, see HPCC-29894
KbPerSecAve: {
label: nlsHPCC.TransferRateAvg, width: 90,
formatter: React.useCallback(function (value, row) {
return Utility.convertedSize(row.KbPerSecAve * 1024) + " / sec";
}, [])
}
*/
}
});

Expand Down
2 changes: 2 additions & 0 deletions esp/src/src/nls/hpcc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,8 @@ export = {
TotalSize: "Total Size",
TotalClusterTime: "Total Cluster Time",
ToTime: "To Time",
TransferRate: "Transfer Rate",
TransferRateAvg: "Transfer Rate (Avg)",
TransitionGuide: "Transition Guide",
Text: "Text",
Tree: "Tree",
Expand Down

0 comments on commit 31e7315

Please sign in to comment.