Skip to content

Commit

Permalink
Merge pull request #693 from uw-it-aca/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mikeseibel authored Aug 22, 2024
2 parents 9888d6f + 331133b commit 5ffe3d6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions endorsement/dao/shared_drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,13 @@ def reconcile_drive_quota(
sdr, no_subscription_quota=no_subscription_quota
)

if not quota_correct:
logger.info(
f"reconcile: skip set drive for {sdr.shared_drive.drive_id} "
"as the subscription contains no current quota"
)
return

if quota_actual != quota_correct:
# temporary check for prior to ITBill subscription deadline
in_grace_period = (
Expand Down
9 changes: 7 additions & 2 deletions endorsement/static/endorsement/js/handlebars-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ $(window.document).ready(function() {
'or': function(a, b) { return (a || b); },
'not': function(a) { return (!a); },
'numberFormat': function(n) { return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); },
'driveCapacity': function(n) { return (n < 1) ? Math.round(n * 1000).toString().substring(0,3) + 'MB' : (n >= 1000) ? (n/1000) + 'TB' : ((n < 100) ? n.toString().substring(0, (n < 10) ? 4 : 3) : Math.round(n)) + 'GB'; }

'driveCapacity': function(n) {
return (n < 1) ? Math.round(n * 1000) + ' MB' :
(n < 10) ? n.toString().substring(0,3) + ' GB' :
(n < 1000) ? Math.round(n) + ' GB' :
(n < 10000) ? (n/1000).toString().substring(0,3) + ' TB' :
Math.round(n/1000) + ' TB';
}
});
});

0 comments on commit 5ffe3d6

Please sign in to comment.