Skip to content

Commit

Permalink
Swap alert + error colours for v5 ECL Watch
Browse files Browse the repository at this point in the history
Update warning messages
Switch to Alert from Critical in v9 ECL Watch
  • Loading branch information
GordonSmith committed Nov 22, 2023
1 parent d810695 commit e9fc442
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
5 changes: 4 additions & 1 deletion esp/src/eclwatch/HPCCPlatformWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,17 @@ define([
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;
const message = nlsHPCC.PlatformIsNNNDaysOld.replace("NNN", `${age}`);
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";
}
Expand Down
6 changes: 3 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;";
} else if (severity === "Alert") {
row.customStyles += "background-color: #fe8147;";
} else if (severity === "Alert") {
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
6 changes: 3 additions & 3 deletions esp/src/eclwatch/css/hpcc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1658,15 +1658,15 @@ margin-left:-20px;
}

.dijitToasterWarning .dijitToasterContent {
background: rgb(255, 238, 0);
background: #ffee00;
}

.dijitToasterError .dijitToasterContent {
background: rgb(255, 30, 0);
background: #fe8147;
}

.dijitToasterAlert .dijitToasterContent {
background: #fe8147;
background: #ff1e00;
}

/* imported from dijit.css */
Expand Down
8 changes: 4 additions & 4 deletions esp/src/src-react/components/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ export const DevTitle: React.FunctionComponent<DevTitleProps> = ({
React.useEffect(() => {
if (!features.timestamp) return;
const age = Math.floor((Date.now() - features.timestamp.getTime()) / DAY);
const message = nlsHPCC.PlatformIsNNNDaysOld.replace("NNN", `${age}`);
const message = nlsHPCC.PlatformBuildIsNNNDaysOld.replace("NNN", `${age}`);
if (age > 90) {
logger.critical(message);
logger.alert(message + ` ${nlsHPCC.PleaseUpgradeToLaterPointRelease}`);
} else if (age > 60) {
logger.error(message);
logger.error(message + ` ${nlsHPCC.PleaseUpgradeToLaterPointRelease}`);
} else if (age > 30) {
logger.warning(message);
logger.warning(message + ` ${nlsHPCC.PleaseUpgradeToLaterPointRelease}`);
} else {
logger.info(message);
}
Expand Down
3 changes: 2 additions & 1 deletion esp/src/src/nls/hpcc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,12 @@ export = {
PlaceholderFirstName: "John",
PlaceholderLastName: "Smith",
Platform: "Platform",
PlatformIsNNNDaysOld: "Platform is NNN days old",
PlatformBuildIsNNNDaysOld: "Platform build is NNN days old.",
Playground: "Playground",
PleaseEnableCookies: "This site uses cookies. To see how cookies are used, please review our cookie notice. If you agree to our use of cookies, please continue to use our site.",
PleaseLogIntoECLWatch: "Please log into ECL Watch",
PleasePickADefinition: "Please pick a definition",
PleaseUpgradeToLaterPointRelease: "Please upgrade to a later point release.",
PleaseSelectAGroupToAddUser: "Please select a group to add the user to",
PleaseSelectAUserOrGroup: "Please select a user or a group along with a file name",
PleaseSelectAUserToAdd: "Please select a user to add",
Expand Down

0 comments on commit e9fc442

Please sign in to comment.