Skip to content

Commit

Permalink
Baselined from internal Repository
Browse files Browse the repository at this point in the history
last_commit:7a437edb2ec5d7003a8748650cd7169571fc9a96
  • Loading branch information
GVE Devnet Admin committed Jan 8, 2024
1 parent c0051f7 commit 4b1501f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions flask_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ def deploy_templates():
# Convert JSON string to Python list of dictionaries
template_selections = json.loads(data)

# Calculate progress increment (100 / length floored)
progress_inc = 100 // len(template_selections)
# Calculate progress increment
progress_inc = 100 / float(len(template_selections))

threads = []
# Iterate through table selections for baseline and exception templates
Expand Down
5 changes: 3 additions & 2 deletions flask_app/templates/deploy_templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@ <h5 class="display-5">Deploy Template(s)</h5>
const response = await fetch('/progress');
const data = await response.json();

console.log(data.progress)
// Floor the progress value
const flooredProgress = Math.floor(data.progress);

updateProgressBar(data.progress);
updateProgressBar(flooredProgress);

// Continue checking progress unless it has reached 100%
if (data.progress < 100) {
Expand Down

0 comments on commit 4b1501f

Please sign in to comment.