Skip to content

Commit 4d62052

Browse files
committed
DO NOT MERGE - Debugging test flake
1 parent 0200cf1 commit 4d62052

File tree

5 files changed

+61
-23
lines changed

5 files changed

+61
-23
lines changed

app/scripts/directives/nav.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ angular.module('openshiftConsole')
305305
});
306306
};
307307

308-
$scope.$on('$routeChangeSuccess', function() {
308+
$scope.$on('$routeChangeSuccess', function(event, next) {
309+
$scope.nextRoute = next;
309310
var currentProjectName = $routeParams.project;
310311
if ($scope.currentProjectName === currentProjectName) {
311312
// The project hasn't changed.

app/views/directives/header/header.html

+11-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@
66
<span class="icon-bar"></span>
77
<span class="icon-bar"></span>
88
</button>
9+
<!-- DEBUGGING -- DO NOT MERGE -->
910
<!-- JS click handler for #openshift-logo -->
10-
<a class="navbar-brand" id="openshift-logo" href="./">
11-
<div id="header-logo"></div>
12-
</a>
11+
<!-- <a class="navbar-brand" id="openshift-logo" href="./"> -->
12+
<!-- <div id="header-logo"></div> -->
13+
<!-- </a> -->
14+
<div style="color: white;">
15+
view.hasProject: {{view.hasProject}}
16+
currentProjectName: {{currentProjectName}}
17+
</div>
18+
<div style="color: white;">
19+
nextRoute: {{nextRoute.params}}
20+
</div>
1321
</div>
1422
<navbar-utility></navbar-utility>
1523
</nav>

dist/scripts/scripts.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -10137,10 +10137,11 @@ return s.list().then(function(e) {
1013710137
l = e.by("metadata.name");
1013810138
});
1013910139
};
10140-
r.$on("$routeChangeSuccess", function() {
10141-
var e = a.project;
10142-
r.currentProjectName !== e && (r.currentProjectName = e, r.chromeless = "chromeless" === a.view, e && !r.chromeless ? (_.set(n, "view.hasProject", !0), r.canIAddToProject = !1, o.getProjectRules(e).then(function() {
10143-
r.currentProjectName === e && (r.canIAddToProject = o.canIAddToProject(e));
10140+
r.$on("$routeChangeSuccess", function(e, t) {
10141+
r.nextRoute = t;
10142+
var i = a.project;
10143+
r.currentProjectName !== i && (r.currentProjectName = i, r.chromeless = "chromeless" === a.view, i && !r.chromeless ? (_.set(n, "view.hasProject", !0), r.canIAddToProject = !1, o.getProjectRules(i).then(function() {
10144+
r.currentProjectName === i && (r.canIAddToProject = o.canIAddToProject(i));
1014410145
}), C().then(function() {
1014510146
r.currentProjectName && l && (l[r.currentProjectName] || (l[r.currentProjectName] = {
1014610147
metadata: {

dist/scripts/templates.js

+10-3
Original file line numberDiff line numberDiff line change
@@ -6927,9 +6927,16 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
69276927
"<span class=\"icon-bar\"></span>\n" +
69286928
"</button>\n" +
69296929
"\n" +
6930-
"<a class=\"navbar-brand\" id=\"openshift-logo\" href=\"./\">\n" +
6931-
"<div id=\"header-logo\"></div>\n" +
6932-
"</a>\n" +
6930+
"\n" +
6931+
"\n" +
6932+
"\n" +
6933+
"\n" +
6934+
"<div style=\"color: white\">\n" +
6935+
"view.hasProject: {{view.hasProject}} currentProjectName: {{currentProjectName}}\n" +
6936+
"</div>\n" +
6937+
"<div style=\"color: white\">\n" +
6938+
"nextRoute: {{nextRoute.params}}\n" +
6939+
"</div>\n" +
69336940
"</div>\n" +
69346941
"<navbar-utility></navbar-utility>\n" +
69356942
"</nav>\n" +

dist/scripts/vendor.js

+33-12
Original file line numberDiff line numberDiff line change
@@ -72753,7 +72753,7 @@ e.put("src/components/binding/bindServiceForm.html", '<div class="bind-form">\n
7275372753
e.put("src/components/create-project/createProject.html", '<form name="createProjectForm" novalidate>\n <fieldset ng-disabled="disableInputs">\n <div class="form-group">\n <label for="name" class="required">Name</label>\n <span ng-class="{\'has-error\': (createProjectForm.name.$error.pattern && createProjectForm.name.$touched) || nameTaken}">\n <input class="form-control"\n name="name"\n id="name"\n placeholder="my-project"\n type="text"\n required\n take-focus\n minlength="2"\n maxlength="63"\n pattern="[a-z0-9]([-a-z0-9]*[a-z0-9])?"\n aria-describedby="nameHelp"\n ng-model="name"\n ng-model-options="{ updateOn: \'default blur\' }"\n ng-change="nameTaken = false"\n autocorrect="off"\n autocapitalize="off"\n spellcheck="false">\n </span>\n <div>\n <span class="help-block">A unique name for the project.</span>\n </div>\n <div class="has-error">\n <span id="nameHelp" class="help-block" ng-if="createProjectForm.name.$error.required && createProjectForm.name.$dirty">\n Name is required.\n </span>\n </div>\n <div class="has-error">\n <span id="nameHelp" class="help-block" ng-if="createProjectForm.name.$error.minlength && createProjectForm.name.$touched">\n Name must have at least two characters.\n </span>\n </div>\n <div class="has-error">\n <span id="nameHelp" class="help-block" ng-if="createProjectForm.name.$error.pattern && createProjectForm.name.$touched">\n Project names may only contain lower-case letters, numbers, and dashes.\n They may not start or end with a dash.\n </span>\n </div>\n <div class="has-error">\n <span class="help-block" ng-if="nameTaken">\n This name is already in use. Please choose a different name.\n </span>\n </div>\n </div>\n\n <div class="form-group">\n <label for="displayName">Display Name</label>\n <input class="form-control"\n name="displayName"\n id="displayName"\n placeholder="My Project"\n type="text"\n ng-model="displayName">\n </div>\n\n <div class="form-group">\n <label for="description">Description</label>\n <textarea class="form-control"\n name="description"\n id="description"\n placeholder="A short description."\n ng-model="description"></textarea>\n </div>\n\n <div class="button-group">\n <button type="submit"\n class="btn btn-primary"\n ng-class="{\'dialog-btn\': isDialog}"\n ng-click="createProject()"\n ng-disabled="createProjectForm.$invalid || nameTaken || disableInputs"\n value="">\n Create\n </button>\n <button\n class="btn btn-default"\n ng-class="{\'dialog-btn\': isDialog}"\n ng-click="cancelCreateProject()">\n Cancel\n </button>\n </div>\n </fieldset>\n</form>\n'),
7275472754
e.put("src/components/delete-project/delete-project-button.html", '<div class="actions">\n \x3c!-- Avoid whitespace inside the link --\x3e\n <a href=""\n ng-click="$event.stopPropagation(); openDeleteModal()"\n role="button"\n class="action-button"\n ng-attr-aria-disabled="{{disableDelete ? \'true\' : undefined}}"\n ng-class="{ \'disabled-link\': disableDelete }"\n ><i class="fa fa-trash-o" aria-hidden="true"\n ></i><span class="sr-only">Delete Project {{projectName}}</span></a>\n</div>\n'), e.put("src/components/delete-project/delete-project-modal.html", '<div class="delete-resource-modal">\n \x3c!-- Use a form so that the enter key submits when typing a project name to confirm. --\x3e\n <form>\n <div class="modal-body">\n <h1>Are you sure you want to delete the project \'<strong>{{project | displayName}}</strong>\'?</h1>\n <p>\n This will <strong>delete all resources</strong> associated with\n the project {{project | displayName}} and <strong>cannot be\n undone</strong>. Make sure this is something you really want to do!\n </p>\n <div ng-show="typeNameToConfirm">\n <p>Type the name of the project to confirm.</p>\n <p>\n <label class="sr-only" for="resource-to-delete">project to delete</label>\n <input\n ng-model="confirmName"\n id="resource-to-delete"\n type="text"\n class="form-control input-lg"\n autocorrect="off"\n autocapitalize="off"\n spellcheck="false"\n autofocus>\n </p>\n </div>\n </div>\n <div class="modal-footer">\n <button ng-disabled="typeNameToConfirm && confirmName !== project.metadata.name && confirmName !== (project | displayName : false)" class="btn btn-lg btn-danger" type="submit" ng-click="delete()">Delete</button>\n <button class="btn btn-lg btn-default" type="button" ng-click="cancel()">Cancel</button>\n </div>\n </form>\n</div>\n'),
7275572755
e.put("src/components/delete-project/delete-project.html", '<a href="javascript:void(0)"\n ng-click="openDeleteModal()"\n role="button"\n ng-attr-aria-disabled="{{disableDelete ? \'true\' : undefined}}"\n ng-class="{ \'disabled-link\': disableDelete }"\n>{{label || \'Delete\'}}</a>\n'), e.put("src/components/edit-project/editProject.html", '<form name="editProjectForm">\n <fieldset ng-disabled="disableInputs">\n <div class="form-group">\n <label for="displayName">Display Name</label>\n <input class="form-control"\n name="displayName"\n id="displayName"\n placeholder="My Project"\n type="text"\n ng-model="editableFields.displayName">\n </div>\n\n <div class="form-group">\n <label for="description">Description</label>\n <textarea class="form-control"\n name="description"\n id="description"\n placeholder="A short description."\n ng-model="editableFields.description"></textarea>\n </div>\n\n <div class="button-group">\n <button type="submit"\n class="btn btn-primary"\n ng-class="{\'dialog-btn\': isDialog}"\n ng-click="update()"\n ng-disabled="editProjectForm.$invalid || disableInputs"\n value="">{{submitButtonLabel}}</button>\n <button\n class="btn btn-default"\n ng-class="{\'dialog-btn\': isDialog}"\n ng-click="cancelEditProject()">\n Cancel\n </button>\n </div>\n </fieldset>\n</form>\n'),
72756-
e.put("src/components/origin-modal-popup/origin-modal-popup.html", '<div class="origin-modal-popup tile-click-prevent" ng-if="$ctrl.shown" ng-style="$ctrl.positionStyle"\n ng-class="{\'position-above\': $ctrl.showAbove, \'position-left\': $ctrl.showLeft}">\n <h4 class="origin-modal-popup-title">\n {{$ctrl.modalTitle}}\n </h4>\n <div ng-transclude></div>\n <a href="" class="origin-modal-popup-close" ng-click="$ctrl.onClose()">\n <span class="pficon pficon-close"></span>\n </a>\n</div>\n'), e.put("src/components/toast-notifications/toast-notifications.html", '<div class="toast-notifications-list-pf">\n <div ng-repeat="(notificationID, notification) in notifications track by (notificationID + (notification.message || notification.details))" ng-if="!notification.hidden || notification.isHover"\n ng-mouseenter="setHover(notification, true)" ng-mouseleave="setHover(notification, false)">\n <div class="toast-pf alert {{notification.type | alertStatus}}" ng-class="{\'alert-dismissable\': !hideCloseButton}">\n <button ng-if="!hideCloseButton" type="button" class="close" ng-click="close(notification)">\n <span class="pficon pficon-close" aria-hidden="true"></span>\n <span class="sr-only">Close</span>\n </button>\n <span class="{{notification.type | alertIcon}}" aria-hidden="true"></span>\n <span class="sr-only">{{notification.type}}</span>\n <span class="toast-notification-message" ng-if="notification.message">{{notification.message}}</span>\n <div ng-if="notification.details" class="toast-notification-details">\n <truncate-long-text\n limit="200"\n content="notification.details"\n use-word-boundary="true"\n expandable="true"\n hide-collapse="true">\n </truncate-long-text>\n </div>\n <span ng-repeat="link in notification.links">\n <a ng-if="!link.href" href="" ng-click="onClick(notification, link)" role="button">{{link.label}}</a>\n <a ng-if="link.href" ng-href="{{link.href}}" ng-attr-target="{{link.target}}">{{link.label}}</a>\n <span ng-if="!$last" class="toast-action-divider">|</span>\n </span>\n </div>\n </div>\n</div>\n'),
72756+
e.put("src/components/origin-modal-popup/origin-modal-popup.html", '<div class="origin-modal-popup tile-click-prevent" ng-if="$ctrl.shown" ng-style="$ctrl.positionStyle"\n ng-class="{\'position-above\': $ctrl.showAbove, \'position-left\': $ctrl.showLeft}">\n <h4 class="origin-modal-popup-title">\n {{$ctrl.modalTitle}}\n </h4>\n <div ng-transclude></div>\n <a href="" class="origin-modal-popup-close" ng-click="$ctrl.onClose()">\n <span class="pficon pficon-close"></span>\n </a>\n</div>\n'), e.put("src/components/toast-notifications/toast-notifications.html", '<div class="toast-notifications-list-pf">\n <div ng-repeat="(notificationID, notification) in notifications track by notification.trackByID" ng-if="!notification.hidden || notification.isHover"\n ng-mouseenter="setHover(notification, true)" ng-mouseleave="setHover(notification, false)">\n <div class="toast-pf alert {{notification.type | alertStatus}}" ng-class="{\'alert-dismissable\': !hideCloseButton}">\n <button ng-if="!hideCloseButton" type="button" class="close" ng-click="close(notification)">\n <span class="pficon pficon-close" aria-hidden="true"></span>\n <span class="sr-only">Close</span>\n </button>\n <span class="{{notification.type | alertIcon}}" aria-hidden="true"></span>\n <span class="sr-only">{{notification.type}}</span>\n <span class="toast-notification-message" ng-if="notification.message">{{notification.message}}</span>\n <div ng-if="notification.details" class="toast-notification-details">\n <truncate-long-text\n limit="200"\n content="notification.details"\n use-word-boundary="true"\n expandable="true"\n hide-collapse="true">\n </truncate-long-text>\n </div>\n <span ng-repeat="link in notification.links">\n <a ng-if="!link.href" href="" ng-click="onClick(notification, link)" role="button">{{link.label}}</a>\n <a ng-if="link.href" ng-href="{{link.href}}" ng-attr-target="{{link.target}}">{{link.label}}</a>\n <span ng-if="!$last" class="toast-action-divider">|</span>\n </span>\n </div>\n </div>\n</div>\n'),
7275772757
e.put("src/components/truncate-long-text/truncateLongText.html", '\x3c!--\n Do not remove class `truncated-content` (here or below) even though it\'s not\n styled directly in origin-web-common. `truncated-content` is used by\n origin-web-console in certain contexts.\n--\x3e\n<span ng-if="!truncated" ng-bind-html="content | highlightKeywords : keywords" class="truncated-content"></span>\n<span ng-if="truncated">\n <span ng-if="!toggles.expanded">\n <span ng-attr-title="{{content}}" class="truncation-block">\n <span ng-bind-html="truncatedContent | highlightKeywords : keywords" class="truncated-content"></span>&hellip;\n </span>\n <a ng-if="expandable" href="" ng-click="toggles.expanded = true" class="truncation-expand-link">See All</a>\n </span>\n <span ng-if="toggles.expanded">\n <div ng-if="prettifyJson" class="well">\n <a href="" ng-if="!hideCollapse" ng-click="toggles.expanded = false" class="truncation-collapse-link">Collapse</a>\n <span ng-bind-html="content | prettifyJSON | highlightKeywords : keywords" class="pretty-json truncated-content"></span>\n </div>\n <span ng-if="!prettifyJson">\n <a href="" ng-if="!hideCollapse" ng-click="toggles.expanded = false" class="truncation-collapse-link">Collapse</a>\n <span ng-bind-html="content | highlightKeywords : keywords" class="truncated-content"></span>\n </span>\n </span>\n</span>\n');
7275872758
} ]), angular.module("openshiftCommonUI").component("bindApplicationForm", {
7275972759
controllerAs: "ctrl",
@@ -73605,6 +73605,27 @@ availableKinds: function(e) {
7360573605
return e ? m : g;
7360673606
}
7360773607
};
73608+
} ]), angular.module("openshiftCommonServices").service("ApplicationsService", [ "$filter", "$q", "DataService", function(e, t, n) {
73609+
return {
73610+
getApplications: function(i) {
73611+
var r = t.defer(), o = [];
73612+
return o.push(n.list("deploymentconfigs", i)), o.push(n.list("replicationcontrollers", i)), o.push(n.list({
73613+
group: "apps",
73614+
resource: "deployments"
73615+
}, i)), o.push(n.list({
73616+
group: "extensions",
73617+
resource: "replicasets"
73618+
}, i)), o.push(n.list({
73619+
group: "apps",
73620+
resource: "statefulsets"
73621+
}, i)), t.all(o).then(_.spread(function(t, n, i, o, a) {
73622+
var s = _.toArray(t.by("metadata.name")), l = _.reject(n.by("metadata.name"), e("hasDeploymentConfig")), c = _.toArray(i.by("metadata.name")), u = _.reject(o.by("metadata.name"), e("hasDeployment")), d = _.toArray(a.by("metadata.name")), h = s.concat(c).concat(l).concat(u).concat(d);
73623+
r.resolve(_.sortBy(h, [ "metadata.name", "kind" ]));
73624+
}), function(e) {
73625+
r.reject(e);
73626+
}), r.promise;
73627+
}
73628+
};
7360873629
} ]), angular.module("openshiftCommonServices").provider("AuthService", function() {
7360973630
var e = "";
7361073631
this.UserStore = function(t) {
@@ -73837,7 +73858,7 @@ stringData: {}
7383773858
};
7383873859
return i.stringData.parameters = JSON.stringify(t), i;
7383973860
}, d = function(e, t, n) {
73840-
var n, i = e.metadata.name, r = {
73861+
var n, i = e.metadata.name, r = c(e.metadata.name + "-credentials-"), o = {
7384173862
kind: "Binding",
7384273863
apiVersion: "servicecatalog.k8s.io/v1alpha1",
7384373864
metadata: {
@@ -73847,22 +73868,22 @@ spec: {
7384773868
instanceRef: {
7384873869
name: i
7384973870
},
73850-
secretName: c(e.metadata.name + "-credentials-")
73871+
secretName: r
7385173872
}
7385273873
};
73853-
n && (r.spec.parametersFrom = [ {
73874+
n && (o.spec.parametersFrom = [ {
7385473875
secretKeyRef: {
7385573876
name: n,
7385673877
key: "parameters"
7385773878
}
7385873879
} ]);
73859-
var o = _.get(t, "spec.selector");
73860-
return o && (o.matchLabels || o.matchExpressions || (o = {
73861-
matchLabels: o
73862-
}), r.spec.alphaPodPresetTemplate = {
73863-
name: relatedObjName,
73864-
selector: o
73865-
}), r;
73880+
var a = _.get(t, "spec.selector");
73881+
return a && (a.matchLabels || a.matchExpressions || (a = {
73882+
matchLabels: a
73883+
}), o.spec.alphaPodPresetTemplate = {
73884+
name: r,
73885+
selector: a
73886+
}), o;
7386673887
}, h = function(e, t) {
7386773888
var n = a(e, t);
7386873889
if (_.get(e, "metadata.deletionTimestamp")) return !1;
@@ -75049,7 +75070,7 @@ this.dismissDelay = 8e3, this.autoDismissTypes = [ "info", "success" ], this.$ge
7504975070
var t = [], n = this.dismissDelay, i = this.autoDismissTypes, r = function(e, t) {
7505075071
return t ? "hide/notification/" + t + "/" + e : "hide/notification/" + e;
7505175072
}, o = function(n) {
75052-
n.id = n.id || _.uniqueId("notification-") + Date.now(), n.timestamp = new Date().toISOString(), a(n) || s(n) || (t.push(n), e.$emit("NotificationsService.onNotificationAdded", n));
75073+
n.trackByID = _.uniqueId("notification-") + Date.now(), n.timestamp = new Date().toISOString(), a(n) || s(n) || (t.push(n), e.$emit("NotificationsService.onNotificationAdded", n));
7505375074
}, a = function(e) {
7505475075
if (!e.id) return !1;
7505575076
var t = r(e.id, e.namespace);

0 commit comments

Comments
 (0)