Skip to content

Commit 74d945c

Browse files
author
OpenShift Bot
committed
bump(github.com/openshift/origin-web-console): 3e75b27f3c8defc1e22cfed22a7e8e642a24ee1b
1 parent 44fc84b commit 74d945c

File tree

1 file changed

+44
-22
lines changed

1 file changed

+44
-22
lines changed

pkg/assets/bindata.go

+44-22
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,10 @@ AVAILABLE_KINDS_BLACKLIST:[ "Binding", "Ingress", "DeploymentConfigRollback" ],
12771277
ENABLE_TECH_PREVIEW_FEATURE:{
12781278
pipelines:!0
12791279
},
1280+
SAMPLE_PIPELINE_TEMPLATE:{
1281+
name:"jenkins-pipeline-example",
1282+
namespace:"openshift"
1283+
},
12801284
PROJECT_NAVIGATION:[ {
12811285
label:"Overview",
12821286
iconClass:"fa fa-dashboard",
@@ -6427,47 +6431,60 @@ b.buildConfigs = a.select(b.unfilteredBuildConfigs), j(), m();
64276431
d.unwatchAll(l);
64286432
});
64296433
}));
6430-
} ]), angular.module("openshiftConsole").controller("PipelinesController", [ "$filter", "$routeParams", "$scope", "AlertMessageService", "BuildsService", "DataService", "Logger", "ProjectsService", function(a, b, c, d, e, f, g, h) {
6431-
c.projectName = b.project, c.alerts = c.alerts || {}, c.buildConfigs = {}, d.getAlerts().forEach(function(a) {
6434+
} ]), angular.module("openshiftConsole").controller("PipelinesController", [ "$filter", "$routeParams", "$scope", "Constants", "Navigate", "AlertMessageService", "BuildsService", "DataService", "Logger", "ProjectsService", function(a, b, c, d, e, f, g, h, i, j) {
6435+
c.projectName = b.project, c.alerts = c.alerts || {}, c.buildConfigs = {}, f.getAlerts().forEach(function(a) {
64326436
c.alerts[a.name] = a.data;
6433-
}), d.clearAlerts();
6434-
var i = [];
6435-
h.get(b.project).then(_.spread(function(b, d) {
6437+
}), f.clearAlerts();
6438+
var k = [];
6439+
j.get(b.project).then(_.spread(function(b, f) {
64366440
c.project = b;
6437-
var g = {}, h = a("buildConfigForBuild"), j = a("isIncompleteBuild"), k = a("isJenkinsPipelineStrategy"), l = a("isNewerResource"), m = function(a, b) {
6438-
if (!j(b)) {
6441+
var i = {}, j = a("buildConfigForBuild"), l = a("isIncompleteBuild"), m = a("isJenkinsPipelineStrategy"), n = a("isNewerResource"), o = function(a, b) {
6442+
if (!l(b)) {
64396443
c.statsByConfig[a] || (c.statsByConfig[a] = {
64406444
count:0,
64416445
totalDuration:0
64426446
});
64436447
var d = c.statsByConfig[a];
6444-
d.count++, d.totalDuration += e.getDuration(b), d.avgDuration = _.round(d.totalDuration / d.count);
6448+
d.count++, d.totalDuration += g.getDuration(b), d.avgDuration = _.round(d.totalDuration / d.count);
64456449
}
6446-
}, n = function() {
6450+
}, p = function() {
64476451
var a = {}, b = {};
6448-
c.statsByConfig = {}, _.each(g, function(d) {
6449-
if (k(d)) {
6450-
var e = h(d) || "";
6451-
c.buildConfigs[e] || (c.buildConfigs[e] = null), j(d) ? _.set(a, [ e, d.metadata.name ], d) :l(d, b[e]) && (b[e] = d), m(e, d);
6452+
c.statsByConfig = {}, _.each(i, function(d) {
6453+
if (m(d)) {
6454+
var e = j(d) || "";
6455+
c.buildConfigs[e] || (c.buildConfigs[e] = null), l(d) ? _.set(a, [ e, d.metadata.name ], d) :n(d, b[e]) && (b[e] = d), o(e, d);
64526456
}
64536457
}), _.each(b, function(b, c) {
64546458
_.set(a, [ c, b.metadata.name ], b);
64556459
}), c.interestingBuildsByConfig = a;
64566460
};
6457-
i.push(f.watch("builds", d, function(a) {
6458-
c.buildsLoaded = !0, g = a.by("metadata.name"), n();
6459-
})), i.push(f.watch("buildconfigs", d, function(a) {
6460-
c.buildConfigsLoaded = !0, c.buildConfigs = _.pick(a.by("metadata.name"), k), n();
6461+
k.push(h.watch("builds", f, function(a) {
6462+
c.buildsLoaded = !0, i = a.by("metadata.name"), p();
6463+
}));
6464+
var q = !1;
6465+
k.push(h.watch("buildconfigs", f, function(a) {
6466+
if (c.buildConfigsLoaded = !0, c.buildConfigs = _.pick(a.by("metadata.name"), m), _.isEmpty(c.buildConfigs) && !q) {
6467+
q = !0;
6468+
var b = d.SAMPLE_PIPELINE_TEMPLATE.name, f = d.SAMPLE_PIPELINE_TEMPLATE.namespace;
6469+
h.get("templates", b, {
6470+
namespace:f
6471+
}, {
6472+
errorNotification:!1
6473+
}).then(function() {
6474+
c.createSampleURL = e.fromTemplateURL(c.projectName, b, f);
6475+
});
6476+
}
6477+
p();
64616478
})), c.startBuild = function(b) {
6462-
e.startBuild(b, d).then(_.noop, function(b) {
6479+
g.startBuild(b, f).then(_.noop, function(b) {
64636480
c.alerts["start-build"] = {
64646481
type:"error",
64656482
message:"An error occurred while starting the build.",
64666483
details:a("getErrorDetails")(b)
64676484
};
64686485
});
64696486
}, c.$on("$destroy", function() {
6470-
f.unwatchAll(i);
6487+
h.unwatchAll(k);
64716488
});
64726489
}));
64736490
} ]), angular.module("openshiftConsole").controller("BuildConfigController", [ "$scope", "$filter", "$routeParams", "AlertMessageService", "APIService", "BuildsService", "ImagesService", "DataService", "LabelFilter", "ModalsService", "ProjectsService", "keyValueEditorUtils", function(a, b, c, d, e, f, g, h, i, j, k, l) {
@@ -26149,10 +26166,15 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
2614926166
"<div ng-if=\"project.metadata.name | canIAddToProject\">\n" +
2615026167
"<p>\n" +
2615126168
"No pipelines have been added to project {{projectName}}.\n" +
26169+
"<br>\n" +
26170+
"Learn more about\n" +
26171+
"<a ng-href=\"{{ 'pipeline-builds' | helpLink}}\" target=\"_blank\">Pipeline Builds</a>\n" +
26172+
"and the\n" +
26173+
"<a ng-href=\"{{ 'pipeline-plugin' | helpLink}}\" target=\"_blank\">OpenShift Pipeline Plugin</a>.\n" +
2615226174
"</p>\n" +
26153-
"<p ng-if=\"project.metadata.name | canIAddToProject\">\n" +
26154-
"<a ng-href=\"project/{{projectName}}/create\" class=\"btn btn-lg btn-primary\">\n" +
26155-
"Add to Project\n" +
26175+
"<p ng-if=\"(project.metadata.name | canIAddToProject) && createSampleURL\">\n" +
26176+
"<a ng-href=\"{{createSampleURL}}\" class=\"btn btn-lg btn-primary\">\n" +
26177+
"Create Sample Pipeline\n" +
2615626178
"</a>\n" +
2615726179
"</p>\n" +
2615826180
"</div>\n" +

0 commit comments

Comments
 (0)