diff options
14 files changed, 74 insertions, 27 deletions
diff --git a/deliveries/.gitignore b/deliveries/.gitignore index f12ac3a0..99665291 100644 --- a/deliveries/.gitignore +++ b/deliveries/.gitignore @@ -1 +1,2 @@ /PROJECT +/etc_vm-ep-dev2.zip diff --git a/deliveries/new_stop.sh b/deliveries/new_stop.sh index 7693c035..9193e285 100755 --- a/deliveries/new_stop.sh +++ b/deliveries/new_stop.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Establish environment variables source $(dirname $0)/os_settings.sh diff --git a/deliveries/widget_ms_start.sh b/deliveries/widget_ms_start.sh index 5e51aebe..b5fbdc25 100755 --- a/deliveries/widget_ms_start.sh +++ b/deliveries/widget_ms_start.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Establish environment variables source $(dirname $0)/os_settings.sh diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/CommonWidgetController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/CommonWidgetController.java index 68e32a16..7faea5d9 100644 --- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/CommonWidgetController.java +++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/CommonWidgetController.java @@ -20,6 +20,8 @@ package org.openecomp.portalapp.portal.controller; import javax.servlet.http.HttpServletRequest; + +import org.openecomp.portalapp.controller.EPRestrictedBaseController; import org.openecomp.portalapp.portal.controller.DashboardController.WidgetCategory; import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse; import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum; @@ -33,7 +35,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestController -public class CommonWidgetController implements BasicAuthenticationController{ +public class CommonWidgetController extends EPRestrictedBaseController implements BasicAuthenticationController{ private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CommonWidgetController.class); @@ -63,7 +65,7 @@ public class CommonWidgetController implements BasicAuthenticationController{ * Request parameter. * @return Rest response wrapped around a CommonWidgetMeta object. */ - @RequestMapping(value = "/widgetData", method = RequestMethod.GET, produces = "application/json") + @RequestMapping(value = "/commonWidgets", method = RequestMethod.GET, produces = "application/json") public PortalRestResponse<CommonWidgetMeta> getWidgetData(HttpServletRequest request, @RequestParam String resourceType) { if (!isValidResourceType(resourceType)){ diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceProxyServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceProxyServiceImpl.java index 6b9a4416..ff8ee424 100644 --- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceProxyServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceProxyServiceImpl.java @@ -108,6 +108,8 @@ public class MicroserviceProxyServiceImpl implements MicroserviceProxyService { HttpHeaders headers = new HttpHeaders(); headers.add("Authorization", "Basic " + base64Creds); headers.setContentType(MediaType.APPLICATION_JSON); + String rawCookie = request.getHeader("Cookie"); + headers.add("Cookie", rawCookie); HttpEntity<String> entity = new HttpEntity<String>(headers); String url = microserviceUrlConverter(data, params); diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceServiceImpl.java index aaadfa18..520bef98 100644 --- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceServiceImpl.java @@ -24,6 +24,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.crypto.BadPaddingException; + import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Restrictions; import org.openecomp.portalapp.portal.domain.MicroserviceData; @@ -82,7 +84,11 @@ public class MicroserviceServiceImpl implements MicroserviceService { List<MicroserviceData> list = (List<MicroserviceData>) dataAccessService.getList(MicroserviceData.class, null); for (int i = 0; i < list.size(); i++) { if (list.get(i).getPassword() != null) - list.get(i).setPassword(decryptedPassword(list.get(i).getPassword())); + try{ + list.get(i).setPassword(decryptedPassword(list.get(i).getPassword())); + } catch(BadPaddingException bpe){ + logger.error(EELFLoggerDelegate.errorLogger, "Couldn't decrypt - Check decryption key in system.properties - looks wrong. Still going ahead with list population though", bpe); + } list.get(i).setParameterList(getServiceParameters(list.get(i).getId())); } return list; diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java index 80408954..58809210 100644 --- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java @@ -1242,7 +1242,7 @@ public class UserRolesCommonServiceImpl { protected EPUser getUser(String userId, EPApp app, ApplicationsRestClientService applicationsRestClientService) throws HTTPException { - return applicationsRestClientService.get(EPUser.class, app.getId(), String.format("/user/%s", userId), true); + return applicationsRestClientService.get(EPUser.class, app.getId(), String.format("/user/%s", userId)); } diff --git a/ecomp-portal-BE-os/README.md b/ecomp-portal-BE-os/README.md index 829fd86f..be584cba 100644 --- a/ecomp-portal-BE-os/README.md +++ b/ecomp-portal-BE-os/README.md @@ -17,6 +17,9 @@ https://www.eclipse.org/m2e-wtp/ Version 1.1.?, July 2017 - [Portal-30] Failed to communicate with the widget microservice: Fixed - [Portal-35] Replaced the portal logo with onap logo on the login screen. +- [Portal-40] Fix to add user roles +- [Portal-47] Fix to eliminate duplicate roles on Users page +- [Portal-45] Fix to save on an application Onboarding Version 1.1.0, July 2017 - [Portal-7] Improvements added as part of the rebasing process diff --git a/ecomp-portal-BE-os/pom.xml b/ecomp-portal-BE-os/pom.xml index 1e4b4922..2cf1af23 100644 --- a/ecomp-portal-BE-os/pom.xml +++ b/ecomp-portal-BE-os/pom.xml @@ -116,15 +116,15 @@ </manifestEntries> </archive> <overlays> - <!-- specify the order in which these should be applied --> - <overlay> - <groupId>org.openecomp.ecompsdkos</groupId> - <artifactId>epsdk-app-overlay</artifactId> - </overlay> + <!-- specify the order in which these should be applied --> <overlay> <groupId>org.openecomp.portal</groupId> <artifactId>ecompportal-be-common</artifactId> </overlay> + <overlay> + <groupId>org.openecomp.ecompsdkos</groupId> + <artifactId>epsdk-app-overlay</artifactId> + </overlay> </overlays> </configuration> </plugin> diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientServiceImpl.java index 4626b17b..f3fda34e 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientServiceImpl.java +++ b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/ApplicationsRestClientServiceImpl.java @@ -48,6 +48,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.stereotype.Service; +import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonDeserializationContext; @@ -71,6 +72,8 @@ public class ApplicationsRestClientServiceImpl implements ApplicationsRestClient private AppsCacheService appsCacheService; Gson gson = null; + private final ObjectMapper mapper = new ObjectMapper(); + @PostConstruct private void init(){ logger.debug(EELFLoggerDelegate.debugLogger, "initializing"); @@ -185,7 +188,9 @@ public class ApplicationsRestClientServiceImpl implements ApplicationsRestClient verifyResponse(response); String str = response.readEntity(String.class); EcompPortalUtils.logAndSerializeObject(restPath, "GET result =", str); - try { t = gson.fromJson(str, clazz); } catch(Exception e) { + try { + t = mapper.readValue(str, clazz); + } catch(Exception e) { logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e)); EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput); } diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java index 4c97a52d..f953634a 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java +++ b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java @@ -26,6 +26,8 @@ public class OnboardingApp { public String name; public String imageUrl; + + public String imageLink; public String description; diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp index c37d6d6f..1b269d80 100644 --- a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp @@ -48,6 +48,22 @@ font-family: Verdana,Arial,Helvetica, sans-serif; font-size: 9px; } + .login-tbl { + border: 0px; + } + .login-txt { + font-family: Arial; + font-size: 14px; + text-decoration: none; + } + .login-input-text { + width: 140px; + height:25px; + border-radius:7px; + padding-left:5px; + font-family: Arial; + font-size: 14px; + } .login-btn { cursor: pointer; background: #d97b34; @@ -73,25 +89,34 @@ %> <div ng-controller="externalLoginController"> <div class="centered style="-webkit-transform: translateZ(0);background:white, z-index:0;"> - <div align="center" id="errorInfo" style="display:none;float:left;font-size:12px;margin-left:5px"><span style="color:red">Invaild username or password, Please try again</span></div> + <div align="center" id="errorInfo" style="display:none; float:left; font-family: Arial; font-size:12px; margin-left:5px"> + <span style="color:red">Invalid username or password. Please try again.</span> + </div> <br/> <div align="center" style="margin-left:auto;margin-right:auto;width:40%;padding:6px;background-color:white"> <img src="static/fusion/images/onap-portal-logo.png" height="250"/> <br> <div style="opacity: 0.7;"> - <label> - <label class="form-field__label">Login ID:</label> - </label> - <input type="text" class="fn-ebz-text" ng-model="loginId" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;" - maxlength="30" /> - <br/> - <br/> - <label > Password:</label> - <input type="password" class="span3" ng-model="password" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;" - maxlength="30" onkeydown="if (event.keyCode == 13) document.getElementById('loginBtn').click()"/> - <br /> + <table class="login-tbl"> + <tr> + <td> + <label class="login-txt">Login ID:</label> + </td> + <td> + <input type="text" class="login-input-text" ng-model="loginId" maxlength="30" /> + </td> + </tr> + <tr> + <td> + <label class="login-txt">Password:</label> + </td> + <td> + <input type="password" class="login-input-text" ng-model="password" maxlength="30" + onkeydown="if (event.keyCode == 13) document.getElementById('loginBtn').click()"/> + </td> + </tr> + </table> <br /> - <a class="login-btn" id="loginBtn" ng-click="loginExternal();">LOGIN</a> </div> <br> diff --git a/ecomp-portal-FE-common/client/app/views/header/header.less b/ecomp-portal-FE-common/client/app/views/header/header.less index b553cebb..e10e9ed7 100644 --- a/ecomp-portal-FE-common/client/app/views/header/header.less +++ b/ecomp-portal-FE-common/client/app/views/header/header.less @@ -14,6 +14,7 @@ font-weight: 400; font-family: "Omnes-ECOMP-W02",Arial !important; font-size: 18px; + margin-left: 10px; //.c18b; } diff --git a/ecomp-portal-FE-os/client/configurations/dev.json b/ecomp-portal-FE-os/client/configurations/dev.json index a037deb0..38142f73 100644 --- a/ecomp-portal-FE-os/client/configurations/dev.json +++ b/ecomp-portal-FE-os/client/configurations/dev.json @@ -83,8 +83,8 @@ "UpdateUserAppsSortManual": "http://localhost:8080/ecompportal/portalApi/UpdateUserAppsSortManual", "widgetCatalogSelection": "http://localhost:8080/ecompportal/portalApi/widgetCatalogSelection", "widgetCommon": "http://localhost:8080/ecompportal/portalApi/microservices", - "basicAuthAccount": "http://www.ecomp.att.com:8080/ecompportal-att/portalApi/basicAuthAccount", - "microserviceProxy": "http://www.ecomp.att.com:8080/ecompportal-att/portalApi/microservice/proxy", + "basicAuthAccount": "http://localhost:8080/ecompportal/portalApi/basicAuthAccount", + "microserviceProxy": "http://localhost:8080/ecompportal/portalApi/microservice/proxy", "getWidthThresholdLeftMenu":"http://localhost:8080/ecompportal/portalApi/dashboard/windowWidthThresholdLeftMenu", "getWidthThresholdRightMenu":"http://localhost:8080/ecompportal/portalApi/dashboard/windowWidthThresholdRightMenu", "appCatalogRoles" : "http://localhost:8080/ecompportal/portalApi/appCatalogRoles", |