diff --git a/horizon/static/framework/widgets/table/hz-dynamic-table.directive.js b/horizon/static/framework/widgets/table/hz-dynamic-table.directive.js
index 1846255c2..57ea305bb 100644
--- a/horizon/static/framework/widgets/table/hz-dynamic-table.directive.js
+++ b/horizon/static/framework/widgets/table/hz-dynamic-table.directive.js
@@ -40,7 +40,7 @@
* @param {function=} resultHandler function that is called with return value
* from a clicked actions perform function passed into `actions` directive (optional)
* @param {function=} itemInTransitionFunction function that is called with each item in
- * the table. If it returns true, the row is given the class "status_unknown" which by
+ * the table. If it returns true, the row is given the class "warning" which by
* default highlights the row with a warning color.
*
* @description
diff --git a/horizon/static/framework/widgets/table/hz-dynamic-table.directive.spec.js b/horizon/static/framework/widgets/table/hz-dynamic-table.directive.spec.js
index cbc278177..88fe27653 100644
--- a/horizon/static/framework/widgets/table/hz-dynamic-table.directive.spec.js
+++ b/horizon/static/framework/widgets/table/hz-dynamic-table.directive.spec.js
@@ -75,7 +75,7 @@
"")($scope);
$scope.$digest();
// 3 items in table, only one with ID that will return true from itemInTransitionFunc
- expect(element.find("tr.status_unknown").length).toBe(1);
+ expect(element.find("tr.warning").length).toBe(1);
});
});
diff --git a/horizon/static/framework/widgets/table/hz-dynamic-table.html b/horizon/static/framework/widgets/table/hz-dynamic-table.html
index a6c8999e7..71123a9cf 100644
--- a/horizon/static/framework/widgets/table/hz-dynamic-table.html
+++ b/horizon/static/framework/widgets/table/hz-dynamic-table.html
@@ -53,7 +53,7 @@
-->
+ 'warning': itemInTransitionFunction(item)}">
diff --git a/horizon/static/framework/widgets/table/table.scss b/horizon/static/framework/widgets/table/table.scss
index 5539fdc22..4366d44f0 100644
--- a/horizon/static/framework/widgets/table/table.scss
+++ b/horizon/static/framework/widgets/table/table.scss
@@ -158,10 +158,6 @@ $em-per-priority: floor($table-col-avg-width / $font-size-base) * 3;
+ .detail-row > td {
background-color: $table-bg-accent;
}
-
- &.status_unknown td {
- background-color: lighten($brand-warning, 10%);
- }
}
&,
@@ -174,11 +170,6 @@ $em-per-priority: floor($table-col-avg-width / $font-size-base) * 3;
+ tr.detail-row td {
background-color: transparent;
}
-
- &.status_unknown td {
- background-color: lighten($brand-warning, 6%);
-
- }
}
}
}
diff --git a/horizon/static/horizon/js/horizon.tables.js b/horizon/static/horizon/js/horizon.tables.js
index 6005c7cb7..9d6bea53f 100644
--- a/horizon/static/horizon/js/horizon.tables.js
+++ b/horizon/static/horizon/js/horizon.tables.js
@@ -1,7 +1,7 @@
/* Namespace for core functionality related to DataTables. */
horizon.datatables = {
update: function () {
- var $rows_to_update = $('tr.status_unknown.ajax-update');
+ var $rows_to_update = $('tr.warning.ajax-update');
var $table = $rows_to_update.closest('table');
var interval = $rows_to_update.attr('data-update-interval');
var decay_constant = $table.attr('decay_constant');
@@ -63,7 +63,7 @@ horizon.datatables = {
success: function (data) {
var $new_row = $(data);
- if ($new_row.hasClass('status_unknown')) {
+ if ($new_row.hasClass('warning')) {
var $container = $(document.createElement('div'))
.addClass('progress-text horizon-loading-bar');
@@ -82,7 +82,7 @@ horizon.datatables = {
.addClass('fa fa-question-circle progress-bar-text')
.appendTo($container);
}
- $new_row.find("td.status_unknown:last").prepend($container);
+ $new_row.find("td.warning:last").prepend($container);
}
// Only replace row if the html content has changed
diff --git a/horizon/tables/base.py b/horizon/tables/base.py
index c4a92655a..df17123a6 100644
--- a/horizon/tables/base.py
+++ b/horizon/tables/base.py
@@ -797,7 +797,7 @@ class Cell(html.HTMLElement):
elif status is False:
return "status_down"
else:
- return "status_unknown"
+ return "warning"
def get_default_classes(self):
"""Returns a flattened string of the cell's CSS classes."""
@@ -1790,7 +1790,7 @@ class DataTable(object):
elif status is False:
return "status_down"
else:
- return "status_unknown"
+ return "warning"
def get_columns(self):
"""Returns this table's columns including auto-generated ones."""
diff --git a/horizon/test/tests/tables.py b/horizon/test/tests/tables.py
index be073d210..19028290f 100644
--- a/horizon/test/tests/tables.py
+++ b/horizon/test/tests/tables.py
@@ -591,7 +591,7 @@ class DataTableTests(test.TestCase):
row.cells['id'].get_status_class(cell_status))
cell_status = row3.cells['id'].status
self.assertIsNone(cell_status)
- self.assertEqual('status_unknown',
+ self.assertEqual('warning',
row.cells['id'].get_status_class(cell_status))
# Ensure data is not cached on the column across table instances
diff --git a/openstack_dashboard/static/dashboard/scss/components/_tables.scss b/openstack_dashboard/static/dashboard/scss/components/_tables.scss
index 3b19289bf..254de75cf 100644
--- a/openstack_dashboard/static/dashboard/scss/components/_tables.scss
+++ b/openstack_dashboard/static/dashboard/scss/components/_tables.scss
@@ -116,19 +116,11 @@
td {
background-color: $table-bg-odd;
}
-
- &.status_unknown td {
- background-color: lighten($brand-warning, 6%);
- }
}
tr.even {
td {
background-color: inherit;
}
-
- &.status_unknown td {
- background-color: lighten($brand-warning, 10%);
- }
}
// Hover stuffs!
@@ -137,11 +129,6 @@
tr:hover th {
background-color: $table-bg-hover;
}
-
- tr.odd.status_unknown:hover td,
- tr.even.status_unknown:hover td {
- background-color: lighten($brand-warning, 6%);
- }
}
// Force Table Fixed
diff --git a/openstack_dashboard/themes/default/_variables.scss b/openstack_dashboard/themes/default/_variables.scss
index eee39f974..534350955 100644
--- a/openstack_dashboard/themes/default/_variables.scss
+++ b/openstack_dashboard/themes/default/_variables.scss
@@ -24,7 +24,7 @@ $gray-lighter: lighten(#000, 93.5%) !default; // #eee
$brand-primary: #428bca !default;
$brand-success: #5cb85c !default;
$brand-info: #5bc0de !default;
-$brand-warning: #fdd835 !default;
+$brand-warning: #f0ad4e !default;
$brand-danger: #d9534f !default;
diff --git a/releasenotes/notes/table-row-warning-class-2fdb3434440d0c22.yaml b/releasenotes/notes/table-row-warning-class-2fdb3434440d0c22.yaml
new file mode 100644
index 000000000..d56b304e9
--- /dev/null
+++ b/releasenotes/notes/table-row-warning-class-2fdb3434440d0c22.yaml
@@ -0,0 +1,4 @@
+---
+upgrade:
+ - The ``status_unknown`` table row class has been replaced with
+ the default bootstrap ``warning`` class.
|