Skip to content

Commit

Permalink
Merge pull request eclipse-che#5033 from eclipse/CODENVY-2035
Browse files Browse the repository at this point in the history
CODENVY-2035: Change doc's links
  • Loading branch information
Oleksii Orel committed May 10, 2017
2 parents 7542a58 + 28be50d commit b133c01
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dashboard/src/app/stacks/list-stacks/list-stacks.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-->
<che-toolbar che-title="Stacks" border-none></che-toolbar>
<che-description che-link-title="Learn more." che-link="/docs/workspace/stacks/index.html">
<che-description che-link-title="Learn more." che-link="{{branding.docs.stack}}">
A stack is environment configuration for workspace defined by its runtime recipe. Create workspaces from stacks that define projects, runtimes
and commands.
</che-description>
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/app/stacks/stack-details/stack.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
ng-change="stackController.updateStackFromJson()"
aria-label="Stack configuration editor">
</textarea>
<a target="_blank" ng-href="https://www.eclipse.org/che/docs/workspace/stacks/index.html">Docs: Stack Structure</a>
<a target="_blank" ng-href="{{branding.docs.stack}}">Docs: Stack Structure</a>
</div>
</che-show-area>
</che-label-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-->
<che-toolbar che-title="Workspaces" border-none></che-toolbar>
<che-description che-link-title="Learn more." che-link="/docs/workspace/admin-intro/index.html">A workspace is where your projects live and run. Create workspaces from stacks that define projects, runtimes, and commands.</che-description>
<che-description che-link-title="Learn more." che-link="{{branding.docs.workspace}}">A workspace is where your projects live and run. Create workspaces from stacks that define projects, runtimes, and commands.</che-description>
<md-content md-scroll-y flex layout="column" md-theme="maincontent-theme">
<md-progress-linear md-mode="indeterminate" class="workspaces-list-progress"
ng-show="listWorkspacesCtrl.isInfoLoading"></md-progress-linear>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
'use strict';
import {DockerfileParser} from '../../../../../components/api/environment/docker-file-parser';
import {CheBranding} from '../../../../../components/branding/che-branding.factory';

/**
* @ngdoc controller
Expand All @@ -30,6 +31,7 @@ export class WorkspaceRecipeAuthoringController {
recipeScript: string;
recipeFormatCopy: string;
recipeScriptCopy: string;
stackDocsUrl: string;
recipeChange: Function;

editorOptions: {
Expand All @@ -44,10 +46,10 @@ export class WorkspaceRecipeAuthoringController {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
constructor($scope: ng.IScope, $timeout: ng.ITimeoutService) {
constructor($scope: ng.IScope, $timeout: ng.ITimeoutService, cheBranding: CheBranding) {
this.$timeout = $timeout;

this.dockerfileParser = new DockerfileParser();
this.stackDocsUrl = cheBranding.getDocs().stack;

this.editorOptions = {
lineWrapping: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{{workspaceRecipeAuthoringController.recipeValidationError}}
</div>
<div class="recipe-docs-link">
<a href="https://www.eclipse.org/che/docs/workspace/stacks/index.html#stack-administration" target="_blank">Custom stack documentation</a>
<a ng-href="{{workspaceRecipeAuthoringController.stackDocsUrl}}" target="_blank">Custom stack documentation</a>
</div>
</div>

Expand Down
4 changes: 4 additions & 0 deletions dashboard/src/assets/branding/product.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@
"cli" : {
"configName" : "che.env",
"name" : "CHE"
},
"docs" : {
"stack" : "/docs/devops/runtime-stacks/index.html",
"workspace" : "/docs/devops/intro/index.html"
}
}
15 changes: 13 additions & 2 deletions dashboard/src/components/branding/che-branding.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export class CheBranding {
$http: ng.IHttpService;
cheService: CheService;

private docs: { stack: string; workspace: string};
/**
* Default constructor that is using resource
* @ngInject for Dependency injection
Expand All @@ -47,7 +48,7 @@ export class CheBranding {
let assetPrefix = 'assets/branding/';

// load data
this.$http.get(assetPrefix + 'product.json').then((data) => {
this.$http.get(assetPrefix + 'product.json').then((data: any) => {

let brandingData = data.data;

Expand All @@ -62,7 +63,8 @@ export class CheBranding {
helpPath : brandingData.helpPath,
helpTitle : brandingData.helpTitle,
supportEmail: brandingData.supportEmail,
oauthDocs: brandingData.oauthDocs
oauthDocs: brandingData.oauthDocs,
docs: brandingData.docs
};

this.productName = this.$rootScope.branding.title;
Expand All @@ -83,6 +85,7 @@ export class CheBranding {
} else {
this.cli = this.$rootScope.branding.cli;
}
this.docs = this.$rootScope.branding.docs;
this.deferred.resolve(this.$rootScope.branding);
});

Expand Down Expand Up @@ -124,5 +127,13 @@ export class CheBranding {
return this.cli;
}

/**
* Returns object with docs URLs.
* @returns {{stack: string, workspace: string}}
*/
getDocs(): { stack: string; workspace: string } {
return this.docs;
}

}

0 comments on commit b133c01

Please sign in to comment.