Skip to content

Commit 72e0f59

Browse files
author
OpenShift Bot
authored
Merge pull request #911 from jwforres/help-base-url
Merged by openshift-bot
2 parents 7389ce5 + 7ed1fea commit 72e0f59

File tree

3 files changed

+69
-62
lines changed

3 files changed

+69
-62
lines changed

app/scripts/constants.js

+31-30
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,39 @@
88

99
window.OPENSHIFT_CONSTANTS = {
1010
// Maps links to specific topics in external documentation.
11+
HELP_BASE_URL: "https://docs.openshift.org/latest/",
1112
HELP: {
12-
"cli": "https://docs.openshift.org/latest/cli_reference/overview.html",
13-
"get_started_cli": "https://docs.openshift.org/latest/cli_reference/get_started_cli.html",
14-
"basic_cli_operations": "https://docs.openshift.org/latest/cli_reference/basic_cli_operations.html",
15-
"build-triggers": "https://docs.openshift.org/latest/dev_guide/builds.html#build-triggers",
16-
"webhooks": "https://docs.openshift.org/latest/dev_guide/builds.html#webhook-triggers",
17-
"new_app": "https://docs.openshift.org/latest/dev_guide/new_app.html",
18-
"start-build": "https://docs.openshift.org/latest/dev_guide/builds.html#starting-a-build",
19-
"deployment-operations": "https://docs.openshift.org/latest/cli_reference/basic_cli_operations.html#build-and-deployment-cli-operations",
20-
"route-types": "https://docs.openshift.org/latest/architecture/core_concepts/routes.html#route-types",
21-
"persistent_volumes": "https://docs.openshift.org/latest/dev_guide/persistent_volumes.html",
22-
"compute_resources": "https://docs.openshift.org/latest/dev_guide/compute_resources.html",
23-
"pod_autoscaling": "https://docs.openshift.org/latest/dev_guide/pod_autoscaling.html",
24-
"application_health": "https://docs.openshift.org/latest/dev_guide/application_health.html",
25-
"source_secrets": "https://docs.openshift.org/latest/dev_guide/builds.html#using-secrets",
26-
"git_secret": "https://docs.openshift.org/latest/dev_guide/builds.html#using-private-repositories-for-builds",
27-
"pull_secret": "https://docs.openshift.org/latest/dev_guide/managing_images.html#using-image-pull-secrets",
28-
"managing_secrets": "https://docs.openshift.org/latest/dev_guide/service_accounts.html#managing-allowed-secrets",
29-
"creating_secrets": "https://docs.openshift.org/latest/dev_guide/secrets.html#creating-and-using-secrets",
30-
"storage_classes": "https://docs.openshift.org/latest/install_config/persistent_storage/dynamically_provisioning_pvs.html",
31-
"selector_label": "https://docs.openshift.org/latest/install_config/persistent_storage/selector_label_binding.html",
32-
"rolling_strategy": "https://docs.openshift.org/latest/dev_guide/deployments.html#rolling-strategy",
33-
"recreate_strategy": "https://docs.openshift.org/latest/dev_guide/deployments.html#recreate-strategy",
34-
"custom_strategy": "https://docs.openshift.org/latest/dev_guide/deployments.html#custom-strategy",
35-
"lifecycle_hooks": "https://docs.openshift.org/latest/dev_guide/deployments.html#lifecycle-hooks",
36-
"new_pod_exec": "https://docs.openshift.org/latest/dev_guide/deployments.html#pod-based-lifecycle-hook",
37-
"authorization": "https://docs.openshift.org/latest/architecture/additional_concepts/authorization.html",
38-
"roles": "https://docs.openshift.org/latest/architecture/additional_concepts/authorization.html#roles",
39-
"service_accounts": "https://docs.openshift.org/latest/dev_guide/service_accounts.html",
40-
"users_and_groups": "https://docs.openshift.org/latest/architecture/additional_concepts/authentication.html#users-and-groups",
13+
"cli": "cli_reference/overview.html",
14+
"get_started_cli": "cli_reference/get_started_cli.html",
15+
"basic_cli_operations": "cli_reference/basic_cli_operations.html",
16+
"build-triggers": "dev_guide/builds.html#build-triggers",
17+
"webhooks": "dev_guide/builds.html#webhook-triggers",
18+
"new_app": "dev_guide/new_app.html",
19+
"start-build": "dev_guide/builds.html#starting-a-build",
20+
"deployment-operations": "cli_reference/basic_cli_operations.html#build-and-deployment-cli-operations",
21+
"route-types": "architecture/core_concepts/routes.html#route-types",
22+
"persistent_volumes": "dev_guide/persistent_volumes.html",
23+
"compute_resources": "dev_guide/compute_resources.html",
24+
"pod_autoscaling": "dev_guide/pod_autoscaling.html",
25+
"application_health": "dev_guide/application_health.html",
26+
"source_secrets": "dev_guide/builds.html#using-secrets",
27+
"git_secret": "dev_guide/builds.html#using-private-repositories-for-builds",
28+
"pull_secret": "dev_guide/managing_images.html#using-image-pull-secrets",
29+
"managing_secrets": "dev_guide/service_accounts.html#managing-allowed-secrets",
30+
"creating_secrets": "dev_guide/secrets.html#creating-and-using-secrets",
31+
"storage_classes": "install_config/persistent_storage/dynamically_provisioning_pvs.html",
32+
"selector_label": "install_config/persistent_storage/selector_label_binding.html",
33+
"rolling_strategy": "dev_guide/deployments.html#rolling-strategy",
34+
"recreate_strategy": "dev_guide/deployments.html#recreate-strategy",
35+
"custom_strategy": "dev_guide/deployments.html#custom-strategy",
36+
"lifecycle_hooks": "dev_guide/deployments.html#lifecycle-hooks",
37+
"new_pod_exec": "dev_guide/deployments.html#pod-based-lifecycle-hook",
38+
"authorization": "architecture/additional_concepts/authorization.html",
39+
"roles": "architecture/additional_concepts/authorization.html#roles",
40+
"service_accounts": "dev_guide/service_accounts.html",
41+
"users_and_groups": "architecture/additional_concepts/authentication.html#users-and-groups",
4142
// default should remain last, add new links above
42-
"default": "https://docs.openshift.org/latest/welcome/index.html"
43+
"default": "welcome/index.html"
4344
},
4445
// Maps links names to URL's where the CLI tools can be downloaded, may point directly to files or to external pages in a CDN, for example.
4546
CLI: {

app/scripts/filters/util.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,11 @@ angular.module('openshiftConsole')
192192
})
193193
.filter('helpLink', function(Constants) {
194194
return function(type) {
195-
return Constants.HELP[type] || Constants.HELP["default"];
195+
var helpLink = Constants.HELP[type] || Constants.HELP["default"];
196+
if (!URI(helpLink).is('absolute')) {
197+
helpLink = Constants.HELP_BASE_URL + helpLink;
198+
}
199+
return helpLink;
196200
};
197201
})
198202
.filter('taskTitle', function() {

dist/scripts/scripts.js

+33-31
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,38 @@ return this.resource = a, this.group = b, this.version = c, this;
55
}
66

77
window.OPENSHIFT_CONSTANTS = {
8+
HELP_BASE_URL:"https://docs.openshift.org/latest/",
89
HELP:{
9-
cli:"https://docs.openshift.org/latest/cli_reference/overview.html",
10-
get_started_cli:"https://docs.openshift.org/latest/cli_reference/get_started_cli.html",
11-
basic_cli_operations:"https://docs.openshift.org/latest/cli_reference/basic_cli_operations.html",
12-
"build-triggers":"https://docs.openshift.org/latest/dev_guide/builds.html#build-triggers",
13-
webhooks:"https://docs.openshift.org/latest/dev_guide/builds.html#webhook-triggers",
14-
new_app:"https://docs.openshift.org/latest/dev_guide/new_app.html",
15-
"start-build":"https://docs.openshift.org/latest/dev_guide/builds.html#starting-a-build",
16-
"deployment-operations":"https://docs.openshift.org/latest/cli_reference/basic_cli_operations.html#build-and-deployment-cli-operations",
17-
"route-types":"https://docs.openshift.org/latest/architecture/core_concepts/routes.html#route-types",
18-
persistent_volumes:"https://docs.openshift.org/latest/dev_guide/persistent_volumes.html",
19-
compute_resources:"https://docs.openshift.org/latest/dev_guide/compute_resources.html",
20-
pod_autoscaling:"https://docs.openshift.org/latest/dev_guide/pod_autoscaling.html",
21-
application_health:"https://docs.openshift.org/latest/dev_guide/application_health.html",
22-
source_secrets:"https://docs.openshift.org/latest/dev_guide/builds.html#using-secrets",
23-
git_secret:"https://docs.openshift.org/latest/dev_guide/builds.html#using-private-repositories-for-builds",
24-
pull_secret:"https://docs.openshift.org/latest/dev_guide/managing_images.html#using-image-pull-secrets",
25-
managing_secrets:"https://docs.openshift.org/latest/dev_guide/service_accounts.html#managing-allowed-secrets",
26-
creating_secrets:"https://docs.openshift.org/latest/dev_guide/secrets.html#creating-and-using-secrets",
27-
storage_classes:"https://docs.openshift.org/latest/install_config/persistent_storage/dynamically_provisioning_pvs.html",
28-
selector_label:"https://docs.openshift.org/latest/install_config/persistent_storage/selector_label_binding.html",
29-
rolling_strategy:"https://docs.openshift.org/latest/dev_guide/deployments.html#rolling-strategy",
30-
recreate_strategy:"https://docs.openshift.org/latest/dev_guide/deployments.html#recreate-strategy",
31-
custom_strategy:"https://docs.openshift.org/latest/dev_guide/deployments.html#custom-strategy",
32-
lifecycle_hooks:"https://docs.openshift.org/latest/dev_guide/deployments.html#lifecycle-hooks",
33-
new_pod_exec:"https://docs.openshift.org/latest/dev_guide/deployments.html#pod-based-lifecycle-hook",
34-
authorization:"https://docs.openshift.org/latest/architecture/additional_concepts/authorization.html",
35-
roles:"https://docs.openshift.org/latest/architecture/additional_concepts/authorization.html#roles",
36-
service_accounts:"https://docs.openshift.org/latest/dev_guide/service_accounts.html",
37-
users_and_groups:"https://docs.openshift.org/latest/architecture/additional_concepts/authentication.html#users-and-groups",
38-
"default":"https://docs.openshift.org/latest/welcome/index.html"
10+
cli:"cli_reference/overview.html",
11+
get_started_cli:"cli_reference/get_started_cli.html",
12+
basic_cli_operations:"cli_reference/basic_cli_operations.html",
13+
"build-triggers":"dev_guide/builds.html#build-triggers",
14+
webhooks:"dev_guide/builds.html#webhook-triggers",
15+
new_app:"dev_guide/new_app.html",
16+
"start-build":"dev_guide/builds.html#starting-a-build",
17+
"deployment-operations":"cli_reference/basic_cli_operations.html#build-and-deployment-cli-operations",
18+
"route-types":"architecture/core_concepts/routes.html#route-types",
19+
persistent_volumes:"dev_guide/persistent_volumes.html",
20+
compute_resources:"dev_guide/compute_resources.html",
21+
pod_autoscaling:"dev_guide/pod_autoscaling.html",
22+
application_health:"dev_guide/application_health.html",
23+
source_secrets:"dev_guide/builds.html#using-secrets",
24+
git_secret:"dev_guide/builds.html#using-private-repositories-for-builds",
25+
pull_secret:"dev_guide/managing_images.html#using-image-pull-secrets",
26+
managing_secrets:"dev_guide/service_accounts.html#managing-allowed-secrets",
27+
creating_secrets:"dev_guide/secrets.html#creating-and-using-secrets",
28+
storage_classes:"install_config/persistent_storage/dynamically_provisioning_pvs.html",
29+
selector_label:"install_config/persistent_storage/selector_label_binding.html",
30+
rolling_strategy:"dev_guide/deployments.html#rolling-strategy",
31+
recreate_strategy:"dev_guide/deployments.html#recreate-strategy",
32+
custom_strategy:"dev_guide/deployments.html#custom-strategy",
33+
lifecycle_hooks:"dev_guide/deployments.html#lifecycle-hooks",
34+
new_pod_exec:"dev_guide/deployments.html#pod-based-lifecycle-hook",
35+
authorization:"architecture/additional_concepts/authorization.html",
36+
roles:"architecture/additional_concepts/authorization.html#roles",
37+
service_accounts:"dev_guide/service_accounts.html",
38+
users_and_groups:"architecture/additional_concepts/authentication.html#users-and-groups",
39+
"default":"welcome/index.html"
3940
},
4041
CLI:{
4142
"Latest Release":"https://github.com/openshift/origin/releases/latest"
@@ -13597,7 +13598,8 @@ return a;
1359713598
};
1359813599
}).filter("helpLink", [ "Constants", function(a) {
1359913600
return function(b) {
13600-
return a.HELP[b] || a.HELP["default"];
13601+
var c = a.HELP[b] || a.HELP["default"];
13602+
return URI(c).is("absolute") || (c = a.HELP_BASE_URL + c), c;
1360113603
};
1360213604
} ]).filter("taskTitle", function() {
1360313605
return function(a) {

0 commit comments

Comments
 (0)