summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.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/directives/graphs-v2/palette/palette.directive.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/directives/graphs-v2/palette/palette.directive.ts')
-rw-r--r--catalog-ui/src/app/directives/graphs-v2/palette/palette.directive.ts8
1 files changed, 5 insertions, 3 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 9b9235248e..ebc52c241b 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
@@ -27,9 +27,10 @@ import {LeftPaletteLoaderService} from "../../../services/components/utils/compo
import {Resource} from "app/models/components/resource";
import {ComponentType} from "app/utils/constants";
import {LeftPaletteMetadataTypes} from "../../../models/components/displayComponent";
+import { IDirectiveLinkFn, IScope } from "angular";
-interface IPaletteScope {
+interface IPaletteScope extends IScope{
components:Array<LeftPaletteComponent>;
currentComponent:Component;
model:any;
@@ -88,7 +89,8 @@ export class Palette implements ng.IDirective {
restrict = 'E';
template = require('./palette.html');
- link = (scope:IPaletteScope, el:JQuery) => {
+ link:IDirectiveLinkFn = (scope:IPaletteScope, el:JQuery) => {
+ this.LeftPaletteLoaderService.loadLeftPanel(scope.currentComponent);
this.nodeHtmlSubstitute = $('<div class="node-substitute"><span></span><img /></div>');
el.append(this.nodeHtmlSubstitute);
this.registerEventListenerForLeftPalette(scope);
@@ -277,7 +279,7 @@ export class Palette implements ng.IDirective {
let filteredResources = [];
angular.forEach(subcategory, function (component:LeftPaletteComponent) {
- let resourceFilterTerm:string = component.searchFilterTerms;
+ let resourceFilterTerm:string = component.searchFilterTerms.toLowerCase();
if (resourceFilterTerm.indexOf(searchText.toLowerCase()) >= 0) {
filteredResources.push(component);
}