summaryrefslogtreecommitdiffstats
path: root/ui-react/src/api/LoopCache.js
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2019-07-15 17:26:18 +0200
committersebdet <sebastien.determe@intl.att.com>2019-07-16 23:23:58 +0200
commit493c3839fb6807512218165fd8a3a6efe1933fb9 (patch)
treed5b71a3a1fc554270ae6b4ec138058fb378a732d /ui-react/src/api/LoopCache.js
parent8bd462f6dc4a714b1680cb11f525c05445d3da33 (diff)
SVG Rendering
SVG rendering draft for Config and operational policies management + call to back-end Issue-ID: CLAMP-422 Change-Id: Ia3ca4223e283d0cd56d98fb1871fd3b2880940ec Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/api/LoopCache.js')
-rw-r--r--ui-react/src/api/LoopCache.js31
1 files changed, 9 insertions, 22 deletions
diff --git a/ui-react/src/api/LoopCache.js b/ui-react/src/api/LoopCache.js
index d44b5cfd8..4c8f68c23 100644
--- a/ui-react/src/api/LoopCache.js
+++ b/ui-react/src/api/LoopCache.js
@@ -21,15 +21,14 @@
*
*/
-class LoopCache {
+export default class LoopCache {
loopJsonCache;
constructor(loopJson) {
this.loopJsonCache=loopJson;
- //LoopCache.SET_LOOP_JSON_CACHE(require('./example.json');
}
- updateMsProperties(type, newMsProperties) {
+ updateMicroServiceProperties(type, newMsProperties) {
if (newMsProperties["name"] === type) {
for (var policy in this.loopJsonCache["microServicePolicies"]) {
if (this.loopJsonCache["microServicePolicies"][policy]["name"] === type) {
@@ -43,7 +42,7 @@ class LoopCache {
this.loopJsonCache["globalPropertiesJson"] = newGlobalProperties;
}
- updateOpPolicyProperties(newOpProperties) {
+ updateOperationalPolicyProperties(newOpProperties) {
this.loopJsonCache["operationalPolicies"] = newOpProperties;
}
@@ -51,7 +50,7 @@ class LoopCache {
return this.loopJsonCache["name"];
}
- getOperationalPolicyProperty() {
+ getOperationalPolicyConfigurationJson() {
return JSON.parse(JSON.stringify(this.loopJsonCache["operationalPolicies"]["0"]["configurationsJson"]));
}
@@ -59,15 +58,15 @@ class LoopCache {
return JSON.parse(JSON.stringify(this.loopJsonCache["operationalPolicies"]));
}
- getGlobalProperty() {
+ getGlobalProperties() {
return JSON.parse(JSON.stringify(this.loopJsonCache["globalPropertiesJson"]));
}
- getDeploymentProperties() {
+ getDcaeDeploymentProperties() {
return JSON.parse(JSON.stringify(this.loopJsonCache["globalPropertiesJson"]["dcaeDeployParameters"]));
}
- getMsJson(type) {
+ getMicroServicesJsonForType(type) {
var msProperties = this.loopJsonCache["microServicePolicies"];
for (var policy in msProperties) {
if (msProperties[policy]["name"] === type) {
@@ -77,7 +76,7 @@ class LoopCache {
return null;
}
- getMsProperty(type) {
+ getMicroServiceProperties(type) {
var msProperties = this.loopJsonCache["microServicePolicies"];
for (var policy in msProperties) {
if (msProperties[policy]["name"] === type) {
@@ -89,7 +88,7 @@ class LoopCache {
return null;
}
- getMsUI(type) {
+ getMicroServiceJsonRepresentationForType(type) {
var msProperties = this.loopJsonCache["microServicePolicies"];
for (var policy in msProperties) {
if (msProperties[policy]["name"] === type) {
@@ -114,16 +113,4 @@ class LoopCache {
getComponentStates() {
return this.loopJsonCache.components;
}
-
- get getLoopJsonCache() {
- return this.loopJsonCache;
- }
-
- set setLoopJsonCache(newJson) {
- this.loopJsonCache = newJson;
- }
}
-
-export const LOOP_CACHE = new LoopCache(require('./example.json'));
-
-export default LoopCache;