Ability to disable GAB filters. 27/85027/3
authorTomasz Golabek <tomasz.golabek@nokia.com>
Thu, 11 Apr 2019 08:21:52 +0000 (10:21 +0200)
committerOfir Sonsino <ofir.sonsino@intl.att.com>
Tue, 30 Apr 2019 17:19:26 +0000 (17:19 +0000)
Filters for preconfigured columns can be disabled using props.
(Should be merged after 'Dynamic columns in GAB table')

Change-Id: Id740ceb211c3978499b9c69197929a43e61e9cdc
Issue-ID: SDC-2234
Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
catalog-ui/src/app/models/paths-and-names.ts
catalog-ui/src/app/ng2/components/logic/generic-artifact-browser/generic-artifact-browser.component.html
catalog-ui/src/app/ng2/components/logic/generic-artifact-browser/generic-artifact-browser.component.ts
catalog-ui/src/app/view-models/workspace/tabs/deployment-artifacts/deployment-artifacts-view-model.ts

index 4313637..7304d96 100644 (file)
@@ -19,5 +19,5 @@
  */
 
 export class PathsAndNamesDefinition {
-  constructor(public path: string, public friendlyName: string, public searchable: boolean) {}
+  constructor(public path: string, public friendlyName: string, public searchable: boolean = true) {}
 }
\ No newline at end of file
index ad1ebcb..41ecaa8 100644 (file)
@@ -38,6 +38,7 @@
             </span>
         <br/>
         <input
+            *ngIf="isSearchable(col.name)"
             type='text'
             class="datattable-input-filter"
             placeholder='Filter column...'
index 7e704e1..4de7ff0 100644 (file)
@@ -105,6 +105,13 @@ export class GenericArtifactBrowserComponent {
     this.addNewColumn = true;
   }
 
+  isSearchable(columnName){
+    let selectedPathAndName = this.pathsandnames.filter(function(pathandname){
+      return pathandname.friendlyName === columnName;
+    })[0];
+    return selectedPathAndName.searchable;
+  }
+
   updateColumnFilter(event, column) {
     const val = event.target.value.toLowerCase();
     this.columnsFilters.set(column, val);
index 5ada3d0..fc3de6e 100644 (file)
@@ -301,7 +301,7 @@ export class DeploymentArtifactsViewModel {
             let pathsandnames: PathsAndNamesDefinition[] = [];
 
             if(typeof uiConfiguration.gab === 'undefined') {
-                noConfig = true
+                noConfig = true;
             } else {
                 const gabConfig: GabConfig = uiConfiguration.gab
                     .find(config => config.artifactType === artifact.artifactType);