diff options
author | Michael Lando <ml636r@att.com> | 2017-06-19 19:51:24 +0300 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2017-06-19 19:54:06 +0300 |
commit | 6e60006d2e22665b491d176ca9e91b74326bfabc (patch) | |
tree | 47e30ee9661e172e73f0e35bf198d5b3c70db8dd /catalog-ui | |
parent | 4d97d5fac309ce0d66938e5ccd0349e2660d4e23 (diff) |
[sdc] update to the current code base
and support http
Change-Id: I2fb35494b40126a8395b1e309a180db4127754b7
Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui')
16 files changed, 92 insertions, 42 deletions
diff --git a/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts b/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts index 03c923c228..4f3417186c 100644 --- a/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts +++ b/catalog-ui/src/app/models/properties-inputs/input-fe-model.ts @@ -27,9 +27,10 @@ export class InputFEModel extends InputBEModel { this.instanceId = input.inputs[0].componentInstanceId; this.propertyName = input.inputs[0].name; }else{ - if (input.inputPath) { + if (input.inputPath && input.inputPath.indexOf('#') > -1) { this.propertyName = input.inputPath.substring(0, input.inputPath.indexOf('#')) } else { + this.inputPath = undefined; //input path may be populated even if its a parent - ensure its empty this.propertyName = this.name.substring(propNameIndex + 1); } } diff --git a/catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.html b/catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.html index 8d3f6d1836..5467c94de7 100644 --- a/catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.html +++ b/catalog-ui/src/app/ng2/components/inputs-table/inputs-table.component.html @@ -14,7 +14,7 @@ <div class="inner-cell-div" tooltip="{{input.name}}"><span class="property-name">{{input.name}}</span></div> <span *ngIf="input.description" class="property-description-icon sprite-new show-desc" - tooltip="{{input.description}}"></span> + tooltip="{{input.description}}" tooltipDelay="0"></span> </div> <div class="table-cell col2"> <div class="inner-cell-div" tooltip="{{input.type | contentAfterLastDot}}"> diff --git a/catalog-ui/src/app/ng2/components/properties-table/dynamic-property/dynamic-property.component.html b/catalog-ui/src/app/ng2/components/properties-table/dynamic-property/dynamic-property.component.html index 2df17971e2..5aa0052cc3 100644 --- a/catalog-ui/src/app/ng2/components/properties-table/dynamic-property/dynamic-property.component.html +++ b/catalog-ui/src/app/ng2/components/properties-table/dynamic-property/dynamic-property.component.html @@ -4,8 +4,8 @@ (click)="onClickPropertyRow(property, $event)"> <!-- LEFT CELL --> <ng-container *ngIf="!isPropertyFEModel"> - <div class="table-cell" *ngIf="canBeDeclared" [ngClass]="{'filtered':property.name === propertyNameSearchText}"> <!-- simple children of complex type --> - <checkbox [(checked)]="property.isSelected" [disabled]="property.isDisabled ||property.isDeclared || readonly" (checkedChange)="checkProperty.emit(property.propertiesName)"></checkbox> + <div class="table-cell" *ngIf="canBeDeclared" [ngClass]="{'filtered':property.name === propertyNameSearchText}" [class.round-checkbox]="property.isDeclared"> <!-- simple children of complex type [@checkEffect]="property.isDeclared"--> + <checkbox [(checked)]="property.isSelected" [disabled]="property.isDisabled ||property.isDeclared || readonly" (checkedChange)="checkProperty.emit(property.propertiesName)" ></checkbox> <div class="inner-cell-div" tooltip="{{property.name}}"><span>{{property.name}}</span></div> </div> <div class="table-cell" *ngIf="!canBeDeclared && !property.isChildOfListOrMap">{{property.name}}</div> <!-- simple children of complex type within map or list --> diff --git a/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.html b/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.html index dc8fe70244..f3259ab3a2 100644 --- a/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.html +++ b/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.html @@ -17,8 +17,8 @@ (click)="onClickPropertyRow(property, instanceName, $event)" [ngClass]="{'selected': selectedPropertyId && selectedPropertyId === property.name }"> - <div class="table-cell col1" [ngClass]="{'filtered':property.name === propertyNameSearchText}"> - <div class="property-name cut-inner-long-text"> + <div class="table-cell col1" [ngClass]="{'filtered':property.name === propertyNameSearchText}" [class.round-checkbox]="property.isDeclared"> + <div class="property-name"> <checkbox [(checked)]="property.isSelected" [disabled]="property.isDisabled || property.isDeclared || readonly" (checkedChange)="propertyChecked(property)"></checkbox> diff --git a/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.less b/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.less index a525021b04..41ff5ede13 100644 --- a/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.less +++ b/catalog-ui/src/app/ng2/components/properties-table/properties-table.component.less @@ -1,4 +1,5 @@ @import './../../../../assets/styles/variables.less'; +@import '../../../../assets/styles/sprite'; @smaller-screen: ~"only screen and (max-width: 1580px)"; :host /deep/ input { width:100%;} @@ -108,10 +109,6 @@ margin-left: 5px; flex: 0 0 auto; } - - /deep/ .checkbox-container { - margin-right: 10px; - } } &.col2 { flex: 0 0 150px; @@ -130,6 +127,27 @@ display: flex; @media @smaller-screen { flex: 1 0 40%;} } + + + /deep/ .checkbox-container { + margin-right: 10px; + } + + /deep/ &.round-checkbox { + .checkbox-container input[type=checkbox].checkbox-hidden { + &:checked ~ .checkbox-icon::before { + .sprite-new; + .round-checked-icon; + } + &[disabled] ~ .checkbox-icon::before { + .sprite-new; + .round-checked-icon.disabled; + background-color:inherit; + border:none; + //animation: addDisabledCheck 4s linear; + } + } + } } .filtered { diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.less b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.less index 7f9b4e7d58..8df479ffa6 100644 --- a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.less +++ b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.less @@ -46,6 +46,13 @@ background-color: white; padding-top:9px; } + + .tab-indication { + background-color:#4ca90c; + border:solid 2px #fff; + border-radius:50%; + font-size:12px; + } } .header { diff --git a/catalog-ui/src/app/view-models/admin-dashboard/category-management/category-management-view-model.ts b/catalog-ui/src/app/view-models/admin-dashboard/category-management/category-management-view-model.ts index ba390c4bee..61558252e0 100644 --- a/catalog-ui/src/app/view-models/admin-dashboard/category-management/category-management-view-model.ts +++ b/catalog-ui/src/app/view-models/admin-dashboard/category-management/category-management-view-model.ts @@ -98,7 +98,7 @@ export class CategoryManagementViewModel { }; let modalOptions:ng.ui.bootstrap.IModalSettings = { - template: 'src/app/view-models/admin-dashboard/add-category-modal/add-category-modal-view.html', + templateUrl: '../add-category-modal/add-category-modal-view.html', controller: 'Sdc.ViewModels.AddCategoryModalViewModel', size: 'sdc-xsm', backdrop: 'static', diff --git a/catalog-ui/src/app/view-models/workspace/tabs/activity-log/activity-log.ts b/catalog-ui/src/app/view-models/workspace/tabs/activity-log/activity-log.ts index ed583dc4c0..f41364dbfd 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/activity-log/activity-log.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/activity-log/activity-log.ts @@ -88,11 +88,11 @@ export class ActivityLogViewModel { private initSortedTableScope = ():void => { this.$scope.tableHeadersList = [ - {title: 'Date', property: 'logDate'}, - {title: 'Action', property: 'logAction'}, - {title: 'Comment', property: 'logComment'}, - {title: 'Username', property: 'logUsername'}, - {title: 'Status', property: 'logStatus'} + {title: 'Date', property: 'dateFormat'}, + {title: 'Action', property: 'ACTION'}, + {title: 'Comment', property: 'COMMENT'}, + {title: 'Username', property: 'MODIFIER'}, + {title: 'Status', property: 'STATUS'} ]; this.$scope.sort = (sortBy:string):void => { diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts index 670655ea4b..d0eefdfd11 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts @@ -20,7 +20,7 @@ 'use strict'; import {Component, Product, ComponentInstance, IAppMenu} from "app/models"; import {SharingService, CacheService, EventListenerService, LeftPaletteLoaderService} from "app/services"; -import {ModalsHandler, GRAPH_EVENTS, ComponentFactory, ChangeLifecycleStateHandler, MenuHandler} from "app/utils"; +import {ModalsHandler, GRAPH_EVENTS, ComponentFactory, ChangeLifecycleStateHandler, MenuHandler, EVENTS} from "app/utils"; import {IWorkspaceViewModelScope} from "../../workspace-view-model"; import {ComponentServiceNg2} from "app/ng2/services/component-services/component.service"; import {ComponentGenericResponse} from "app/ng2/services/responses/component-generic-response"; @@ -240,7 +240,13 @@ export class CompositionViewModel { this.$scope.currentComponent = component; this.$scope.setComponent(this.$scope.currentComponent); this.$scope.updateSelectedComponent(); - } + }; + + this.$scope.reload = (component:Component):void => { + this.$state.go(this.$state.current.name,{id:component.uniqueId},{reload:true}); + }; + + this.eventListenerService.registerObserverCallback(EVENTS.ON_CHECKOUT, this.$scope.reload); } } 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 507181c98c..4300c33412 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 @@ -424,7 +424,6 @@ export class WorkspaceViewModel { //when checking out a major(certified) version this.components.unshift(component); } - this.EventListenerService.notifyObservers(EVENTS.ON_CHECKOUT, component); // this.$state.go(this.$state.current.name, { // id: component.uniqueId, // type: component.componentType.toLowerCase(), @@ -434,7 +433,7 @@ export class WorkspaceViewModel { this.initChangeLifecycleStateButtons(); this.initVersionObject(); this.$scope.isLoading = false; - + this.EventListenerService.notifyObservers(EVENTS.ON_CHECKOUT, component); this.Notification.success({ message: this.$filter('translate')("CHECKOUT_SUCCESS_MESSAGE_TEXT"), title: this.$filter('translate')("CHECKOUT_SUCCESS_MESSAGE_TITLE") diff --git a/catalog-ui/src/assets/styles/images/resource-icons/vl.png b/catalog-ui/src/assets/styles/images/resource-icons/vl.png Binary files differindex 1fb2fc07ce..061c6386a8 100644 --- a/catalog-ui/src/assets/styles/images/resource-icons/vl.png +++ b/catalog-ui/src/assets/styles/images/resource-icons/vl.png diff --git a/catalog-ui/src/assets/styles/images/welcome/002.png b/catalog-ui/src/assets/styles/images/welcome/002.png Binary files differindex f3e7a7c3ed..e76c480ad8 100644 --- a/catalog-ui/src/assets/styles/images/welcome/002.png +++ b/catalog-ui/src/assets/styles/images/welcome/002.png diff --git a/catalog-ui/src/assets/styles/images/welcome/sprite.png b/catalog-ui/src/assets/styles/images/welcome/sprite.png Binary files differindex 3bb7542446..4a7fb39518 100644 --- a/catalog-ui/src/assets/styles/images/welcome/sprite.png +++ b/catalog-ui/src/assets/styles/images/welcome/sprite.png diff --git a/catalog-ui/src/assets/styles/sprite.less b/catalog-ui/src/assets/styles/sprite.less index fd2b6c87e0..62defccca8 100644 --- a/catalog-ui/src/assets/styles/sprite.less +++ b/catalog-ui/src/assets/styles/sprite.less @@ -232,7 +232,8 @@ .filter-icon { background-position: -48px -1040px; width: 19px; height: 20px;} .filter-icon:hover { background-position: -99px -1040px; width: 19px; height: 20px;} .filled-checkbox-icon { background-position: -100px -1079px; width: 14px; height: 14px;} - +.round-checked-icon { background-position: -50px -1119px; width: 20px; height: 20px;} +.round-checked-icon.disabled { background-position: -100px -1119px; width: 20px; height: 20px;} .round-expand-icon { background-position: -50px -1188px; width: 15px; height: 15px; } .round-expand-icon:hover { background-position: -100px -1188px; width: 15px; height: 15px; } .round-expand-icon.open { background-position: -50px -1216px; width: 15px; height: 15px; } diff --git a/catalog-ui/webpack.config.js b/catalog-ui/webpack.config.js index 4f03b7c87c..71fc3ab9f7 100644 --- a/catalog-ui/webpack.config.js +++ b/catalog-ui/webpack.config.js @@ -5,12 +5,14 @@ const merge = require('webpack-merge'); const webpack = require('webpack'); const ServerConfig = require('./webpack.server'); const webpackCommonConfig = require('./webpack.common'); -const { BaseHrefWebpackPlugin} = require('@angular/cli/plugins/webpack'); +const {BaseHrefWebpackPlugin} = require('@angular/cli/plugins/webpack'); const CopyWebpackPlugin = require('copy-webpack-plugin'); // Print server configuration //process.stdout.write('webpack.server: ' + JSON.stringify(ServerConfig) + '\n'); //process.stdout.write('webpack.common: ' + JSON.stringify(webpackCommonConfig) + '\n'); +var currentTime = new Date().getTime(); + const params = { // entryPoints: [ // '/scripts/inline', @@ -23,32 +25,37 @@ const params = { // ] }; -module.exports = function(env) { +module.exports = function (env) { const webpackDevConfig = { devtool: "source-map", devServer: ServerConfig(env), module: { rules: [ - { test: /\.(eot|svg)$/, loader: "file-loader?name=scripts/fonts/[name].[hash:20].[ext]" }, - { test: /\.(jpg|png|gif|otf|ttf|woff|woff2|cur|ani)$/, loader: "url-loader?name=scripts/images/[name].[hash:20].[ext]&limit=10000" } + {test: /\.(eot|svg)$/, loader: "file-loader?name=scripts/fonts/[name].[hash:20].[ext]"}, + { + test: /\.(jpg|png|gif|otf|ttf|woff|woff2|cur|ani)$/, + loader: "url-loader?name=scripts/images/[name].[hash:20].[ext]&limit=10000" + } ] }, output: { path: path.join(process.cwd(), "dist"), - filename: "[name].bundle.js", + filename: "[name]." + currentTime + ".bundle.js", chunkFilename: "[id].chunk.js" //publicPath: "/" }, plugins: [ + // Replace /sdc1 inside index.html with '' (because /sdc1 is used only in production). new CopyWebpackPlugin([ - { - from: './src/index.html', transform: function(content, path) { - content = (content+'').replace(/\/sdc1/g,''); - return content; - } - } + { + from: './src/index.html', transform: function (content, path) { + content = (content + '').replace(/\/sdc1/g, ''); + content = (content + '').replace(/\.bundle/g, '.' + currentTime + '.bundle'); + return content; + } + } ]), new webpack.DefinePlugin({ __DEBUG__: JSON.stringify(true), @@ -61,4 +68,4 @@ module.exports = function(env) { }; return merge(webpackDevConfig, webpackCommonConfig(params)); -}
\ No newline at end of file +} diff --git a/catalog-ui/webpack.production.js b/catalog-ui/webpack.production.js index b93b8f2663..db33a94f3e 100644 --- a/catalog-ui/webpack.production.js +++ b/catalog-ui/webpack.production.js @@ -8,6 +8,8 @@ const webpackCommonConfig = require('./webpack.common'); const {GlobCopyWebpackPlugin, BaseHrefWebpackPlugin} = require('@angular/cli/plugins/webpack'); const CopyWebpackPlugin = require('copy-webpack-plugin'); +var currentTime = new Date().getTime(); + const params = { // entryPoints: [ // '/sdc1/scripts/inline', @@ -22,26 +24,35 @@ const params = { const webpackProdConfig = { module: { - rules: [ - { test: /\.(eot|svg)$/, loader: "file-loader?name=/scripts/fonts/[name].[hash:20].[ext]" }, - { test: /\.(jpg|png|gif|otf|ttf|woff|woff2|cur|ani)$/, loader: "url-loader?name=/scripts/images/[name].[hash:20].[ext]&limit=10000" } - ] + rules: [ + {test: /\.(eot|svg)$/, loader: "file-loader?name=/scripts/fonts/[name].[hash:20].[ext]"}, + { + test: /\.(jpg|png|gif|otf|ttf|woff|woff2|cur|ani)$/, + loader: "url-loader?name=/scripts/images/[name].[hash:20].[ext]&limit=10000" + } + ] }, output: { path: path.join(process.cwd(), "dist"), - filename: "[name].bundle.js", + filename: "[name]." + currentTime + ".bundle.js", chunkFilename: "[id].chunk.js", publicPath: "/sdc1" }, - plugins: [ + plugins: [ new webpack.DefinePlugin({ __DEBUG__: JSON.stringify(false), __ENV__: JSON.stringify('prod') }), + new CopyWebpackPlugin([ - { from: './src/index.html'} + { + from: './src/index.html', transform: function (content, path) { + content = (content + '').replace(/\.bundle/g, '.' + currentTime + '.bundle'); + return content; + } + } ]), - new webpack.optimize.UglifyJsPlugin({ + new webpack.optimize.UglifyJsPlugin({ beautify: false, mangle: { screw_ie8: true, @@ -53,7 +64,7 @@ const webpackProdConfig = { }, comments: false }) - ] + ] }; module.exports = merge(webpackProdConfig, webpackCommonConfig(params)); |