fix filter by tags 70/116170/1
authorEltanany Shaaban <shaaban.eltanany.ext@orange.com>
Mon, 7 Dec 2020 13:42:36 +0000 (15:42 +0200)
committerEltanany Shaaban <shaaban.eltanany.ext@orange.com>
Mon, 7 Dec 2020 13:42:36 +0000 (15:42 +0200)
Issue-ID: CCSDK-3027
Signed-off-by: Eltanany Shaaban <shaaban.eltanany.ext@orange.com>
Change-Id: I9f0fe055e2afc7a3c8daf76abee07c05c6830110

cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.html
cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts

index 0b03f4d..ca88c65 100644 (file)
@@ -8,11 +8,11 @@
             <div class="card-footer row">
                 <div class="col text-center">
                     <a tourAnchor="create" routerLink="/packages/createPackage" role="button" aria-pressed="true"
-                        class="btn-create-package float"><i class="icon-create-white" aria-hidden="true"></i>Create
+                       class="btn-create-package float"><i class="icon-create-white" aria-hidden="true"></i>Create
                         Package
                     </a>
-                    <br />
-                    <a data-target="#importPackageModal" data-toggle="modal"  id="clone-btn" role="button"
+                    <br/>
+                    <a data-target="#importPackageModal" data-toggle="modal" id="clone-btn" role="button"
                        aria-pressed="true" class="btn-import-package float"><i
                             class="icon-import-blue" aria-hidden="true"></i>Import Package
                     </a>
@@ -28,7 +28,7 @@
                 <div class="row">
                     <div class="col-10 pr-0">
                         <a class="card-title" [routerLink]="['/packages/package', bluePrint.id]"
-                            (click)="testDispatch(bluePrint)">
+                           (click)="testDispatch(bluePrint)">
                             <!-- <img class="icon-deployed" src="/assets/img/icon-deploy.svg"> -->
                             <p class="packageName" tooltip="{{bluePrint.artifactName}}" placement="bottom">
                                 {{bluePrint.artifactName}}</p>
                         </p>
                         <p class="mb-2">By {{bluePrint.updatedBy.split('<')[0]}}</p>
                         <p class="package-desc" [delay]="300" tooltip="{{bluePrint.artifactDescription}}"
-                            placement="bottom left">{{bluePrint.artifactDescription}}</p>
+                           placement="bottom left">{{bluePrint.artifactDescription}}</p>
+                        <p>{{bluePrint.tags}}</p>
                         <ul class="package-contributers">
                             <li>
                                 <button type="button" class="border-fade" data-toggle="tooltip" data-placement="bottom"
-                                    title="User name">
+                                        title="User name">
                                     <img src="/assets/img/img-user1.jpeg">
                                 </button>
                             </li>
 
                         <div class="col">
                             <button type="button" (click)="view(bluePrint.id)" class="btn btn-card-config"><i
-                                    class="icon-btn-card-config" aria-hidden="true"></i>Configuration</button>
+                                    class="icon-btn-card-config" aria-hidden="true"></i>Configuration
+                            </button>
                         </div>
                         <div class="col">
-                            <button type="button" (click)="viewDesigner(bluePrint.id)" class="btn btn-card-topology"><i class="icon-btn-card-topology"
+                            <button type="button" (click)="viewDesigner(bluePrint.id)" class="btn btn-card-topology"><i
+                                    class="icon-btn-card-topology"
                                     aria-hidden="true"></i>Designer Mode
                             </button>
                         </div>
index 1377d25..1e52e31 100644 (file)
@@ -19,13 +19,13 @@ limitations under the License.
 ============LICENSE_END============================================
 */
 
-import { Injectable } from '@angular/core';
-import { BluePrintPage } from './model/BluePrint.model';
-import { Store } from '../../../common/core/stores/Store';
-import { PackagesApiService } from './packages-api.service';
-import { PackagesDashboardState } from './model/packages-dashboard.state';
-import { Observable, of } from 'rxjs';
-import { NgxUiLoaderService } from 'ngx-ui-loader';
+import {Injectable} from '@angular/core';
+import {BluePrintPage} from './model/BluePrint.model';
+import {Store} from '../../../common/core/stores/Store';
+import {PackagesApiService} from './packages-api.service';
+import {PackagesDashboardState} from './model/packages-dashboard.state';
+import {Observable, of} from 'rxjs';
+import {NgxUiLoaderService} from 'ngx-ui-loader';
 
 @Injectable({
     providedIn: 'root'
@@ -154,7 +154,7 @@ export class PackagesStore extends Store<PackagesDashboardState> {
                             tag = tag.replace(',', '');
                         }
                         bluePrintModel.tags.split(',').forEach(bluePrintModelTag => {
-                            if (bluePrintModelTag === tag) {
+                            if (tag.includes(bluePrintModelTag.trim())) {
                                 this.bluePrintContent.content.push(bluePrintModel);
                             }
                         });