-
+
+
+
+
diff --git a/dashboard/src/app/factories/load-factory/load-factory.service.ts b/dashboard/src/app/factories/load-factory/load-factory.service.ts
index 98f2ae2d9d9..62566f8877f 100644
--- a/dashboard/src/app/factories/load-factory/load-factory.service.ts
+++ b/dashboard/src/app/factories/load-factory/load-factory.service.ts
@@ -10,6 +10,7 @@
* Red Hat, Inc. - initial API and implementation
*/
'use strict';
+import {WorkspacesService} from '../../workspaces/workspaces.service';
export interface FactoryLoadingStep {
text: string;
@@ -23,14 +24,19 @@ export interface FactoryLoadingStep {
* @author Ann Shumilova
*/
export class LoadFactoryService {
+
+ static $inject = ['workspacesService'];
+
private loadFactoryInProgress: boolean;
private currentProgressStep: number;
private loadingSteps: Array
;
+ private workspacesService: WorkspacesService;
/**
* Default constructor that is using resource
*/
- constructor () {
+ constructor (workspacesService: WorkspacesService) {
+ this.workspacesService = workspacesService;
this.loadFactoryInProgress = false;
this.currentProgressStep = 0;
@@ -123,4 +129,19 @@ export class LoadFactoryService {
setLoadFactoryInProgress(value: boolean): void {
this.loadFactoryInProgress = value;
}
+
+ /**
+ * Returns `true` if supported version of factory workspace.
+ * @param factory {che.IFactory}
+ * @returns {boolean}
+ */
+ isSupportedVersion(factory: che.IFactory): boolean {
+ if (!factory) {
+ return false;
+ }
+ return this.workspacesService.isSupportedVersion({
+ config: factory.workspace,
+ devfile: factory.devfile
+ });
+ }
}
diff --git a/dashboard/src/app/factories/load-factory/load-factory.styl b/dashboard/src/app/factories/load-factory/load-factory.styl
index a010d4bdf27..b3138a70e4a 100644
--- a/dashboard/src/app/factories/load-factory/load-factory.styl
+++ b/dashboard/src/app/factories/load-factory/load-factory.styl
@@ -14,6 +14,14 @@
.load-factory-working-log
margin 35px 0
+div.load-factory-warning-info
+ border none
+ color inherit
+ max-width 448px
+ padding-left 20px
+ margin-bottom 20px
+ background-color $warning-color
+
.load-factory-bottom-bar
height 90px
diff --git a/dashboard/src/app/workspaces/workspaces.service.ts b/dashboard/src/app/workspaces/workspaces.service.ts
index 499d955bb6c..afae52fdda5 100644
--- a/dashboard/src/app/workspaces/workspaces.service.ts
+++ b/dashboard/src/app/workspaces/workspaces.service.ts
@@ -70,11 +70,13 @@ export class WorkspacesService {
* @returns {boolean}
*/
isSupportedVersion(workspace: che.IWorkspace): boolean {
+ if (!workspace){
+ return false;
+ }
if (workspace.devfile) {
return true;
}
-
- if (!workspace || !workspace.config) {
+ if (!workspace.config) {
return false;
}
const config = workspace.config;
diff --git a/dashboard/src/components/api/factory-templates.ts b/dashboard/src/components/api/factory-templates.ts
index 763111d2edb..802cded7486 100644
--- a/dashboard/src/components/api/factory-templates.ts
+++ b/dashboard/src/components/api/factory-templates.ts
@@ -20,6 +20,10 @@ export class CheFactoryTemplates {
return JSON.stringify({
'v': '4.0',
'workspace': {
+ 'attributes': {
+ 'editor': 'eclipse/che-theia/next',
+ 'plugins': 'eclipse/che-machine-exec-plugin/0.0.1'
+ },
'projects': [
{
'name': 'Spring',
@@ -54,10 +58,6 @@ export class CheFactoryTemplates {
'wss': {
'machines': {
'dev-machine': {
- 'installers': [
- 'org.eclipse.che.terminal',
- 'org.eclipse.che.ws-agent'
- ],
'servers': {},
'attributes': {
'memoryLimitBytes': '2147483648'
@@ -78,6 +78,10 @@ export class CheFactoryTemplates {
return JSON.stringify({
'v': '4.0',
'workspace': {
+ 'attributes': {
+ 'editor': 'eclipse/che-theia/next',
+ 'plugins': 'eclipse/che-machine-exec-plugin/0.0.1'
+ },
'commands': [],
'projects': [
{
@@ -109,15 +113,10 @@ export class CheFactoryTemplates {
],
'defaultEnv': 'wss',
'name': 'wss',
- 'attributes': {},
'environments': {
'wss': {
'machines': {
'dev-machine': {
- 'installers': [
- 'org.eclipse.che.terminal',
- 'org.eclipse.che.ws-agent'
- ],
'servers': {},
'attributes': {
'memoryLimitBytes': '2147483648'
@@ -143,6 +142,10 @@ export class CheFactoryTemplates {
return JSON.stringify({
'v': '4.0',
'workspace': {
+ 'attributes': {
+ 'editor': 'eclipse/che-theia/next',
+ 'plugins': 'eclipse/che-machine-exec-plugin/0.0.1'
+ },
'commands': [],
'projects': [
{
@@ -166,10 +169,6 @@ export class CheFactoryTemplates {
'wss': {
'machines': {
'dev-machine': {
- 'installers': [
- 'org.eclipse.che.terminal',
- 'org.eclipse.che.ws-agent'
- ],
'servers': {},
'attributes': {
'memoryLimitBytes': '2147483648'
diff --git a/dashboard/src/components/steps-container/steps-container.directive.ts b/dashboard/src/components/steps-container/steps-container.directive.ts
index 17e89a3918c..d47b0c9c62a 100644
--- a/dashboard/src/components/steps-container/steps-container.directive.ts
+++ b/dashboard/src/components/steps-container/steps-container.directive.ts
@@ -18,6 +18,7 @@
export class CheStepsContainer implements ng.IDirective {
restrict = 'E';
+ transclude = true;
templateUrl = 'components/steps-container/steps-container.html';
scope = {
diff --git a/dashboard/src/components/steps-container/steps-container.html b/dashboard/src/components/steps-container/steps-container.html
index 3792a41c379..7f0633c7434 100644
--- a/dashboard/src/components/steps-container/steps-container.html
+++ b/dashboard/src/components/steps-container/steps-container.html
@@ -1,4 +1,5 @@
+