Skip to content

Commit 2a2794f

Browse files
committed
Adding doc and support links to template info panel
1 parent 2ef8242 commit 2a2794f

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

Diff for: app/scripts/directives/processTemplateDialog.js

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
var ctrl = this;
3737
var validityWatcher;
3838
var imageForIconClass = $filter('imageForIconClass');
39+
var annotation = $filter('annotation');
3940

4041
ctrl.selectStep = {
4142
id: 'projectTemplates',
@@ -127,6 +128,8 @@
127128
initializeSteps();
128129
ctrl.iconClass = getIconClass();
129130
ctrl.image = getImage();
131+
ctrl.docUrl = annotation(ctrl.template, "template.openshift.io/documentation-url");
132+
ctrl.supportUrl = annotation(ctrl.template, "template.openshift.io/support-url");
130133
}
131134
}
132135
if (changes.useProjectTemplate) {

Diff for: app/views/directives/process-template-dialog/process-template-info.html

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
{{tag}}
1414
</span>
1515
</div>
16+
<ul ng-if="$ctrl.docUrl || $ctrl.supportUrl" class="list-inline order-service-documentation-url">
17+
<li ng-if="$ctrl.docUrl" >
18+
<a ng-href="{{$ctrl.docUrl}}" target="_blank" class="learn-more-link">View Documentation <i class="fa fa-external-link" aria-hidden="true"></i></a>
19+
</li>
20+
<li ng-if="$ctrl.supportUrl" >
21+
<a ng-href="{{$ctrl.supportUrl}}" target="_blank" class="learn-more-link">Get Support <i class="fa fa-external-link" aria-hidden="true"></i></a>
22+
</li>
23+
</ul>
1624
</div>
1725
</div>
1826
<div class="order-service-description-block">

Diff for: dist/scripts/scripts.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -13083,10 +13083,10 @@ b.unfilteredProjects = _.toArray(e.by("metadata.name"));
1308313083
}, function() {
1308413084
b.unfilteredProjects = [];
1308513085
}).finally(function() {
13086-
S();
13086+
w();
1308713087
});
1308813088
}
13089-
var y, b = this, C = t("imageForIconClass");
13089+
var y, b = this, C = t("imageForIconClass"), S = t("annotation");
1309013090
b.selectStep = {
1309113091
id: "projectTemplates",
1309213092
label: "Selection",
@@ -13156,7 +13156,7 @@ appliedFilters: [],
1315613156
onFilterChange: g
1315713157
}, n.project || (b.showProjectName = !0);
1315813158
}, b.$onChanges = function(e) {
13159-
e.template && b.template && (d(), b.iconClass = l(), b.image = u()), e.useProjectTemplate && d();
13159+
e.template && b.template && (d(), b.iconClass = l(), b.image = u(), b.docUrl = S(b.template, "template.openshift.io/documentation-url"), b.supportUrl = S(b.template, "template.openshift.io/support-url")), e.useProjectTemplate && d();
1316013160
}, e.$on("templateInstantiated", function(e, t) {
1316113161
b.selectedProject = t.project, b.currentStep = b.resultsStep.label;
1316213162
}), b.$onDestroy = function() {
@@ -13178,7 +13178,7 @@ message: t
1317813178
});
1317913179
}));
1318013180
};
13181-
var S = function() {
13181+
var w = function() {
1318213182
var e = _.reject(b.unfilteredProjects, "metadata.deletionTimestamp"), n = _.sortBy(e, t("displayName"));
1318313183
b.searchEnabled = !_.isEmpty(e), b.templateProjects = c.orderByMostRecentlyViewed(n);
1318413184
};

Diff for: dist/scripts/templates.js

+8
Original file line numberDiff line numberDiff line change
@@ -8858,6 +8858,14 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
88588858
"{{tag}}\n" +
88598859
"</span>\n" +
88608860
"</div>\n" +
8861+
"<ul ng-if=\"$ctrl.docUrl || $ctrl.supportUrl\" class=\"list-inline order-service-documentation-url\">\n" +
8862+
"<li ng-if=\"$ctrl.docUrl\">\n" +
8863+
"<a ng-href=\"{{$ctrl.docUrl}}\" target=\"_blank\" class=\"learn-more-link\">View Documentation <i class=\"fa fa-external-link\" aria-hidden=\"true\"></i></a>\n" +
8864+
"</li>\n" +
8865+
"<li ng-if=\"$ctrl.supportUrl\">\n" +
8866+
"<a ng-href=\"{{$ctrl.supportUrl}}\" target=\"_blank\" class=\"learn-more-link\">Get Support <i class=\"fa fa-external-link\" aria-hidden=\"true\"></i></a>\n" +
8867+
"</li>\n" +
8868+
"</ul>\n" +
88618869
"</div>\n" +
88628870
"</div>\n" +
88638871
"<div class=\"order-service-description-block\">\n" +

0 commit comments

Comments
 (0)