aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/common
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2019-04-19 17:34:54 +0530
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>2019-04-19 17:35:09 +0530
commit82f1f0a6156b7ca4847041f4f9140e05a37c1891 (patch)
treefc582b24cb8fc395f69a335eb2be97de3e551352 /cds-ui/client/src/app/common
parentf812f74460b20a2ba2d4c58e45fd9463a7209769 (diff)
Resourcedictionary-fetching resources from backend
Intgrated UI with loopback to fetch resources from backend on search Issue-ID: CCSDK-1217 Change-Id: I4a1c30748d24079bc976f6785df39bbe60777489 Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'cds-ui/client/src/app/common')
-rw-r--r--cds-ui/client/src/app/common/constants/app-constants.ts6
-rw-r--r--cds-ui/client/src/app/common/shared/pipes/search.pipe.ts6
2 files changed, 11 insertions, 1 deletions
diff --git a/cds-ui/client/src/app/common/constants/app-constants.ts b/cds-ui/client/src/app/common/constants/app-constants.ts
index 0bfe5cade..d4e8989c1 100644
--- a/cds-ui/client/src/app/common/constants/app-constants.ts
+++ b/cds-ui/client/src/app/common/constants/app-constants.ts
@@ -95,4 +95,10 @@ export const GlobalContants = {
export const LoopbackConfig = {
url: "http://127.0.0.1:3000",
authtoken: "ccsdkapps"
+}
+
+export const ResourceDictionaryURLs = {
+ saveResourceDictionary: '/resourcedictionary/save',
+ searchResourceDictionaryByTags: '/resourcedictionary/search',
+ searchResourceDictionaryByName: ''
} \ No newline at end of file
diff --git a/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts b/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts
index b0d37c3d1..08c76df5b 100644
--- a/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts
+++ b/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts
@@ -31,7 +31,11 @@ export class SearchPipe implements PipeTransform{
if(!searchText) return items;
searchText = searchText.toLowerCase();
return items.filter( it => {
- return it.toLowerCase().includes(searchText);
+ if(it.tags) {
+ return it.tags.toLowerCase().includes(searchText);
+ } else {
+ return items;
+ }
});
}
} \ No newline at end of file