diff options
author | Idan Amit <ia096e@intl.att.com> | 2018-01-15 14:31:42 +0200 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2018-01-16 16:58:47 +0000 |
commit | 5197c8b7b3cf7576f1198e4b59a7d6484e793107 (patch) | |
tree | 55e938e420d863fac9f1c92901f4e7c2e34787c4 /catalog-fe/src/main/java | |
parent | fd19ae43d9f057f9ce51d48f95ef3f5f60173f22 (diff) |
Designer-view component for top-nav
Create a designer-view component for opening a designer view from the top-nav
Updated the API to return the designers as a list and not as an object
Created a designer-frame component that will get a designer url to open in the dedicated position
Change-Id: Ic42f7695277e88aacdeaa74d4d0f95b49ce44999
Issue-ID: SDC-884
Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'catalog-fe/src/main/java')
-rw-r--r-- | catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/DesignerStatusBL.java | 24 | ||||
-rw-r--r-- | catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/DesignerStatusBL.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/DesignerStatusBL.java index cadaf19e96..eb43df6c95 100644 --- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/DesignerStatusBL.java +++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/DesignerStatusBL.java @@ -1,8 +1,8 @@ package org.openecomp.sdc.fe.impl; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; +import java.util.ArrayList; +import java.util.List; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpHead; @@ -32,31 +32,31 @@ public class DesignerStatusBL { } - public String checkDesinerListAvailability() { + public String checkDesignerListAvailability() { String result = null; - DesignersConfiguration designersConfiguarion = ConfigurationManager.getConfigurationManager() + DesignersConfiguration designersConfiguration = ConfigurationManager.getConfigurationManager() .getDesignersConfiguration(); - if (designersConfiguarion == null || designersConfiguarion.getDesignersList() == null) { + if (designersConfiguration == null || designersConfiguration.getDesignersList() == null) { log.warn("Configuration of type {} was not found", DesignersConfiguration.class); } else { - log.debug("The value returned from getConfig is {}", designersConfiguarion); + log.debug("The value returned from getConfig is {}", designersConfiguration); - Map<String, Designer> avaiableDesignersMap = new HashMap<String, Designer>(); + List<Designer> availableDesignersList = new ArrayList<>(); - designersConfiguarion.getDesignersList().forEach((key, value) -> { - if (CheckDesignerAvailabilty(value)) { - avaiableDesignersMap.put(key, value); + designersConfiguration.getDesignersList().forEach(value -> { + if (checkDesignerAvailability(value)) { + availableDesignersList.add(value); } }); - result = gson.toJson(avaiableDesignersMap); + result = gson.toJson(availableDesignersList); } return result; } - private boolean CheckDesignerAvailabilty(Designer designer) { + private boolean checkDesignerAvailability(Designer designer) { StringBuilder requestString = new StringBuilder(); boolean result = false; diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java index bcaf504497..ba37e94d10 100644 --- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java +++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java @@ -124,7 +124,7 @@ public class ConfigServlet extends BasicServlet { DesignerStatusBL designerStatusBL = (DesignerStatusBL) context.getAttribute(Constants.DESIGNER_BL_COMPONENT); - result = designerStatusBL.checkDesinerListAvailability(); + result = designerStatusBL.checkDesignerListAvailability(); return Response.status(Status.OK).entity(result).build(); |