diff --git a/submarine-workbench/workbench-web/src/app/pages/workbench/environment/environment.component.html b/submarine-workbench/workbench-web/src/app/pages/workbench/environment/environment.component.html
index 3c9fdd7320..0d100c68f5 100644
--- a/submarine-workbench/workbench-web/src/app/pages/workbench/environment/environment.component.html
+++ b/submarine-workbench/workbench-web/src/app/pages/workbench/environment/environment.component.html
@@ -95,7 +95,7 @@
Environment
-
+
|
{{ data.environmentSpec.name }} |
{{ data.environmentSpec.dockerImage }} |
diff --git a/submarine-workbench/workbench-web/src/app/pages/workbench/environment/environment.component.ts b/submarine-workbench/workbench-web/src/app/pages/workbench/environment/environment.component.ts
index 023769c95e..e324e4c663 100644
--- a/submarine-workbench/workbench-web/src/app/pages/workbench/environment/environment.component.ts
+++ b/submarine-workbench/workbench-web/src/app/pages/workbench/environment/environment.component.ts
@@ -175,7 +175,7 @@ export class EnvironmentComponent implements OnInit {
deleteEnvironments() {
for (let i = this.checkedList.length - 1; i >= 0; i--) {
console.log(this.environmentList[i].environmentSpec.name);
- if (this.checkedList[i] === true) {
+ if (this.checkedList[i] === true && this.environmentList[i].environmentSpec.name != 'notebook-env') {
this.onDeleteEnvironment(this.environmentList[i].environmentSpec.name, false);
}
}
diff --git a/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook.component.ts b/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook.component.ts
index 4a2176d844..506765cd57 100644
--- a/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook.component.ts
+++ b/submarine-workbench/workbench-web/src/app/pages/workbench/notebook/notebook.component.ts
@@ -34,6 +34,7 @@ export class NotebookComponent implements OnInit {
// Environment
envList;
envNameList = [];
+ indexOfDeaultEnv;
// Namesapces
allNamespaceList = [];
@@ -85,6 +86,7 @@ export class NotebookComponent implements OnInit {
this.envNameList.push(env.environmentSpec.name);
}
});
+ this.indexOfDeaultEnv = this.envNameList.indexOf('notebook-env');
});
}
@@ -180,7 +182,7 @@ export class NotebookComponent implements OnInit {
initNotebookStatus() {
this.isVisible = true;
this.notebookName.reset();
- this.envName.reset(this.envNameList[0]);
+ this.envName.reset(this.envNameList[this.indexOfDeaultEnv]);
this.envVars.clear();
this.cpus.reset(1);
this.gpus.reset(0);