summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/view-models/workspace/workspace-view-model.ts')
-rw-r--r--catalog-ui/src/app/view-models/workspace/workspace-view-model.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
index 11667283b2..e132d53eaf 100644
--- a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
@@ -27,6 +27,7 @@ import {
IUserProperties,
IAppMenu,
Resource,
+ Service,
Component,
Plugin,
PluginsConfiguration,
@@ -431,8 +432,14 @@ export class WorkspaceViewModel {
components: this.components
}, {inherit: false});
};
+
+ console.log(this.$scope.component, "this.$scope.component")
+ if ((<Service>this.$scope.component).serviceType == "Service") {
+ this.ComponentFactory.importComponentOnServer(this.$scope.component).then(onSuccessCreate, onFailed);
+ } else {
+ this.ComponentFactory.createComponentOnServer(this.$scope.component).then(onSuccessCreate, onFailed);
+ }
- this.ComponentFactory.createComponentOnServer(this.$scope.component).then(onSuccessCreate, onFailed);
};