aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/server/src/datasources/resource-dictionary.datasource-template.ts
diff options
context:
space:
mode:
authorNirvan Ramjuttun <nirvan.ramjuttun@amdocs.com>2019-05-07 12:39:19 -0400
committerDan Timoney <dtimoney@att.com>2019-05-13 12:52:51 +0000
commitc6bc12d878753aceb887838b926666595d480a86 (patch)
treedac36d0f140ea7a557b862511a78afab564f1a6b /cds-ui/server/src/datasources/resource-dictionary.datasource-template.ts
parentd34f1566790860da5d050ccdeb3aaaf6c61ff7e5 (diff)
Modify CDS-UI server to allow communicating with external blueprint mS
Issue-ID: CCSDK-1292 Change-Id: I3536437bad334841d7c7ecd577c092cd13f42a9b Signed-off-by: Nirvan Ramjuttun <nirvan.ramjuttun@amdocs.com> (cherry picked from commit 087d4b667a9c5517ac7d014c2bbdad994b927147)
Diffstat (limited to 'cds-ui/server/src/datasources/resource-dictionary.datasource-template.ts')
-rw-r--r--cds-ui/server/src/datasources/resource-dictionary.datasource-template.ts91
1 files changed, 91 insertions, 0 deletions
diff --git a/cds-ui/server/src/datasources/resource-dictionary.datasource-template.ts b/cds-ui/server/src/datasources/resource-dictionary.datasource-template.ts
new file mode 100644
index 000000000..b987e588c
--- /dev/null
+++ b/cds-ui/server/src/datasources/resource-dictionary.datasource-template.ts
@@ -0,0 +1,91 @@
+import {controllerApiConfig} from '../../config/app-config';
+
+export default {
+ "name": "resourceDictionary",
+ "connector": "rest",
+ "baseURL": controllerApiConfig.url + "/dictionary",
+ "crud": false,
+ "operations": [{
+ "template": {
+ "method": "GET",
+ "url": controllerApiConfig.url + "/dictionary/{name}",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": controllerApiConfig.authToken
+ },
+ "responsePath": "$.*"
+ },
+ "functions": {
+ "getByName": ["name"]
+
+ }
+ },
+ {
+ "template": {
+ "method": "GET",
+ "url": controllerApiConfig.url + "/dictionary/source-mapping",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": controllerApiConfig.authToken
+ },
+ "responsePath": "$.*"
+ },
+ "functions": {
+ "getSourceMapping": []
+
+ }
+ },
+ {
+ "template": {
+ "method": "GET",
+ "url": controllerApiConfig.url + "/dictionary/search/{tags}",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": controllerApiConfig.authToken
+ },
+ "responsePath": "$.*"
+ },
+ "functions": {
+ "getByTags": ["tags"]
+
+ }
+ },
+ {
+ "template": {
+ "method": "POST",
+ "url": controllerApiConfig.url + "/dictionary",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": controllerApiConfig.authToken
+ },
+ "body": "{resourceDictionary}",
+ "responsePath": "$.*"
+ },
+ "functions": {
+ "save": ["resourceDictionary"]
+
+ }
+ },
+ {
+ "template": {
+ "method": "POST",
+ "url": controllerApiConfig.url + "/dictionary/by-names",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": controllerApiConfig.authToken
+ },
+ "body": "{resourceDictionaryList}",
+ "responsePath": "$.*"
+ },
+ "functions": {
+ "searchbyNames": ["resourceDictionaryList"]
+
+ }
+ }
+ ]
+}; \ No newline at end of file