Skip to content

Commit

Permalink
Don't let users accidentally and permanently dismiss router hostname …
Browse files Browse the repository at this point in the history
…message

Knowing the router hostname is vital for setting up a CNAME for routes
with custom hosts. Remove the "Don't Show Me Again" link to prevent
users from accidentally dismissing the message without being able to get
it back.
  • Loading branch information
spadgett committed Sep 29, 2017
1 parent 33a87c8 commit bac657d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16 deletions.
5 changes: 0 additions & 5 deletions app/scripts/controllers/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ angular.module('openshiftConsole')
return !AlertMessageService.isAlertPermanentlyHidden(alertKey, $scope.projectName);
};

$scope.hideRouterHostnameAlert = function(ingress) {
var alertKey = routerHostnameAlertKey(ingress);
AlertMessageService.permanentlyHideAlert(alertKey, $scope.projectName);
};

ProjectsService
.get($routeParams.project)
.then(_.spread(function(project, context) {
Expand Down
7 changes: 2 additions & 5 deletions app/views/browse/route.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,8 @@ <h1 class="contains-actions">
<div ng-if="showRouterHostnameAlert(ingress, admittedCondition)" class="mar-top-lg">
<div class="alert alert-info">
<span class="pficon pficon-info" aria-hidden="true"></span>
<span class="mar-right-sm">
The DNS admin should set up a CNAME from the route's hostname, {{ingress.host}},
to the router's canonical hostname, {{ingress.routerCanonicalHostname}}.
</span>
<a href="" ng-click="hideRouterHostnameAlert(ingress)" role="button" class="nowrap">Don't Show Me Again</a>
The DNS admin should set up a CNAME from the route's hostname, {{ingress.host}},
to the router's canonical hostname, {{ingress.routerCanonicalHostname}}.
</div>
</div>
</div>
Expand Down
3 changes: 0 additions & 3 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -6475,9 +6475,6 @@ if (!t || !t.host || !t.routerCanonicalHostname) return !1;
if (!n || "True" !== n.status) return !1;
var r = u(t);
return !a.isAlertPermanentlyHidden(r, e.projectName);
}, e.hideRouterHostnameAlert = function(t) {
var n = u(t);
a.permanentlyHideAlert(n, e.projectName);
}, o.get(n.project).then(_.spread(function(a, o) {
e.project = a, r.get("routes", n.route, o, {
errorNotification: !1
Expand Down
3 changes: 0 additions & 3 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -3350,10 +3350,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<div ng-if=\"showRouterHostnameAlert(ingress, admittedCondition)\" class=\"mar-top-lg\">\n" +
"<div class=\"alert alert-info\">\n" +
"<span class=\"pficon pficon-info\" aria-hidden=\"true\"></span>\n" +
"<span class=\"mar-right-sm\">\n" +
"The DNS admin should set up a CNAME from the route's hostname, {{ingress.host}}, to the router's canonical hostname, {{ingress.routerCanonicalHostname}}.\n" +
"</span>\n" +
"<a href=\"\" ng-click=\"hideRouterHostnameAlert(ingress)\" role=\"button\" class=\"nowrap\">Don't Show Me Again</a>\n" +
"</div>\n" +
"</div>\n" +
"</div>\n" +
Expand Down

0 comments on commit bac657d

Please sign in to comment.