Skip to content

Commit

Permalink
Merge pull request #19274 from jeclrsg/hpcc-32866-containerized-unava…
Browse files Browse the repository at this point in the history
…il-tabs

HPCC-32866 ECL Watch disable tabs in containerized envs
  • Loading branch information
GordonSmith authored Nov 7, 2024
2 parents 323c797 + 600fcc1 commit 624d422
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 12 deletions.
19 changes: 15 additions & 4 deletions esp/src/eclwatch/ClusterProcessesQueryWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ define([
"dojo/_base/declare",
"src/nlsHPCC",
"dojo/topic",
"dojo/dom-construct",

"dijit/registry",

Expand All @@ -20,7 +21,7 @@ define([
"hpcc/IFrameWidget",

"dijit/Dialog",
], function (declare, nlsHPCCMod, topic,
], function (declare, nlsHPCCMod, topic, domConstruct,
registry,
tree, selector,
GridDetailsWidget, ESPPreflight, ESPRequest, WsTopology, Utility, ESPUtil, DelayLoadWidget, PreflightDetailsWidget, MachineInformationWidget, IFrameWidget) {
Expand Down Expand Up @@ -50,6 +51,10 @@ define([
style: "border: 0; width: 100%; height: 100%"
});
this.legacyClustersProcessesIframeWidget.placeAt(this._tabContainer, "last");
if (dojoConfig.isContainer) {
const legacyTab = registry.byId(this.id + "_LegacyClustersProcessesIframeWidget");
legacyTab.set("disabled", true);
}
},

init: function (params) {
Expand Down Expand Up @@ -85,9 +90,15 @@ define([
if (currSel.id === this.id + "_Grid") {
this.refreshGrid();
} else if (currSel.id === this.legacyClustersProcessesIframeWidget.id && !this.legacyClustersProcessesIframeWidget.initalized) {
this.legacyClustersProcessesIframeWidget.init({
src: ESPRequest.getBaseURL("WsTopology") + "/TpClusterQuery?Type=ROOT"
});
if (!dojoConfig.isContainer) {
this.legacyClustersProcessesIframeWidget.init({
src: ESPRequest.getBaseURL("WsTopology") + "/TpClusterQuery?Type=ROOT"
});
} else {
const unavailMsg = domConstruct.create("div", { style: { margin: "5px" } });
unavailMsg.innerText = this.i18n.UnavailableInContainerized;
this.legacyClustersProcessesIframeWidget.contentPane.set("content", unavailMsg);
}
} else {
currSel.init(currSel.params);
}
Expand Down
19 changes: 15 additions & 4 deletions esp/src/eclwatch/SystemServersQueryWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ define([
"dojo/_base/array",
"dojo/dom-class",
"dojo/topic",
"dojo/dom-construct",

"dijit/registry",
"dijit/Dialog",
Expand All @@ -21,7 +22,7 @@ define([
"hpcc/PreflightDetailsWidget",
"hpcc/MachineInformationWidget",
"hpcc/IFrameWidget"
], function (declare, nlsHPCCMod, arrayUtil, domClass, topic,
], function (declare, nlsHPCCMod, arrayUtil, domClass, topic, domConstruct,
registry, Dialog,
tree, selector,
GridDetailsWidget, ESPPreflight, ESPRequest, WsTopology, Utility, ESPUtil, DelayLoadWidget, PreflightDetailsWidget, MachineInformationWidget, IFrameWidget) {
Expand Down Expand Up @@ -71,9 +72,15 @@ define([
if (currSel.id === this.id + "_Grid") {
this.refreshGrid();
} else if (currSel.id === this.systemServersQueryWidgetIframeWidget.id && !this.systemServersQueryWidgetIframeWidget.initalized) {
this.systemServersQueryWidgetIframeWidget.init({
src: ESPRequest.getBaseURL("WsTopology") + "/TpServiceQuery?Type=ALLSERVICES"
});
if (!dojoConfig.isContainer) {
this.systemServersQueryWidgetIframeWidget.init({
src: ESPRequest.getBaseURL("WsTopology") + "/TpServiceQuery?Type=ALLSERVICES"
});
} else {
const unavailMsg = domConstruct.create("div", { style: { margin: "5px" } });
unavailMsg.innerText = this.i18n.UnavailableInContainerized;
this.systemServersQueryWidgetIframeWidget.contentPane.set("content", unavailMsg);
}
} else {
currSel.init(currSel.params);
}
Expand Down Expand Up @@ -139,6 +146,10 @@ define([
style: "border: 0; width: 100%; height: 100%"
});
this.systemServersQueryWidgetIframeWidget.placeAt(this._tabContainer, "last");
if (dojoConfig.isContainer) {
const legacyTab = registry.byId(this.id + "_SystemServersQueryWidgetIframeWidget");
legacyTab.set("disabled", true);
}
},

createGrid: function (domID) {
Expand Down
19 changes: 15 additions & 4 deletions esp/src/eclwatch/TargetClustersQueryWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ define([
"dojo/_base/declare",
"src/nlsHPCC",
"dojo/topic",
"dojo/dom-construct",

"dijit/registry",

Expand All @@ -20,7 +21,7 @@ define([
"hpcc/IFrameWidget",

"dijit/Dialog",
], function (declare, nlsHPCCMod, topic,
], function (declare, nlsHPCCMod, topic, domConstruct,
registry,
tree, selector,
GridDetailsWidget, PreflightDetailsWidget, ESPPreflight, ESPRequest, WsTopology, Utility, DelayLoadWidget, ESPUtil, MachineInformationWidget, IFrameWidget) {
Expand Down Expand Up @@ -61,9 +62,15 @@ define([
if (currSel.id === this.id + "_Grid") {
this.refreshGrid();
} else if (currSel.id === this.legacyTargetClustersIframeWidget.id && !this.legacyTargetClustersIframeWidget.initalized) {
this.legacyTargetClustersIframeWidget.init({
src: ESPRequest.getBaseURL("WsTopology") + "/TpTargetClusterQuery?Type=ROOT"
});
if (!dojoConfig.isContainer) {
this.legacyTargetClustersIframeWidget.init({
src: ESPRequest.getBaseURL("WsTopology") + "/TpTargetClusterQuery?Type=ROOT"
});
} else {
const unavailMsg = domConstruct.create("div", { style: { margin: "5px" } });
unavailMsg.innerText = this.i18n.UnavailableInContainerized;
this.legacyTargetClustersIframeWidget.contentPane.set("content", unavailMsg);
}
} else if (currSel.params.newPreflight || currSel.params.Usergenerated) { //prevents loop of pfTab.init above
currSel.init(currSel.params);
}
Expand All @@ -88,6 +95,10 @@ define([
style: "border: 0; width: 100%; height: 100%"
});
this.legacyTargetClustersIframeWidget.placeAt(this._tabContainer, "last");
if (dojoConfig.isContainer) {
const legacyTab = registry.byId(this.id + "_LegacyTargetClustersIframeWidget");
legacyTab.set("disabled", true);
}
this.machineFilter.disable();
},

Expand Down
1 change: 1 addition & 0 deletions esp/src/src/nls/hpcc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,7 @@ export = {
Text: "Text",
Tree: "Tree",
Type: "Type",
UnavailableInContainerized: "This is unavailable in a containerized environment.",
Unbound: "unbound",
undefined: "undefined",
Unknown: "Unknown",
Expand Down

0 comments on commit 624d422

Please sign in to comment.