Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-9.2.x' into candidate-…
Browse files Browse the repository at this point in the history
…9.4.x

Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
  • Loading branch information
GordonSmith committed Nov 23, 2023
2 parents 78756ac + 00cdee3 commit 587ed92
Show file tree
Hide file tree
Showing 26 changed files with 1,266 additions and 306 deletions.
28 changes: 27 additions & 1 deletion esp/src/eclwatch/HPCCPlatformWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ define([
"src/react/index",
"src-react/components/About",
"src-react/components/controls/ComingSoon",
"src-react/hooks/platform",

"hpcc/_TabContainerWidget",
"src/ESPRequest",
Expand Down Expand Up @@ -74,7 +75,7 @@ define([
], function (declare, lang, nlsHPCCMod, arrayUtil, dom, domConstruct, domClass, domForm, domStyle, domGeo, cookie, query, topic, xhr,
registry, Tooltip,
UpgradeBar, ColorPicker,
CodeMirror, srcReact, AboutModule, ComingSoonModule,
CodeMirror, srcReact, AboutModule, ComingSoonModule, platformModule,
_TabContainerWidget, ESPRequest, ESPActivity, ESPUtil, WsAccount, WsAccess, WsSMC, WsTopology, WsMachine, LockDialogWidget, EnvironmentTheme, Utility,
template,

Expand Down Expand Up @@ -162,6 +163,31 @@ define([
/* */
var teaserNode = dom.byId(this.id + "teaser");
srcReact.render(ComingSoonModule.ComingSoon, { style: { color: "white" } }, teaserNode);

const DAY = 1000 * 60 * 60 * 24;
platformModule.fetchCheckFeatures().then(function (features) {
if (!features || !features.BuildTagTimestamp) return;
const age = features.BuildTagTimestamp ? Math.floor((Date.now() - new Date(features.BuildTagTimestamp).getTime()) / DAY) : 0;
let message = nlsHPCC.PlatformBuildIsNNNDaysOld.replace("NNN", `${age}`);
let severity = "Info";
if (age > 90) {
severity = "Alert";
message += ` ${nlsHPCC.PleaseUpgradeToLaterPointRelease}`;
} else if (age > 60) {
severity = "Error";
message += ` ${nlsHPCC.PleaseUpgradeToLaterPointRelease}`;
} else if (age > 30) {
severity = "Warning";
message += ` ${nlsHPCC.PleaseUpgradeToLaterPointRelease}`;
} else {
severity = "Info";
}
dojo.publish("hpcc/brToaster", {
Severity: severity,
Source: "eclwatch/HPCCPlatformWidget.js",
Exceptions: [{ Source: "", Message: message }]
});
});
},

// Implementation ---
Expand Down
7 changes: 4 additions & 3 deletions esp/src/eclwatch/InfoGridWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,11 @@ define([
if (item) {
var severity = this.store.getValue(item, "Severity", null);
if (severity === "Error") {
row.customStyles += "background-color: red;";
row.customStyles += "background-color: #fe8147;";
} else if (severity === "Alert") {
row.customStyles += "background-color: #febe47;";
row.customStyles += "background-color: #ff1e00;";
} else if (severity === "Warning") {
row.customStyles += "background-color: yellow;";
row.customStyles += "background-color: #ffee00;";
}
}
this.infoGrid.focus.styleRow(row);
Expand Down Expand Up @@ -337,6 +337,7 @@ define([
break;
case "Alert":
this._counts.alert++;
this._counts.errorWarning++;
if (errorChecked) {
data.push(item);
}
Expand Down
17 changes: 14 additions & 3 deletions esp/src/eclwatch/css/hpcc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1697,19 +1697,30 @@ table.miniSelect span {
color: #fff;
}

.dijitToasterWarning,
.dijitToasterAlert,
.dijitToasterWarning {
font-weight: bold;
}

.dijitToasterError,
.dijitToasterFatal {
font-weight: bold;
color: #fff;
.dijitToasterFatal {
font-weight: bold;
color: #fff;
}

.dijitToasterWarning .dijitToasterContent {
background: #d4d943;
background: #ffee00;
}

.dijitToasterError .dijitToasterContent {
background: #c46600;
background: #fe8147;
}

.dijitToasterAlert .dijitToasterContent {
background: #ff1e00;
}

/* imported from dijit.css */
Expand Down
Loading

0 comments on commit 587ed92

Please sign in to comment.