Skip to content

Commit 6dbbfff

Browse files
committed
Add Empty State Tables for Builds & Routes
-Builds page is without a button because there was not a button previously -Routes page has a button because there was a button previously
1 parent fda7ab7 commit 6dbbfff

File tree

4 files changed

+59
-15
lines changed

4 files changed

+59
-15
lines changed

app/views/browse/routes.html

+16-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,22 @@ <h1>Routes</h1>
2424
<div class="container-fluid">
2525
<div class="row">
2626
<div class="col-md-12 gutter-top">
27-
<table class="table table-bordered table-hover table-mobile">
27+
<div ng-if="(routes | hashSize) == 0" class="blank-slate-pf">
28+
<div class="blank-slate-pf-icon">
29+
<span class="pficon pficon pficon-route"></span>
30+
</div>
31+
<h1>{{emptyMessage}}</h1>
32+
<p>
33+
To create your project's first route select the 'Create Route' button below and follow the on-screen prompts.
34+
</p>
35+
<p>
36+
For more information or to find out why you might be seeing this message, please visit our <a href="#">Openshift Help Center</a>.
37+
</p>
38+
<div class="blank-slate-pf-main-action">
39+
<a ng-href="project/{{project.metadata.name}}/create-route"><button class="btn btn-primary btn-lg"> Create Route </button></a>
40+
</div>
41+
</div>
42+
<table ng-if="(routes | hashSize) !== 0" class="table table-bordered table-hover table-mobile">
2843
<thead>
2944
<tr>
3045
<th>Name</th>

app/views/builds.html

+10-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,16 @@ <h1>Builds</h1>
2121
<div class="container-fluid">
2222
<div class="row">
2323
<div class="col-md-12 gutter-top">
24-
<table class="table table-bordered table-hover table-mobile">
24+
<div ng-if="((buildsByBuildConfig | hashSize) == 0)" class="blank-slate-pf">
25+
<div class="blank-slate-pf-icon">
26+
<span class="pficon pficon pficon-build"></span>
27+
</div>
28+
<h1>{{emptyMessage}}</h1>
29+
<p>
30+
To create your project's first build, please visit our <a href="#">Build Configuration Wizard</a>.
31+
</p>
32+
</div>
33+
<table ng-if="((buildsByBuildConfig | hashSize) !== 0)" class="table table-bordered table-hover table-mobile">
2534
<thead>
2635
<tr>
2736
<th>Name</th>
@@ -32,9 +41,6 @@ <h1>Builds</h1>
3241
<th>Source</th>
3342
</tr>
3443
</thead>
35-
<tbody ng-if="((buildsByBuildConfig | hashSize) == 0)">
36-
<tr><td colspan="6"><em>{{emptyMessage}}</em></td></tr>
37-
</tbody>
3844
<tbody ng-repeat="(buildConfigName, buildConfigBuilds) in buildsByBuildConfig">
3945
<!-- Build config with no builds-->
4046
<tr ng-if="(buildConfigBuilds | hashSize) == 0">

dist/scripts/templates.js

+26-5
Original file line numberDiff line numberDiff line change
@@ -2760,7 +2760,22 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
27602760
"<div class=\"container-fluid\">\n" +
27612761
"<div class=\"row\">\n" +
27622762
"<div class=\"col-md-12 gutter-top\">\n" +
2763-
"<table class=\"table table-bordered table-hover table-mobile\">\n" +
2763+
"<div ng-if=\"(routes | hashSize) == 0\" class=\"blank-slate-pf\">\n" +
2764+
"<div class=\"blank-slate-pf-icon\">\n" +
2765+
"<span class=\"pficon pficon pficon-route\"></span>\n" +
2766+
"</div>\n" +
2767+
"<h1>{{emptyMessage}}</h1>\n" +
2768+
"<p>\n" +
2769+
"To create your project's first route select the 'Create Route' button below and follow the on-screen prompts.\n" +
2770+
"</p>\n" +
2771+
"<p>\n" +
2772+
"For more information or to find out why you might be seeing this message, please visit our <a href=\"#\">Openshift Help Center</a>.\n" +
2773+
"</p>\n" +
2774+
"<div class=\"blank-slate-pf-main-action\">\n" +
2775+
"<a ng-href=\"project/{{project.metadata.name}}/create-route\"><button class=\"btn btn-primary btn-lg\"> Create Route </button></a>\n" +
2776+
"</div>\n" +
2777+
"</div>\n" +
2778+
"<table ng-if=\"(routes | hashSize) !== 0\" class=\"table table-bordered table-hover table-mobile\">\n" +
27642779
"<thead>\n" +
27652780
"<tr>\n" +
27662781
"<th>Name</th>\n" +
@@ -2968,7 +2983,16 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
29682983
"<div class=\"container-fluid\">\n" +
29692984
"<div class=\"row\">\n" +
29702985
"<div class=\"col-md-12 gutter-top\">\n" +
2971-
"<table class=\"table table-bordered table-hover table-mobile\">\n" +
2986+
"<div ng-if=\"((buildsByBuildConfig | hashSize) == 0)\" class=\"blank-slate-pf\">\n" +
2987+
"<div class=\"blank-slate-pf-icon\">\n" +
2988+
"<span class=\"pficon pficon pficon-build\"></span>\n" +
2989+
"</div>\n" +
2990+
"<h1>{{emptyMessage}}</h1>\n" +
2991+
"<p>\n" +
2992+
"To create your project's first build, please visit our <a href=\"#\">Build Configuration Wizard</a>.\n" +
2993+
"</p>\n" +
2994+
"</div>\n" +
2995+
"<table ng-if=\"((buildsByBuildConfig | hashSize) !== 0)\" class=\"table table-bordered table-hover table-mobile\">\n" +
29722996
"<thead>\n" +
29732997
"<tr>\n" +
29742998
"<th>Name</th>\n" +
@@ -2979,9 +3003,6 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
29793003
"<th>Source</th>\n" +
29803004
"</tr>\n" +
29813005
"</thead>\n" +
2982-
"<tbody ng-if=\"((buildsByBuildConfig | hashSize) == 0)\">\n" +
2983-
"<tr><td colspan=\"6\"><em>{{emptyMessage}}</em></td></tr>\n" +
2984-
"</tbody>\n" +
29853006
"<tbody ng-repeat=\"(buildConfigName, buildConfigBuilds) in buildsByBuildConfig\">\n" +
29863007
"\n" +
29873008
"<tr ng-if=\"(buildConfigBuilds | hashSize) == 0\">\n" +

dist/scripts/vendor.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -39719,12 +39719,13 @@ prevent:"=",
3971939719
rows:"=",
3972039720
cols:"=",
3972139721
screenKeys:"=",
39722-
autofocus:"=?"
39722+
autofocus:"=?",
39723+
status:"="
3972339724
},
3972439725
link:function(g, h, i) {
3972539726
function j() {
3972639727
function a(a) {
39727-
!a && j && (a = "Could not connect to the container. Do you have sufficient privileges?"), a || (a = "disconnected"), j || (a = "\r\n" + a), q.write("" + a + "\r\n"), g.$apply(k);
39728+
!a && j && (a = "Could not connect to the container. Do you have sufficient privileges?"), a || (a = "disconnected"), j || (a = "\r\n" + a), q.write("" + a + "\r\n"), g.status = "disconnected", g.$apply(k);
3972839729
}
3972939730
k(), q.reset();
3973039731
var b = "", c = g.pod();
@@ -39751,15 +39752,16 @@ q.write(d(b));
3975139752
}
3975239753
j && (j = !1, m.addClass("hidden"), n.addClass("hidden"), q.cursorHidden = !1, q.showCursor(), q.refresh(q.y, q.y), g.autofocus && q.element && q.element.focus());
3975339754
}, p.onclose = function(b) {
39754-
a(b.reason);
39755+
g.status = "disconnected", a(b.reason);
3975539756
};
3975639757
}, function(b) {
3975739758
a(b.message);
39758-
});
39759+
}), g.status = "connected";
3975939760
}
3976039761
function k() {
39761-
m.addClass("hidden"), n.removeClass("hidden"), q && (q.cursorHidden = !0, q.refresh(q.x, q.y)), p && (p.onopen = p.onmessage = p.onerror = p.onclose = null, p.readyState < 2 && p.close(), p = null), window.clearInterval(o), o = null;
39762+
g.status = "disconnected", m.addClass("hidden"), n.removeClass("hidden"), q && (q.cursorHidden = !0, q.refresh(q.x, q.y)), p && (p.onopen = p.onmessage = p.onerror = p.onclose = null, p.readyState < 2 && p.close(), p = null), window.clearInterval(o), o = null;
3976239763
}
39764+
g.status = "disconnected";
3976339765
var l = a.element("<div class='terminal-wrapper'>");
3976439766
h.append(l);
3976539767
var m = a.element("<div class='spinner spinner-white hidden'>"), n = a.element("<button class='btn btn-default fa fa-refresh'>");

0 commit comments

Comments
 (0)