|
3 | 3 | function OverviewController(e, t, n, a, r, o, i, s, c, l, u, d, m, p, g, f, h, v, y, b, C, S, w, k, j) {
|
4 | 4 | var P = this, R = t("isIE")() || t("isEdge")();
|
5 | 5 | e.projectName = n.project;
|
6 |
| -var E, T, N = t("annotation"), I = t("buildConfigForBuild"), D = t("deploymentIsInProgress"), A = t("imageObjectRef"), B = t("isJenkinsPipelineStrategy"), L = t("isNewerResource"), U = t("label"), O = t("podTemplate"), x = {}, F = {}, M = {}, V = P.state = { |
| 6 | +var E, T, N = t("annotation"), I = t("buildConfigForBuild"), D = t("deploymentIsInProgress"), A = t("imageObjectRef"), B = t("isJenkinsPipelineStrategy"), L = t("isNewerResource"), U = t("label"), O = t("podTemplate"), F = {}, x = {}, M = {}, V = P.state = { |
7 | 7 | alerts: {},
|
8 | 8 | builds: {},
|
9 | 9 | clusterQuotas: {},
|
@@ -124,7 +124,7 @@ P.filteredDeploymentConfigs = re(P.deploymentConfigs), P.filteredReplicationCont
|
124 | 124 | P.viewBy = localStorage.getItem(se) || "app", e.$watch(function() {
|
125 | 125 | return P.viewBy;
|
126 | 126 | }, function(e) {
|
127 |
| -localStorage.setItem(se, e), ee(), ne = "app" === P.viewBy ? [ "metadata.name", "metadata.labels.app" ] : [ "metadata.name" ], ie(), "pipeline" === P.viewBy ? f.setLabelSuggestions(F) : f.setLabelSuggestions(x); |
| 127 | +localStorage.setItem(se, e), ee(), ne = "app" === P.viewBy ? [ "metadata.name", "metadata.labels.app" ] : [ "metadata.name" ], ie(), "pipeline" === P.viewBy ? f.setLabelSuggestions(x) : f.setLabelSuggestions(F); |
128 | 128 | }), c.DISABLE_OVERVIEW_METRICS || (v.isAvailable(!0).then(function(e) {
|
129 | 129 | V.showMetrics = e;
|
130 | 130 | }), e.$on("metrics-connection-failed", function(e, t) {
|
@@ -201,9 +201,9 @@ e.$evalAsync(function() {
|
201 | 201 | Se(), ve(), Ce();
|
202 | 202 | });
|
203 | 203 | }, 500), we = function(e) {
|
204 |
| -_.isEmpty(e) || (f.addLabelSuggestionsFromResources(e, x), "pipeline" !== P.viewBy && f.setLabelSuggestions(x)); |
| 204 | +_.isEmpty(e) || (f.addLabelSuggestionsFromResources(e, F), "pipeline" !== P.viewBy && f.setLabelSuggestions(F)); |
205 | 205 | }, ke = function(e) {
|
206 |
| -_.isEmpty(e) || (f.addLabelSuggestionsFromResources(e, F), "pipeline" === P.viewBy && f.setLabelSuggestions(F)); |
| 206 | +_.isEmpty(e) || (f.addLabelSuggestionsFromResources(e, x), "pipeline" === P.viewBy && f.setLabelSuggestions(x)); |
207 | 207 | }, je = function(e) {
|
208 | 208 | return "Succeeded" !== e.status.phase && "Failed" !== e.status.phase && (!U(e, "openshift.io/deployer-pod-for.name") && (!N(e, "openshift.io/build.name") && "slave" !== U(e, "jenkins")));
|
209 | 209 | }, Pe = function() {
|
@@ -273,13 +273,13 @@ _.each(a, function(t) {
|
273 | 273 | V.recentPipelinesByDeploymentConfig[t] = V.recentPipelinesByDeploymentConfig[t] || [], V.recentPipelinesByDeploymentConfig[t].push(e);
|
274 | 274 | }), X();
|
275 | 275 | }
|
276 |
| -}, Oe = {}, xe = function() { |
| 276 | +}, Oe = {}, Fe = function() { |
277 | 277 | Oe = i.groupBuildConfigsByOutputImage(P.buildConfigs);
|
278 |
| -}, Fe = function(e) { |
| 278 | +}, xe = function(e) { |
279 | 279 | var t = H(e);
|
280 | 280 | if (t) return _.get(V, [ "buildConfigsByObjectUID", t ], []);
|
281 | 281 | }, Me = function(e) {
|
282 |
| -var t = [], n = Fe(e); |
| 282 | +var t = [], n = xe(e); |
283 | 283 | _.each(n, function(e) {
|
284 | 284 | var n = _.get(V, [ "recentBuildsByBuildConfig", e.metadata.name ], []);
|
285 | 285 | t = t.concat(n);
|
@@ -415,7 +415,7 @@ P.routes = e.by("metadata.name"), Be(), h.log("routes (subscribe)", P.routes);
|
415 | 415 | poll: R,
|
416 | 416 | pollInterval: 6e4
|
417 | 417 | })), Ye.push(l.watch("buildConfigs", a, function(e) {
|
418 |
| -P.buildConfigs = e.by("metadata.name"), xe(), He(), Ge(), ie(), h.log("buildconfigs (subscribe)", P.buildConfigs); |
| 418 | +P.buildConfigs = e.by("metadata.name"), Fe(), He(), Ge(), ie(), h.log("buildconfigs (subscribe)", P.buildConfigs); |
419 | 419 | }, {
|
420 | 420 | poll: R,
|
421 | 421 | pollInterval: 6e4
|
@@ -5901,9 +5901,9 @@ details: t("getErrorDetails")(n)
|
5901 | 5901 | };
|
5902 | 5902 | });
|
5903 | 5903 | };
|
5904 |
| -var x = t("hasDeploymentConfig"); |
| 5904 | +var F = t("hasDeploymentConfig"); |
5905 | 5905 | e.isScalable = function() {
|
5906 |
| -return !!_.isEmpty(e.autoscalers) && (!x(e.replicaSet) && !w(e.replicaSet) || (!(!e.deploymentConfigMissing && !e.deploymentMissing) || !(!e.deploymentConfig && !e.deployment) && (e.isActive && !B))); |
| 5906 | +return !!_.isEmpty(e.autoscalers) && (!F(e.replicaSet) && !w(e.replicaSet) || (!(!e.deploymentConfigMissing && !e.deploymentMissing) || !(!e.deploymentConfig && !e.deployment) && (e.isActive && !B))); |
5907 | 5907 | }, e.removeVolume = function(n) {
|
5908 | 5908 | var a = "This will remove the volume from the " + t("humanizeKind")(e.replicaSet.kind) + ".";
|
5909 | 5909 | n.persistentVolumeClaim ? a += " It will not delete the persistent volume claim." : n.secret ? a += " It will not delete the secret." : n.configMap && (a += " It will not delete the config map.");
|
@@ -11286,7 +11286,7 @@ var t = r.defer();
|
11286 | 11286 | return A ? (A.onClose(function() {
|
11287 | 11287 | t.resolve();
|
11288 | 11288 | }), A.stop()) : t.resolve(), e || (U.cancel(), l && (l.innerHTML = ""), L = document.createDocumentFragment()), t.promise;
|
11289 |
| -}, x = function() { |
| 11289 | +}, F = function() { |
11290 | 11290 | O().then(function() {
|
11291 | 11291 | t.$evalAsync(function() {
|
11292 | 11292 | if (t.run) {
|
@@ -11368,11 +11368,11 @@ toggleAutoScroll: function() {
|
11368 | 11368 | t.autoScrollActive = !t.autoScrollActive, t.autoScrollActive && B();
|
11369 | 11369 | },
|
11370 | 11370 | goChromeless: d.chromelessLink,
|
11371 |
| -restartLogs: x |
| 11371 | +restartLogs: F |
11372 | 11372 | }), t.$on("$destroy", function() {
|
11373 | 11373 | O(), p.off("resize", D), p.off("scroll", P), g.off("scroll", P);
|
11374 | 11374 | }), "deploymentconfigs/logs" === b && !C) return t.state = "empty", void (t.emptyStateMessage = "Logs are not available for this replication controller because it was not generated from a deployment configuration.");
|
11375 |
| -t.$watchGroup([ "name", "options.container", "run" ], x); |
| 11375 | +t.$watchGroup([ "name", "options.container", "run" ], F); |
11376 | 11376 | } ],
|
11377 | 11377 | require: "logViewer",
|
11378 | 11378 | link: function(e, n, a, r) {
|
@@ -13043,24 +13043,32 @@ _.extend(s, r.ui);
|
13043 | 13043 | var c = e("getErrorDetails"), l = e("serviceInstanceDisplayName"), u = function() {
|
13044 | 13044 | var e = s.apiObject.spec.serviceClassName;
|
13045 | 13045 | return _.get(s, [ "state", "serviceClasses", e, "description" ]);
|
| 13046 | +}, d = function() { |
| 13047 | +var e = _.get(s.apiObject, "status.conditions"), t = _.find(e, { |
| 13048 | +type: "Ready" |
| 13049 | +}); |
| 13050 | +s.instanceError = _.find(e, { |
| 13051 | +type: "Failed", |
| 13052 | +status: "True" |
| 13053 | +}), _.get(s.apiObject, "metadata.deletionTimestamp") ? s.instanceStatus = "deleted" : s.instanceError ? s.instanceStatus = "failed" : t && "True" === t.status ? s.instanceStatus = "ready" : (s.instanceStatus = "pending", s.pendingMessage = _.get(t, "message") || "The instance is being provisioned asynchronously."); |
13046 | 13054 | };
|
13047 | 13055 | s.$doCheck = function() {
|
13048 |
| -s.notifications = r.getNotifications(s.apiObject, s.state), s.displayName = l(s.apiObject, s.state.serviceClasses), s.isBindable = a.isServiceBindable(s.apiObject, s.state.serviceClasses), s.description = u(); |
| 13056 | +d(), s.notifications = r.getNotifications(s.apiObject, s.state), s.displayName = l(s.apiObject, s.state.serviceClasses), s.isBindable = !s.instanceError && a.isServiceBindable(s.apiObject, s.state.serviceClasses), s.description = u(); |
13049 | 13057 | }, s.$onChanges = function(e) {
|
13050 | 13058 | e.bindings && (s.deleteableBindings = _.reject(s.bindings, "metadata.deletionTimestamp"));
|
13051 | 13059 | }, s.getSecretForBinding = function(e) {
|
13052 | 13060 | return e && _.get(s, [ "state", "secrets", e.spec.secretName ]);
|
13053 | 13061 | }, s.actionsDropdownVisible = function() {
|
13054 |
| -return !(!s.isBindable || !i.canI({ |
| 13062 | +return !(_.get(s.apiObject, "metadata.deletionTimestamp") || (!s.isBindable || !i.canI({ |
13055 | 13063 | resource: "bindings",
|
13056 | 13064 | group: "servicecatalog.k8s.io"
|
13057 |
| -}, "create")) || !(_.isEmpty(s.deleteableBindings) || !i.canI({ |
| 13065 | +}, "create")) && (_.isEmpty(s.deleteableBindings) || !i.canI({ |
13058 | 13066 | resource: "bindings",
|
13059 | 13067 | group: "servicecatalog.k8s.io"
|
13060 |
| -}, "delete")) || !!i.canI({ |
| 13068 | +}, "delete")) && !i.canI({ |
13061 | 13069 | resource: "instances",
|
13062 | 13070 | group: "servicecatalog.k8s.io"
|
13063 |
| -}, "delete"); |
| 13071 | +}, "delete")); |
13064 | 13072 | }, s.closeOverlayPanel = function() {
|
13065 | 13073 | _.set(s, "overlay.panelVisible", !1);
|
13066 | 13074 | }, s.showOverlayPanel = function(e, t) {
|
@@ -13957,15 +13965,15 @@ return _.get(e, "params.project") !== _.get(t, "params.project");
|
13957 | 13965 | C(r.project).then(function() {
|
13958 | 13966 | k(r.project, B), $(r.project), A();
|
13959 | 13967 | });
|
13960 |
| -}, x = function() { |
| 13968 | +}, F = function() { |
13961 | 13969 | r.project && O(), f.push(o.$on("$routeChangeSuccess", function(e, t, n) {
|
13962 | 13970 | U(t, n) && (g.customScope.projectName = r.project, O());
|
13963 | 13971 | })), f.push(o.$on("NotificationDrawerWrapper.toggle", function() {
|
13964 | 13972 | g.drawerHidden = !g.drawerHidden;
|
13965 | 13973 | }));
|
13966 | 13974 | };
|
13967 | 13975 | g.$onInit = function() {
|
13968 |
| -m || p || x(); |
| 13976 | +m || p || F(); |
13969 | 13977 | }, g.$onDestroy = function() {
|
13970 | 13978 | j(), w(), D();
|
13971 | 13979 | };
|
|
0 commit comments