Skip to content

Commit

Permalink
Merge pull request #2 from hotwax/upstream-sync
Browse files Browse the repository at this point in the history
Upstream sync
  • Loading branch information
dixitdeepak authored Sep 23, 2022
2 parents 4100ef4 + 286c3c3 commit b68746e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ along with this software (see the LICENSE.md file). If not, see
<text-line size="4"/></default-field></field>
<field name="minRetryTime"><default-field title="Min Retry Minutes" tooltip="Min time to retry after error, defaults to 5 minutes">
<text-line size="4"/></default-field></field>
<field name="priority"><default-field tooltip="Lower numbers run first (ascending sort)">
<text-line size="4"/></default-field></field>
<field name="submitButton"><default-field title="Update Job"><submit/></default-field></field>
<field-layout>
<field-ref name="jobName"/><field-ref name="description"/><field-ref name="serviceName"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ along with this software (see the LICENSE.md file). If not, see
<header-field><drop-down allow-empty="true"><option key="Y"/><option key="N"/></drop-down></header-field>
<default-field><display/></default-field>
</field>
<field name="priority">
<header-field show-order-by="true"><!--<range-find size="2"/>--></header-field>
<default-field><display/></default-field>
</field>
<field name="findButton"><header-field title="Find"><submit/></header-field><default-field>
<display text=" "/></default-field></field>
</form-list>
Expand Down
13 changes: 11 additions & 2 deletions base-component/tools/screen/System/dashboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ along with this software (see the LICENSE.md file). If not, see
<set field="runtimeVersionMap" from="ec.factory.versionMap"/>

<set field="workerPool" from="ec.factory.workerPool"/>
<set field="jobWorkerPool" from="ec.service.jobWorkerPool"/>

<set field="esClientList" from="ec.elastic.getClientList()"/>
<set field="esServerInfoList" from="[]"/>
Expand Down Expand Up @@ -60,7 +61,7 @@ along with this software (see the LICENSE.md file). If not, see
<link url="../Print/PrintJob" text="Print Jobs"/>
<link url="../HazelcastInfo" text="Hazelcast"/>
<link url="../ServiceJob/Jobs" text="Service Jobs"/>
<link url="../ServiceJob/JobRuns" text="Jobs Runs"/>
<link url="../ServiceJob/JobRuns" text="Job Runs"/>
</box-body></container-box>
<container-box id="Security"><box-header title="Security"/><box-body>
<link url="../Security/UserAccount" text="Users"/>
Expand Down Expand Up @@ -178,7 +179,15 @@ along with this software (see the LICENSE.md file). If not, see
style="${workerPool.getActiveCount() == workerPool.getMaximumPoolSize() ? 'text-warning' : ''}"/></row-col></container-row>
<container-row><row-col xs="1"/><row-col xs="4"><label text="Queue" type="strong"/></row-col>
<row-col xs="7"><label text="Cur: ${workerPool.queue.size()} Rem: ${workerPool.queue.remainingCapacity()}"
style="workerPool.queue.remainingCapacity() == 0 ? 'text-danger' : (workerPool.queue.size() &gt; workerPool.queue.remainingCapacity() ? 'text-warning' : '')"/></row-col></container-row>
style="${workerPool.queue.remainingCapacity() == 0 ? 'text-danger' : (workerPool.queue.size() &gt; workerPool.queue.remainingCapacity() ? 'text-warning' : '')}"/></row-col></container-row>

<label text="Service Job Pool" type="strong"/>
<container-row><row-col xs="1"/><row-col xs="4"><label text="Threads" type="strong"/></row-col>
<row-col xs="7"><label text="Active: ${jobWorkerPool.getActiveCount()} Cur: ${jobWorkerPool.getPoolSize()} Max: ${jobWorkerPool.getMaximumPoolSize()}"
style="${jobWorkerPool.getActiveCount() == jobWorkerPool.getMaximumPoolSize() ? 'text-warning' : ''}"/></row-col></container-row>
<container-row><row-col xs="1"/><row-col xs="4"><label text="Queue" type="strong"/></row-col>
<row-col xs="7"><label text="Cur: ${jobWorkerPool.queue.size()} Rem: ${jobWorkerPool.queue.remainingCapacity()}"
style="${jobWorkerPool.queue.remainingCapacity() == 0 ? 'text-danger' : (jobWorkerPool.queue.size() &gt; jobWorkerPool.queue.remainingCapacity() ? 'text-warning' : '')}"/></row-col></container-row>
</row-col></container-row>
</box-body><box-body-nopad>
<form-list name="DatasourceList" list="smap.DataSources" skip-form="true">
Expand Down
20 changes: 14 additions & 6 deletions base-component/webroot/screen/webroot/js/WebrootVue.js
Original file line number Diff line number Diff line change
Expand Up @@ -606,12 +606,12 @@ Vue.component('m-form', {
// console.log("changed? " + changed + " node " + targetDom.nodeName + " type " + targetEl.attr("type") + " " + targetEl.attr("name") + " to " + targetDom.value + " default " + targetDom.defaultValue);
// console.log(targetDom.defaultValue);
if (changed) {
this.fieldsChanged[targetEl.attr("name")] = true;
this.$set(this.fieldsChanged, targetEl.attr("name"), true);
targetEl.parents(".form-group").children("label").addClass("is-changed");
targetEl.parents(".form-group").find(".select2-selection").addClass("is-changed");
targetEl.addClass("is-changed");
} else {
this.fieldsChanged[targetEl.attr("name")] = false;
this.$set(this.fieldsChanged, targetEl.attr("name"), false);
targetEl.parents(".form-group").children("label").removeClass("is-changed");
targetEl.parents(".form-group").find(".select2-selection").removeClass("is-changed");
targetEl.removeClass("is-changed");
Expand Down Expand Up @@ -1281,7 +1281,14 @@ moqui.webrootVue = new Vue({
}
},
setParameters: function(parmObj) {
if (parmObj) { this.$root.currentParameters = $.extend({}, this.$root.currentParameters, parmObj); }
if (parmObj) {
this.$root.currentParameters = $.extend({}, this.$root.currentParameters, parmObj);
// no path change so just need to update parameters on most recent history item
var curUrl = this.currentLinkUrl;
var curHistoryItem = this.navHistoryList[0];
curHistoryItem.pathWithParams = curUrl;
window.history.pushState(null, curHistoryItem.title || '', curUrl);
}
this.$root.reloadSubscreens();
},
addSubscreen: function(saComp) {
Expand Down Expand Up @@ -1393,7 +1400,8 @@ moqui.webrootVue = new Vue({

// update history and document.title
var newTitle = (par ? par.title + ' - ' : '') + cur.title;
var curUrl = cur.pathWithParams; var questIdx = curUrl.indexOf("?");
var curUrl = cur.pathWithParams;
var questIdx = curUrl.indexOf("?");
if (questIdx > 0) {
var excludeKeys = ["pageIndex", "orderBySelect", "orderByField", "moquiSessionToken"];
var parmList = curUrl.substring(questIdx+1).split("&");
Expand All @@ -1410,7 +1418,7 @@ moqui.webrootVue = new Vue({
if (eqIdx > 0) {
var key = parm.substring(0, eqIdx);
var value = parm.substring(eqIdx + 1);
if (key.indexOf("_op") > 0 || key.indexOf("_not") > 0 || key.indexOf("_ic") > 0 || excludeKeys.indexOf(key) > 0 || key === value) continue;
if (key.indexOf("_op") > 0 || key.indexOf("_not") > 0 || key.indexOf("_ic") > 0 || excludeKeys.indexOf(key) >= 0 || key === value) continue;
if (titleParms.length > 0) titleParms += ", ";
titleParms += decodeURIComponent(value);
dpCount++;
Expand Down Expand Up @@ -1456,7 +1464,7 @@ moqui.webrootVue = new Vue({
get: function() { return moqui.objToSearch(this.currentParameters); },
set: function(newSearch) { this.currentParameters = moqui.searchToObj(newSearch); }
},
currentLinkUrl: function() { var srch = this.currentSearch; return this.currentLinkPath + (srch.length > 0 ? '?' + srch : ''); },
currentLinkUrl: function() { var search = this.currentSearch; return this.currentLinkPath + (search.length > 0 ? '?' + search : ''); },
basePathSize: function() { return this.basePath.split('/').length - this.appRootPath.split('/').length; },
ScreenTitle: function() { return this.navMenuList.length > 0 ? this.navMenuList[this.navMenuList.length - 1].title : ""; },
documentMenuList: function() {
Expand Down
16 changes: 12 additions & 4 deletions base-component/webroot/screen/webroot/js/WebrootVue.qvt.js
Original file line number Diff line number Diff line change
Expand Up @@ -2134,7 +2134,14 @@ moqui.webrootVue = new Vue({
hash:'', query:this.currentParameters, params:this.bodyParameters||{}, fullPath:this.currentLinkUrl, matched:[] };
},
setParameters: function(parmObj) {
if (parmObj) { this.$root.currentParameters = $.extend({}, this.$root.currentParameters, parmObj); }
if (parmObj) {
this.$root.currentParameters = $.extend({}, this.$root.currentParameters, parmObj);
// no path change so just need to update parameters on most recent history item
var curUrl = this.currentLinkUrl;
var curHistoryItem = this.navHistoryList[0];
curHistoryItem.pathWithParams = curUrl;
window.history.pushState(null, curHistoryItem.title || '', curUrl);
}
this.$root.reloadSubscreens();
},
addSubscreen: function(saComp) {
Expand Down Expand Up @@ -2256,7 +2263,8 @@ moqui.webrootVue = new Vue({

// update history and document.title
var newTitle = (par ? par.title + ' - ' : '') + cur.title;
var curUrl = cur.pathWithParams; var questIdx = curUrl.indexOf("?");
var curUrl = cur.pathWithParams;
var questIdx = curUrl.indexOf("?");
if (questIdx > 0) {
var excludeKeys = ["pageIndex", "orderBySelect", "orderByField", "moquiSessionToken"];
var parmList = curUrl.substring(questIdx+1).split("&");
Expand All @@ -2273,7 +2281,7 @@ moqui.webrootVue = new Vue({
if (eqIdx > 0) {
var key = parm.substring(0, eqIdx);
var value = parm.substring(eqIdx + 1);
if (key.indexOf("_op") > 0 || key.indexOf("_not") > 0 || key.indexOf("_ic") > 0 || excludeKeys.indexOf(key) > 0 || key === value) continue;
if (key.indexOf("_op") > 0 || key.indexOf("_not") > 0 || key.indexOf("_ic") > 0 || excludeKeys.indexOf(key) >= 0 || key === value) continue;
if (titleParms.length > 0) titleParms += ", ";
titleParms += decodeURIComponent(value);
dpCount++;
Expand Down Expand Up @@ -2319,7 +2327,7 @@ moqui.webrootVue = new Vue({
get: function() { return moqui.objToSearch(this.currentParameters); },
set: function(newSearch) { this.currentParameters = moqui.searchToObj(newSearch); }
},
currentLinkUrl: function() { var srch = this.currentSearch; return this.currentLinkPath + (srch.length > 0 ? '?' + srch : ''); },
currentLinkUrl: function() { var search = this.currentSearch; return this.currentLinkPath + (search.length > 0 ? '?' + search : ''); },
basePathSize: function() { return this.basePath.split('/').length - this.appRootPath.split('/').length; },
ScreenTitle: function() { return this.navMenuList.length > 0 ? this.navMenuList[this.navMenuList.length - 1].title : ""; },
documentMenuList: function() {
Expand Down

0 comments on commit b68746e

Please sign in to comment.