Skip to content

Commit a504787

Browse files
committed
Allow the help base url to be configured to update docs links more easily
Fixes openshift#896
1 parent a60cd15 commit a504787

File tree

2 files changed

+72
-61
lines changed

2 files changed

+72
-61
lines changed

app/scripts/constants.js

+37-30
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,45 @@
66

77
// NOTE: Update extensions/examples/online-extensions.js if you add a new help link to this map.
88

9+
(function() {
10+
11+
var HELP_BASE_URL = "https://docs.openshift.org/latest/";
12+
913
window.OPENSHIFT_CONSTANTS = {
1014
// Maps links to specific topics in external documentation.
15+
HELP_BASE_URL: HELP_BASE_URL,
1116
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",
17+
"cli": HELP_BASE_URL + "cli_reference/overview.html",
18+
"get_started_cli": HELP_BASE_URL + "cli_reference/get_started_cli.html",
19+
"basic_cli_operations": HELP_BASE_URL + "cli_reference/basic_cli_operations.html",
20+
"build-triggers": HELP_BASE_URL + "dev_guide/builds.html#build-triggers",
21+
"webhooks": HELP_BASE_URL + "dev_guide/builds.html#webhook-triggers",
22+
"new_app": HELP_BASE_URL + "dev_guide/new_app.html",
23+
"start-build": HELP_BASE_URL + "dev_guide/builds.html#starting-a-build",
24+
"deployment-operations": HELP_BASE_URL + "cli_reference/basic_cli_operations.html#build-and-deployment-cli-operations",
25+
"route-types": HELP_BASE_URL + "architecture/core_concepts/routes.html#route-types",
26+
"persistent_volumes": HELP_BASE_URL + "dev_guide/persistent_volumes.html",
27+
"compute_resources": HELP_BASE_URL + "dev_guide/compute_resources.html",
28+
"pod_autoscaling": HELP_BASE_URL + "dev_guide/pod_autoscaling.html",
29+
"application_health": HELP_BASE_URL + "dev_guide/application_health.html",
30+
"source_secrets": HELP_BASE_URL + "dev_guide/builds.html#using-secrets",
31+
"git_secret": HELP_BASE_URL + "dev_guide/builds.html#using-private-repositories-for-builds",
32+
"pull_secret": HELP_BASE_URL + "dev_guide/managing_images.html#using-image-pull-secrets",
33+
"managing_secrets": HELP_BASE_URL + "dev_guide/service_accounts.html#managing-allowed-secrets",
34+
"creating_secrets": HELP_BASE_URL + "dev_guide/secrets.html#creating-and-using-secrets",
35+
"storage_classes": HELP_BASE_URL + "install_config/persistent_storage/dynamically_provisioning_pvs.html",
36+
"selector_label": HELP_BASE_URL + "install_config/persistent_storage/selector_label_binding.html",
37+
"rolling_strategy": HELP_BASE_URL + "dev_guide/deployments.html#rolling-strategy",
38+
"recreate_strategy": HELP_BASE_URL + "dev_guide/deployments.html#recreate-strategy",
39+
"custom_strategy": HELP_BASE_URL + "dev_guide/deployments.html#custom-strategy",
40+
"lifecycle_hooks": HELP_BASE_URL + "dev_guide/deployments.html#lifecycle-hooks",
41+
"new_pod_exec": HELP_BASE_URL + "dev_guide/deployments.html#pod-based-lifecycle-hook",
42+
"authorization": HELP_BASE_URL + "architecture/additional_concepts/authorization.html",
43+
"roles": HELP_BASE_URL + "architecture/additional_concepts/authorization.html#roles",
44+
"service_accounts": HELP_BASE_URL + "dev_guide/service_accounts.html",
45+
"users_and_groups": HELP_BASE_URL + "architecture/additional_concepts/authentication.html#users-and-groups",
4146
// default should remain last, add new links above
42-
"default": "https://docs.openshift.org/latest/welcome/index.html"
47+
"default": HELP_BASE_URL + "welcome/index.html"
4348
},
4449
// 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.
4550
CLI: {
@@ -371,3 +376,5 @@ window.OPENSHIFT_CONSTANTS = {
371376
}
372377
]
373378
};
379+
380+
})();

dist/scripts/scripts.js

+35-31
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,41 @@ function ResourceGroupVersion(a, b, c) {
44
return this.resource = a, this.group = b, this.version = c, this;
55
}
66

7+
!function() {
8+
var a = "https://docs.openshift.org/latest/";
79
window.OPENSHIFT_CONSTANTS = {
10+
HELP_BASE_URL:a,
811
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"
12+
cli:a + "cli_reference/overview.html",
13+
get_started_cli:a + "cli_reference/get_started_cli.html",
14+
basic_cli_operations:a + "cli_reference/basic_cli_operations.html",
15+
"build-triggers":a + "dev_guide/builds.html#build-triggers",
16+
webhooks:a + "dev_guide/builds.html#webhook-triggers",
17+
new_app:a + "dev_guide/new_app.html",
18+
"start-build":a + "dev_guide/builds.html#starting-a-build",
19+
"deployment-operations":a + "cli_reference/basic_cli_operations.html#build-and-deployment-cli-operations",
20+
"route-types":a + "architecture/core_concepts/routes.html#route-types",
21+
persistent_volumes:a + "dev_guide/persistent_volumes.html",
22+
compute_resources:a + "dev_guide/compute_resources.html",
23+
pod_autoscaling:a + "dev_guide/pod_autoscaling.html",
24+
application_health:a + "dev_guide/application_health.html",
25+
source_secrets:a + "dev_guide/builds.html#using-secrets",
26+
git_secret:a + "dev_guide/builds.html#using-private-repositories-for-builds",
27+
pull_secret:a + "dev_guide/managing_images.html#using-image-pull-secrets",
28+
managing_secrets:a + "dev_guide/service_accounts.html#managing-allowed-secrets",
29+
creating_secrets:a + "dev_guide/secrets.html#creating-and-using-secrets",
30+
storage_classes:a + "install_config/persistent_storage/dynamically_provisioning_pvs.html",
31+
selector_label:a + "install_config/persistent_storage/selector_label_binding.html",
32+
rolling_strategy:a + "dev_guide/deployments.html#rolling-strategy",
33+
recreate_strategy:a + "dev_guide/deployments.html#recreate-strategy",
34+
custom_strategy:a + "dev_guide/deployments.html#custom-strategy",
35+
lifecycle_hooks:a + "dev_guide/deployments.html#lifecycle-hooks",
36+
new_pod_exec:a + "dev_guide/deployments.html#pod-based-lifecycle-hook",
37+
authorization:a + "architecture/additional_concepts/authorization.html",
38+
roles:a + "architecture/additional_concepts/authorization.html#roles",
39+
service_accounts:a + "dev_guide/service_accounts.html",
40+
users_and_groups:a + "architecture/additional_concepts/authentication.html#users-and-groups",
41+
"default":a + "welcome/index.html"
3942
},
4043
CLI:{
4144
"Latest Release":"https://github.com/openshift/origin/releases/latest"
@@ -241,7 +244,8 @@ label:"Uncategorized",
241244
description:""
242245
} ]
243246
} ]
244-
}, angular.module("openshiftConsole", [ "ngAnimate", "ngCookies", "ngResource", "ngRoute", "ngSanitize", "openshiftUI", "kubernetesUI", "registryUI.images", "ui.bootstrap", "patternfly.charts", "patternfly.sort", "openshiftConsoleTemplates", "ui.ace", "extension-registry", "as.sortable", "ui.select", "key-value-editor", "angular-inview", "angularMoment" ]).config([ "$routeProvider", function(a) {
247+
};
248+
}(), angular.module("openshiftConsole", [ "ngAnimate", "ngCookies", "ngResource", "ngRoute", "ngSanitize", "openshiftUI", "kubernetesUI", "registryUI.images", "ui.bootstrap", "patternfly.charts", "patternfly.sort", "openshiftConsoleTemplates", "ui.ace", "extension-registry", "as.sortable", "ui.select", "key-value-editor", "angular-inview", "angularMoment" ]).config([ "$routeProvider", function(a) {
245249
a.when("/", {
246250
templateUrl:"views/projects.html",
247251
controller:"ProjectsController"

0 commit comments

Comments
 (0)