@@ -12677,14 +12677,14 @@ templateUrl: "views/directives/process-template.html"
12677
12677
angular.module("openshiftConsole").component("processTemplateDialog", {
12678
12678
controller: [ "$scope", "$filter", "Catalog", "DataService", "KeywordService", "NotificationsService", "ProjectsService", "RecentlyViewedProjectsService", function(e, t, n, a, r, o, i, s) {
12679
12679
function c() {
12680
- var e = _.get(y , "template.metadata.annotations.iconClass", "fa fa-clone");
12680
+ var e = _.get(v , "template.metadata.annotations.iconClass", "fa fa-clone");
12681
12681
return -1 !== e.indexOf("icon-") ? "font-icon " + e : e;
12682
12682
}
12683
12683
function l() {
12684
- y .steps || (y .steps = [ y .selectStep, y .configStep, y .resultsStep ]);
12684
+ v .steps || (v .steps = [ v .selectStep, v .configStep, v .resultsStep ]);
12685
12685
}
12686
12686
function u() {
12687
- v && (v (), v = void 0);
12687
+ h && (h (), h = void 0);
12688
12688
}
12689
12689
function d() {
12690
12690
e.$broadcast("instantiateTemplate");
@@ -12693,67 +12693,64 @@ function m(e, t) {
12693
12693
return r.filterForKeywords(t, [ "name", "tags" ], r.generateKeywords(e));
12694
12694
}
12695
12695
function p(e) {
12696
- y .filterConfig.appliedFilters = e, f();
12696
+ v .filterConfig.appliedFilters = e, f();
12697
12697
}
12698
12698
function f() {
12699
- y .filteredItems = y .catalogItems, y .filterConfig.appliedFilters && y .filterConfig.appliedFilters.length > 0 && _.each(y .filterConfig.appliedFilters, function(e) {
12700
- y .filteredItems = m(e.value, y .filteredItems);
12701
- }), _.includes(y .filteredItems, y .selectedTemplate) || y .templateSelected(), g ();
12699
+ v .filteredItems = v .catalogItems, v .filterConfig.appliedFilters && v .filterConfig.appliedFilters.length > 0 && _.each(v .filterConfig.appliedFilters, function(e) {
12700
+ v .filteredItems = m(e.value, v .filteredItems);
12701
+ }), v.filterConfig.resultsCount = v.filteredItems.length, _.includes(v .filteredItems, v .selectedTemplate) || v .templateSelected();
12702
12702
}
12703
12703
function g() {
12704
- y.filterConfig.resultsCount = y.filteredItems.length, y.totalCount <= 1 ? $(".filter-pf.filter-fields input").attr("disabled", "") : $(".filter-pf.filter-fields input").removeAttr("disabled");
12705
- }
12706
- function h() {
12707
- y.unfilteredProjects || i.list().then(function(e) {
12708
- y.unfilteredProjects = _.toArray(e.by("metadata.name"));
12704
+ v.unfilteredProjects || i.list().then(function(e) {
12705
+ v.unfilteredProjects = _.toArray(e.by("metadata.name"));
12709
12706
}, function() {
12710
- y .unfilteredProjects = [];
12707
+ v .unfilteredProjects = [];
12711
12708
}).finally(function() {
12712
- b ();
12709
+ y ();
12713
12710
});
12714
12711
}
12715
- var v, y = this;
12716
- y .selectStep = {
12712
+ var h, v = this;
12713
+ v .selectStep = {
12717
12714
id: "projectTemplates",
12718
12715
label: "Selection",
12719
12716
view: "views/directives/process-template-dialog/process-template-select.html",
12720
- hidden: !0 !== y .useProjectTemplate,
12717
+ hidden: !0 !== v .useProjectTemplate,
12721
12718
allowed: !0,
12722
12719
valid: !1,
12723
12720
onShow: function() {
12724
- y .selectStep.selected = !0, y .configStep.selected = !1, y .resultsStep.selected = !1, y .nextTitle = "Next >", u(), h ();
12721
+ v .selectStep.selected = !0, v .configStep.selected = !1, v .resultsStep.selected = !1, v .nextTitle = "Next >", u(), g ();
12725
12722
}
12726
- }, y .configStep = {
12723
+ }, v .configStep = {
12727
12724
id: "configuration",
12728
12725
label: "Configuration",
12729
12726
view: "views/directives/process-template-dialog/process-template-config.html",
12730
12727
valid: !1,
12731
12728
allowed: !0,
12732
12729
onShow: function() {
12733
- y .selectStep.selected = !1, y .configStep.selected = !0, y .resultsStep.selected = !1, y .nextTitle = "Create", y .resultsStep.allowed = y .configStep.valid, v = e.$watch("$ctrl.form.$valid", function(e) {
12734
- y .configStep.valid = e && y .selectedProject, y .resultsStep.allowed = e;
12730
+ v .selectStep.selected = !1, v .configStep.selected = !0, v .resultsStep.selected = !1, v .nextTitle = "Create", v .resultsStep.allowed = v .configStep.valid, h = e.$watch("$ctrl.form.$valid", function(e) {
12731
+ v .configStep.valid = e && v .selectedProject, v .resultsStep.allowed = e;
12735
12732
});
12736
12733
}
12737
- }, y .resultsStep = {
12734
+ }, v .resultsStep = {
12738
12735
id: "results",
12739
12736
label: "Results",
12740
12737
view: "views/directives/process-template-dialog/process-template-results.html",
12741
12738
valid: !0,
12742
12739
allowed: !1,
12743
12740
prevEnabled: !1,
12744
12741
onShow: function() {
12745
- y .selectStep.selected = !1, y .configStep.selected = !1, y .resultsStep.selected = !0, y .nextTitle = "Close", u(), y .wizardDone = !0;
12742
+ v .selectStep.selected = !1, v .configStep.selected = !1, v .resultsStep.selected = !0, v .nextTitle = "Close", u(), v .wizardDone = !0;
12746
12743
}
12747
- }, y .$onInit = function() {
12748
- y .loginBaseUrl = a.openshiftAPIBaseUrl(), y .preSelectedProject = y .selectedProject = y .project, h (), y .projectEmptyState = {
12744
+ }, v .$onInit = function() {
12745
+ v .loginBaseUrl = a.openshiftAPIBaseUrl(), v .preSelectedProject = v .selectedProject = v .project, g (), v .projectEmptyState = {
12749
12746
icon: "pficon pficon-info",
12750
12747
title: "No Project Selected",
12751
12748
info: "Please select a project from the dropdown to load Templates from that project."
12752
- }, y .templatesEmptyState = {
12749
+ }, v .templatesEmptyState = {
12753
12750
icon: "pficon pficon-info",
12754
12751
title: "No Templates",
12755
12752
info: "The selected project has no templates available to import."
12756
- }, y .filterConfig = {
12753
+ }, v .filterConfig = {
12757
12754
fields: [ {
12758
12755
id: "keyword",
12759
12756
title: "Keyword",
@@ -12768,32 +12765,32 @@ resultsCount: 0,
12768
12765
appliedFilters: [],
12769
12766
onFilterChange: p
12770
12767
};
12771
- }, y .$onChanges = function(e) {
12772
- e.template && y .template && (l(), y .iconClass = c()), e.useProjectTemplate && l();
12768
+ }, v .$onChanges = function(e) {
12769
+ e.template && v .template && (l(), v .iconClass = c()), e.useProjectTemplate && l();
12773
12770
}, e.$on("templateInstantiated", function(e, t) {
12774
- y .selectedProject = t.project, y .currentStep = y .resultsStep.label;
12775
- }), y .$onDestroy = function() {
12771
+ v .selectedProject = t.project, v .currentStep = v .resultsStep.label;
12772
+ }), v .$onDestroy = function() {
12776
12773
u();
12777
- }, y .next = function(e) {
12778
- return e.stepId === y .configStep.id ? (d(), !1) : e.stepId !== y .resultsStep.id || (y .close(), !1);
12779
- }, y .close = function() {
12780
- var e = y .onDialogClosed();
12774
+ }, v .next = function(e) {
12775
+ return e.stepId === v .configStep.id ? (d(), !1) : e.stepId !== v .resultsStep.id || (v .close(), !1);
12776
+ }, v .close = function() {
12777
+ var e = v .onDialogClosed();
12781
12778
_.isFunction(e) && e();
12782
- }, y .onProjectSelected = function(t) {
12783
- y .selectedProject = t, y .configStep.valid = e.$ctrl.form.$valid && y .selectedProject;
12784
- }, y .templateSelected = function(e) {
12785
- y .selectedTemplate = e, y .template = _.get(e, "resource"), y .selectStep.valid = !!e;
12786
- }, y .templateProjectChange = function() {
12787
- y .templateProjectName = _.get(y .templateProject, "metadata.name"), y .catalogItems = {}, y .templateSelected(), n.getProjectCatalogItems(y .templateProjectName, !1, !0).then(_.spread(function(e, t) {
12788
- y .catalogItems = e, y .totalCount = y .catalogItems.length, f (), t && o.addNotification({
12779
+ }, v .onProjectSelected = function(t) {
12780
+ v .selectedProject = t, v .configStep.valid = e.$ctrl.form.$valid && v .selectedProject;
12781
+ }, v .templateSelected = function(e) {
12782
+ v .selectedTemplate = e, v .template = _.get(e, "resource"), v .selectStep.valid = !!e;
12783
+ }, v .templateProjectChange = function() {
12784
+ v .templateProjectName = _.get(v .templateProject, "metadata.name"), v .catalogItems = {}, v .templateSelected(), n.getProjectCatalogItems(v .templateProjectName, !1, !0).then(_.spread(function(e, t) {
12785
+ v .catalogItems = e, v .totalCount = v .catalogItems.length, p (), t && o.addNotification({
12789
12786
type: "error",
12790
12787
message: t
12791
12788
});
12792
12789
}));
12793
12790
};
12794
- var b = function() {
12795
- var e = _.reject(y .unfilteredProjects, "metadata.deletionTimestamp"), n = _.sortBy(e, t("displayName"));
12796
- y .searchEnabled = !_.isEmpty(e), y .templateProjects = s.orderByMostRecentlyViewed(n);
12791
+ var y = function() {
12792
+ var e = _.reject(v .unfilteredProjects, "metadata.deletionTimestamp"), n = _.sortBy(e, t("displayName"));
12793
+ v .searchEnabled = !_.isEmpty(e), v .templateProjects = s.orderByMostRecentlyViewed(n);
12797
12794
};
12798
12795
} ],
12799
12796
controllerAs: "$ctrl",
0 commit comments