summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/directives/graphs-v2/palette
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2017-12-10 18:55:03 +0200
committerTal Gitelman <tg851x@intl.att.com>2017-12-10 19:33:38 +0200
commit51d50f0ef642e0f996a1c8b8d2ef4838bdfec892 (patch)
tree3ac236a864d74d19b0f5c9020891a7a7e5c31b44 /catalog-ui/src/app/directives/graphs-v2/palette
parentb5cc2e0695f195716d6ccdc65e73807a6632ec70 (diff)
Final commit to master merge from
Change-Id: Ib464f9a8828437c86fe6def8af238aaf83473507 Issue-ID: SDC-714 Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/directives/graphs-v2/palette')
-rw-r--r--catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.ts45
-rw-r--r--catalog-ui/src/app/directives/graphs-v2/palette/palette.html2
2 files changed, 9 insertions, 38 deletions
diff --git a/catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.ts b/catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.ts
index f46dc6c939..8abf968c82 100644
--- a/catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.ts
+++ b/catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.ts
@@ -132,7 +132,7 @@ export class Palette implements ng.IDirective {
private initLeftPanel(leftPanelComponents:Array<LeftPaletteComponent>, resourceFilterTypes:Array<string>):LeftPanelModel {
let leftPanelModel = new LeftPanelModel();
-
+
if (resourceFilterTypes && resourceFilterTypes.length) {
leftPanelComponents = this.leftPanelResourceFilter(leftPanelComponents, resourceFilterTypes);
}
@@ -171,40 +171,6 @@ export class Palette implements ng.IDirective {
this.EventListenerService.notifyObservers(GRAPH_EVENTS.ON_PALETTE_COMPONENT_HOVER_IN, displayComponent);
this.$log.debug('palette::onMouseOver:: fired');
- //
- // if (this.CompositionGraphGeneralUtils.componentRequirementsAndCapabilitiesCaching.containsKey(displayComponent.uniqueId)) {
- // this.$log.debug(`palette::onMouseOver:: component id ${displayComponent.uniqueId} found in cache`);
- // let cacheComponent:Component = this.CompositionGraphGeneralUtils.componentRequirementsAndCapabilitiesCaching.getValue(displayComponent.uniqueId);
- //
- // //TODO: Danny: fire event to highlight matching nodes
- // //showMatchingNodes(cacheComponent);
- // return;
- // }
- //
- // this.$log.debug(`palette::onMouseOver:: component id ${displayComponent.uniqueId} not found in cache, initiating server get`);
- // // This will bring the component from the server including requirements and capabilities
- // // Check that we do not fetch many times, because only in the success we add the component to componentRequirementsAndCapabilitiesCaching
- // if (this.fetchingComponentFromServer) {
- // return;
- // }
- //
- // this.fetchingComponentFromServer = true;
- // this.ComponentFactory.getComponentFromServer(displayComponent.componentSubType, displayComponent.uniqueId)
- // .then((component:Component) => {
- // this.$log.debug(`palette::onMouseOver:: component id ${displayComponent.uniqueId} fetch success`);
- // // this.LeftPaletteLoaderService.updateSpecificComponentLeftPalette(component, scope.currentComponent.componentType);
- // this.CompositionGraphGeneralUtils.componentRequirementsAndCapabilitiesCaching.setValue(component.uniqueId, component);
- // this.fetchingComponentFromServer = false;
- //
- // //TODO: Danny: fire event to highlight matching nodes
- // //showMatchingNodes(component);
- // })
- // .catch(() => {
- // this.$log.debug('palette::onMouseOver:: component id fetch error');
- // this.fetchingComponentFromServer = false;
- // });
-
-
};
scope.onMouseOut = () => {
@@ -226,8 +192,13 @@ export class Palette implements ng.IDirective {
private updateLeftPanelDisplay(scope:IPaletteScope) {
let entityType:string = scope.currentComponent.componentType.toLowerCase();
let resourceFilterTypes:Array<string> = this.sdcConfig.resourceTypesFilter[entityType];
- scope.components = this.LeftPaletteLoaderService.getLeftPanelComponentsForDisplay(scope.currentComponent);
- scope.model = this.initLeftPanel(scope.components, resourceFilterTypes);
+ scope.components = this.LeftPaletteLoaderService.getLeftPanelComponentsForDisplay(scope.currentComponent);
+ //remove the container component from the list
+ let componentTempToDisplay = angular.copy(scope.components);
+ componentTempToDisplay = _.remove(componentTempToDisplay, function (component) {
+ return component.component.invariantUUID !== scope.currentComponent.invariantUUID;
+ });
+ scope.model = this.initLeftPanel(componentTempToDisplay, resourceFilterTypes);
scope.displaySortedCategories = angular.copy(scope.model.sortedCategories);
};
diff --git a/catalog-ui/src/app/directives/graphs-v2/palette/palette.html b/catalog-ui/src/app/directives/graphs-v2/palette/palette.html
index 4b123e5777..7f9bfd1e0d 100644
--- a/catalog-ui/src/app/directives/graphs-v2/palette/palette.html
+++ b/catalog-ui/src/app/directives/graphs-v2/palette/palette.html
@@ -32,7 +32,7 @@
data-ng-repeat="component in components | orderBy: 'displayName' track by $index"
data-tests-id={{component.displayName}}>
<div class="i-sdc-designer-leftbar-section-content-item-icon-ph">
- <div class="medium {{component.iconClass}}"
+ <div class="medium small {{component.iconClass}}"
data-tests-id="leftbar-section-content-item-{{component.displayName}}">
<div class="{{component.certifiedIconClass}}" uib-tooltip="Not certified"
tooltip-class="uib-custom-tooltip" tooltip-placement="bottom" tooltip-popup-delay="700">