diff --git a/tailbone/templates/themes/falafel/progress.mako b/tailbone/templates/themes/falafel/progress.mako
index f1973e81..ad0a1371 100644
--- a/tailbone/templates/themes/falafel/progress.mako
+++ b/tailbone/templates/themes/falafel/progress.mako
@@ -8,6 +8,7 @@
${initial_msg or "Working"}...
${core_javascript()}
${core_styles()}
+ ${self.extra_styles()}
@@ -61,6 +62,8 @@
+ ${self.after_progress()}
+
@@ -72,23 +75,6 @@
let WholePage = {
template: '#whole-page-template',
- data() {
- return {
- progressURL: '${url('progress', key=progress.key, _query={'sessiontype': progress.session.type})}',
- progressMessage: "${(initial_msg or "Working").replace('"', '\\"')} (please wait)",
- progressMax: null,
- progressMaxDisplay: null,
- progressValue: null,
- stillInProgress: true,
-
- % if can_cancel:
- canCancel: true,
- cancelURL: '${url('progress.cancel', key=progress.key, _query={'sessiontype': progress.session.type})}',
- cancelingProgress: false,
- % endif
- }
- },
-
computed: {
totalDisplay() {
@@ -113,10 +99,15 @@
setTimeout(() => {
this.updateProgress()
}, 1000)
+
+ // custom logic if applicable
+ this.mountedCustom()
},
methods: {
+ mountedCustom() {},
+
updateProgress() {
this.$http.get(this.progressURL).then(response => {
@@ -146,6 +137,9 @@
}
}
+ // custom logic if applicable
+ this.updateProgressCustom(response)
+
if (this.stillInProgress) {
// fetch progress data again, in one second from now
@@ -157,6 +151,8 @@
})
},
+ updateProgressCustom(response) {},
+
% if can_cancel:
cancelProgress() {
@@ -178,13 +174,46 @@
}
}
- Vue.component('whole-page', WholePage)
+ let WholePageData = {
- new Vue({
- el: '#whole-page-app'
- })
+ progressURL: '${url('progress', key=progress.key, _query={'sessiontype': progress.session.type})}',
+ progressMessage: "${(initial_msg or "Working").replace('"', '\\"')} (please wait)",
+ progressMax: null,
+ progressMaxDisplay: null,
+ progressValue: null,
+ stillInProgress: true,
+
+ % if can_cancel:
+ canCancel: true,
+ cancelURL: '${url('progress.cancel', key=progress.key, _query={'sessiontype': progress.session.type})}',
+ cancelingProgress: false,
+ % endif
+ }
+ ${self.modify_whole_page_vars()}
+ ${self.make_whole_page_app()}
+