Use standard styling for quotameter; this fixes danger/warning/success indicators and visibility.

This commit is contained in:
Dannon Baker
2018-05-04 11:23:13 -04:00
parent 96dcf54c43
commit 6bb5fa02fc
3 changed files with 8 additions and 6 deletions
@@ -1,6 +1,10 @@
import * as Backbone from "backbone";
import * as _ from "underscore";
import baseMVC from "mvc/base-mvc";
import _l from "utils/localization";
/* global $ */
var logNamespace = "user";
//==============================================================================
/** @class View to display a user's disk/storage usage
@@ -68,7 +72,7 @@ var UserQuotaMeter = Backbone.View.extend(baseMVC.LoggableMixin).extend(
// OVER QUOTA: color the quota bar and show the quota error message
if (this.isOverQuota()) {
//this.log( '\t over quota' );
$bar.attr("class", "progress-bar progress-bar-danger");
$bar.attr("class", "progress-bar bg-danger");
$meter.find(".quota-meter-text").css("color", "white");
//TODO: only trigger event if state has changed
this.trigger("quota:over", modelJson);
@@ -76,13 +80,13 @@ var UserQuotaMeter = Backbone.View.extend(baseMVC.LoggableMixin).extend(
// APPROACHING QUOTA: color the quota bar
} else if (percent >= this.options.warnAtPercent) {
//this.log( '\t approaching quota' );
$bar.attr("class", "progress-bar progress-bar-warning");
$bar.attr("class", "progress-bar bg-warning");
//TODO: only trigger event if state has changed
this.trigger("quota:under quota:under:approaching", modelJson);
// otherwise, hide/don't use the msg box
} else {
$bar.attr("class", "progress-bar progress-bar-success");
$bar.attr("class", "progress-bar bg-success");
//TODO: only trigger event if state has changed
this.trigger("quota:under quota:under:ok", modelJson);
}
-1
View File
@@ -492,7 +492,6 @@ div.unified-panel-body-background {
right: 8px;
height: 16px;
width: 100px;
background-color: $progress-bg;
}
.quota-meter-bar {
+1 -2
View File
@@ -12824,8 +12824,7 @@ div.unified-panel-body-background {
top: 8px;
right: 8px;
height: 16px;
width: 100px;
background-color: #e9ecef; }
width: 100px; }
.quota-meter-bar {
position: absolute;