diff options
Diffstat (limited to 'catalog-ui/src/app/utils')
-rw-r--r-- | catalog-ui/src/app/utils/component-factory.ts | 20 | ||||
-rw-r--r-- | catalog-ui/src/app/utils/component-instance-factory.ts | 10 | ||||
-rw-r--r-- | catalog-ui/src/app/utils/constants.ts | 8 | ||||
-rw-r--r-- | catalog-ui/src/app/utils/modals-handler.ts | 18 |
4 files changed, 24 insertions, 32 deletions
diff --git a/catalog-ui/src/app/utils/component-factory.ts b/catalog-ui/src/app/utils/component-factory.ts index c202a1c8f5..b35918c0f6 100644 --- a/catalog-ui/src/app/utils/component-factory.ts +++ b/catalog-ui/src/app/utils/component-factory.ts @@ -20,8 +20,8 @@ 'use strict'; import {DEFAULT_ICON, ResourceType, ComponentType} from "./constants"; -import {ServiceService, CacheService, ResourceService, ProductService} from "app/services"; -import {IMainCategory, ISubCategory, ICsarComponent, Component, Resource, Service, Product} from "app/models"; +import {ServiceService, CacheService, ResourceService} from "app/services"; +import {IMainCategory, ISubCategory, ICsarComponent, Component, Resource, Service} from "app/models"; import {ComponentMetadata} from "../models/component-metadata"; import {ComponentServiceNg2} from "../ng2/services/component-services/component.service"; import {ComponentGenericResponse} from "../ng2/services/responses/component-generic-response"; @@ -32,7 +32,6 @@ export class ComponentFactory { static '$inject' = [ 'Sdc.Services.Components.ResourceService', 'Sdc.Services.Components.ServiceService', - 'Sdc.Services.Components.ProductService', 'Sdc.Services.CacheService', '$q', 'ComponentServiceNg2' @@ -40,7 +39,6 @@ export class ComponentFactory { constructor(private ResourceService:ResourceService, private ServiceService:ServiceService, - private ProductService:ProductService, private cacheService:CacheService, private $q:ng.IQService, private ComponentServiceNg2: ComponentServiceNg2) { @@ -58,18 +56,10 @@ export class ComponentFactory { newComponent = new Resource(this.ResourceService, this.$q, <Resource> component); break; - case 'PRODUCT': - newComponent = new Product(this.ProductService, this.$q, <Product> component); - break; } return newComponent; }; - public createProduct = (product:Product):Product => { - let newProduct:Product = new Product(this.ProductService, this.$q, <Product> product); - return newProduct; - }; - public createService = (service:Service):Service => { let newService:Service = new Service(this.ServiceService, this.$q, <Service> service); return newService; @@ -144,12 +134,10 @@ export class ComponentFactory { case ResourceType.VL: case ResourceType.VFC: case ResourceType.CP: + case ResourceType.PNF: + case ResourceType.CVFC: newComponent = new Resource(this.ResourceService, this.$q); break; - - case ComponentType.PRODUCT: - newComponent = new Product(this.ProductService, this.$q); - break; } newComponent.componentType = componentType; newComponent.tags = []; diff --git a/catalog-ui/src/app/utils/component-instance-factory.ts b/catalog-ui/src/app/utils/component-instance-factory.ts index c020c53705..9e25e6b02f 100644 --- a/catalog-ui/src/app/utils/component-instance-factory.ts +++ b/catalog-ui/src/app/utils/component-instance-factory.ts @@ -21,7 +21,7 @@ * Created by obarda on 3/7/2016. */ 'use strict'; -import {ComponentInstance, ServiceInstance, ProductInstance, ResourceInstance, Component} from "../models"; +import {ComponentInstance, ServiceInstance, ResourceInstance, Component} from "../models"; import {LeftPaletteComponent} from "../models/components/displayComponent"; export class ComponentInstanceFactory { @@ -33,10 +33,6 @@ export class ComponentInstanceFactory { newComponentInstance = new ServiceInstance(componentInstance); break; - case 'PRODUCT': - newComponentInstance = new ProductInstance(componentInstance); - break; - default : newComponentInstance = new ResourceInstance(componentInstance); break; @@ -51,10 +47,6 @@ export class ComponentInstanceFactory { newComponentInstance = new ServiceInstance(); break; - case 'PRODUCT': - newComponentInstance = new ProductInstance(); - break; - default : newComponentInstance = new ResourceInstance(); break; diff --git a/catalog-ui/src/app/utils/constants.ts b/catalog-ui/src/app/utils/constants.ts index 636c0c4fbf..d239019455 100644 --- a/catalog-ui/src/app/utils/constants.ts +++ b/catalog-ui/src/app/utils/constants.ts @@ -29,13 +29,11 @@ export let CHANGE_COMPONENT_CSAR_VERSION_FLAG = 'changeComponentCsarVersion'; export class ComponentType { static SERVICE = 'SERVICE'; static RESOURCE = 'RESOURCE'; - static PRODUCT = 'PRODUCT'; } export class ServerTypeUrl { static RESOURCES = 'resources/'; static SERVICES = 'services/'; - static PRODUCTS = 'product/'; } export class ResourceType { @@ -45,6 +43,7 @@ export class ResourceType { static VFC = 'VFC'; static VFCMT = 'VFCMT'; static PNF = 'PNF'; + static CVFC = 'CVFC'; } export class ComponentState { @@ -129,8 +128,6 @@ export class PROPERTY_VALUE_CONSTRAINTS { export class Role { public static ADMIN = 'ADMIN'; public static DESIGNER = 'DESIGNER'; - public static PRODUCT_STRATEGIST = 'PRODUCT_STRATEGIST'; - public static PRODUCT_MANAGER = 'PRODUCT_MANAGER'; public static TESTER = 'TESTER'; public static OPS = 'OPS'; public static GOVERNOR = 'GOVERNOR'; @@ -213,14 +210,12 @@ export class GraphUIObjects { export class States { public static WORKSPACE_GENERAL = 'workspace.general'; - public static WORKSPACE_ICONS = 'workspace.icons'; 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_HIERARCHY = 'workspace.hierarchy'; public static WORKSPACE_INFORMATION_ARTIFACTS = 'workspace.information_artifacts'; public static WORKSPACE_TOSCA_ARTIFACTS = 'workspace.tosca_artifacts'; public static WORKSPACE_COMPOSITION = 'workspace.composition'; @@ -237,7 +232,6 @@ export class EVENTS { static RESOURCE_LEFT_PALETTE_UPDATE_EVENT = "resourceLeftPanelUpdateEvent"; static RESOURCE_PNF_LEFT_PALETTE_UPDATE_EVENT = "resourcePNFLeftPanelUpdateEvent"; static SERVICE_LEFT_PALETTE_UPDATE_EVENT = "serviceLeftPanelUpdateEvent"; - static PRODUCT_LEFT_PALETTE_UPDATE_EVENT = "productLeftPanelUdateEvent"; static VL_LEFT_PALETTE_UPDATE_EVENT = "vlLeftPanelUdateEvent"; static ON_CSAR_LOADING = "onCsarLoading"; static DOWNLOAD_ARTIFACT_FINISH_EVENT = "downloadArtifactFinishEvent"; diff --git a/catalog-ui/src/app/utils/modals-handler.ts b/catalog-ui/src/app/utils/modals-handler.ts index ae91b2acb7..0d17683116 100644 --- a/catalog-ui/src/app/utils/modals-handler.ts +++ b/catalog-ui/src/app/utils/modals-handler.ts @@ -187,6 +187,24 @@ export class ModalsHandler implements IModalsHandler { return deferred.promise; }; + openUpdateIconModal = (component: Component):ng.IPromise<any> => { + let deferred = this.$q.defer(); + let modalOptions:ng.ui.bootstrap.IModalSettings = { + templateUrl: '../view-models/modals/icons-modal/icons-modal-view.html', + controller: 'Sdc.ViewModels.IconsModalViewModel', + size: 'sdc-auto', + backdrop: 'static', + resolve: { + component: ():Component => { + return component; + } + } + }; + let modalInstance:ng.ui.bootstrap.IModalServiceInstance = this.$uibModal.open(modalOptions); + deferred.resolve(modalInstance.result); + return deferred.promise; + }; + openEditEnvParametersModal = (artifactResource:ArtifactModel, component?:Component):ng.IPromise<any> => { let deferred = this.$q.defer(); let modalOptions:ng.ui.bootstrap.IModalSettings = { |