diff options
author | 2017-06-09 03:19:04 +0300 | |
---|---|---|
committer | 2017-06-09 03:19:04 +0300 | |
commit | ed64b5edff15e702493df21aa3230b81593e6133 (patch) | |
tree | a4cb01fdaccc34930a8db403a3097c0d1e40914b /catalog-ui/app/scripts/view-models/workspace/tabs/deployment | |
parent | 280f8015d06af1f41a3ef12e8300801c7a5e0d54 (diff) |
[SDC-29] catalog 1707 rebase commit.
Change-Id: I43c3dc5cf44abf5da817649bc738938a3e8388c1
Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/app/scripts/view-models/workspace/tabs/deployment')
3 files changed, 0 insertions, 170 deletions
diff --git a/catalog-ui/app/scripts/view-models/workspace/tabs/deployment/deployment-view-model.ts b/catalog-ui/app/scripts/view-models/workspace/tabs/deployment/deployment-view-model.ts deleted file mode 100644 index f8afc0b758..0000000000 --- a/catalog-ui/app/scripts/view-models/workspace/tabs/deployment/deployment-view-model.ts +++ /dev/null @@ -1,127 +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========================================================= - */ -/// <reference path="../../../../references"/> -module Sdc.ViewModels { - 'use strict'; - - export interface IDeploymentViewModelScope extends IWorkspaceViewModelScope { - - currentComponent: Models.Components.Component; - selectedComponent: Models.Components.Component; - isLoading: boolean; - sharingService:Sdc.Services.SharingService; - sdcMenu:Models.IAppMenu; - version:string; - isViewOnly:boolean; - tabs:Array<Models.Tab>; - - setComponent(component: Models.Components.Component); - isComponentInstanceSelected():boolean; - updateSelectedComponent(): void - openUpdateModal(); - deleteSelectedComponentInstance():void; - onBackgroundClick():void; - setSelectedInstance(componentInstance: Models.ComponentsInstances.ComponentInstance): void; - printScreen():void; - - } - - export class DeploymentViewModel { - - static '$inject' = [ - '$scope', - 'sdcMenu', - 'MenuHandler', - '$modal', - '$templateCache', - '$state', - 'Sdc.Services.SharingService', - '$filter', - 'Sdc.Services.CacheService', - 'ComponentFactory', - 'ChangeLifecycleStateHandler', - 'LeftPaletteLoaderService', - 'ModalsHandler' - ]; - - constructor(private $scope:IDeploymentViewModelScope, - private sdcMenu:Models.IAppMenu, - private MenuHandler: Utils.MenuHandler, - private $modal:ng.ui.bootstrap.IModalService, - private $templateCache:ng.ITemplateCacheService, - private $state:ng.ui.IStateService, - private sharingService:Services.SharingService, - private $filter:ng.IFilterService, - private cacheService:Services.CacheService, - private ComponentFactory: Utils.ComponentFactory, - private ChangeLifecycleStateHandler: Sdc.Utils.ChangeLifecycleStateHandler, - private LeftPaletteLoaderService: Services.Components.LeftPaletteLoaderService, - private ModalsHandler: Sdc.Utils.ModalsHandler) { - - this.$scope.setValidState(true); - this.initScope(); - this.$scope.updateSelectedMenuItem(); - } - - - private initComponent = ():void => { - - this.$scope.currentComponent = this.$scope.component; - this.$scope.selectedComponent = this.$scope.currentComponent; - this.updateUuidMap(); - this.$scope.isViewOnly = this.$scope.isViewMode(); - }; - - - private updateUuidMap = ():void => { - /** - * In case user press F5, the page is refreshed and this.sharingService.currentEntity will be undefined, - * but after loadService or loadResource this.sharingService.currentEntity will be defined. - * Need to update the uuidMap with the new resource or service. - */ - this.sharingService.addUuidValue(this.$scope.currentComponent.uniqueId,this.$scope.currentComponent.uuid); - }; - - private initRightTabs = ()=> { - if(this.$scope.currentComponent.groups){ - - let hierarchyTab = new Models.Tab('/app/scripts/view-models/tabs/hierarchy/hierarchy-view.html', 'Sdc.ViewModels.HierarchyViewModel', 'hierarchy', this.$scope.currentComponent, 'hierarchy'); - this.$scope.tabs = Array<Models.Tab>(); - this.$scope.tabs.push(hierarchyTab) - } - - } - private initScope = ():void => { - - this.$scope.sharingService = this.sharingService; - this.$scope.sdcMenu = this.sdcMenu; - this.$scope.isLoading = false; - - this.$scope.version = this.cacheService.get('version'); - this.initComponent(); - - this.$scope.setComponent = (component: Models.Components.Product):void => { - this.$scope.currentComponent = component; - } - - this.initRightTabs(); - } - } -} diff --git a/catalog-ui/app/scripts/view-models/workspace/tabs/deployment/deployment-view.html b/catalog-ui/app/scripts/view-models/workspace/tabs/deployment/deployment-view.html deleted file mode 100644 index 9e26656f5f..0000000000 --- a/catalog-ui/app/scripts/view-models/workspace/tabs/deployment/deployment-view.html +++ /dev/null @@ -1,10 +0,0 @@ -<div class="deployment-view"> - <div class="w-sdc-deployment-canvas" data-ng-class="{sidebaractive: displayDesignerRightSidebar}"> - <!--<module-graph data-tests-id="canvas" current-component="currentComponent" is-view-only="isViewOnly" is-loading="isLoading"></module-graph>--> - <deployment-graph component="currentComponent" is-view-only="isViewOnly"></deployment-graph> - </div> - - <div class="w-sdc-deployment-right-bar"> - <sdc-tabs tabs="tabs" is-view-only="isViewOnly"></sdc-tabs> - </div> -</div> diff --git a/catalog-ui/app/scripts/view-models/workspace/tabs/deployment/deployment.less b/catalog-ui/app/scripts/view-models/workspace/tabs/deployment/deployment.less deleted file mode 100644 index 0439ccd0fa..0000000000 --- a/catalog-ui/app/scripts/view-models/workspace/tabs/deployment/deployment.less +++ /dev/null @@ -1,33 +0,0 @@ -.deployment-view{ - - display: inline-block; - text-align: left; - align-items: left; - padding: 0; - width: 100%; - height: 100%; - - .w-sdc-deployment-canvas { - .noselect; - .bg_c; - bottom: 0; - width: 100%; - height: 100%; - - .view-mode{ - background-color: #f8f8f8; - border:0; - } - } - - .w-sdc-deployment-right-bar { - - .noselect; - bottom: 0; - position: absolute; - right: 0px; - transition: right 0.2s; - z-index: 10000; - top: @action_nav_height; - } -} |