Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-32866 ECL Watch disable tabs in containerized envs #19274

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These dojo components all have two changes: (1) disabling the tab. And (2) because they are still reachable programmatically (eg, directly thru the url) setting the content to a generic message rather than loading the iframe, resulting in that exception from ESP being shown

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
Loading