From 8c11656073a04aa73cc5dfe62bf722ab6a499d32 Mon Sep 17 00:00:00 2001 From: Anjali walsatwar Date: Fri, 12 Oct 2018 14:46:39 +0530 Subject: removed resource-input & service-input folder Issue-ID: SDC-1789 Change-Id: I15868ac889a57fabb1009787098087e22e3f45a5 Signed-off-by: Anjali walsatwar --- catalog-ui/src/app/app.ts | 24 -- catalog-ui/src/app/modules/view-model-module.ts | 4 - catalog-ui/src/app/utils/constants.ts | 2 - .../resource-input/resource-inputs-view-model.ts | 137 ------- .../resource-input/resource-inputs-view.html | 102 ------ .../inputs/resource-input/resource-inputs.less | 9 - .../service-input/service-inputs-view-model.ts | 398 --------------------- .../inputs/service-input/service-inputs-view.html | 150 -------- .../tabs/inputs/service-input/service-inputs.less | 47 --- catalog-ui/src/assets/styles/app.less | 4 - 10 files changed, 877 deletions(-) delete mode 100644 catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view-model.ts delete mode 100644 catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view.html delete mode 100644 catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs.less delete mode 100644 catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view-model.ts delete mode 100644 catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view.html delete mode 100644 catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs.less diff --git a/catalog-ui/src/app/app.ts b/catalog-ui/src/app/app.ts index 67cf66529c..2f7b78169e 100644 --- a/catalog-ui/src/app/app.ts +++ b/catalog-ui/src/app/app.ts @@ -345,18 +345,6 @@ ng1appModule.config([ } ); - $stateProvider.state( - States.WORKSPACE_SERVICE_INPUTS, { - url: 'service_inputs', - parent: 'workspace', - controller: viewModelsModuleName + '.ServiceInputsViewModel', - templateUrl: './view-models/workspace/tabs/inputs/service-input/service-inputs-view.html', - data: { - bodyClass: 'workspace-inputs' - } - } - ); - $stateProvider.state( States.WORKSPACE_PROPERTIES_ASSIGNMENT, { url: 'properties_assignment', @@ -376,18 +364,6 @@ ng1appModule.config([ } ); - $stateProvider.state( - States.WORKSPACE_RESOURCE_INPUTS, { - url: 'resource_inputs', - parent: 'workspace', - controller: viewModelsModuleName + '.ResourceInputsViewModel', - templateUrl: './view-models/workspace/tabs/inputs/resource-input/resource-inputs-view.html', - data: { - bodyClass: 'workspace-inputs' - } - } - ); - $stateProvider.state( States.WORKSPACE_ATTRIBUTES, { url: 'attributes', diff --git a/catalog-ui/src/app/modules/view-model-module.ts b/catalog-ui/src/app/modules/view-model-module.ts index 08bd53e89a..c1929e0e12 100644 --- a/catalog-ui/src/app/modules/view-model-module.ts +++ b/catalog-ui/src/app/modules/view-model-module.ts @@ -67,8 +67,6 @@ import {ManagementWorkflowViewModel} from "../view-models/workspace/tabs/managem import {InterfaceOperationViewModel} from "../view-models/workspace/tabs/interface-operation/interface-operation-view-model"; import {NetworkCallFlowViewModel} from "../view-models/workspace/tabs/network-call-flow/network-call-flow-view-model"; import {DeploymentViewModel} from "../view-models/workspace/tabs/deployment/deployment-view-model"; -// import {ResourceInputsViewModel} from "../view-models/workspace/tabs/inputs/resource-input/resource-inputs-view-model"; -// import {ServiceInputsViewModel} from "../view-models/workspace/tabs/inputs/service-input/service-inputs-view-model"; import {ReqAndCapabilitiesViewModel} from "../view-models/workspace/tabs/req-and-capabilities/req-and-capabilities-view-model"; import {InputFormViewModel} from "../view-models/forms/input-form/input-form-view-modal"; import {HierarchyViewModel} from "../view-models/tabs/hierarchy/hierarchy-view-model"; @@ -132,8 +130,6 @@ viewModelModule .controller(moduleName + '.InterfaceOperationViewModel', InterfaceOperationViewModel) .controller(moduleName + '.NetworkCallFlowViewModel', NetworkCallFlowViewModel) .controller(moduleName + '.DeploymentViewModel', DeploymentViewModel) - // .controller(moduleName + '.ResourceInputsViewModel', ResourceInputsViewModel) - // .controller(moduleName + '.ServiceInputsViewModel', ServiceInputsViewModel) .controller(moduleName + '.ReqAndCapabilitiesViewModel', ReqAndCapabilitiesViewModel) .controller(moduleName + '.InputFormViewModel', InputFormViewModel) .controller(moduleName + '.PluginsTabViewModel', PluginsTabViewModel) diff --git a/catalog-ui/src/app/utils/constants.ts b/catalog-ui/src/app/utils/constants.ts index b0f22ac1f8..0694560549 100644 --- a/catalog-ui/src/app/utils/constants.ts +++ b/catalog-ui/src/app/utils/constants.ts @@ -252,8 +252,6 @@ export class States { public static WORKSPACE_ACTIVITY_LOG = 'workspace.activity_log'; public static WORKSPACE_DEPLOYMENT_ARTIFACTS = 'workspace.deployment_artifacts'; public static WORKSPACE_PROPERTIES = 'workspace.properties'; - public static WORKSPACE_SERVICE_INPUTS = 'workspace.service_inputs'; - public static WORKSPACE_RESOURCE_INPUTS = 'workspace.resource_inputs'; public static WORKSPACE_ATTRIBUTES = 'workspace.attributes'; public static WORKSPACE_INFORMATION_ARTIFACTS = 'workspace.information_artifacts'; public static WORKSPACE_TOSCA_ARTIFACTS = 'workspace.tosca_artifacts'; diff --git a/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view-model.ts deleted file mode 100644 index 4b9d314a38..0000000000 --- a/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view-model.ts +++ /dev/null @@ -1,137 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -/*********** DEPRECATED -- replaced by prop assignments */ -// 'use strict'; -// import * as _ from "lodash"; -// import {IWorkspaceViewModelScope} from "app/view-models/workspace/workspace-view-model"; -// import {ComponentInstance, InstancesInputsOrPropertiesMapData, Resource, PropertyModel, InputModel} from "app/models"; -// import {ModalsHandler} from "app/utils"; - -// export interface IInputsViewModelScope extends IWorkspaceViewModelScope { -// InstanceInputsProperties:InstancesInputsOrPropertiesMapData; //this is tha map object that hold the selected inputs and the inputs we already used -// vfInstancesList:Array; -// component:Resource; - -// onArrowPressed():void; -// getInputPropertiesForInstance(instanceId:string, instance:ComponentInstance):ng.IPromise ; -// loadInputPropertiesForInstance(instanceId:string, input:InputModel):ng.IPromise ; -// openEditValueModal(input:InputModel):void; -// openEditPropertyModal(property:PropertyModel):void; -// } - -// export class ResourceInputsViewModel { - -// static '$inject' = [ -// '$scope', -// '$q', -// 'ModalsHandler' -// ]; - -// constructor(private $scope:IInputsViewModelScope, private $q:ng.IQService, private ModalsHandler:ModalsHandler) { -// this.initScope(); -// } - -// private initScope = ():void => { - -// this.$scope.InstanceInputsProperties = new InstancesInputsOrPropertiesMapData(); -// this.$scope.vfInstancesList = this.$scope.component.componentInstances; - -// // Need to cast all inputs to InputModel for the search to work -// let tmpInputs:Array = new Array(); -// _.each(this.$scope.component.inputs, (input):void => { -// tmpInputs.push(new InputModel(input)); -// }); -// this.$scope.component.inputs = tmpInputs; -// // This function is not supported for resource -// //this.$scope.component.getComponentInputs(); - -// /* -// * When clicking on instance input in the left or right table, this function will load all properties of the selected input -// */ -// this.$scope.getInputPropertiesForInstance = (instanceId:string, instance:ComponentInstance):ng.IPromise => { -// let deferred = this.$q.defer(); -// instance.properties = this.$scope.component.componentInstancesProperties[instanceId]; -// deferred.resolve(true); -// return deferred.promise; -// }; - -// /* -// * When clicking on instance input in the left or right table, this function will load all properties of the selected input -// */ -// this.$scope.loadInputPropertiesForInstance = (instanceId:string, input:InputModel):ng.IPromise => { -// let deferred = this.$q.defer(); - -// let onSuccess = (properties:Array) => { -// input.properties = properties; -// deferred.resolve(true); -// }; - -// let onError = () => { -// deferred.resolve(false) -// }; - -// if (!input.properties) { -// this.$scope.component.getComponentInstanceInputProperties(instanceId, input.uniqueId).then(onSuccess, onError); -// } else { -// deferred.resolve(true); -// } -// return deferred.promise; -// }; - -// /* -// * When pressing the arrow, we create service inputs from the inputs selected -// */ -// this.$scope.onArrowPressed = ():void => { -// let onSuccess = (inputsCreated:Array) => { - -// //disabled all the inputs in the left table -// _.forEach(this.$scope.InstanceInputsProperties, (properties:Array) => { -// _.forEach(properties, (property:PropertyModel) => { -// property.isAlreadySelected = true; -// }); -// }); - -// // Adding color to the new inputs (right table) -// _.forEach(inputsCreated, (input) => { -// input.isNew = true; -// }); - -// // Removing color to the new inputs (right table) -// setTimeout(() => { -// _.forEach(inputsCreated, (input) => { -// input.isNew = false; -// }); -// this.$scope.$apply(); -// }, 3000); -// }; - -// this.$scope.component.createInputsFormInstances(this.$scope.InstanceInputsProperties).then(onSuccess); -// }; - -// this.$scope.openEditValueModal = (input:InputModel) => { -// this.ModalsHandler.openEditInputValueModal(input); -// }; - -// this.$scope.openEditPropertyModal = (property:PropertyModel):void => { -// this.ModalsHandler.openEditPropertyModal(property, this.$scope.component, this.$scope.component.componentInstancesProperties[property.resourceInstanceUniqueId], false).then(() => { -// }); -// } -// } -// } \ No newline at end of file diff --git a/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view.html b/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view.html deleted file mode 100644 index 4a66b8cd10..0000000000 --- a/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view.html +++ /dev/null @@ -1,102 +0,0 @@ - - -
-
- -
-
VFC instances inputs
-
-
- - - -
-
-
- {{instance.name}} -
-
- -
- -
-
No properties to display
-
- -
- -
- -
-
-
-
- -
- -
- -
- -
-
-
VF inputs
- - -
- - - -
-
- -
-
No properties to display
-
- -
-
- -
-
-
-
-
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs.less b/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs.less deleted file mode 100644 index ebb32fbdb2..0000000000 --- a/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs.less +++ /dev/null @@ -1,9 +0,0 @@ -.workspace-inputs { - - .property-row { - .input-check-box { - text-align: center; - } - } - -} diff --git a/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view-model.ts deleted file mode 100644 index 5e69f5bed6..0000000000 --- a/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view-model.ts +++ /dev/null @@ -1,398 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -/***** DEPRECATED - replaced by prop assignments */ -// 'use strict'; -// import * as _ from "lodash"; -// import {IWorkspaceViewModelScope} from "app/view-models/workspace/workspace-view-model"; -// import {ComponentInstance, InstancesInputsOrPropertiesMapData, Service, IAppMenu, InputModel, PropertyModel, InputPropertyBase} from "app/models"; -// import {DataTypesService} from "app/services"; -// import {ModalsHandler, ResourceType} from "app/utils"; - - -// interface IServiceInputsViewModelScope extends IWorkspaceViewModelScope { - -// vfInstancesList:Array; -// instanceInputsMap:InstancesInputsOrPropertiesMapData; //this is tha map object that hold the selected inputs and the inputs we already used -// instancePropertiesMap:InstancesInputsOrPropertiesMapData; -// component:Service; -// sdcMenu:IAppMenu; -// isViewOnly:boolean; -// isArrowDisabled:boolean; -// onArrowPressed():void; -// checkArrowState():void; -// loadComponentInputs():void; -// loadInstanceInputs(instance:ComponentInstance):ng.IPromise ; -// loadInstanceProperties(instance:ComponentInstance):ng.IPromise ; -// loadInputPropertiesForInstance(instanceId:string, input:InputModel):ng.IPromise ; -// loadInputInputs(input:InputModel):ng.IPromise; -// deleteInput(input:InputModel):void -// openEditValueModal(input:InputModel):void; -// openSelectPropertyDataTypeViewModel(instanceId:string, property:PropertyModel):void; -// openEditPropertyDataTypeViewModel(property:PropertyModel):void; -// dataTypesService:DataTypesService; -// } - -// export class ServiceInputsViewModel { - -// static '$inject' = [ -// '$scope', -// '$q', -// 'ModalsHandler', -// 'Sdc.Services.DataTypesService' -// ]; - -// constructor(private $scope:IServiceInputsViewModelScope, -// private $q:ng.IQService, -// private ModalsHandler:ModalsHandler, -// private DataTypesService:DataTypesService) { -// this.initScope(); -// this.$scope.isViewOnly = this.$scope.isViewMode(); -// } - - -// private getInputsOrPropertiesAlreadySelected = (instanceNormalizeName:string, arrayToFilter:Array):Array => { -// let alreadySelectedInput = []; -// _.forEach(arrayToFilter, (inputOrProperty:InputPropertyBase) => { -// let expectedServiceInputName = instanceNormalizeName + '_' + inputOrProperty.name; -// let inputAlreadyInService = _.find(this.$scope.component.inputs, (serviceInput:InputModel) => { -// //Checking if the input prefix is the instance name + '_' + property/input name (prefix because we don't need to check full name for complex dataType) -// return serviceInput.name.substring(0, expectedServiceInputName.length) === expectedServiceInputName; -// }); -// if (inputAlreadyInService) { -// inputOrProperty.isAlreadySelected = true; -// alreadySelectedInput.push(inputOrProperty); -// } else { -// inputOrProperty.isAlreadySelected = false; -// } -// }); -// return alreadySelectedInput; -// }; - - -// /* -// * When loading the screen again, we need to disabled the inputs that already created on the service, -// * we do that by comparing the service input name, to the instance name + '_' + the resource instance input name. -// */ -// private disableEnableSelectedInputsOrPropertiesOnInit = (instance:ComponentInstance):void => { - -// if (instance.originType === ResourceType.VF) { -// this.$scope.instanceInputsMap[instance.uniqueId] = this.getInputsOrPropertiesAlreadySelected(instance.normalizedName, instance.inputs); -// } else { -// this.$scope.instancePropertiesMap[instance.uniqueId] = this.getInputsOrPropertiesAlreadySelected(instance.normalizedName, instance.properties); -// } -// }; - -// /* -// * Enable Input/Property after delete -// */ -// private enableInputsAfterDelete = (propertiesOrInputsDeletes:Array):void => { - -// _.forEach(propertiesOrInputsDeletes, (deletedInputInput:InputPropertyBase) => { //Enable all component instance inputs deleted - -// let inputOrPropertyDeleted:InputPropertyBase = _.find(this.$scope.instanceInputsMap[deletedInputInput.componentInstanceId], (inputOrProperty:InputPropertyBase) => { -// return inputOrProperty.uniqueId === deletedInputInput.uniqueId; -// }); -// inputOrPropertyDeleted.isAlreadySelected = false; -// delete _.remove(this.$scope.instanceInputsMap[deletedInputInput.componentInstanceId], {uniqueId: inputOrPropertyDeleted.uniqueId})[0]; -// }); -// }; - -// /* -// * Enable Input/Property after delete -// */ -// private enablePropertiesAfterDelete = (propertiesOrInputsDeletes:Array):void => { - -// _.forEach(propertiesOrInputsDeletes, (deletedInputInput:InputPropertyBase) => { //Enable all component instance inputs deleted -// let componentInstance = _.find(this.$scope.vfInstancesList, (instance:ComponentInstance) => { -// return instance.uniqueId === deletedInputInput.componentInstanceId; -// }); -// let inputOrPropertyDeleted:InputPropertyBase = _.find(this.$scope.instancePropertiesMap[deletedInputInput.componentInstanceId], (inputOrProperty:InputPropertyBase) => { -// return inputOrProperty.uniqueId === deletedInputInput.uniqueId; -// }); - -// let expectedName = componentInstance.normalizedName + '_' + inputOrPropertyDeleted.name; -// let isAnotherInputExist = _.find(this.$scope.component.inputs, (input:InputModel) => { -// return input.name.substring(0, expectedName.length) === expectedName; -// }); -// if (!isAnotherInputExist) { -// inputOrPropertyDeleted.isAlreadySelected = false; -// delete _.remove(this.$scope.instancePropertiesMap[deletedInputInput.componentInstanceId], {uniqueId: inputOrPropertyDeleted.uniqueId})[0]; -// } -// }); -// }; - -// private initScope = ():void => { - -// this.$scope.instanceInputsMap = new InstancesInputsOrPropertiesMapData(); -// this.$scope.instancePropertiesMap = new InstancesInputsOrPropertiesMapData(); -// this.$scope.isLoading = true; -// this.$scope.isArrowDisabled = true; -// // Why do we need this? we call this later. -// //this.$scope.component.getComponentInputs(); - -// let onSuccess = (componentInstances:Array) => { -// console.log("component instances loaded: ", componentInstances); -// this.$scope.vfInstancesList = componentInstances; -// this.$scope.isLoading = false; -// }; - -// //This function will get al component instance for the left table - in -// // future the instances will be filter according to search text -// this.$scope.component.getComponentInstancesFilteredByInputsAndProperties().then(onSuccess); - -// // This function will get the service inputs for the right table -// this.$scope.component.getComponentInputs(); - -// /* -// * When clicking on instance in the left table, this function will load all instance inputs -// */ -// this.$scope.loadInstanceInputs = (instance:ComponentInstance):ng.IPromise => { -// let deferred = this.$q.defer(); - -// let onSuccess = (inputs:Array) => { -// instance.inputs = inputs; -// this.disableEnableSelectedInputsOrPropertiesOnInit(instance); -// deferred.resolve(true); -// }; - -// let onError = () => { -// deferred.resolve(false); -// }; - -// if (!instance.inputs) { -// this.$scope.component.getComponentInstanceInputs(instance.uniqueId, instance.componentUid).then(onSuccess, onError); -// //this.disableEnableSelectedInputs(instance); -// } else { -// deferred.resolve(true); -// } -// return deferred.promise; -// }; - - -// this.$scope.loadInstanceProperties = (instance:ComponentInstance):ng.IPromise => { -// let deferred = this.$q.defer(); - -// let onSuccess = (properties:Array) => { -// instance.properties = properties; -// this.disableEnableSelectedInputsOrPropertiesOnInit(instance); -// deferred.resolve(true); -// }; - -// let onError = () => { -// deferred.resolve(false); -// }; - -// if (!instance.properties) { -// this.$scope.component.getComponentInstanceProperties(instance.uniqueId).then(onSuccess, onError); -// } else { -// deferred.resolve(true); -// } -// return deferred.promise; -// }; - -// /* -// * When clicking on instance input in the left or right table, this function will load all properties of the selected input -// */ -// this.$scope.loadInputPropertiesForInstance = (instanceId:string, input:InputModel):ng.IPromise => { -// let deferred = this.$q.defer(); - -// let onSuccess = (properties:Array) => { -// input.properties = properties; -// deferred.resolve(true); -// }; - -// let onError = () => { -// deferred.resolve(false) -// }; - -// if (!input.properties) { -// this.$scope.component.getComponentInstanceInputProperties(instanceId, input.uniqueId).then(onSuccess, onError); -// } else { -// deferred.resolve(true); -// } -// return deferred.promise; -// }; - -// /* -// * When clicking on input in the right table, this function will load all inputs of the selected input -// */ -// this.$scope.loadInputInputs = (input:InputModel):ng.IPromise => { -// let deferred = this.$q.defer(); - -// let onSuccess = () => { -// deferred.resolve(true); -// }; -// let onError = () => { -// deferred.resolve(false); -// }; - -// if (!input.inputs) { // Caching, if exists do not get it. -// this.$scope.component.getServiceInputInputsAndProperties(input.uniqueId).then(onSuccess, onError); -// } else { -// deferred.resolve(true); -// } -// return deferred.promise; -// }; - -// /* -// * When pressing the arrow, we create service inputs from the inputs selected -// */ -// this.$scope.onArrowPressed = ():void => { -// let onSuccess = (inputsCreated:Array) => { - -// //disabled all the inputs in the left table -// _.forEach(this.$scope.instanceInputsMap, (inputs:Array, instanceId:string) => { -// _.forEach(inputs, (input:InputModel) => { -// input.isAlreadySelected = true; -// }); -// }); -// _.forEach(this.$scope.instancePropertiesMap, (properties:Array, instanceId:string) => { -// _.forEach(properties, (property:PropertyModel) => { -// property.isAlreadySelected = true; -// }); -// }); -// this.addColorToItems(inputsCreated); -// }; - -// let onFailed = (error:any) => { -// this.$scope.isArrowDisabled = false; -// console.log("Error declaring input/property"); -// }; - -// this.$scope.isArrowDisabled = true; -// this.$scope.component.createInputsFormInstances(this.$scope.instanceInputsMap, this.$scope.instancePropertiesMap).then(onSuccess, onFailed); -// }; - - -// /* Iterates through array of selected inputs and properties and returns true if there is at least one new selection on left */ -// this.$scope.checkArrowState = ()=> { - -// let newInputSelected:boolean = _.some(this.$scope.instanceInputsMap, (inputs:Array) => { -// return _.some(inputs, (input:InputModel)=> { -// return input.isAlreadySelected === false; -// }); -// }); - -// let newPropSelected:boolean = _.some(this.$scope.instancePropertiesMap, (properties:Array) => { -// return _.some(properties, (property:PropertyModel) => { -// return property.isAlreadySelected === false; -// }); -// }); - -// this.$scope.isArrowDisabled = !(newInputSelected || newPropSelected); - -// }; - -// this.$scope.deleteInput = (inputToDelete:InputModel):void => { - -// let onDelete = ():void => { - -// let onSuccess = (deletedInput:InputModel):void => { -// if (deletedInput.inputs && deletedInput.inputs.length > 0) { // Enable input declared from input -// this.enableInputsAfterDelete(deletedInput.inputs); -// } - -// if (deletedInput.properties && deletedInput.properties.length > 0) { // Enable properties -// this.enablePropertiesAfterDelete(deletedInput.properties); -// } -// deletedInput.isDeleteDisabled = false; -// this.$scope.checkArrowState(); - -// }; - -// let onFailed = (error:any):void => { -// console.log("Error deleting input"); -// inputToDelete.isDeleteDisabled = false; -// }; - -// inputToDelete.isDeleteDisabled = true; -// this.addColorToItems([inputToDelete]); -// this.$scope.component.deleteServiceInput(inputToDelete.uniqueId).then((deletedInput:InputModel):void => { -// onSuccess(deletedInput); -// }, onFailed); -// }; - -// // Get confirmation modal text from menu.json -// let state = "deleteInput"; -// let title:string = this.$scope.sdcMenu.alertMessages[state].title; -// let message:string = this.$scope.sdcMenu.alertMessages[state].message.format([inputToDelete.name]); - -// // Open confirmation modal -// this.ModalsHandler.openAlertModal(title, message).then(onDelete); -// }; - -// this.$scope.openEditValueModal = (input:InputModel) => { -// this.ModalsHandler.openEditInputValueModal(input); -// }; - -// this.$scope.openSelectPropertyDataTypeViewModel = (instanceId:string, property:PropertyModel) => { -// //to open the select data type modal -// let selectedInstance = _.find(this.$scope.vfInstancesList, {uniqueId: instanceId}); -// this.DataTypesService.selectedInstance = selectedInstance; //set the selected instance on the service for compering the input name on the service & the complex property -// this.DataTypesService.selectedComponentInputs = this.$scope.component.inputs; // set all the service inputs on the data type service -// let filteredPropertiesMap = _.filter(this.$scope.instancePropertiesMap[instanceId], (instanceProperty)=> { -// return instanceProperty.name == property.name; -// });//get all properties under the specific property -// this.DataTypesService.selectedPropertiesName = property.propertiesName; - -// this.ModalsHandler.openSelectDataTypeModal(property, this.$scope.component, this.$scope.component.properties, filteredPropertiesMap).then((selectedProperty:PropertyModel)=> { -// if (selectedProperty && selectedProperty.propertiesName) { -// let propertyToUpdate:PropertyModel = _.find(selectedInstance.properties, {uniqueId: selectedProperty.uniqueId}); -// let existingProperty:PropertyModel = (_.find(this.$scope.instancePropertiesMap[instanceId], {uniqueId: propertyToUpdate.uniqueId})); - -// if (existingProperty) { -// existingProperty.propertiesName = selectedProperty.propertiesName; -// existingProperty.input = selectedProperty.input; -// existingProperty.isAlreadySelected = false; -// } else { -// propertyToUpdate.propertiesName = selectedProperty.propertiesName; -// propertyToUpdate.input = selectedProperty.input; -// this.$scope.instancePropertiesMap[instanceId].push(propertyToUpdate); - -// } -// this.$scope.checkArrowState(); - -// } -// }); -// }; - - -// this.$scope.openEditPropertyDataTypeViewModel = (property:PropertyModel)=> { -// this.ModalsHandler.openEditPropertyModal(property, this.$scope.component, this.$scope.component.properties, false).then(() => { -// }); -// } -// }; - -// private addColorToItems = (inputsCreated:Array):void => { - -// // Adding color to the new inputs (right table) -// _.forEach(inputsCreated, (input) => { -// input.isNew = true; -// }); - -// // Removing color to the new inputs (right table) -// setTimeout(() => { -// _.forEach(inputsCreated, (input) => { -// input.isNew = false; -// }); -// this.$scope.$apply(); -// }, 3000); -// }; -// } diff --git a/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view.html b/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view.html deleted file mode 100644 index 7ad93b8c18..0000000000 --- a/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view.html +++ /dev/null @@ -1,150 +0,0 @@ - - -
-
- -
-
Resource instance inputs
-
-
- - - -
-
-
- {{instance.name}} -
-
-
- -
-
- - - - - -
-
No properties to display -
-
- -
-
-
-
-
No - properties to display -
-
- -
-
-
- -
-
-
-
- -
-
-
- -
- -
-
-
Service inputs
- - - - - -
-
- - - - -
-
No properties to display -
-
- -
-
-
-
-
No properties to display
-
- -
-
-
- - -
-
-
-
-
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs.less b/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs.less deleted file mode 100644 index f783d0b6d6..0000000000 --- a/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs.less +++ /dev/null @@ -1,47 +0,0 @@ -.workspace-inputs { - - .service-inputs-view { - - .table-container-flex { - width:100% !important; - } - - .table-loader { - position: relative; - top:215px; - } - - } - - .infinite-scroll { - - overflow-y: scroll; - overflow-x: hidden; - max-height: 400px; - } - - .class_with_css_props_leading_to_a_scroll { - height: 100%; - overflow-y: auto; - } - - .table-container-flex { - .expand-collapse-table-row { - .service-input-row { - padding-left: 15px; - border: none; - border-bottom: rgba(120, 136, 148, 0.26) solid 1px; - - &.service-input-row { - background: @tlv_color_u; - &.new-input { - background: @tlv_color_v; - } - } - } - - - } - } - -} diff --git a/catalog-ui/src/assets/styles/app.less b/catalog-ui/src/assets/styles/app.less index 1b42aefd5f..0738c460e7 100644 --- a/catalog-ui/src/assets/styles/app.less +++ b/catalog-ui/src/assets/styles/app.less @@ -51,9 +51,7 @@ @import '../../app/directives/graphs-v2/composition-graph/composition-graph.less'; @import '../../app/directives/graphs-v2/deployment-graph/deployment-graph.less'; @import '../../app/directives/graphs-v2/palette/palette.less'; -// @import '../../app/directives/graphs-v2/relation-menu/relation-menu.less'; @import '../../app/directives/capabilities-and-requirements/capabilities-requirements-list.less'; -// @import '../../app/directives/graphs-v2/asset-popover/asset-popover.less'; @import '../../app/directives/info-tooltip/info-tooltip.less'; @import '../../app/directives/inputs-and-properties/inputs/input-row.less'; @import '../../app/directives/inputs-and-properties/properties/property-row-view.less'; @@ -114,8 +112,6 @@ @import '../../app/view-models/workspace/tabs/general/general.less'; @import '../../app/view-models/workspace/tabs/information-artifacts/information-artifacts.less'; @import '../../app/view-models/workspace/tabs/inputs/inputs.less'; -@import '../../app/view-models/workspace/tabs/inputs/resource-input/resource-inputs.less'; -@import '../../app/view-models/workspace/tabs/inputs/service-input/service-inputs.less'; @import '../../app/view-models/workspace/tabs/properties/properties.less'; @import '../../app/view-models/workspace/tabs/req-and-capabilities/req-and-capabilities.less'; @import '../../app/view-models/workspace/tabs/tosca-artifacts/tosca-artifacts.less'; -- cgit 1.2.3-korg