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 <[email protected]>

# Conflicts:
#	helm/hpcc/Chart.yaml
#	helm/hpcc/templates/_helpers.tpl
#	version.cmake
  • Loading branch information
GordonSmith committed Oct 14, 2024
2 parents 11afe9f + c0c4bc8 commit e572c47
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 8 deletions.
29 changes: 29 additions & 0 deletions esp/src/eclwatch/WUDetailsWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ define([
this.emailFrom = registry.byId(this.id + "EmailFrom");
this.emailSubject = registry.byId(this.id + "EmailSubject");
this.emailBody = registry.byId(this.id + "EmailBody");

//Zap LogFilters
this.logFilterStartDateTime = dom.byId(this.id + "StartDateTime");
this.logFilterStartDate = registry.byId(this.id + "StartDate");
this.logFilterStartTime = registry.byId(this.id + "StartTime");
this.logFilterEndDateTime = dom.byId(this.id + "EndDateTime");
this.logFilterEndDate = registry.byId(this.id + "EndDate");
this.logFilterEndTime = registry.byId(this.id + "EndTime");
this.logFilterRelativeTimeRangeBuffer = registry.byId(this.id + "RelativeTimeRangeBuffer");

this.protected = registry.byId(this.id + "Protected");
this.infoGridWidget = registry.byId(this.id + "InfoContainer");
this.zapDialog = registry.byId(this.id + "ZapDialog");
Expand Down Expand Up @@ -146,14 +156,33 @@ define([
this.checkThorLogStatus();
},

formatLogFilterDateTime: function (dateField, timeField, dateTimeField) {
if (dateField.value.toString() !== "Invalid Date") {
const d = new Date(dateField.value);
const date = `${d.getFullYear()}-${(d.getMonth() < 9 ? "0" : "") + parseInt(d.getMonth() + 1, 10)}-${d.getDate()}`;
const time = timeField.value.toString().replace(/.*1970\s(\S+).*/, "$1");
dateTimeField.value = `${date}T${time}.000Z`;
}
},

_onSubmitDialog: function () {
var context = this;
var includeSlaveLogsCheckbox = this.includeSlaveLogsCheckbox.get("checked");
if (this.logFilterRelativeTimeRangeBuffer.value !== "") {
this.logFilterEndDate.required = "";
this.logFilterStartDate.required = "";
}
if (this.zapForm.validate()) {
//WUCreateAndDownloadZAPInfo is not a webservice so relying on form to submit.
//Server treats "on" and '' as the same thing.
this.includeSlaveLogsCheckbox.set("value", includeSlaveLogsCheckbox ? "on" : "off");

// Log Filters
this.formatLogFilterDateTime(this.logFilterStartDate, this.logFilterStartTime, this.logFilterStartDateTime);
this.formatLogFilterDateTime(this.logFilterEndDate, this.logFilterEndTime, this.logFilterEndDateTime);

this.zapForm.set("action", "/WsWorkunits/WUCreateAndDownloadZAPInfo");

this.zapDialog.hide();
this.checkThorLogStatus();
if (this.logAccessorMessage !== "") {
Expand Down
4 changes: 4 additions & 0 deletions esp/src/eclwatch/css/hpcc.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ form li label {
padding-top: 4px;
}

.dijitDialogPaneContent {
overflow-x: hidden !important;
}

.dijitDialogPaneContent form li label {
float: left;
width: 25%;
Expand Down
37 changes: 35 additions & 2 deletions esp/src/eclwatch/templates/WUDetailsWidget.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ <h2>
<div id="${id}ZapDialog" data-dojo-type="dijit.Dialog" title="${i18n.ZippedAnalysisPackage}">
<div class="dijitDialogPaneContentArea">
<div id="${id}ZapForm" style="width:460px;" method="post" enctype="application/x-www-form-urlencoded" data-dojo-type="dijit.form.Form">
<div data-dojo-props="cols:2" data-dojo-type="hpcc.TableContainer">
<div data-dojo-props="cols:2" style="width:410px" data-dojo-type="hpcc.TableContainer">
<input id="${id}ZapName" title="${i18n.FileName}:" name="ZAPFileName" colspan="2" data-dojo-props="trim: true," data-dojo-type="dijit.form.TextBox" />
<input id="${id}ZapWUID" title="${i18n.WUID}:" name="Wuid" colspan="2" data-dojo-props="trim: true, readonly: true," data-dojo-type="dijit.form.TextBox" />
<input id="${id}BuildVersion" title="${i18n.ESPBuildVersion}:" name="BuildVersion" colspan="2" data-dojo-props="trim: true, readonly: true," data-dojo-type="dijit.form.TextBox" />
Expand All @@ -199,8 +199,41 @@ <h2>
<input id="${id}EmailFrom" title="${i18n.EmailFrom}:" name="EmailFrom" colspan="2" data-dojo-props="trim:true, placeHolder:'See Configuration Manager.'" data-dojo-type="dijit.form.TextBox" />
<input id="${id}EmailSubject" title="${i18n.EmailSubject}:" name="EmailSubject" colspan="2" data-dojo-props="trim:true" data-dojo-type="dijit.form.ValidationTextBox" required="false" />
<input id="${id}EmailBody" title="${i18n.EmailBody}:" name="EmailBody" cols="22" colspan="2" data-dojo-type="dijit.form.SimpleTextarea" />
<input id="${id}StartDateTime" name="LogFilter_AbsoluteTimeRange_StartDate" type="hidden" />
<input id="${id}StartDate" title="${i18n.FromDate}:" name="StartDate" data-dojo-props="trim: true" required="required" data-dojo-type="dijit.form.DateTextBox" />
<input id="${id}StartTime" title="" name="StartTime" data-dojo-props="trim: true" value="T07:30:00" data-dojo-type="dijit.form.TimeTextBox" />
<input id="${id}EndDateTime" name="LogFilter_AbsoluteTimeRange_EndDate" type="hidden" />
<input id="${id}EndDate" title="${i18n.ToDate}:" name="EndDate" data-dojo-props="trim: true" required="required" data-dojo-type="dijit.form.DateTextBox" />
<input id="${id}EndTime" title="" name="EndTime" data-dojo-props="trim: true" value="T19:30:00" data-dojo-type="dijit.form.TimeTextBox" />
<input id="${id}RelativeTimeRangeBuffer" title="${i18n.RelativeTimeRange}" name="LogFilter_RelativeTimeRangeBuffer" colspan="2" data-dojo-type="dijit.form.TextBox" />
<input id="${id}LineLimit" title="${i18n.LogLineLimit}" name="LogFilter_LineLimit" colspan="2" value="10000" data-dojo-type="dijit.form.TextBox" />
<input id="${id}LineStartFrom" title="${i18n.LogLineStartFrom}" name="LogFilter_LineStartFrom" value="0" colspan="2" data-dojo-type="dijit.form.TextBox" />
<select id="${id}SelectColumnMode" title="${i18n.ColumnMode}" name="LogFilter_SelectColumnMode" colspan="2" data-dojo-type="dijit.form.Select">
<option value="0">MIN</option>
<option selected="selected" value="1">DEFAULT</option>
<option value="2">ALL</option>
</select>
<select id="${id}LogFilterFormat" title="${i18n.LogFormat}" name="LogFilter_Format" colspan="2" data-dojo-type="dijit.form.Select">
<option selected="selected" value="csv">CSV</option>
<option value="json">JSON</option>
<option value="xml">XML</option>
</select>
<input id="${id}WildcardFilter" title="${i18n.WildcardFilter}" name="LogFilter_WildcardFilter" colspan="2" data-dojo-type="dijit.form.TextBox" />
<select id="${id}sortByTimeDirection" title="${i18n.Sort} ${i18n.TimeStamp}" name="LogFilter_sortByTimeDirection" colspan="2" data-dojo-type="dijit.form.Select">
<option value="0">ASC</option>
<option selected="selected" value="1">DESC</option>
</select>
<select id="${id}LogEventType" title="${i18n.LogEventType}" name="LogFilter_LogEventType" colspan="2" data-dojo-type="dijit.form.Select">
<option selected="selected" value="ALL">All</option>
<option value="DIS">Disaster</option>
<option value="ERR">Error</option>
<option value="WRN">Warning</option>
<option value="INF">Information</option>
<option value="PRO">Progress</option>
<option value="MET">Metric</option>
</select>
</div>
<div class="dijitDialogPaneActionBar">
<div style="width:410px" class="dijitDialogPaneActionBar">
<button id="${id}onZapSubmit" data-dojo-attach-event="onClick:_onSubmitDialog" type="submit" data-dojo-type="dijit.form.Button">${i18n.Apply}</button>
<button style="float:left" data-dojo-attach-event="onClick:_onCancelDialog" data-dojo-type="dijit.form.Button">${i18n.Cancel}</button>
</div>
Expand Down
13 changes: 7 additions & 6 deletions esp/src/src-react/components/Queries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ export const Queries: React.FunctionComponent<QueriesProps> = ({
headerTooltip: nlsHPCC.ErrorWarnings,
width: 16,
sortable: false,
formatter: (error) => {
if (error > 0) {
formatter: (error, row) => {
if (row.ErrorCount > 0) {
return <Icon iconName="Warning" />;
}
return "";
Expand All @@ -133,8 +133,9 @@ export const Queries: React.FunctionComponent<QueriesProps> = ({
headerTooltip: nlsHPCC.MixedNodeStates,
width: 16,
sortable: false,
formatter: (mixed) => {
if (mixed === true) {
formatter: (mixed, row) => {
const mixedStates = row.Clusters.ClusterQueryState[0]?.MixedNodeStates ?? false;
if (mixedStates === true) {
return <Icon iconName="Error" />;
}
return "";
Expand All @@ -144,8 +145,8 @@ export const Queries: React.FunctionComponent<QueriesProps> = ({
headerIcon: "SkypeCircleCheck",
headerTooltip: nlsHPCC.Active,
width: 16,
formatter: (activated) => {
if (activated === true) {
formatter: (activated, row) => {
if (row.Activated === true) {
return <Icon iconName="SkypeCircleCheck" />;
}
return "";
Expand Down

0 comments on commit e572c47

Please sign in to comment.