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>
diff --git a/ui-react/src/api/LoopCache.js b/ui-react/src/api/LoopCache.js
index d44b5cf..4c8f68c 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 @@
this.loopJsonCache["globalPropertiesJson"] = newGlobalProperties;
}
- updateOpPolicyProperties(newOpProperties) {
+ updateOperationalPolicyProperties(newOpProperties) {
this.loopJsonCache["operationalPolicies"] = newOpProperties;
}
@@ -51,7 +50,7 @@
return this.loopJsonCache["name"];
}
- getOperationalPolicyProperty() {
+ getOperationalPolicyConfigurationJson() {
return JSON.parse(JSON.stringify(this.loopJsonCache["operationalPolicies"]["0"]["configurationsJson"]));
}
@@ -59,15 +58,15 @@
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 @@
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 @@
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 @@
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;