Skip to content

Commit

Permalink
1.3.1
Browse files Browse the repository at this point in the history
Changelog:
* Fix bug with 'Task history' widget during running task;
* Fix autoupdate of history_stdout component - leaving of history page during running task.

See merge request polemarch/ce!154
  • Loading branch information
onegreyonewhite committed Jul 8, 2019
2 parents 1a8a110 + 2405636 commit e901e2f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion polemarch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
"VST_ROOT_URLCONF": os.getenv("VST_ROOT_URLCONF", 'vstutils.urls'),
}

__version__ = "1.3.0"
__version__ = "1.3.1"

prepare_environment(**default_settings)
4 changes: 4 additions & 0 deletions polemarch/static/js/pmDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ guiWidgets.history_chart = class HistoryChart extends guiWidgets.line_chart {
let record = stats[index];
let status = record.status.toLowerCase();

if(!data[status]) {
continue;
}

data[status].sum += record.sum;
}

Expand Down
28 changes: 27 additions & 1 deletion polemarch/static/js/pmHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,23 @@ var history_pk_mixin = {
was_cleared: undefined,
}
},

/**
* Redefinition of 'beforeRouteUpdate' hook of view_with_autoupdate_mixin.
*/
beforeRouteUpdate(to, from, next) {
this.stopChildrenAutoUpdate();
this.stopAutoUpdate();
next();
},
/**
* Redefinition of 'beforeRouteUpdate' hook of view_with_autoupdate_mixin.
*/
beforeRouteLeave(to, from, next) {
this.stopChildrenAutoUpdate();
this.stopAutoUpdate();
this.$destroy();
next();
},
computed: {
/**
* Property, that returns inventory field instance from inventory section.
Expand Down Expand Up @@ -273,6 +289,16 @@ var history_pk_mixin = {
}
},
methods: {
/**
* Stops autoupdate of history_stdout component.
*/
stopChildrenAutoUpdate() {
this.$children.forEach(child => {
if(child.stopAutoUpdate && typeof child.stopAutoUpdate == 'function') {
child.stopAutoUpdate();
}
});
},
/**
* Method, that sends API request for cleaning of history stdout.
*/
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ def make_setup(**opts):
kwargs = dict(
name='polemarch',
ext_modules_list=ext_list,
static_exclude_min=[
'polemarch/templates/gui/service-worker.js',
],
install_requires=[
] +
load_requirements('requirements.txt', os.getcwd()),
Expand Down

0 comments on commit e901e2f

Please sign in to comment.