Skip to content

Commit

Permalink
Merge pull request #6117 from spadgett/pod-status-sr-only
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot committed Dec 1, 2015
2 parents 96a1778 + 58ff7ab commit f95bec5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
3 changes: 3 additions & 0 deletions assets/app/scripts/directives/podStatusChart.js
Expand Up @@ -123,6 +123,9 @@ angular.module('openshiftConsole')
} else {
chart.load(data);
}

// Add to scope for sr-only text.
$scope.podStatusData = data.columns;
}

function countPodPhases() {
Expand Down
7 changes: 5 additions & 2 deletions assets/app/views/_pod-status-chart.html
@@ -1,6 +1,9 @@
<div ng-attr-id="{{chartId}}" class="pod-status-chart"></div>
<!-- Include text values for screen readers -->
<div class="sr-only">
Pod status:
<span ng-repeat="column in chartConfig.data.columns">{{column[1]}} {{column[0]}}</span>
<div ng-if="(pods | hashSize) === 0">No pods.</div>
<div ng-if="(pods | hashSize) !== 0">
Pod status:
<span ng-repeat="column in podStatusData" ng-if="column[1]">{{column[1]}} {{column[0]}}</span>
</div>
</div>
15 changes: 9 additions & 6 deletions pkg/assets/bindata.go
Expand Up @@ -5333,13 +5333,13 @@ function h() {
var c, d = d3.select(g[0]).select("text.c3-chart-arcs-title"), f = b(a.pods);
return d ? (c = angular.isNumber(a.desired) && a.desired !== f ? "scaling to " + a.desired + "..." :1 === f ? "pod" :"pods", d.selectAll("*").remove(), d.insert("tspan").text(f).classed("pod-count donut-title-big-pf", !0).attr("dy", 0).attr("x", 0), void d.insert("tspan").text(c).classed("donut-title-small-pf", !0).attr("dy", 20).attr("x", 0)) :void e.warn("Can't select donut title element");
}
function i(a) {
var c = {
function i(c) {
var d = {
columns:[]
};
angular.forEach(m, function(b) {
c.columns.push([ b, a[b] || 0 ]);
}), 0 === b(a) ? c.columns.push([ "Empty", 1 ]) :c.unload = "Empty", k ? k.load(c) :(l.data.columns = c.columns, k = c3.generate(l));
angular.forEach(m, function(a) {
d.columns.push([ a, c[a] || 0 ]);
}), 0 === b(c) ? d.columns.push([ "Empty", 1 ]) :d.unload = "Empty", k ? k.load(d) :(l.data.columns = d.columns, k = c3.generate(l)), a.podStatusData = d.columns;
}
function j() {
var b = {}, e = function(a) {
Expand Down Expand Up @@ -6353,8 +6353,11 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
"<div ng-attr-id=\"{{chartId}}\" class=\"pod-status-chart\"></div>\n" +
"\n" +
"<div class=\"sr-only\">\n" +
"<div ng-if=\"(pods | hashSize) === 0\">No pods.</div>\n" +
"<div ng-if=\"(pods | hashSize) !== 0\">\n" +
"Pod status:\n" +
"<span ng-repeat=\"column in chartConfig.data.columns\">{{column[1]}} {{column[0]}}</span>\n" +
"<span ng-repeat=\"column in podStatusData\" ng-if=\"column[1]\">{{column[1]}} {{column[0]}}</span>\n" +
"</div>\n" +
"</div>"
);

Expand Down

0 comments on commit f95bec5

Please sign in to comment.