summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts
diff options
context:
space:
mode:
authorys9693 <ys9693@att.com>2020-01-19 13:50:02 +0200
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-01-22 12:33:31 +0000
commit16a9fce0e104a38371a9e5a567ec611ae3fc7f33 (patch)
tree03a2aff3060ddb5bc26a90115805a04becbaffc9 /catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts
parentaa83a2da4f911c3ac89318b8e9e8403b072942e1 (diff)
Catalog alignment
Issue-ID: SDC-2724 Signed-off-by: ys9693 <ys9693@att.com> Change-Id: I52b4aacb58cbd432ca0e1ff7ff1f7dd52099c6fe
Diffstat (limited to 'catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts')
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts23
1 files changed, 13 insertions, 10 deletions
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts
index b09662d7a2..9794209757 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts
@@ -19,12 +19,12 @@
*/
'use strict';
-import {IWorkspaceViewModelScope} from "app/view-models/workspace/workspace-view-model";
-import {PropertyModel} from "app/models";
-import {ModalsHandler} from "app/utils";
-import {COMPONENT_FIELDS} from "../../../../utils/constants";
-import {ComponentGenericResponse} from "../../../../ng2/services/responses/component-generic-response";
-import {ComponentServiceNg2} from "../../../../ng2/services/component-services/component.service";
+import { IWorkspaceViewModelScope } from "app/view-models/workspace/workspace-view-model";
+import { PropertyModel } from "app/models";
+import { ModalsHandler } from "app/utils";
+import { ComponentGenericResponse } from "../../../../ng2/services/responses/component-generic-response";
+import { ComponentServiceNg2 } from "../../../../ng2/services/component-services/component.service";
+import { SdcUiCommon, SdcUiServices, SdcUiComponents } from "onap-ui-angular";
interface IPropertiesViewModelScope extends IWorkspaceViewModelScope {
tableHeadersList:Array<any>;
@@ -43,14 +43,16 @@ export class PropertiesViewModel {
'$scope',
'$filter',
'ModalsHandler',
- 'ComponentServiceNg2'
+ 'ComponentServiceNg2',
+ 'ModalServiceSdcUI'
];
constructor(private $scope:IPropertiesViewModelScope,
private $filter:ng.IFilterService,
private ModalsHandler:ModalsHandler,
- private ComponentServiceNg2:ComponentServiceNg2) {
+ private ComponentServiceNg2:ComponentServiceNg2,
+ private modalService: SdcUiServices.ModalService) {
this.initComponentProperties();
}
@@ -101,12 +103,13 @@ export class PropertiesViewModel {
this.$scope.delete = (property:PropertyModel):void => {
- let onOk = ():void => {
+ let onOk: Function = ():void => {
this.$scope.component.deleteProperty(property.uniqueId);
};
let title:string = this.$filter('translate')("PROPERTY_VIEW_DELETE_MODAL_TITLE");
let message:string = this.$filter('translate')("PROPERTY_VIEW_DELETE_MODAL_TEXT", "{'name': '" + property.name + "'}");
- this.ModalsHandler.openConfirmationModal(title, message, false).then(onOk);
+ const okButton = {testId: "OK", text: "OK", type: SdcUiCommon.ButtonType.info, callback: onOk, closeModal: true} as SdcUiComponents.ModalButtonComponent;
+ this.modalService.openInfoModal(title, message, 'delete-modal', [okButton]);
};
}
}