Skip to content

Commit

Permalink
Show required memory for devfile, use devfile registry url from settings
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Shumilova <[email protected]>
  • Loading branch information
ashumilova committed Jun 6, 2019
1 parent ed63694 commit a4f7a1b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
che-label-description="Choose your workspace runtime environment used to build and run your projects.">
<devfile-selector on-devfile-select="createWorkspaceController.onDevfileSelected(devfile)">
</devfile-selector>
</che-label-container-->
</che-label-container>

<!-- Project source selector -->
<che-label-container che-label-name="Projects">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class DevfileSelectorController {
}

loadDevfiles(): void {
let location = this.cheWorkspace.getWorkspaceSettings().devfileRegistry;
let location = this.cheWorkspace.getWorkspaceSettings().cheWorkspaceDevfileRegistryUrl;
this.devfileRegistry.fetchDevfiles(location).then((data: Array<IDevfileMetaData>) => {
this.devfiles = data;

Expand All @@ -50,7 +50,7 @@ export class DevfileSelectorController {
devfileOnClick(devfile: any): void {
this.selectedDevfile = devfile;

let location = this.cheWorkspace.getWorkspaceSettings().devfileRegistry;
let location = this.cheWorkspace.getWorkspaceSettings().cheWorkspaceDevfileRegistryUrl;

let devfileContent = this.devfileRegistry.getDevfile(location, devfile.links.self);
if (devfileContent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
class="che-list-item-details">
<che-list-header-column class="devfile-selector-icon-column"
che-column-title=""></che-list-header-column>
<che-list-header-column flex="auto"
<che-list-header-column flex="25"
che-sort-value="devfileSelectorController.devfileOrderBy"
che-sort-item="name"
che-column-title="Name"></che-list-header-column>
<che-list-header-column flex="40"
<che-list-header-column flex="50"
che-sort-value="devfileSelectorController.devfileOrderBy"
che-column-title="Description"></che-list-header-column>
che-column-title="Description"></che-list-header-column>
<che-list-header-column flex="10"
che-sort-value="devfileSelectorController.devfileOrderBy"
che-column-title="Required memory"></che-list-header-column>
</div>
</div>
</che-list-header>
Expand All @@ -44,13 +47,17 @@
</div>
</div>
<!-- Name -->
<div flex="35">
<div flex="25">
<span class="che-list-item-name" devfile-name="{{devfile.displayName}}">{{devfile.displayName}}</span>
</div>
<!-- Description -->
<div flex="50">
<span class="che-list-item-secondary" devfile-description="{{devfile.description}}">{{devfile.description}}</span>
</div>
<!-- Memory -->
<div flex="10">
<span class="che-list-item-secondary" devfile-memory="{{devfile.globalMemoryLimit}}">{{devfile.globalMemoryLimit}}</span>
</div>
</div>
</div>
</che-list-item>
Expand Down
1 change: 1 addition & 0 deletions dashboard/src/components/api/devfile-registry.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { stringify } from "querystring";
export interface IDevfileMetaData {
displayName: string;
description?: string;
globalMemoryLimit: string;
icon: string;
links: any;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,6 @@ export class CheWorkspace {
const promise = this.remoteWorkspaceAPI.getSettings().$promise;
return promise.then((settings: che.IWorkspaceSettings) => {
this.workspaceSettings = settings;
//TODO remove next line
this.workspaceSettings.devfileRegistry = 'http://che-devfile-registry-default.192.168.39.13.nip.io';
return this.workspaceSettings;
}, (error: any) => {
if (error.status === 304) {
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/typings/che.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ declare namespace che {
export interface IWorkspaceSettings {
supportedRecipeTypes: string;
cheWorkspacePluginRegistryUrl: string;
devfileRegistry?: string;
cheWorkspaceDevfileRegistryUrl?: string;
[propName: string]: string | boolean;
}

Expand Down

0 comments on commit a4f7a1b

Please sign in to comment.