@@ -5470,66 +5470,66 @@ i.showJenkinsfileExamples();
5470
5470
o.unwatchAll(d);
5471
5471
});
5472
5472
}));
5473
- } ]), angular.module("openshiftConsole").controller("ImageController", [ "$scope ", "$routeParams ", "DataService ", "ProjectsService ", "$filter ", "ImageStreamsService", "imageLayers", function(e, t, n, a, r, o, i) {
5474
- function s(n , a) {
5475
- var r = o.tagsByName(n );
5476
- e .imageStream = n, e .tagsByName = r, e .tagName = t .tag;
5477
- var i = r[t .tag];
5478
- i ? (delete e .alerts.load, l (i, a)) : e .alerts.load = {
5473
+ } ]), angular.module("openshiftConsole").controller("ImageController", [ "$filter ", "$scope ", "$routeParams ", "APIService ", "DataService ", "ImageStreamsService", "imageLayers", "ProjectsService", function(e, t, n, a, r, o, i, s ) {
5474
+ function c(e , a) {
5475
+ var r = o.tagsByName(e );
5476
+ t .imageStream = e, t .tagsByName = r, t .tagName = n .tag;
5477
+ var i = r[n .tag];
5478
+ i ? (delete t .alerts.load, p (i, a)) : t .alerts.load = {
5479
5479
type: "error",
5480
5480
message: "The image tag was not found in the stream."
5481
5481
};
5482
5482
}
5483
- e .projectName = t .project, e .imageStream = null, e .image = null, e .layers = null, e .tagsByName = {}, e .alerts = {}, e .renderOptions = e .renderOptions || {}, e .renderOptions.hideFilterWidget = !0, e .breadcrumbs = [ {
5483
+ t .projectName = n .project, t .imageStream = null, t .image = null, t .layers = null, t .tagsByName = {}, t .alerts = {}, t .renderOptions = t .renderOptions || {}, t .renderOptions.hideFilterWidget = !0, t .breadcrumbs = [ {
5484
5484
title: "Image Streams",
5485
- link: "project/" + t .project + "/browse/images"
5485
+ link: "project/" + n .project + "/browse/images"
5486
5486
}, {
5487
- title: t .imagestream,
5488
- link: "project/" + t .project + "/browse/images/" + t .imagestream
5487
+ title: n .imagestream,
5488
+ link: "project/" + n .project + "/browse/images/" + n .imagestream
5489
5489
}, {
5490
- title: ":" + t .tag
5490
+ title: ":" + n .tag
5491
5491
} ];
5492
- var c = [], l = _.debounce(function(a, o) {
5493
- var s = t .imagestream + ":" + t .tag;
5494
- n .get("imagestreamtags" , s, o).then(function(t ) {
5495
- e .loaded = !0, e .image = t .image, e .layers = i(e .image);
5496
- }, function(t ) {
5497
- e .loaded = !0, e .alerts.load = {
5492
+ var l = a.getPreferredVersion("imagestreamtags"), u = a.getPreferredVersion("imagestreams"), d = [], p = _.debounce(function(a, o) {
5493
+ var s = n .imagestream + ":" + n .tag;
5494
+ r .get(l , s, o).then(function(e ) {
5495
+ t .loaded = !0, t .image = e .image, t .layers = i(t .image);
5496
+ }, function(n ) {
5497
+ t .loaded = !0, t .alerts.load = {
5498
5498
type: "error",
5499
5499
message: "The image details could not be loaded.",
5500
- details: r ("getErrorDetails")(t )
5500
+ details: e ("getErrorDetails")(n )
5501
5501
};
5502
5502
});
5503
- }, 200), u = function(t , n, a) {
5504
- s(t , n), "DELETED" === a && (e .alerts.deleted = {
5503
+ }, 200), m = function(e , n, a) {
5504
+ c(e , n), "DELETED" === a && (t .alerts.deleted = {
5505
5505
type: "warning",
5506
5506
message: "This image stream has been deleted."
5507
5507
});
5508
5508
};
5509
- a .get(t .project).then(_.spread(function(a, o) {
5510
- e .project = a, n .get("imagestreams", t .imagestream, o, {
5509
+ s .get(n .project).then(_.spread(function(a, o) {
5510
+ t .project = a, r .get(u, n .imagestream, o, {
5511
5511
errorNotification: !1
5512
5512
}).then(function(e) {
5513
- u (e, o), c .push(n .watchObject("imagestreams", t .imagestream, o, function(e, t) {
5514
- u (e, o, t);
5513
+ m (e, o), d .push(r .watchObject(u, n .imagestream, o, function(e, t) {
5514
+ m (e, o, t);
5515
5515
}));
5516
- }, function(t ) {
5517
- e .loaded = !0, e .alerts.load = {
5516
+ }, function(n ) {
5517
+ t .loaded = !0, t .alerts.load = {
5518
5518
type: "error",
5519
5519
message: "The image stream details could not be loaded.",
5520
- details: r ("getErrorDetails")(t )
5520
+ details: e ("getErrorDetails")(n )
5521
5521
};
5522
- }), e .$on("$destroy", function() {
5523
- n .unwatchAll(c );
5522
+ }), t .$on("$destroy", function() {
5523
+ r .unwatchAll(d );
5524
5524
});
5525
5525
}));
5526
- } ]), angular.module("openshiftConsole").controller("ImagesController", [ "$routeParams ", "$scope ", "DataService ", "ProjectsService ", "$filter ", "LabelFilter", "Logger", function(e, t, n, a, r, o, i) {
5527
- t .projectName = e .project, t .imageStreams = {}, t .unfilteredImageStreams = {}, t .missingStatusTagsByImageStream = {}, t .builds = {}, t .labelSuggestions = {}, t .alerts = t .alerts || {}, t .emptyMessage = "Loading...";
5528
- var s = [];
5529
- a .get(e .project).then(_.spread(function(e, a ) {
5530
- function r () {
5531
- angular.forEach(t .unfilteredImageStreams, function(e, n ) {
5532
- var a = t .missingStatusTagsByImageStream[n ] = {};
5526
+ } ]), angular.module("openshiftConsole").controller("ImagesController", [ "$filter ", "$routeParams ", "$scope ", "APIService ", "DataService ", "LabelFilter", "Logger", "ProjectsService", function(e, t, n, a, r, o, i, s ) {
5527
+ n .projectName = t .project, n .imageStreams = {}, n .unfilteredImageStreams = {}, n .missingStatusTagsByImageStream = {}, n .builds = {}, n .labelSuggestions = {}, n .alerts = n .alerts || {}, n .emptyMessage = "Loading...";
5528
+ var c = a.getPreferredVersion("imagestreams"), l = [];
5529
+ s .get(t .project).then(_.spread(function(e, t ) {
5530
+ function a () {
5531
+ angular.forEach(n .unfilteredImageStreams, function(e, t ) {
5532
+ var a = n .missingStatusTagsByImageStream[t ] = {};
5533
5533
if (e.spec && e.spec.tags) {
5534
5534
var r = {};
5535
5535
e.status && e.status.tags && angular.forEach(e.status.tags, function(e) {
@@ -5540,50 +5540,50 @@ r[e.name] || (a[e.name] = e);
5540
5540
}
5541
5541
});
5542
5542
}
5543
- function c () {
5544
- o.getLabelSelector().isEmpty() || !$.isEmptyObject(t .imageStreams) || $.isEmptyObject(t .unfilteredImageStreams) ? delete t .alerts.imageStreams : t .alerts.imageStreams = {
5543
+ function s () {
5544
+ o.getLabelSelector().isEmpty() || !$.isEmptyObject(n .imageStreams) || $.isEmptyObject(n .unfilteredImageStreams) ? delete n .alerts.imageStreams : n .alerts.imageStreams = {
5545
5545
type: "warning",
5546
5546
details: "The active filters are hiding all image streams."
5547
5547
};
5548
5548
}
5549
- t .project = e, s .push(n .watch("imagestreams", a , function(e) {
5550
- t .unfilteredImageStreams = e.by("metadata.name"), o.addLabelSuggestionsFromResources(t .unfilteredImageStreams, t .labelSuggestions), o.setLabelSuggestions(t .labelSuggestions), t .imageStreams = o.getLabelSelector().select(t .unfilteredImageStreams), t .emptyMessage = "No image streams to show", r (), c (), i.log("image streams (subscribe)", t .imageStreams);
5549
+ n .project = e, l .push(r .watch(c, t , function(e) {
5550
+ n .unfilteredImageStreams = e.by("metadata.name"), o.addLabelSuggestionsFromResources(n .unfilteredImageStreams, n .labelSuggestions), o.setLabelSuggestions(n .labelSuggestions), n .imageStreams = o.getLabelSelector().select(n .unfilteredImageStreams), n .emptyMessage = "No image streams to show", a (), s (), i.log("image streams (subscribe)", n .imageStreams);
5551
5551
})), o.onActiveFiltersChanged(function(e) {
5552
- t .$apply(function() {
5553
- t .imageStreams = e.select(t .unfilteredImageStreams), c ();
5552
+ n .$apply(function() {
5553
+ n .imageStreams = e.select(n .unfilteredImageStreams), s ();
5554
5554
});
5555
- }), t .$on("$destroy", function() {
5556
- n .unwatchAll(s );
5555
+ }), n .$on("$destroy", function() {
5556
+ r .unwatchAll(l );
5557
5557
});
5558
5558
}));
5559
- } ]), angular.module("openshiftConsole").controller("ImageStreamController", [ "$scope ", "$routeParams", "DataService ", "ProjectsService ", "$filter ", "ImageStreamsService", "Navigate", function(e, t, n, a, r, o, i) {
5560
- e .projectName = t.project, e .imageStream = null, e .tags = [], e .tagShowOlder = {}, e .alerts = {}, e .renderOptions = e .renderOptions || {}, e .renderOptions.hideFilterWidget = !0, e .breadcrumbs = [ {
5559
+ } ]), angular.module("openshiftConsole").controller("ImageStreamController", [ "$filter ", "$routeParams", "$scope ", "APIService ", "DataService ", "ImageStreamsService", "Navigate", "ProjectsService", function(e, t, n, a, r, o, i, s ) {
5560
+ n .projectName = t.project, n .imageStream = null, n .tags = [], n .tagShowOlder = {}, n .alerts = {}, n .renderOptions = n .renderOptions || {}, n .renderOptions.hideFilterWidget = !0, n .breadcrumbs = [ {
5561
5561
title: "Image Streams",
5562
5562
link: "project/" + t.project + "/browse/images"
5563
5563
}, {
5564
5564
title: t.imagestream
5565
- } ], e .emptyMessage = "Loading...";
5566
- var s = [];
5567
- a .get(t.project).then(_.spread(function(a, i) {
5568
- e .project = a, n .get("imagestreams" , t.imagestream, i, {
5565
+ } ], n .emptyMessage = "Loading...", n.imageStreamsVersion = a.getPreferredVersion("imagestreams") ;
5566
+ var c = [];
5567
+ s .get(t.project).then(_.spread(function(a, i) {
5568
+ n .project = a, r .get(n.imageStreamsVersion , t.imagestream, i, {
5569
5569
errorNotification: !1
5570
- }).then(function(a ) {
5571
- e .loaded = !0, e .imageStream = a, e .emptyMessage = "No tags to show", s .push(n .watchObject("imagestreams" , t.imagestream, i, function(t, n ) {
5572
- "DELETED" === n && (e .alerts.deleted = {
5570
+ }).then(function(e ) {
5571
+ n .loaded = !0, n .imageStream = e, n .emptyMessage = "No tags to show", c .push(r .watchObject(n.imageStreamsVersion , t.imagestream, i, function(e, t ) {
5572
+ "DELETED" === t && (n .alerts.deleted = {
5573
5573
type: "warning",
5574
5574
message: "This image stream has been deleted."
5575
- }), e .imageStream = t, e .tags = _.toArray(o.tagsByName(e .imageStream));
5575
+ }), n .imageStream = e, n .tags = _.toArray(o.tagsByName(n .imageStream));
5576
5576
}));
5577
5577
}, function(t) {
5578
- e .loaded = !0, e .alerts.load = {
5578
+ n .loaded = !0, n .alerts.load = {
5579
5579
type: "error",
5580
5580
message: "The image stream details could not be loaded.",
5581
- details: r ("getErrorDetails")(t)
5581
+ details: e ("getErrorDetails")(t)
5582
5582
};
5583
- }), e .$on("$destroy", function() {
5584
- n .unwatchAll(s );
5583
+ }), n .$on("$destroy", function() {
5584
+ r .unwatchAll(c );
5585
5585
});
5586
- })), e .imagestreamPath = function(e, t) {
5586
+ })), n .imagestreamPath = function(e, t) {
5587
5587
if (!t.status) return "";
5588
5588
var n = i.resourceURL(e.metadata.name, "ImageStream", e.metadata.namespace);
5589
5589
return t && (n += "/" + t.name), n;
@@ -15269,11 +15269,9 @@ group: "autoscaling",
15269
15269
resource: "horizontalpodautoscalers",
15270
15270
verbs: [ "update", "delete" ]
15271
15271
} ],
15272
- imageStreams: [ {
15273
- group: "",
15274
- resource: "imagestreams",
15272
+ imageStreams: [ _.assign({}, e.getPreferredVersion("imagestreams"), {
15275
15273
verbs: [ "update", "delete" ]
15276
- } ],
15274
+ }) ],
15277
15275
serviceInstances: [ {
15278
15276
group: "servicecatalog.k8s.io",
15279
15277
resource: "serviceinstances",
0 commit comments