summaryrefslogtreecommitdiffstats
path: root/python/gui
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-12 08:37:20 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-12 08:37:20 +0100
commit8ddc109a649899ab6a0b673908186a39c75c8f71 (patch)
tree72f77cb95387513f6d3d982c9dc2ef77829bebae /python/gui
parent5d825e7586814d47f29d3b4324effb36c6acd9ed (diff)
downloaddabmod-8ddc109a649899ab6a0b673908186a39c75c8f71.tar.gz
dabmod-8ddc109a649899ab6a0b673908186a39c75c8f71.tar.bz2
dabmod-8ddc109a649899ab6a0b673908186a39c75c8f71.zip
GUI: add progress bar
Diffstat (limited to 'python/gui')
-rw-r--r--python/gui/static/js/odr-predistortion.js6
-rw-r--r--python/gui/templates/predistortion.html6
2 files changed, 11 insertions, 1 deletions
diff --git a/python/gui/static/js/odr-predistortion.js b/python/gui/static/js/odr-predistortion.js
index 04d2773..739e0ee 100644
--- a/python/gui/static/js/odr-predistortion.js
+++ b/python/gui/static/js/odr-predistortion.js
@@ -29,6 +29,12 @@ function resultrefresh() {
$('#dpdresults').html(summary);
$('#dpdstatus').text(data['state']);
+ var percentage = data['stateprogress'];
+ if (percentage > 100) {
+ percentage = 100;
+ }
+ $('#dpdprogress').css('width', percentage + '%');
+ $('#dpdprogresstext').text(percentage + '%');
});
jqxhr.always(function() {
diff --git a/python/gui/templates/predistortion.html b/python/gui/templates/predistortion.html
index cc5ecb0..f9af2f1 100644
--- a/python/gui/templates/predistortion.html
+++ b/python/gui/templates/predistortion.html
@@ -31,7 +31,11 @@ along with ODR-DabMod. If not, see <http://www.gnu.org/licenses/>.
<div class="panel panel-default">
<div class="panel-heading">Status and calibration</div>
<div class="panel-body">
- <div>Current DPDCE status: <span id="dpdstatus" style="font-weight:bold;">N/A</span>
+ <div>Current DPDCE status:
+ <span id="dpdstatus" style="font-weight:bold;">N/A</span>
+ <div id="dpdprogress" class="progress-bar" role="progressbar" style="width:0%">
+ <span id="dpdprogresstext"></span>
+ </div>
<div class="well well-sm" id="dpdresults">N/A</div>
</div>