summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models/components/displayComponent.ts
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2018-07-29 16:13:45 +0300
committerMichael Lando <ml636r@att.com>2018-07-29 16:20:34 +0300
commit5b593496b8f1b8e8be8d7d2dbcc223332e65a49b (patch)
tree2f9dfc45191e723da69cf74be7829784e9741b94 /catalog-ui/src/app/models/components/displayComponent.ts
parent9200382f2ce7b4bb729aa287d0878004b2d2b4f9 (diff)
re base code
Change-Id: I12a5ca14a6d8a87e9316b9ff362eb131105f98a5 Issue-ID: SDC-1566 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/models/components/displayComponent.ts')
-rw-r--r--catalog-ui/src/app/models/components/displayComponent.ts15
1 files changed, 9 insertions, 6 deletions
diff --git a/catalog-ui/src/app/models/components/displayComponent.ts b/catalog-ui/src/app/models/components/displayComponent.ts
index c89490306c..f96e0bf14b 100644
--- a/catalog-ui/src/app/models/components/displayComponent.ts
+++ b/catalog-ui/src/app/models/components/displayComponent.ts
@@ -22,7 +22,6 @@
*/
'use strict';
-import * as _ from "lodash";
import {ComponentType} from "../../utils/constants";
import {ComponentMetadata} from "../component-metadata";
import {PolicyMetadata} from "../policy-metadata";
@@ -48,6 +47,7 @@ export class LeftPaletteComponent {
searchFilterTerms:string;
certifiedIconClass:string;
icon:string;
+ isDraggable:boolean;
isRequirmentAndCapabilitiesLoaded:boolean;
uuid:string;
@@ -64,7 +64,7 @@ export class LeftPaletteComponent {
categoryType:LeftPaletteMetadataTypes;
- constructor(metadataType: LeftPaletteMetadataTypes, item: ComponentMetadata | PolicyMetadata) {
+ constructor(metadataType: LeftPaletteMetadataTypes, item: ComponentMetadata | PolicyMetadata | GroupMetadata) {
if (metadataType === LeftPaletteMetadataTypes.Policy) {
this.initPolicy(item as PolicyMetadata);
return;
@@ -94,6 +94,7 @@ export class LeftPaletteComponent {
this.componentType = component.componentType;
this.systemName = component.systemName;
this.invariantUUID = component.invariantUUID;
+ this.isDraggable = true;
if (component.categories && component.categories[0] && component.categories[0].subcategories && component.categories[0].subcategories[0]) {
this.mainCategory = component.categories[0].name;
@@ -118,7 +119,7 @@ export class LeftPaletteComponent {
this.categoryType = LeftPaletteMetadataTypes.Group;
this.uniqueId = group.uniqueId;
- this.displayName = group.type;
+ this.displayName = group.name;
this.mainCategory = "Groups";
this.subCategory = "Groups";
this.iconClass = "sprite-group-icons group";
@@ -127,14 +128,15 @@ export class LeftPaletteComponent {
this.type = group.type;
this.componentSubType = 'GROUP';
- this.searchFilterTerms = this.displayName + ' ' + group.description + ' ' + group.version;
+ this.searchFilterTerms = this.type + ' ' + group.name + ' ' + group.version;
+ this.isDraggable = false;
}
private initPolicy(policy:PolicyMetadata): void {
this.categoryType = LeftPaletteMetadataTypes.Policy;
this.uniqueId = policy.uniqueId;
- this.displayName = policy.type;
+ this.displayName = policy.name;
this.mainCategory = "Policies";
this.subCategory = "Policies";
this.iconClass = "sprite-policy-icons policy";
@@ -143,7 +145,8 @@ export class LeftPaletteComponent {
this.type = policy.type;
this.componentSubType = 'POLICY';
- this.searchFilterTerms = this.displayName + ' ' + policy.description + ' ' + policy.version;
+ this.searchFilterTerms = this.type + ' ' + policy.name + ' ' + policy.version;
+ this.isDraggable = false;
}
public initDisplayName = (name:string):void => {