Skip to content

Commit

Permalink
Adding doc and support links to template info panel
Browse files Browse the repository at this point in the history
  • Loading branch information
rhamilto committed Oct 9, 2017
1 parent 2ef8242 commit 2a2794f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
3 changes: 3 additions & 0 deletions app/scripts/directives/processTemplateDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
var ctrl = this;
var validityWatcher;
var imageForIconClass = $filter('imageForIconClass');
var annotation = $filter('annotation');

ctrl.selectStep = {
id: 'projectTemplates',
Expand Down Expand Up @@ -127,6 +128,8 @@
initializeSteps();
ctrl.iconClass = getIconClass();
ctrl.image = getImage();
ctrl.docUrl = annotation(ctrl.template, "template.openshift.io/documentation-url");
ctrl.supportUrl = annotation(ctrl.template, "template.openshift.io/support-url");
}
}
if (changes.useProjectTemplate) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
{{tag}}
</span>
</div>
<ul ng-if="$ctrl.docUrl || $ctrl.supportUrl" class="list-inline order-service-documentation-url">
<li ng-if="$ctrl.docUrl" >
<a ng-href="{{$ctrl.docUrl}}" target="_blank" class="learn-more-link">View Documentation <i class="fa fa-external-link" aria-hidden="true"></i></a>
</li>
<li ng-if="$ctrl.supportUrl" >
<a ng-href="{{$ctrl.supportUrl}}" target="_blank" class="learn-more-link">Get Support <i class="fa fa-external-link" aria-hidden="true"></i></a>
</li>
</ul>
</div>
</div>
<div class="order-service-description-block">
Expand Down
8 changes: 4 additions & 4 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -13083,10 +13083,10 @@ b.unfilteredProjects = _.toArray(e.by("metadata.name"));
}, function() {
b.unfilteredProjects = [];
}).finally(function() {
S();
w();
});
}
var y, b = this, C = t("imageForIconClass");
var y, b = this, C = t("imageForIconClass"), S = t("annotation");
b.selectStep = {
id: "projectTemplates",
label: "Selection",
Expand Down Expand Up @@ -13156,7 +13156,7 @@ appliedFilters: [],
onFilterChange: g
}, n.project || (b.showProjectName = !0);
}, b.$onChanges = function(e) {
e.template && b.template && (d(), b.iconClass = l(), b.image = u()), e.useProjectTemplate && d();
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();
}, e.$on("templateInstantiated", function(e, t) {
b.selectedProject = t.project, b.currentStep = b.resultsStep.label;
}), b.$onDestroy = function() {
Expand All @@ -13178,7 +13178,7 @@ message: t
});
}));
};
var S = function() {
var w = function() {
var e = _.reject(b.unfilteredProjects, "metadata.deletionTimestamp"), n = _.sortBy(e, t("displayName"));
b.searchEnabled = !_.isEmpty(e), b.templateProjects = c.orderByMostRecentlyViewed(n);
};
Expand Down
8 changes: 8 additions & 0 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -8858,6 +8858,14 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"{{tag}}\n" +
"</span>\n" +
"</div>\n" +
"<ul ng-if=\"$ctrl.docUrl || $ctrl.supportUrl\" class=\"list-inline order-service-documentation-url\">\n" +
"<li ng-if=\"$ctrl.docUrl\">\n" +
"<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" +
"</li>\n" +
"<li ng-if=\"$ctrl.supportUrl\">\n" +
"<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" +
"</li>\n" +
"</ul>\n" +
"</div>\n" +
"</div>\n" +
"<div class=\"order-service-description-block\">\n" +
Expand Down

0 comments on commit 2a2794f

Please sign in to comment.