From: rb7147 Date: Mon, 4 Dec 2017 21:45:55 +0000 (-0500) Subject: Upgraded the latest ONAP SDK X-Git-Tag: v1.2.0~198 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=commitdiff_plain;h=428150834ee60899b9a8da019bae3c8bf009adf1 Upgraded the latest ONAP SDK Upgraded latest ONAP SDK Code. Change-Id: I669d6cfcefe068b1e4c078889d7d6c77ce788e2e Issue-ID: POLICY-432 Signed-off-by: rb7147 --- diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java index 7591781ff..cf183114c 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java @@ -1219,13 +1219,12 @@ public class PolicyDBDao { groupQuery.setParameter("groupId", group.getId()); groupQuery.setParameter("deleted", false); List groupQueryList = groupQuery.getResultList(); - if(groupQueryList!=null){ + if(groupQueryList!=null && !groupQueryList.isEmpty()){ GroupEntity dbgroup = (GroupEntity)groupQueryList.get(0); updatedGroup = synchronizeGroupPoliciesInFileSystem(group, dbgroup); + logger.info("Group was updated during file system audit: " + updatedGroup.toString()); } - } catch (PAPException e) { - logger.error(e); - } catch (PolicyDBException e) { + } catch (PAPException | PolicyDBException e) { logger.error(e); } catch (Exception e) { logger.error(e); @@ -1236,7 +1235,6 @@ public class PolicyDBDao { em.getTransaction().commit(); em.close(); - logger.info("Group was updated during file system audit: " + updatedGroup.toString()); return updatedGroup; } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/adapter/AddressGroupJson.java b/ONAP-REST/src/main/java/org/onap/policy/rest/adapter/AddressGroupJson.java index c634a74d1..da4671ba4 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/adapter/AddressGroupJson.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/adapter/AddressGroupJson.java @@ -28,7 +28,7 @@ public class AddressGroupJson { protected String name; protected String description; - protected List members; + protected List members; // name public String getName() { @@ -66,16 +66,16 @@ public class AddressGroupJson { this.description = value; } - public List getMembers() + public List getMembers() { if(members==null) { - members= new ArrayList(); + members= new ArrayList(); } return this.members; } - public void setMembers(List members) + public void setMembers(List members) { this.members = members; } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/adapter/AddressMembers.java b/ONAP-REST/src/main/java/org/onap/policy/rest/adapter/AddressMembers.java index 14e46f15f..e6b993fb9 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/adapter/AddressMembers.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/adapter/AddressMembers.java @@ -25,6 +25,7 @@ package org.onap.policy.rest.adapter; public class AddressMembers { protected String type; + protected String name; protected String value; public String getType() { @@ -35,6 +36,14 @@ public class AddressMembers { this.type = type; } + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public String getValue() { return value; } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/adapter/AddressMembersJson.java b/ONAP-REST/src/main/java/org/onap/policy/rest/adapter/AddressMembersJson.java new file mode 100644 index 000000000..e97d2b2cf --- /dev/null +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/adapter/AddressMembersJson.java @@ -0,0 +1,46 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP Policy Engine + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.rest.adapter; + + + +public class AddressMembersJson { + + protected String type; + protected String name; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + +} \ No newline at end of file diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyVersion.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyVersion.java index bc6ad99fd..dd51bee2a 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyVersion.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyVersion.java @@ -168,7 +168,7 @@ public class PolicyVersion implements Serializable { return modifiedDate; } - public void setModifiedDate(Timestamp modifiedDate) { + public void setModifiedDate(Date modifiedDate) { this.modifiedDate = modifiedDate; } diff --git a/ONAP-SDK-APP/README.md b/ONAP-SDK-APP/README.md deleted file mode 100644 index 043a967fd..000000000 --- a/ONAP-SDK-APP/README.md +++ /dev/null @@ -1,68 +0,0 @@ -Onap SDK Web App -================= - -This is a Maven project with the ONAP SDK web application for public release, containing files specific to requirements of the open-source version. This project uses the Maven war plugin to copy in ("overlay") the contents of the ONAP SDK web application overlay files distribution at package time. - -Use Apache Maven to build, package and deploy this webapp to a web container like Apache Tomcat. Eclipse users must install the M2E-WTP connector, see https://www.eclipse.org/m2e-wtp/ -Release Notes - -All of the release notes in the epsdk-app-common and epsdk-app-overlay areas apply here! - -Build 1.2.8, ?? ??? 2017 - - put new entries here * - -Build 1.2.7, 10 Apr 2017 - - Drop shared context property - -Build 1.2.6, 23 Mar 2017 - - DE270905 Removed total page/current page text boxes from bottom of Profile Search page - DE272154 SDK-App: self profile page, changes on drop downs not saved (120272) - DE273128 Revise left menu to have unique IDs - DE271378 fixed Camunda Page link in fn_menu; additional links were updated: Notebook - US847688 Abstraction of support page content for AT&T vs Open Source in SQL Scripts - Add sample defs/definitions.xml file for partner applications to configure jsp pages - Downgrade angularJS from 1.5.0 to 1.4.8 - -Build 1.2.5, 16 Mar 2017 - - DE272709 Update icon names from DS1 to DS2 in database load script - Upgrade to EPSDK libraries version 1.2.5 - -Build 1.2.4, 10 Mar 2017 - - DE272042 Add missing includes so left menu appears on collaborate and notebook pages - DE272193 Fix class/icon name to restore role icon on Self Profile page - Restore spinners by changing class name from icon-spinner to icon-primary-spinner - DE272202 updated ionicon.css for open source version of report search page - Removed unused js files from samplePage.html in epsdk-app-os - Upgrade to EPSDK libraries version 1.2.4 - -Build 1.2.3, 8 Mar 2017 - - DE271038 Remove references to famous telecommunications company from system.properties - Upgrade to EPSDK libraries version 1.2.3 - -Build 1.2.2, 6 Mar 2017 - - DE270658 EPSDK-app-os header is covering part of left menu. - DE271510 Pages not loading in IE and FF properly. Drop page-resource-ds2.js; load scripts in HTML directly - Remove references to famous telecommunications company hosts from fusion.properties, portal.properties - Upgrade to EPSDK libraries version 1.2.2 - -Build 1.2.1, 2 Mar 2017 - - DE269231 Separated footer files on OS module displaying black footer with no content - US847688 Split database scripts; include full set in distributions - US847706 Refactored AdminAuthExtension to implement interface expected in OnboardingApiServiceImpl - Added class conf/HibernateMappingLocations - moved out of common to apps - Added file logback.xml to src/main/resources with appropriate logger names - Extend HibernateMappingLocations with method that returns list of package names to scan - Remove references to famous telecommunications company hosts from system.properties file - Upgrade to EPSDK libraries version 1.2.1 - -Build 1.2.0, 9 Feb 2017 - - Initial release diff --git a/ONAP-SDK-APP/pom.xml b/ONAP-SDK-APP/pom.xml index 32cac6e92..e1497ccac 100644 --- a/ONAP-SDK-APP/pom.xml +++ b/ONAP-SDK-APP/pom.xml @@ -17,7 +17,6 @@ limitations under the License. ============LICENSE_END========================================================= --> - 4.0.0 @@ -31,14 +30,17 @@ UTF-8 - 1.3.1 + 2.1.0-SNAPSHOT 4.2.0.RELEASE 4.3.11.Final true 2.6.0 - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**,src/main/webapp/**/* + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**,src/main/webapp/**/* + + http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin + apache-tomcat-8.0.37 @@ -96,7 +98,7 @@ maven-war-plugin 2.1 - true + true true @@ -111,8 +113,8 @@ org.onap.portal.sdk epsdk-app-overlay - static/fusion/raptor/uigrid/vfs_fonts.js - + static/fusion/raptor/uigrid/vfs_fonts.js + org.onap.policy.engine @@ -122,29 +124,71 @@ - org.apache.maven.plugins - maven-assembly-plugin - 3.0.0 - - ${skipassembly} - - ${basedir}/distribution.xml - - - - - make-assembly - package - - single - - - - + org.apache.maven.plugins + maven-assembly-plugin + 3.0.0 + + ${skipassembly} + + ${basedir}/distribution.xml + + + + + make-assembly + package + + single + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + io.fabric8 + docker-maven-plugin + 0.22.0 + + true + + + onap/portal-sdk:${project.version} + + frolvlad/alpine-oraclejdk8:slim + + artifact + + + + + tar -xzf ${tomcat.download.name}.tar.gz + rm -f ${tomcat.download.name}.tar.gz + rm -fr ${tomcat.download.name}/webapps/[a-z]* + mkdir -p /opt + mv ${tomcat.download.name} /opt + + + + /opt/${tomcat.download.name}/bin/catalina.sh run + + + + + + + - + org.onap.policy.engine POLICY-SDK-APP @@ -202,7 +246,7 @@ mysql - mysql-connector-java + mysql-connector-java @@ -227,7 +271,7 @@ eelf-core 0.0.1 - + org.slf4j jcl-over-slf4j diff --git a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java similarity index 80% rename from ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java rename to ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java index 1b6397c05..7db760a93 100644 --- a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java +++ b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java @@ -17,21 +17,20 @@ * limitations under the License. * ================================================================================ */ -package org.openecomp.portalapp.conf; +package org.onap.portalapp.conf; import java.util.ArrayList; import java.util.List; -import org.openecomp.portalapp.login.LoginStrategyImpl; -import org.openecomp.portalapp.scheduler.RegistryAdapter; -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.conf.AppConfig; -import org.openecomp.portalsdk.core.conf.Configurable; -import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.CacheManager; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalapp.login.LoginStrategyImpl; +import org.onap.portalapp.scheduler.RegistryAdapter; +import org.onap.portalsdk.core.auth.LoginStrategy; +import org.onap.portalsdk.core.conf.AppConfig; +import org.onap.portalsdk.core.conf.Configurable; +import org.onap.portalsdk.core.objectcache.AbstractCacheManager; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.CacheManager; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -48,12 +47,12 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; /** - * ONAP Portal SDK sample application. ONAP Portal SDK core AppConfig class to + * ONAP Portal SDK sample application. Extends core AppConfig class to * reuse interceptors, view resolvers and other features defined there. */ @Configuration @EnableWebMvc -@ComponentScan(basePackages = "org.onap, org.openecomp") +@ComponentScan(basePackages = "org.onap") @PropertySource(value = { "${container.classpath:}/WEB-INF/conf/app/test.properties" }, ignoreResourceNotFound = true) @Profile("src") @EnableAsync @@ -68,24 +67,27 @@ public class ExternalAppConfig extends AppConfig implements Configurable { } /** - * @see org.openecomp.portalsdk.core.conf.AppConfig#viewResolver() + * @see org.onap.portalsdk.core.conf.AppConfig#viewResolver() */ + @Override public ViewResolver viewResolver() { return super.viewResolver(); } /** - * @see org.openecomp.portalsdk.core.conf.AppConfig#addResourceHandlers(ResourceHandlerRegistry) + * @see org.onap.portalsdk.core.conf.AppConfig#addResourceHandlers(ResourceHandlerRegistry) * * @param registry */ + @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { super.addResourceHandlers(registry); } /** - * @see org.openecomp.portalsdk.core.conf.AppConfig#dataAccessService() + * @see org.onap.portalsdk.core.conf.AppConfig#dataAccessService() */ + @Override public DataAccessService dataAccessService() { // Echo the JDBC URL to assist developers when starting the app. System.out.println("ExternalAppConfig: " + SystemProperties.DB_CONNECTIONURL + " is " @@ -99,6 +101,7 @@ public class ExternalAppConfig extends AppConfig implements Configurable { * * @return List of String, size 1 */ + @Override public List addTileDefinitions() { List definitions = new ArrayList<>(); definitions.add("/WEB-INF/defs/definitions.xml"); @@ -136,15 +139,11 @@ public class ExternalAppConfig extends AppConfig implements Configurable { */ // @Bean // ANNOTATION COMMENTED OUT // APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION - public SchedulerFactoryBean schedulerFactoryBean() throws PortalAPIException { + public SchedulerFactoryBean schedulerFactoryBean() throws Exception { SchedulerFactoryBean scheduler = new SchedulerFactoryBean(); scheduler.setTriggers(schedulerRegistryAdapter.getTriggers()); scheduler.setConfigLocation(appApplicationContext.getResource("WEB-INF/conf/quartz.properties")); - try{ - scheduler.setDataSource(dataSource()); - }catch(Exception e){ - throw new PortalAPIException(e); - } + scheduler.setDataSource(dataSource()); return scheduler; } @@ -160,7 +159,6 @@ public class ExternalAppConfig extends AppConfig implements Configurable { @Bean public LoginStrategy loginStrategy() { - return new LoginStrategyImpl(); } } diff --git a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java similarity index 94% rename from ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java rename to ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java index 2a904ce3c..8a1fff0f5 100644 --- a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java +++ b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java @@ -17,9 +17,9 @@ * limitations under the License. * ================================================================================ */ -package org.openecomp.portalapp.conf; +package org.onap.portalapp.conf; -import org.openecomp.portalsdk.core.conf.AppInitializer; +import org.onap.portalsdk.core.conf.AppInitializer; public class ExternalAppInitializer extends AppInitializer { diff --git a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java similarity index 79% rename from ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java rename to ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java index c66a96c6b..01591ccf3 100644 --- a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java +++ b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java @@ -17,25 +17,18 @@ * limitations under the License. * ================================================================================ */ -package org.openecomp.portalapp.conf; +package org.onap.portalapp.conf; +import org.onap.portalsdk.core.conf.HibernateMappingLocatable; import org.springframework.context.annotation.Profile; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.stereotype.Component; -import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable; - @Component @Profile("src") public class HibernateMappingLocations implements HibernateMappingLocatable { - /* - * (non-Javadoc) - * - * @see org.openecomp.portalsdk.core.conf.HibernateMappingLocatable# - * getMappingLocations() - */ @Override public Resource[] getMappingLocations() { return new Resource[] { new ClassPathResource("../fusion/orm/Fusion.hbm.xml"), @@ -43,15 +36,9 @@ public class HibernateMappingLocations implements HibernateMappingLocatable { new ClassPathResource("../fusion/orm/RNoteBookIntegration.hbm.xml") }; } - /* - * (non-Javadoc) - * - * @see org.openecomp.portalsdk.core.conf.HibernateMappingLocatable# - * getPackagesToScan() - */ @Override public String[] getPackagesToScan() { - return new String[] { "org.onap", "org.openecomp" }; + return new String[] { "org.onap" }; } } diff --git a/ONAP-SDK-APP/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java new file mode 100644 index 000000000..9843f604a --- /dev/null +++ b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java @@ -0,0 +1,90 @@ +/*- + * ================================================================================ + * ONAP Portal SDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +package org.onap.portalapp.filter; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.onap.portalapp.util.SecurityXssValidator; +import org.springframework.web.filter.OncePerRequestFilter; +import org.springframework.web.util.ContentCachingRequestWrapper; +import org.springframework.web.util.ContentCachingResponseWrapper; +import org.springframework.web.util.WebUtils; + +public class SecurityXssFilter extends OncePerRequestFilter { + + private static final String BAD_REQUEST = "BAD_REQUEST"; + + private SecurityXssValidator validator = SecurityXssValidator.getInstance(); + + private static String getRequestData(final HttpServletRequest request) throws UnsupportedEncodingException { + String payload = null; + ContentCachingRequestWrapper wrapper = WebUtils.getNativeRequest(request, ContentCachingRequestWrapper.class); + if (wrapper != null) { + byte[] buf = wrapper.getContentAsByteArray(); + if (buf.length > 0) { + payload = new String(buf, 0, buf.length, wrapper.getCharacterEncoding()); + } + } + return payload; + } + + private static String getResponseData(final HttpServletResponse response) throws IOException { + String payload = null; + ContentCachingResponseWrapper wrapper = WebUtils.getNativeResponse(response, + ContentCachingResponseWrapper.class); + if (wrapper != null) { + byte[] buf = wrapper.getContentAsByteArray(); + if (buf.length > 0) { + payload = new String(buf, 0, buf.length, wrapper.getCharacterEncoding()); + wrapper.copyBodyToResponse(); + } + } + return payload; + } + + @SuppressWarnings("unused") + @Override + protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) + throws ServletException, IOException { + + if (request.getMethod().equalsIgnoreCase("POST") || request.getMethod().equalsIgnoreCase("PUT")) { + + HttpServletRequest requestToCache = new ContentCachingRequestWrapper(request); + HttpServletResponse responseToCache = new ContentCachingResponseWrapper(response); + filterChain.doFilter(requestToCache, responseToCache); + String requestData = getRequestData(requestToCache); + String responseData = getResponseData(responseToCache); + if (StringUtils.isNotBlank(requestData) && validator.denyXSS(requestData)) { + throw new SecurityException(BAD_REQUEST); + } + + } else { + filterChain.doFilter(request, response); + } + + } +} diff --git a/ONAP-SDK-APP/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java new file mode 100644 index 000000000..af6e0ae69 --- /dev/null +++ b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java @@ -0,0 +1,113 @@ +/*- + * ================================================================================ + * ONAP Portal SDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ + +package org.onap.portalapp.login; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.onap.portalsdk.core.auth.LoginStrategy; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.exception.CipherUtilException; +import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; +import org.onap.portalsdk.core.onboarding.util.CipherUtil; +import org.onap.portalsdk.core.util.SystemProperties; +import org.springframework.web.servlet.ModelAndView; + +/** + * Implements basic single-signon login strategy for open-source applications + * when users start at Portal. Extracts an encrypted user ID sent by Portal. + */ +public class LoginStrategyImpl extends LoginStrategy { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LoginStrategyImpl.class); + + /** + * login for open source is same as external login in the non-open-source + * version. + */ + @Override + public ModelAndView doLogin(HttpServletRequest request, HttpServletResponse response) throws Exception { + return doExternalLogin(request, response); + } + + @Override + public String getUserId(HttpServletRequest request) throws PortalAPIException { + // Check ECOMP Portal cookie + Cookie ep = getCookie(request, EP_SERVICE); + if (ep == null) { + logger.debug(EELFLoggerDelegate.debugLogger, "getUserId: no EP_SERVICE cookie, returning null"); + return null; + } + + String userid = null; + try { + userid = getUserIdFromCookie(request); + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, "getUserId failed", e); + } + return userid; + } + + /** + * Searches the request for the user-ID cookie and decrypts the value using a + * key configured in properties + * + * @param request + * HttpServletRequest + * @return User ID + * @throws CipherUtilException + * On any failure to decrypt + */ + @SuppressWarnings("deprecation") + private String getUserIdFromCookie(HttpServletRequest request) throws CipherUtilException { + String userId = ""; + Cookie userIdCookie = getCookie(request, USER_ID); + if (userIdCookie != null) { + final String cookieValue = userIdCookie.getValue(); + if (!SystemProperties.containsProperty(SystemProperties.Decryption_Key)) + throw new IllegalStateException("Failed to find property " + SystemProperties.Decryption_Key); + final String decryptionKey = SystemProperties.getProperty(SystemProperties.Decryption_Key); + userId = CipherUtil.decrypt(cookieValue, decryptionKey); + logger.debug(EELFLoggerDelegate.debugLogger, "getUserIdFromCookie: decrypted as {}", userId); + } + return userId; + } + + /** + * Searches the request for the named cookie. + * + * @param request + * HttpServletRequest + * @param cookieName + * Name of desired cookie + * @return Cookie if found; otherwise null. + */ + private Cookie getCookie(HttpServletRequest request, String cookieName) { + Cookie[] cookies = request.getCookies(); + if (cookies != null) + for (Cookie cookie : cookies) + if (cookie.getName().equals(cookieName)) + return cookie; + return null; + } + +} diff --git a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/scheduler/Register.java b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/scheduler/Register.java similarity index 73% rename from ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/scheduler/Register.java rename to ONAP-SDK-APP/src/main/java/org/onap/portalapp/scheduler/Register.java index 0bb7da14a..2a355787b 100644 --- a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/scheduler/Register.java +++ b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/scheduler/Register.java @@ -17,14 +17,14 @@ * limitations under the License. * ================================================================================ */ -package org.openecomp.portalapp.scheduler; +package org.onap.portalapp.scheduler; import java.util.ArrayList; import java.util.List; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.scheduler.Registerable; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.scheduler.Registerable; +import org.onap.portalsdk.core.util.SystemProperties; import org.quartz.Trigger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.DependsOn; @@ -34,10 +34,10 @@ import org.springframework.stereotype.Component; @DependsOn({ "logRegistry", "systemProperties" }) public class Register implements Registerable { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Register.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Register.class); private List scheduleTriggers = new ArrayList<>(); - Trigger trigger[] = new Trigger[1]; + Trigger[] trigger = new Trigger[1]; @Autowired private LogRegistry logRegistry; @@ -49,15 +49,12 @@ public class Register implements Registerable { @Override public void registerTriggers() { - // if the property value is not available; the cron will not be added - // and can be ignored. its safe to ignore the exceptions - try { - if (SystemProperties.getProperty(SystemProperties.LOG_CRON) != null) - getScheduleTriggers().add(logRegistry.getTrigger()); - } catch (IllegalStateException ies) { - logger.info(EELFLoggerDelegate.debugLogger, ("Log Cron not available") + ies); + // if the property value is not available; the cron will not be added. + if (SystemProperties.containsProperty(SystemProperties.LOG_CRON)) { + logger.debug(EELFLoggerDelegate.debugLogger, + "Adding log registry for cron property {}", SystemProperties.getProperty(SystemProperties.LOG_CRON)); + getScheduleTriggers().add(logRegistry.getTrigger()); } - } public List getScheduleTriggers() { diff --git a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java similarity index 88% rename from ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java rename to ONAP-SDK-APP/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java index 18b3fa45f..241d2a18e 100644 --- a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java +++ b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java @@ -17,14 +17,14 @@ * limitations under the License. * ================================================================================ */ -package org.openecomp.portalapp.scheduler; +package org.onap.portalapp.scheduler; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openecomp.portalsdk.core.scheduler.Registerable; -import org.openecomp.portalsdk.workflow.services.WorkflowScheduleService; +import org.onap.portalsdk.core.scheduler.Registerable; +import org.onap.portalsdk.workflow.services.WorkflowScheduleService; import org.quartz.Trigger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.quartz.SchedulerFactoryBean; @@ -41,20 +41,15 @@ public class RegistryAdapter { private SchedulerFactoryBean schedulerBean; - Trigger trigger[] = new Trigger[1]; + Trigger [] trigger = new Trigger[1]; public Trigger[] getTriggers() { - registry.registerTriggers(); - List allTriggers = new ArrayList<>(); - List coreTriggers = addCoreTriggers(); final Trigger[] extTriggerArray = registry.getTriggers(); - allTriggers.addAll(Arrays.asList(extTriggerArray)); allTriggers.addAll(coreTriggers); - return allTriggers.toArray(trigger); } @@ -65,8 +60,8 @@ public class RegistryAdapter { return triggers; } - public void setSchedulerBean(SchedulerFactoryBean _schedulerBean) { - schedulerBean = _schedulerBean; + public void setSchedulerBean(final SchedulerFactoryBean schedulerBean) { + this.schedulerBean = schedulerBean; } public SchedulerFactoryBean getSchedulerBean() { diff --git a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java similarity index 92% rename from ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java rename to ONAP-SDK-APP/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java index db5c0a69a..c769ded26 100644 --- a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java +++ b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java @@ -17,17 +17,17 @@ * limitations under the License. * ================================================================================ */ -package org.openecomp.portalapp.service; +package org.onap.portalapp.service; import java.util.Set; +import org.onap.policy.model.Roles; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.UserInfo; -import org.openecomp.policy.model.Roles; -import org.openecomp.portalapp.service.IAdminAuthExtension; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalapp.service.IAdminAuthExtension; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java b/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java deleted file mode 100644 index 454cd3378..000000000 --- a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -/*- - * ================================================================================ - * ONAP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.lm; - -import java.util.Date; -import java.util.List; -import java.util.Map; - -import javax.servlet.ServletContext; - -import org.openecomp.portalsdk.core.lm.FusionLicenseManager; -import org.springframework.stereotype.Component; - -/* - * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. - */ - -@Component -public class FusionLicenseManagerImpl implements FusionLicenseManager { - - @Override - public void initKeyStoreParam() { - - } - - @Override - public void initCipherParam() { - - } - - @Override - public void initLicenseParam() { - - } - - @Override - public void doInitWork() { - - } - - @Override - public int installLicense() { - return 0; - } - - @Override - public synchronized int verifyLicense(ServletContext context) { - return 0; - } - - @Override - public void generateLicense(Map clientInfoMap, List ipAddressList) throws Exception { - - } - - @Override - public String nvl(String s) { - return null; - } - - @Override - public Date getExpiredDate() { - return null; - } - - @Override - public void setExpiredDate(Date expiredDate) { - - } - -} diff --git a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java b/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java deleted file mode 100644 index 26c5d9174..000000000 --- a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * ================================================================================ - * onap Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.lm; - -import java.io.FileNotFoundException; -import java.io.InputStream; - -import org.openecomp.portalsdk.core.lm.LicenseableClass; - -/* - * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. - */ - -public class LicenseableClassImpl implements LicenseableClass { - - public String getApplicationName() { - return ""; - } - - public InputStream getPublicKeystoreAsInputStream() throws FileNotFoundException { - return null; - } - - public String getAlias() { - return ""; - } - - public String getKeyPasswd() { - return ""; - } - - public String getPublicKeystorePassword() { - return ""; - } - - public String getCipherParamPassword() { - return ""; - } - - @SuppressWarnings("rawtypes") - public Class getClassToLicense() { - return this.getClass(); - } -} - diff --git a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java b/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java deleted file mode 100644 index 3b38f1d8e..000000000 --- a/ONAP-SDK-APP/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -/*- - * ================================================================================ - * ONAP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.login; - -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.onap.policy.common.logging.flexlogger.FlexLogger; -import org.onap.policy.common.logging.flexlogger.Logger; -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.springframework.web.servlet.ModelAndView; - -public class LoginStrategyImpl extends LoginStrategy { - - private static final Logger LOGGER = FlexLogger.getLogger(LoginStrategyImpl.class); - - @Override - public ModelAndView doLogin(HttpServletRequest request, HttpServletResponse response) throws Exception { - // 'login' for opensource is same as 'external' login. - return doExternalLogin(request, response); - } - - @Override - public String getUserId(HttpServletRequest request) throws PortalAPIException { - // Check ONAP Portal cookie - if (!isLoginCookieExist(request)) - return null; - - String userid = null; - try { - userid = getUserIdFromCookie(request); - } catch (Exception e) { - LOGGER.error("Exception Occured" + e); - } - return userid; - } - - private static String getUserIdFromCookie(HttpServletRequest request) throws PortalAPIException { - String userId = ""; - Cookie userIdCookie = getCookie(request, USER_ID); - if (userIdCookie != null) { - final String cookieValue = userIdCookie.getValue(); - if (!SystemProperties.containsProperty(SystemProperties.Decryption_Key)) - throw new IllegalStateException("Failed to find property " + SystemProperties.Decryption_Key); - final String decryptionKey = SystemProperties.getProperty(SystemProperties.Decryption_Key); - try { - userId = CipherUtil.decrypt(cookieValue, decryptionKey); - LOGGER.debug("getUserIdFromCookie: decrypted as {}" +userId); - } catch (Exception e) { - LOGGER.error("Exception Occured in getUserIdFromCookie" + e); - } - } - return userId; - } - - private static boolean isLoginCookieExist(HttpServletRequest request) { - Cookie ep = getCookie(request, EP_SERVICE); - return (ep != null); - } - - private static Cookie getCookie(HttpServletRequest request, String cookieName) { - Cookie[] cookies = request.getCookies(); - if (cookies != null) - for (Cookie cookie : cookies) - if (cookie.getName().equals(cookieName)) - return cookie; - - return null; - } - -} diff --git a/ONAP-SDK-APP/src/main/resources/key.properties b/ONAP-SDK-APP/src/main/resources/key.properties new file mode 100644 index 000000000..134227d20 --- /dev/null +++ b/ONAP-SDK-APP/src/main/resources/key.properties @@ -0,0 +1,23 @@ +### +# ================================================================================ +# onap Portal SDK +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ================================================================================ +### + +# Properties read by the ONAP Framework library (epsdk-fw) + +cipher.enc.key = AGLDdG4D04BKm2IxIWEr8o==! \ No newline at end of file diff --git a/ONAP-SDK-APP/src/main/resources/logback.xml b/ONAP-SDK-APP/src/main/resources/logback.xml index fe4aac919..42535510b 100644 --- a/ONAP-SDK-APP/src/main/resources/logback.xml +++ b/ONAP-SDK-APP/src/main/resources/logback.xml @@ -99,7 +99,7 @@ ${applicationLoggerPattern} - + @@ -324,47 +324,30 @@ - - - - + + + - - - - + + - - + + - - - + + + - - - - - + + + + - \ No newline at end of file + diff --git a/ONAP-SDK-APP/src/main/resources/portal.properties b/ONAP-SDK-APP/src/main/resources/portal.properties index 1f2336d7b..04d39c14f 100644 --- a/ONAP-SDK-APP/src/main/resources/portal.properties +++ b/ONAP-SDK-APP/src/main/resources/portal.properties @@ -17,7 +17,7 @@ # limitations under the License. # ================================================================================ ### -# Properties read by ONAP Framework library, onapFW.jar +# Properties read by ONAP Framework library, ecompFW.jar ########################################################################## # The following properties should NOT be changed by partner applications. @@ -35,30 +35,18 @@ use_rest_for_functional_menu=true ########################################################################## # Name of java class that implements the OnBoardingApiService interface. -portal.api.impl.class = org.openecomp.portalapp.service.OnBoardingApiServiceImpl +portal.api.impl.class = org.onap.portalapp.service.OnBoardingApiServiceImpl -# CSP Global Log On for single sign on -ecomp_redirect_url = todo_csp_global_logon +# URL of the Portal where this app is onboarded +ecomp_redirect_url = https://portal.onap.org/onapportal/process_csp # URL of the ONAP Portal REST API -ecomp_rest_url = todo_Onap_rest_url +ecomp_rest_url = http://portal.onap.org:50580/onapportal/auxapi -# Applications do not need to run a UEB listener in 1610. +# Applications do not need to run a UEB listener after 1607. ueb_listeners_enable = false # UEB Configuration -# In release 1607, all 6 entries below were required. -# In release 1610, if key ueb_listeners_enable is set to false, +# If key ueb_listeners_enable is set to false, # then only the ueb_app_key is required. -# UEB servers -ueb_url_list = todo_ueb_list -# ONAP Portal listens on this UEB topic -ecomp_portal_inbox_name = ONAP-PORTAL-INBOX-TEST-DEMETER -# Replace these 3 default values with the ones for your specific App, -# as shown on the on-boarding page on the ONAP Portal web application. -ueb_app_key = ZOicEniw7BWDL1pM -ueb_app_secret = PJIsBErHfo2RGKzuu03CZKgV -ueb_app_mailbox_name = ONAP-PORTAL-OUTBOX-TEST-32756 -# Consumer group name for UEB topic. -# Use the special tag '{UUID}' to generate a unique one for each sdk-app server. -ueb_app_consumer_group_name = {UUID} +ueb_app_key = REPLACE-ME-UEB-APP-KEY-EPSDK-APP-OS diff --git a/ONAP-SDK-APP/src/main/webapp/WEB-INF/conf/system.properties b/ONAP-SDK-APP/src/main/webapp/WEB-INF/conf/system.properties index aa8ee1476..64f9f65c6 100644 --- a/ONAP-SDK-APP/src/main/webapp/WEB-INF/conf/system.properties +++ b/ONAP-SDK-APP/src/main/webapp/WEB-INF/conf/system.properties @@ -1,4 +1,4 @@ -# Properties read by ONAP Core library, onapSDK-core.jar +# Properties read by ONAP Core library, epsdk-core.jar ########################################################################## # The following properties should NOT be changed by partner applications. @@ -20,53 +20,53 @@ user_name = fullName decryption_key = AGLDdG4D04BKm2IxIWEr8o== ########################################################################## -# The following properties MAY require changes by partner applications. +# The following properties REQUIRE changes by partner applications. ########################################################################## + + #Mysql -db.driver = org.mariadb.jdbc.Driver +db.driver = org.mariadb.jdbc.Driver db.connectionURL = jdbc:mariadb://localhost:3306/onap_sdk db.userName = policy_user db.password = policy_user +db.encrypt_flag = false db.hib.dialect = org.hibernate.dialect.MySQLDialect db.min_pool_size = 5 db.max_pool_size = 10 +#db.test_connection_on_checkout = false +#db.preferred_test_query = SELECT 1 from FN_USER + hb.dialect = org.hibernate.dialect.MySQLDialect # SQL statements are logged to stdout hb.show_sql = true hb.idle_connection_test_period = 3600 -app_display_name = EP SDK App +app_display_name = ONAP Policy +# license file area files_path = /tmp #element map files -element_map_file_path = /tmp +element_map_file_path = app/fusionapp/files/ element_map_icon_path = app/fusionapp/icons/ #Cron Schedules have 6 required fields and 1 optional field: # Seconds Minutes Hours Day-of-Month Month Day-of-Week Year log_cron = 0 0/1 * * * ?; -mylogins_feed_cron = 0 0/60 * * * ?; #sessiontimeout_feed_cron = 0 * * * * ? * -my_login_feed_output_dir = /tmp/MyLogins - -# ONAP Portal Shared Context REST API URL -ecomp_shared_context_rest_url= todo_shared_context_url # Link shown in Help menu -contact_us_link = todo_Contact_link +contact_us_link = https://wiki.onap.org/display/DW/Portal -# Camunda cockpit link -camunda_cockpit_link = todo_camunda_link # An Unique 128-bit value defined to identify a specific version # of an application deployed on a specific virtual machine. # This value must be generated and updated by the application # which is using the ONAP SDK at the time of its deployment. # Online Unique UUID generator - https://www.uuidgenerator.net/ -instance_uuid=8da691c9-987d-43ed-a358-00ac2f35685d - -# R Cloud feature -guard_notebook_url=todo_guard_url +instance_uuid=8a3a3721-bca6-4140-92a3-5b1ad1b0df83 # Application base URL has the host and app context only; a proper prefix of the on-boarded URL. -# Only required for applications using WebJunction or FE/BE separation. For example: -# app_base_url = todo_App_base_url +# Only required for applications using FE/BE separation. For example: +# app_base_url = https://www.onap.org/app_context/ + +#authenticate user server +authenticate_user_server=http://todo_enter_auth_server_hostname:8383/openid-connect-server-webapp/allUsers \ No newline at end of file diff --git a/ONAP-SDK-APP/src/main/webapp/WEB-INF/defs/definitions.xml b/ONAP-SDK-APP/src/main/webapp/WEB-INF/defs/definitions.xml index b2391b562..2f4a91408 100644 --- a/ONAP-SDK-APP/src/main/webapp/WEB-INF/defs/definitions.xml +++ b/ONAP-SDK-APP/src/main/webapp/WEB-INF/defs/definitions.xml @@ -3,12 +3,16 @@ "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN" "http://tiles.apache.org/dtds/tiles-config_3_0.dtd"> - + + diff --git a/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/conf/fusion.properties b/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/conf/fusion.properties index 7140d35fb..8ce8cc95a 100644 --- a/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/conf/fusion.properties +++ b/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/conf/fusion.properties @@ -1,7 +1,11 @@ # login settings login_method_backdoor = backdoor login_method_attribute_name = login_method -login_method_csp = csp + +# These properties will be removed after SingleSignOnController is cleaned +authentication_mechanism = BOTH +login_method_csp = csp +login_method_web_junction = web_junction #login message login.error.hrid.empty = Login failed, please contact system administrator. @@ -11,9 +15,8 @@ login.error.user.inactive = Account is disabled, please contact system administr # User Session settings user_attribute_name = user roles_attribute_name = roles -role_functions_attribute_name = role_functions -authentication_mechanism = BOTH role_function_list = role_function_list +role_functions_attribute_name = role_functions # Import-user LDAP settings post_initial_context_factory = com.sun.jndi.ldap.LdapCtxFactory diff --git a/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp b/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp index edb040504..0d62c7865 100644 --- a/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp +++ b/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp @@ -20,35 +20,15 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ page isELIgnored="false"%> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> -<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties"%> -<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants"%> -<%@ page import="org.openecomp.portalsdk.core.domain.MenuData"%> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties"%> +<%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiProperties"%> +<%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiConstants"%> +<%@ page import="org.onap.portalsdk.core.domain.MenuData"%> - - - @@ -57,7 +37,7 @@ <% String contactUsLink = SystemProperties.getProperty(SystemProperties.CONTACT_US_LINK); - String redirectUrl = PortalApiProperties.getProperty(PortalApiConstants.ONAP_REDIRECT_URL); + String redirectUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL); String portalUrl = redirectUrl.substring(0, redirectUrl.lastIndexOf('/')) + "/process_csp"; String getAccessLink = redirectUrl.substring(0, redirectUrl.lastIndexOf('/')) + "/get_access"; %> @@ -83,8 +63,7 @@
  • - - ONAP Portal +
  • diff --git a/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml b/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml index 984e2369b..3d9a5e455 100644 --- a/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml +++ b/ONAP-SDK-APP/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml @@ -23,7 +23,7 @@ "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> - + diff --git a/ONAP-SDK-APP/src/main/webapp/WEB-INF/jsp/login.jsp b/ONAP-SDK-APP/src/main/webapp/WEB-INF/jsp/login.jsp index 2d6c95115..0ecb69609 100644 --- a/ONAP-SDK-APP/src/main/webapp/WEB-INF/jsp/login.jsp +++ b/ONAP-SDK-APP/src/main/webapp/WEB-INF/jsp/login.jsp @@ -17,7 +17,7 @@ limitations under the License. ================================================================================ --%> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties"%> <% // Name is defined by app; do not throw if missing diff --git a/ONAP-SDK-APP/src/main/webapp/WEB-INF/jsp/login_external.jsp b/ONAP-SDK-APP/src/main/webapp/WEB-INF/jsp/login_external.jsp index cb980c625..3671d2969 100644 --- a/ONAP-SDK-APP/src/main/webapp/WEB-INF/jsp/login_external.jsp +++ b/ONAP-SDK-APP/src/main/webapp/WEB-INF/jsp/login_external.jsp @@ -17,7 +17,7 @@ limitations under the License. ================================================================================ --%> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties"%> <% // Name is defined by app; do not throw if missing diff --git a/ONAP-SDK-APP/src/main/webapp/WEB-INF/web.xml b/ONAP-SDK-APP/src/main/webapp/WEB-INF/web.xml index 31b096049..a576f61f5 100644 --- a/ONAP-SDK-APP/src/main/webapp/WEB-INF/web.xml +++ b/ONAP-SDK-APP/src/main/webapp/WEB-INF/web.xml @@ -10,8 +10,16 @@ - 7 + 30 COOKIE + + SecurityXssFilter + org.onap.portalapp.filter.SecurityXssFilter + + + SecurityXssFilter + /* + \ No newline at end of file diff --git a/ONAP-SDK-APP/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css b/ONAP-SDK-APP/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css new file mode 100644 index 000000000..597b466d5 --- /dev/null +++ b/ONAP-SDK-APP/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css @@ -0,0 +1,193 @@ +@charset "UTF-8"; + +@font-face { font-family: "Ionicons"; src: url("../fonts/ionicons.eot?v=2.0.0"); src: url("../fonts/ionicons.eot?v=2.0.0#iefix") format("embedded-opentype"), url("../fonts/ionicons.ttf?v=2.0.0") format("truetype"), url("../fonts/ionicons.woff?v=2.0.0") format("woff"), url("../fonts/ionicons.svg?v=2.0.0#Ionicons") format("svg"); font-weight: normal; font-style: normal; } +.ionicons, +.icon-controls-upPRIMARY, +.icon-arrows-download:before, +.icon-securityalerts-alertL:before, +.icon-controls-add-maximize:before, +.icon-controls-add-maximize-circle:before, +.icon-misc-time:before, +.icoSecurityalerts:before, +.icon-apps-marketplace:before, +.icon-content-grid:before, +.icon-documents-archive:before, +.icon-arrows-vertical-arrow-down:before, +.icoArrows-download:before, +.icoArrows-incoming-call:before, +.icon-arrows-outgoing-call:before, +.icon-arrows-upload:before, +.icon-arrows-straight-arrow:before, +.icoArrows-vertical-arrow:before, +.icon-people-userbookmark:before, +.icon-controls-check:before, +.icon-chevron-down:before, +.icon-controls-down:before, +.icon-controls-left:before, +.icon-controls-right:before, +.icon-chevron-up:before, +.icoDocuments-report:before, +.icon-edit:before, +.icon-controls-up:before, +.icon-overview:before, +.icon-settings:before, +.icon-building-home:before, +.icon-documents-book:before, +.icoDocuments-book-outline:before, +.icoDocuments-bookmarks:before, +.icoDocuments-bookmarks-outline:before, +.icon-add-widget:before, +.icon-documents-copy:before, +.icon-content-flag:before, +.icon-primary-accordion-minus:before, +.icon-misc-piechart:before, +.icon-misc-piechart-outline:before, +.icon-primary-accordion-plus:before, +.icon-star:before, +.icon-building-door:before, +.icon-content-gridguide:before, +.icon-user:before, +.icon-people-oneperson:before, +.icon-people-oneperson-add:before, +.icon-people-oneperson-stalker:before, +.icon-controls-pointer:before, +.icon-arrows-replay-restart:before, +.icon-content-star:before, +.icon-misc-trash:before, +.icon-misc-pen:before, +.ion-navicon:before, +.icon-primary-close:before, .close:before, .reset-field:before, +.icon-datanetwork-softwareasaservice:before, +.icon-datanetwork-messaging2:before, +.icon-controls-settingsconnectedactivity:before, +.icon-arrows-upload:before { + display: inline-block; + font-family: "Ionicons"; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + text-rendering: auto; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + + +.icoSecurityalerts-alert:before { content: "\f100"; } + +.icon-arrows-download:before { content: "\f41f"; } + +.icon-controls-add-maximize:before { content: "\f2c7"; } + +.icon-controls-add-maximize-circle:before { content: "\f359"; } + +.icon-misc-time:before { content: "\f35a"; } + +.icoSecurityalerts:before { content: "\f35b"; } + +.icon-content-grid:before { content: "\f35c"; } + +.icon-documents-archive:before { content: "\f2c9"; } + +.icon-arrows-vertical-arrow-down:before { content: "\f35d"; } + +.icon-arrows-download:before { content: "\f35e"; } + +.icon-arrows-incoming-call:before { content: "\f360"; } + +.icoArrows-outgoing-call:before { content: "\f362"; } + +.icoArrows-upload:before { content: "\f364"; } + +.icoArrows-straight-arrow:before { content: "\f30f"; } + +.icon-arrows-vertical-arrow:before { content: "\f366"; } + +.icon-people-userbookmark:before { content: "\f39f"; } + +.icon-controls-check:before { content: "\f121"; } + +.icon-chevron-down:before { content: "\f123"; } + +.icon-controls-left:before { content: "\f124"; } + +.icon-controls-right:before { content: "\f125"; } + +.icon-chevron-up:before { content: "\f126"; } + +.icoDocuments-report:before { content: "\f274"; } + +.icon-overview:before { content: "\f133"; } + +.icon-controls-down:before { content: "\f3d0"; } + +.icon-controls-up:before { content: "\f3d8"; } + +.icon-documents-book:before { content: "\f3e8"; } + +.icoDocuments-book-outline:before { content: "\f3e7"; } + +.icoDocuments-bookmarks:before { content: "\f3ea"; } + +.icoDocuments-bookmarks-outline:before { content: "\f3e9"; } + +.icon-documents-copy:before { content: "\f41c"; } + +.icon-content-flag:before { content: "\f42d"; } + +.icon-primary-accordion-minus:before { content: "\f463"; } + +.icon-misc-piechart:before { content: "\f484"; } + +.icon-misc-piechart-outline:before { content: "\f483"; } + +.icon-primary-accordion-plus:before { content: "\f48a"; } + +.icon-building-door:before { content: "\f29f"; } + +.icon-content-gridguide:before { content: "\f20d"; } + +.icon-people-oneperson:before { content: "\f213"; } + +.icon-people-oneperson-add:before { content: "\f211"; } + +.icon-people-oneperson-stalker:before { content: "\f212"; } + +.icon-arrows-replay-restart:before { content: "\f21c"; } + +.icon-misc-trash:before { content: "\f252"; } + +.icon-arrows-upload:before { content: "\f255"; } + +.icon-user:before { content: "\f213"; } + +.icon-star:before { content: "\f4b3"; } + +.icon-edit:before { content: "\f2bf"; } + +.icon-settings:before { content: "\f13d"; } + +.icon-apps-marketplace:before { content: "\f35c"; } + +.icon-add-widget:before { content: "\f3f0"; } + +.icon-controls-upPRIMARY:before { content: "\f3d8"; } + +.icon-misc-pen:before { content: "\f2bf"; } + +.ion-navicon:before { content: "\f20e"; } + +.icon-building-home:before { content: "\f144"; } + +.icon-content-star:before { content: "\f24e"; } + +.icon-primary-close:before, .close:before, .reset-field:before { content: "\f129"; } + +.icon-datanetwork-softwareasaservice:before { content: "\f40c"; } + +.icon-datanetwork-messaging2:before { content: "\f132"; } + +.icon-controls-settingsconnectedactivity:before { content: "\f411"; } \ No newline at end of file diff --git a/ONAP-SDK-APP/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ionicons.css b/ONAP-SDK-APP/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ionicons.css index 3f7fef611..885aa6bd7 100644 --- a/ONAP-SDK-APP/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ionicons.css +++ b/ONAP-SDK-APP/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ionicons.css @@ -11,47 +11,47 @@ Modified icons to fit ionicon’s grid from original. */ @font-face { font-family: "Ionicons"; src: url("../fonts/ionicons.eot?v=2.0.0"); src: url("../fonts/ionicons.eot?v=2.0.0#iefix") format("embedded-opentype"), url("../fonts/ionicons.ttf?v=2.0.0") format("truetype"), url("../fonts/ionicons.woff?v=2.0.0") format("woff"), url("../fonts/ionicons.svg?v=2.0.0#Ionicons") format("svg"); font-weight: normal; font-style: normal; } -.ion, .ionicons, .ion-alert:before, .icon-securityalerts-alertL:before, .icon-controls-add-maximize:before, .icon-controls-add-maximize-circle:before, .icon-misc-time:before, .icoSecurityalerts:before,.icon-apps-marketplace:before ,.icon-content-grid:before, .icon-documents-archive:before, .ion-android-arrow-back:before, .icon-arrows-vertical-arrow-down:before, .ion-android-arrow-dropdown:before, .icoArrows-download:before, .ion-android-arrow-dropleft:before, .icoArrows-incoming-call:before, .ion-android-arrow-dropright:before, .icon-arrows-outgoing-call:before, .ion-android-arrow-dropup:before, .icon-arrows-upload:before, .icon-arrows-straight-arrow:before, .icoArrows-vertical-arrow:before, .ion-android-attach:before, .ion-android-bar:before, .ion-android-bicycle:before, .ion-android-boat:before, .ion-android-bookmark:before, .ion-android-bulb:before, .ion-android-bus:before, .ion-android-calendar:before, .ion-android-call:before, .ion-android-camera:before, .ion-android-cancel:before, .ion-android-car:before, .ion-android-cart:before, .ion-android-chat:before, .ion-android-checkbox:before, .ion-android-checkbox-blank:before, .ion-android-checkbox-outline:before, .ion-android-checkbox-outline-blank:before, .ion-android-checkmark-circle:before, .ion-android-clipboard:before, .ion-android-close:before, .ion-android-cloud:before, .ion-android-cloud-circle:before, .ion-android-cloud-done:before, .ion-android-cloud-outline:before, .ion-android-color-palette:before, .ion-android-compass:before, .ion-android-contact:before, .ion-android-contacts:before, .ion-android-contract:before, .ion-android-create:before, .ion-android-delete:before, .ion-android-desktop:before, .ion-android-document:before, .ion-android-done:before, .ion-android-done-all:before, .ion-android-download:before, .ion-android-drafts:before, .ion-android-exit:before, .ion-android-expand:before, .ion-android-favorite:before, .ion-android-favorite-outline:before, .ion-android-film:before, .ion-android-folder:before, .ion-android-folder-open:before, .ion-android-funnel:before, .ion-android-globe:before, .ion-android-hand:before, .ion-android-hangout:before, .ion-android-happy:before, .ion-android-home:before, .ion-android-image:before, .ion-android-laptop:before, .ion-android-list:before, .ion-android-locate:before, .ion-android-lock:before, .ion-android-mail:before, .ion-android-map:before, .ion-android-menu:before, .ion-android-microphone:before, .ion-android-microphone-off:before, .ion-android-more-horizontal:before, .ion-android-more-vertical:before, .ion-android-navigate:before, .ion-android-notifications:before, .ion-android-notifications-none:before, .ion-android-notifications-off:before, .ion-android-open:before, .ion-android-options:before, .ion-android-people:before, .ion-android-person:before, .icon-people-userbookmark:before, .ion-android-phone-landscape:before, .ion-android-phone-portrait:before, .ion-android-pin:before, .ion-android-plane:before, .ion-android-playstore:before, .ion-android-print:before, .ion-android-radio-button-off:before, .ion-android-radio-button-on:before, .ion-android-refresh:before, .ion-android-remove:before, .ion-android-remove-circle:before, .ion-android-restaurant:before, .ion-android-sad:before, .ion-android-search:before, .ion-android-send:before, .ion-android-settings:before, .ion-android-share:before, .ion-android-share-alt:before, .ion-android-star:before, .ion-android-star-half:before, .ion-android-star-outline:before, .ion-android-stopwatch:before, .ion-android-subway:before, .ion-android-sunny:before, .ion-android-sync:before, .ion-android-textsms:before, .ion-android-time:before, .ion-android-train:before, .ion-android-unlock:before, .ion-android-upload:before, .ion-android-volume-down:before, .ion-android-volume-mute:before, .ion-android-volume-off:before, .ion-android-volume-up:before, .ion-android-walk:before, .ion-android-warning:before, .ion-android-watch:before, .ion-android-wifi:before, .ion-aperture:before, .ion-archive:before, .ion-arrow-down-a:before, .ion-arrow-down-b:before, .ion-arrow-down-c:before, .ion-arrow-expand:before, .ion-arrow-graph-down-left:before, .ion-arrow-graph-down-right:before, .ion-arrow-graph-up-left:before, .ion-arrow-graph-up-right:before, .ion-arrow-left-a:before, .ion-arrow-left-b:before, .ion-arrow-left-c:before, .ion-arrow-move:before, .ion-arrow-resize:before, .ion-arrow-return-left:before, .ion-arrow-return-right:before, .ion-arrow-right-a:before, .ion-arrow-right-b:before, .ion-arrow-right-c:before, .ion-arrow-shrink:before, .ion-arrow-swap:before, .ion-arrow-up-a:before, .ion-arrow-up-b:before, .ion-arrow-up-c:before, .ion-asterisk:before, .ion-at:before, .ion-backspace:before, .ion-backspace-outline:before, .ion-bag:before, .ion-battery-charging:before, .ion-battery-empty:before, .ion-battery-full:before, .ion-battery-half:before, .ion-battery-low:before, .ion-beaker:before, .ion-beer:before, .ion-bluetooth:before, .ion-bonfire:before, .ion-bookmark:before, .ion-bowtie:before, .ion-briefcase:before, .ion-bug:before, .ion-calculator:before, .ion-calendar:before, .ion-camera:before, .ion-card:before, .ion-cash:before, .ion-chatbox:before, .ion-chatbox-working:before, .ion-chatboxes:before, .ion-chatbubble:before, .ion-chatbubble-working:before, .ion-chatbubbles:before, .ion-checkmark:before, .ion-checkmark-circled:before, .ion-checkmark-round:before, .icon-chevron-down:before, .icon-controls-left:before, .icon-controls-right:before, .icon-chevron-up:before, .ion-clipboard:before, .ion-clock:before, .ion-close:before, .ion-close-circled:before, .ion-close-round:before, .ion-closed-captioning:before, .ion-cloud:before, .ion-code:before, .ion-code-download:before, .ion-code-working:before, .ion-coffee:before, .ion-compass:before, .ion-compose:before, .icoDocuments-report:before, .ion-contrast:before, .ion-crop:before, .ion-cube:before, .ion-disc:before, .ion-document:before, .ion-document-text:before, .ion-drag:before, .ion-earth:before, .ion-easel:before, .icon-edit:before,.icon-misc-pen:before, .ion-egg:before, .ion-eject:before, .ion-email:before, .ion-email-unread:before, .ion-erlenmeyer-flask:before, .ion-erlenmeyer-flask-bubbles:before, .icon-overview:before, .ion-eye-disabled:before, .ion-female:before, .ion-filing:before, .ion-film-marker:before, .ion-fireball:before, .ion-flag:before, .ion-flame:before, .ion-flash:before, .ion-flash-off:before, .ion-folder:before, .ion-fork:before, .ion-fork-repo:before, .ion-forward:before, .ion-funnel:before, .icon-settings:before,.ion-gear-a:before, .ion-gear-b:before, .ion-grid:before, .ion-hammer:before, .ion-happy:before, .ion-happy-outline:before, .ion-headphone:before, .ion-heart:before, .ion-heart-broken:before, .ion-help:before, .ion-help-buoy:before, .ion-help-circled:before, .icon-building-home:before, .ion-icecream:before, .ion-image:before, .ion-images:before, .ion-information:before, .ion-information-circled:before, .ion-ionic:before, .ion-ios-alarm:before, .ion-ios-alarm-outline:before, .ion-ios-albums:before, .ion-ios-albums-outline:before, .ion-ios-americanfootball:before, .ion-ios-americanfootball-outline:before, .ion-ios-analytics:before, .ion-ios-analytics-outline:before, .ion-ios-arrow-back:before, .icon-controls-down:before, .ion-ios-arrow-forward:before, .ion-ios-arrow-left:before, .ion-ios-arrow-right:before, .ion-ios-arrow-thin-down:before, .ion-ios-arrow-thin-left:before, .ion-ios-arrow-thin-right:before, .ion-ios-arrow-thin-up:before, .icon-controls-up:before, .ion-ios-at:before, .ion-ios-at-outline:before, .ion-ios-barcode:before, .ion-ios-barcode-outline:before, .ion-ios-baseball:before, .ion-ios-baseball-outline:before, .ion-ios-basketball:before, .ion-ios-basketball-outline:before, .ion-ios-bell:before, .ion-ios-bell-outline:before, .ion-ios-body:before, .ion-ios-body-outline:before, .ion-ios-bolt:before, .ion-ios-bolt-outline:before, .icon-documents-book:before, .icoDocuments-book-outline:before, .icoDocuments-bookmarks:before, .icoDocuments-bookmarks-outline:before, .ion-ios-box:before, .ion-ios-box-outline:before, .ion-ios-briefcase:before, .ion-ios-briefcase-outline:before,.icon-add-widget:before , .ion-ios-browsers:before, .ion-ios-browsers-outline:before, .ion-ios-calculator:before, .ion-ios-calculator-outline:before, .ion-ios-calendar:before, .ion-ios-calendar-outline:before, .ion-ios-camera:before, .ion-ios-camera-outline:before, .ion-ios-cart:before, .ion-ios-cart-outline:before, .ion-ios-chatboxes:before, .ion-ios-chatboxes-outline:before, .ion-ios-chatbubble:before, .ion-ios-chatbubble-outline:before, .ion-ios-checkmark:before, .ion-ios-checkmark-empty:before, .ion-ios-checkmark-outline:before, .ion-ios-circle-filled:before, .ion-ios-circle-outline:before, .ion-ios-clock:before, .ion-ios-clock-outline:before, .ion-ios-close:before, .ion-ios-close-empty:before, .ion-ios-close-outline:before, .ion-ios-cloud:before, .ion-ios-cloud-download:before, .ion-ios-cloud-download-outline:before, .ion-ios-cloud-outline:before, .ion-ios-cloud-upload:before, .ion-ios-cloud-upload-outline:before, .ion-ios-cloudy:before, .ion-ios-cloudy-night:before, .ion-ios-cloudy-night-outline:before, .ion-ios-cloudy-outline:before, .ion-ios-cog:before, .ion-ios-cog-outline:before, .ion-ios-color-filter:before, .ion-ios-color-filter-outline:before, .ion-ios-color-wand:before, .ion-ios-color-wand-outline:before, .ion-ios-compose:before, .ion-ios-compose-outline:before, .ion-ios-contact:before, .ion-ios-contact-outline:before, .icon-documents-copy:before, .ion-ios-copy-outline:before, .ion-ios-crop:before, .ion-ios-crop-strong:before, .ion-ios-download:before, .ion-ios-download-outline:before, .ion-ios-drag:before, .ion-ios-email:before, .ion-ios-email-outline:before, .ion-ios-eye:before, .ion-ios-eye-outline:before, .ion-ios-fastforward:before, .ion-ios-fastforward-outline:before, .ion-ios-filing:before, .ion-ios-filing-outline:before, .ion-ios-film:before, .ion-ios-film-outline:before, .icon-content-flag:before, .ion-ios-flag-outline:before, .ion-ios-flame:before, .ion-ios-flame-outline:before, .ion-ios-flask:before, .ion-ios-flask-outline:before, .ion-ios-flower:before, .ion-ios-flower-outline:before, .ion-ios-folder:before, .ion-ios-folder-outline:before, .ion-ios-football:before, .ion-ios-football-outline:before, .ion-ios-game-controller-a:before, .ion-ios-game-controller-a-outline:before, .ion-ios-game-controller-b:before, .ion-ios-game-controller-b-outline:before, .ion-ios-gear:before, .ion-ios-gear-outline:before, .ion-ios-glasses:before, .ion-ios-glasses-outline:before, .ion-ios-grid-view:before, .ion-ios-grid-view-outline:before, .ion-ios-heart:before, .ion-ios-heart-outline:before, .ion-ios-help:before, .ion-ios-help-empty:before, .ion-ios-help-outline:before, .ion-ios-home:before, .ion-ios-home-outline:before, .ion-ios-infinite:before, .ion-ios-infinite-outline:before, .ion-ios-information:before, .ion-ios-information-empty:before, .ion-ios-information-outline:before, .ion-ios-ionic-outline:before, .ion-ios-keypad:before, .ion-ios-keypad-outline:before, .ion-ios-lightbulb:before, .ion-ios-lightbulb-outline:before, .ion-ios-list:before, .ion-ios-list-outline:before, .ion-ios-location:before, .ion-ios-location-outline:before, .ion-ios-locked:before, .ion-ios-locked-outline:before, .ion-ios-loop:before, .ion-ios-loop-strong:before, .ion-ios-medical:before, .ion-ios-medical-outline:before, .ion-ios-medkit:before, .ion-ios-medkit-outline:before, .ion-ios-mic:before, .ion-ios-mic-off:before, .ion-ios-mic-outline:before, .ion-ios-minus:before, .ion-ios-minus-empty:before, .icon-primary-accordion-minus:before, .ion-ios-monitor:before, .ion-ios-monitor-outline:before, .ion-ios-moon:before, .ion-ios-moon-outline:before, .ion-ios-more:before, .ion-ios-more-outline:before, .ion-ios-musical-note:before, .ion-ios-musical-notes:before, .ion-ios-navigate:before, .ion-ios-navigate-outline:before, .ion-ios-nutrition:before, .ion-ios-nutrition-outline:before, .ion-ios-paper:before, .ion-ios-paper-outline:before, .ion-ios-paperplane:before, .ion-ios-paperplane-outline:before, .ion-ios-partlysunny:before, .ion-ios-partlysunny-outline:before, .ion-ios-pause:before, .ion-ios-pause-outline:before, .ion-ios-paw:before, .ion-ios-paw-outline:before, .ion-ios-people:before, .ion-ios-people-outline:before, .ion-ios-person:before, .ion-ios-person-outline:before, .ion-ios-personadd:before, .ion-ios-personadd-outline:before, .ion-ios-photos:before, .ion-ios-photos-outline:before, .icon-misc-piechart:before, .icon-misc-piechart-outline:before, .ion-ios-pint:before, .ion-ios-pint-outline:before, .ion-ios-play:before, .ion-ios-play-outline:before, .ion-ios-plus:before, .ion-ios-plus-empty:before, .icon-primary-accordion-plus:before, .ion-ios-pricetag:before, .ion-ios-pricetag-outline:before, .ion-ios-pricetags:before, .ion-ios-pricetags-outline:before, .ion-ios-printer:before, .ion-ios-printer-outline:before, .ion-ios-pulse:before, .ion-ios-pulse-strong:before, .ion-ios-rainy:before, .ion-ios-rainy-outline:before, .ion-ios-recording:before, .ion-ios-recording-outline:before, .ion-ios-redo:before, .ion-ios-redo-outline:before, .ion-ios-refresh:before, .ion-ios-refresh-empty:before, .ion-ios-refresh-outline:before, .ion-ios-reload:before, .ion-ios-reverse-camera:before, .ion-ios-reverse-camera-outline:before, .ion-ios-rewind:before, .ion-ios-rewind-outline:before, .ion-ios-rose:before, .ion-ios-rose-outline:before, .ion-ios-search:before, .ion-ios-search-strong:before, .ion-ios-settings:before, .ion-ios-settings-strong:before, .ion-ios-shuffle:before, .ion-ios-shuffle-strong:before, .ion-ios-skipbackward:before, .ion-ios-skipbackward-outline:before, .ion-ios-skipforward:before, .ion-ios-skipforward-outline:before, .ion-ios-snowy:before, .ion-ios-speedometer:before, .ion-ios-speedometer-outline:before, .icon-star:before,.ion-ios-star:before, .ion-ios-star-half:before, .ion-ios-star-outline:before, .ion-ios-stopwatch:before, .ion-ios-stopwatch-outline:before, .ion-ios-sunny:before, .ion-ios-sunny-outline:before, .ion-ios-telephone:before, .ion-ios-telephone-outline:before, .ion-ios-tennisball:before, .ion-ios-tennisball-outline:before, .ion-ios-thunderstorm:before, .ion-ios-thunderstorm-outline:before, .ion-ios-time:before, .ion-ios-time-outline:before, .ion-ios-timer:before, .ion-ios-timer-outline:before, .ion-ios-toggle:before, .ion-ios-toggle-outline:before, .ion-ios-trash:before, .ion-ios-trash-outline:before, .ion-ios-undo:before, .ion-ios-undo-outline:before, .ion-ios-unlocked:before, .ion-ios-unlocked-outline:before, .ion-ios-upload:before, .ion-ios-upload-outline:before, .ion-ios-videocam:before, .ion-ios-videocam-outline:before, .ion-ios-volume-high:before, .ion-ios-volume-low:before, .ion-ios-wineglass:before, .ion-ios-wineglass-outline:before, .ion-ios-world:before, .ion-ios-world-outline:before, .ion-ipad:before, .ion-iphone:before, .ion-ipod:before, .ion-jet:before, .ion-key:before, .ion-knife:before, .ion-laptop:before, .ion-leaf:before, .ion-levels:before, .ion-lightbulb:before, .ion-link:before, .ion-load-a:before, .ion-load-b:before, .ion-load-c:before, .ion-load-d:before, .ion-location:before, .ion-lock-combination:before, .ion-locked:before, .ion-log-in:before, .icon-building-door:before, .ion-loop:before, .ion-magnet:before, .ion-male:before, .ion-man:before, .ion-map:before, .ion-medkit:before, .ion-merge:before, .ion-mic-a:before, .ion-mic-b:before, .ion-mic-c:before, .ion-minus:before, .ion-minus-circled:before, .ion-minus-round:before, .ion-model-s:before, .ion-monitor:before, .ion-more:before, .ion-mouse:before, .ion-music-note:before, .ion-navicon:before, .icon-content-gridguide:before, .ion-navigate:before, .ion-network:before, .ion-no-smoking:before, .ion-nuclear:before, .ion-outlet:before, .ion-paintbrush:before, .ion-paintbucket:before, .ion-paper-airplane:before, .ion-paperclip:before, .ion-pause:before, .icon-user:before, .icon-people-oneperson:before, .icon-people-oneperson-add:before, .icon-people-oneperson-stalker:before, .ion-pie-graph:before, .ion-pin:before, .ion-pinpoint:before, .ion-pizza:before, .ion-plane:before, .ion-planet:before, .icon-controls-pointer:before, .ion-playstation:before, .ion-plus:before, .ion-plus-circled:before, .ion-plus-round:before, .ion-podium:before, .ion-pound:before, .ion-power:before, .ion-pricetag:before, .ion-pricetags:before, .ion-printer:before, .ion-pull-request:before, .ion-qr-scanner:before, .ion-quote:before, .ion-radio-waves:before, .ion-record:before, .icon-arrows-replay-restart:before, .ion-reply:before, .ion-reply-all:before, .ion-ribbon-a:before, .ion-ribbon-b:before, .ion-sad:before, .ion-sad-outline:before, .ion-scissors:before, .ion-search:before, .ion-settings:before, .ion-share:before, .ion-shuffle:before, .ion-skip-backward:before, .ion-skip-forward:before, .ion-social-android:before, .ion-social-android-outline:before, .ion-social-angular:before, .ion-social-angular-outline:before, .ion-social-apple:before, .ion-social-apple-outline:before, .ion-social-bitcoin:before, .ion-social-bitcoin-outline:before, .ion-social-buffer:before, .ion-social-buffer-outline:before, .ion-social-chrome:before, .ion-social-chrome-outline:before, .ion-social-codepen:before, .ion-social-codepen-outline:before, .ion-social-css3:before, .ion-social-css3-outline:before, .ion-social-designernews:before, .ion-social-designernews-outline:before, .ion-social-dribbble:before, .ion-social-dribbble-outline:before, .ion-social-dropbox:before, .ion-social-dropbox-outline:before, .ion-social-euro:before, .ion-social-euro-outline:before, .ion-social-facebook:before, .ion-social-facebook-outline:before, .ion-social-foursquare:before, .ion-social-foursquare-outline:before, .ion-social-freebsd-devil:before, .ion-social-github:before, .ion-social-github-outline:before, .ion-social-google:before, .ion-social-google-outline:before, .ion-social-googleplus:before, .ion-social-googleplus-outline:before, .ion-social-hackernews:before, .ion-social-hackernews-outline:before, .ion-social-html5:before, .ion-social-html5-outline:before, .ion-social-instagram:before, .ion-social-instagram-outline:before, .ion-social-javascript:before, .ion-social-javascript-outline:before, .ion-social-linkedin:before, .ion-social-linkedin-outline:before, .ion-social-markdown:before, .ion-social-nodejs:before, .ion-social-octocat:before, .ion-social-pinterest:before, .ion-social-pinterest-outline:before, .ion-social-python:before, .ion-social-reddit:before, .ion-social-reddit-outline:before, .ion-social-rss:before, .ion-social-rss-outline:before, .ion-social-sass:before, .ion-social-skype:before, .ion-social-skype-outline:before, .ion-social-snapchat:before, .ion-social-snapchat-outline:before, .ion-social-tumblr:before, .ion-social-tumblr-outline:before, .ion-social-tux:before, .ion-social-twitch:before, .ion-social-twitch-outline:before, .ion-social-twitter:before, .ion-social-twitter-outline:before, .ion-social-usd:before, .ion-social-usd-outline:before, .ion-social-vimeo:before, .ion-social-vimeo-outline:before, .ion-social-whatsapp:before, .ion-social-whatsapp-outline:before, .ion-social-windows:before, .ion-social-windows-outline:before, .ion-social-wordpress:before, .ion-social-wordpress-outline:before, .ion-social-yahoo:before, .ion-social-yahoo-outline:before, .ion-social-yen:before, .ion-social-yen-outline:before, .ion-social-youtube:before, .ion-social-youtube-outline:before, .ion-soup-can:before, .ion-soup-can-outline:before, .ion-speakerphone:before, .ion-speedometer:before, .ion-spoon:before, .icon-content-star:before, .ion-stats-bars:before, .ion-steam:before, .ion-stop:before, .ion-thermometer:before, .ion-thumbsdown:before, .ion-thumbsup:before, .ion-toggle:before, .ion-toggle-filled:before, .ion-transgender:before, .icon-misc-trash:before, .ion-trash-b:before, .ion-trophy:before, .ion-tshirt:before, .ion-tshirt-outline:before, .ion-umbrella:before, .ion-university:before, .ion-unlocked:before, .icon-arrows-upload:before, .ion-usb:before, .ion-videocamera:before, .ion-volume-high:before, .ion-volume-low:before, .ion-volume-medium:before, .ion-volume-mute:before, .ion-wand:before, .ion-waterdrop:before, .ion-wifi:before, .ion-wineglass:before, .ion-woman:before, .ion-wrench:before, .ion-xbox:before { display: inline-block; font-family: "Ionicons"; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; text-rendering: auto; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +.ion, .ionicons, .ion-alert:before, .ion-alert-circled:before, .ion-android-add:before, .ion-android-add-circle:before, .ion-android-alarm-clock:before, .ion-android-alert:before, .ion-android-apps:before, .ion-android-archive:before, .ion-android-arrow-back:before, .ion-android-arrow-down:before, .ion-android-arrow-dropdown:before, .ion-android-arrow-dropdown-circle:before, .ion-android-arrow-dropleft:before, .ion-android-arrow-dropleft-circle:before, .ion-android-arrow-dropright:before, .ion-android-arrow-dropright-circle:before, .ion-android-arrow-dropup:before, .ion-android-arrow-dropup-circle:before, .ion-android-arrow-forward:before, .ion-android-arrow-up:before, .ion-android-attach:before, .ion-android-bar:before, .ion-android-bicycle:before, .ion-android-boat:before, .ion-android-bookmark:before, .ion-android-bulb:before, .ion-android-bus:before, .ion-android-calendar:before, .ion-android-call:before, .ion-android-camera:before, .ion-android-cancel:before, .ion-android-car:before, .ion-android-cart:before, .ion-android-chat:before, .ion-android-checkbox:before, .ion-android-checkbox-blank:before, .ion-android-checkbox-outline:before, .ion-android-checkbox-outline-blank:before, .ion-android-checkmark-circle:before, .ion-android-clipboard:before, .ion-android-close:before, .ion-android-cloud:before, .ion-android-cloud-circle:before, .ion-android-cloud-done:before, .ion-android-cloud-outline:before, .ion-android-color-palette:before, .ion-android-compass:before, .ion-android-contact:before, .ion-android-contacts:before, .ion-android-contract:before, .ion-android-create:before, .ion-android-delete:before, .ion-android-desktop:before, .ion-android-document:before, .ion-android-done:before, .ion-android-done-all:before, .ion-android-download:before, .ion-android-drafts:before, .ion-android-exit:before, .ion-android-expand:before, .ion-android-favorite:before, .ion-android-favorite-outline:before, .ion-android-film:before, .ion-android-folder:before, .ion-android-folder-open:before, .ion-android-funnel:before, .ion-android-globe:before, .ion-android-hand:before, .ion-android-hangout:before, .ion-android-happy:before, .ion-android-home:before, .ion-android-image:before, .ion-android-laptop:before, .ion-android-list:before, .ion-android-locate:before, .ion-android-lock:before, .ion-android-mail:before, .ion-android-map:before, .ion-android-menu:before, .ion-android-microphone:before, .ion-android-microphone-off:before, .ion-android-more-horizontal:before, .ion-android-more-vertical:before, .ion-android-navigate:before, .ion-android-notifications:before, .ion-android-notifications-none:before, .ion-android-notifications-off:before, .ion-android-open:before, .ion-android-options:before, .ion-android-people:before, .ion-android-person:before, .ion-android-person-add:before, .ion-android-phone-landscape:before, .ion-android-phone-portrait:before, .ion-android-pin:before, .ion-android-plane:before, .ion-android-playstore:before, .ion-android-print:before, .ion-android-radio-button-off:before, .ion-android-radio-button-on:before, .ion-android-refresh:before, .ion-android-remove:before, .ion-android-remove-circle:before, .ion-android-restaurant:before, .ion-android-sad:before, .ion-android-search:before, .ion-android-send:before, .ion-android-settings:before, .ion-android-share:before, .ion-android-share-alt:before, .ion-android-star:before, .ion-android-star-half:before, .ion-android-star-outline:before, .ion-android-stopwatch:before, .ion-android-subway:before, .ion-android-sunny:before, .ion-android-sync:before, .ion-android-textsms:before, .ion-android-time:before, .ion-android-train:before, .ion-android-unlock:before, .ion-android-upload:before, .ion-android-volume-down:before, .ion-android-volume-mute:before, .ion-android-volume-off:before, .ion-android-volume-up:before, .ion-android-walk:before, .ion-android-warning:before, .ion-android-watch:before, .ion-android-wifi:before, .ion-aperture:before, .ion-archive:before, .ion-arrow-down-a:before, .ion-arrow-down-b:before, .ion-arrow-down-c:before, .ion-arrow-expand:before, .ion-arrow-graph-down-left:before, .ion-arrow-graph-down-right:before, .ion-arrow-graph-up-left:before, .ion-arrow-graph-up-right:before, .ion-arrow-left-a:before, .ion-arrow-left-b:before, .ion-arrow-left-c:before, .ion-arrow-move:before, .ion-arrow-resize:before, .ion-arrow-return-left:before, .ion-arrow-return-right:before, .ion-arrow-right-a:before, .ion-arrow-right-b:before, .ion-arrow-right-c:before, .ion-arrow-shrink:before, .ion-arrow-swap:before, .ion-arrow-up-a:before, .ion-arrow-up-b:before, .ion-arrow-up-c:before, .ion-asterisk:before, .ion-at:before, .ion-backspace:before, .ion-backspace-outline:before, .ion-bag:before, .ion-battery-charging:before, .ion-battery-empty:before, .ion-battery-full:before, .ion-battery-half:before, .ion-battery-low:before, .ion-beaker:before, .ion-beer:before, .ion-bluetooth:before, .ion-bonfire:before, .ion-bookmark:before, .ion-bowtie:before, .ion-briefcase:before, .ion-bug:before, .ion-calculator:before, .ion-calendar:before, .ion-camera:before, .ion-card:before, .ion-cash:before, .ion-chatbox:before, .ion-chatbox-working:before, .ion-chatboxes:before, .ion-chatbubble:before, .ion-chatbubble-working:before, .ion-chatbubbles:before, .ion-checkmark:before, .ion-checkmark-circled:before, .ion-checkmark-round:before, .ion-chevron-down:before, .ion-chevron-left:before, .ion-chevron-right:before, .ion-chevron-up:before, .ion-clipboard:before, .ion-clock:before, .ion-close:before, .ion-close-circled:before, .ion-close-round:before, .ion-closed-captioning:before, .ion-cloud:before, .ion-code:before, .ion-code-download:before, .ion-code-working:before, .ion-coffee:before, .ion-compass:before, .ion-compose:before, .ion-connection-bars:before, .ion-contrast:before, .ion-crop:before, .ion-cube:before, .ion-disc:before, .ion-document:before, .ion-document-text:before, .ion-drag:before, .ion-earth:before, .ion-easel:before, .ion-edit:before, .ion-egg:before, .ion-eject:before, .ion-email:before, .ion-email-unread:before, .ion-erlenmeyer-flask:before, .ion-erlenmeyer-flask-bubbles:before, .ion-eye:before, .ion-eye-disabled:before, .ion-female:before, .ion-filing:before, .ion-film-marker:before, .ion-fireball:before, .ion-flag:before, .ion-flame:before, .ion-flash:before, .ion-flash-off:before, .ion-folder:before, .ion-fork:before, .ion-fork-repo:before, .ion-forward:before, .ion-funnel:before, .ion-gear-a:before, .ion-gear-b:before, .ion-grid:before, .ion-hammer:before, .ion-happy:before, .ion-happy-outline:before, .ion-headphone:before, .ion-heart:before, .ion-heart-broken:before, .ion-help:before, .ion-help-buoy:before, .ion-help-circled:before, .ion-home:before, .ion-icecream:before, .ion-image:before, .ion-images:before, .ion-information:before, .ion-information-circled:before, .ion-ionic:before, .ion-ios-alarm:before, .ion-ios-alarm-outline:before, .ion-ios-albums:before, .ion-ios-albums-outline:before, .ion-ios-americanfootball:before, .ion-ios-americanfootball-outline:before, .ion-ios-analytics:before, .ion-ios-analytics-outline:before, .ion-ios-arrow-back:before, .ion-ios-arrow-down:before, .ion-ios-arrow-forward:before, .ion-ios-arrow-left:before, .ion-ios-arrow-right:before, .ion-ios-arrow-thin-down:before, .ion-ios-arrow-thin-left:before, .ion-ios-arrow-thin-right:before, .ion-ios-arrow-thin-up:before, .ion-ios-arrow-up:before, .ion-ios-at:before, .ion-ios-at-outline:before, .ion-ios-barcode:before, .ion-ios-barcode-outline:before, .ion-ios-baseball:before, .ion-ios-baseball-outline:before, .ion-ios-basketball:before, .ion-ios-basketball-outline:before, .ion-ios-bell:before, .ion-ios-bell-outline:before, .ion-ios-body:before, .ion-ios-body-outline:before, .ion-ios-bolt:before, .ion-ios-bolt-outline:before, .ion-ios-book:before, .ion-ios-book-outline:before, .ion-ios-bookmarks:before, .ion-ios-bookmarks-outline:before, .ion-ios-box:before, .ion-ios-box-outline:before, .ion-ios-briefcase:before, .ion-ios-briefcase-outline:before, .ion-ios-browsers:before, .ion-ios-browsers-outline:before, .ion-ios-calculator:before, .ion-ios-calculator-outline:before, .ion-ios-calendar:before, .ion-ios-calendar-outline:before, .ion-ios-camera:before, .ion-ios-camera-outline:before, .ion-ios-cart:before, .ion-ios-cart-outline:before, .ion-ios-chatboxes:before, .ion-ios-chatboxes-outline:before, .ion-ios-chatbubble:before, .ion-ios-chatbubble-outline:before, .ion-ios-checkmark:before, .ion-ios-checkmark-empty:before, .ion-ios-checkmark-outline:before, .ion-ios-circle-filled:before, .ion-ios-circle-outline:before, .ion-ios-clock:before, .ion-ios-clock-outline:before, .ion-ios-close:before, .ion-ios-close-empty:before, .ion-ios-close-outline:before, .ion-ios-cloud:before, .ion-ios-cloud-download:before, .ion-ios-cloud-download-outline:before, .ion-ios-cloud-outline:before, .ion-ios-cloud-upload:before, .ion-ios-cloud-upload-outline:before, .ion-ios-cloudy:before, .ion-ios-cloudy-night:before, .ion-ios-cloudy-night-outline:before, .ion-ios-cloudy-outline:before, .ion-ios-cog:before, .ion-ios-cog-outline:before, .ion-ios-color-filter:before, .ion-ios-color-filter-outline:before, .ion-ios-color-wand:before, .ion-ios-color-wand-outline:before, .ion-ios-compose:before, .ion-ios-compose-outline:before, .ion-ios-contact:before, .ion-ios-contact-outline:before, .ion-ios-copy:before, .ion-ios-copy-outline:before, .ion-ios-crop:before, .ion-ios-crop-strong:before, .ion-ios-download:before, .ion-ios-download-outline:before, .ion-ios-drag:before, .ion-ios-email:before, .ion-ios-email-outline:before, .ion-ios-eye:before, .ion-ios-eye-outline:before, .ion-ios-fastforward:before, .ion-ios-fastforward-outline:before, .ion-ios-filing:before, .ion-ios-filing-outline:before, .ion-ios-film:before, .ion-ios-film-outline:before, .ion-ios-flag:before, .ion-ios-flag-outline:before, .ion-ios-flame:before, .ion-ios-flame-outline:before, .ion-ios-flask:before, .ion-ios-flask-outline:before, .ion-ios-flower:before, .ion-ios-flower-outline:before, .ion-ios-folder:before, .ion-ios-folder-outline:before, .ion-ios-football:before, .ion-ios-football-outline:before, .ion-ios-game-controller-a:before, .ion-ios-game-controller-a-outline:before, .ion-ios-game-controller-b:before, .ion-ios-game-controller-b-outline:before, .ion-ios-gear:before, .ion-ios-gear-outline:before, .ion-ios-glasses:before, .ion-ios-glasses-outline:before, .ion-ios-grid-view:before, .ion-ios-grid-view-outline:before, .ion-ios-heart:before, .ion-ios-heart-outline:before, .ion-ios-help:before, .ion-ios-help-empty:before, .ion-ios-help-outline:before, .ion-ios-home:before, .ion-ios-home-outline:before, .ion-ios-infinite:before, .ion-ios-infinite-outline:before, .ion-ios-information:before, .ion-ios-information-empty:before, .ion-ios-information-outline:before, .ion-ios-ionic-outline:before, .ion-ios-keypad:before, .ion-ios-keypad-outline:before, .ion-ios-lightbulb:before, .ion-ios-lightbulb-outline:before, .ion-ios-list:before, .ion-ios-list-outline:before, .ion-ios-location:before, .ion-ios-location-outline:before, .ion-ios-locked:before, .ion-ios-locked-outline:before, .ion-ios-loop:before, .ion-ios-loop-strong:before, .ion-ios-medical:before, .ion-ios-medical-outline:before, .ion-ios-medkit:before, .ion-ios-medkit-outline:before, .ion-ios-mic:before, .ion-ios-mic-off:before, .ion-ios-mic-outline:before, .ion-ios-minus:before, .ion-ios-minus-empty:before, .ion-ios-minus-outline:before, .ion-ios-monitor:before, .ion-ios-monitor-outline:before, .ion-ios-moon:before, .ion-ios-moon-outline:before, .ion-ios-more:before, .ion-ios-more-outline:before, .ion-ios-musical-note:before, .ion-ios-musical-notes:before, .ion-ios-navigate:before, .ion-ios-navigate-outline:before, .ion-ios-nutrition:before, .ion-ios-nutrition-outline:before, .ion-ios-paper:before, .ion-ios-paper-outline:before, .ion-ios-paperplane:before, .ion-ios-paperplane-outline:before, .ion-ios-partlysunny:before, .ion-ios-partlysunny-outline:before, .ion-ios-pause:before, .ion-ios-pause-outline:before, .ion-ios-paw:before, .ion-ios-paw-outline:before, .ion-ios-people:before, .ion-ios-people-outline:before, .ion-ios-person:before, .ion-ios-person-outline:before, .ion-ios-personadd:before, .ion-ios-personadd-outline:before, .ion-ios-photos:before, .ion-ios-photos-outline:before, .ion-ios-pie:before, .ion-ios-pie-outline:before, .ion-ios-pint:before, .ion-ios-pint-outline:before, .ion-ios-play:before, .ion-ios-play-outline:before, .ion-ios-plus:before, .ion-ios-plus-empty:before, .ion-ios-plus-outline:before, .ion-ios-pricetag:before, .ion-ios-pricetag-outline:before, .ion-ios-pricetags:before, .ion-ios-pricetags-outline:before, .ion-ios-printer:before, .ion-ios-printer-outline:before, .ion-ios-pulse:before, .ion-ios-pulse-strong:before, .ion-ios-rainy:before, .ion-ios-rainy-outline:before, .ion-ios-recording:before, .ion-ios-recording-outline:before, .ion-ios-redo:before, .ion-ios-redo-outline:before, .ion-ios-refresh:before, .ion-ios-refresh-empty:before, .ion-ios-refresh-outline:before, .ion-ios-reload:before, .ion-ios-reverse-camera:before, .ion-ios-reverse-camera-outline:before, .ion-ios-rewind:before, .ion-ios-rewind-outline:before, .ion-ios-rose:before, .ion-ios-rose-outline:before, .ion-ios-search:before, .ion-ios-search-strong:before, .ion-ios-settings:before, .ion-ios-settings-strong:before, .ion-ios-shuffle:before, .ion-ios-shuffle-strong:before, .ion-ios-skipbackward:before, .ion-ios-skipbackward-outline:before, .ion-ios-skipforward:before, .ion-ios-skipforward-outline:before, .ion-ios-snowy:before, .ion-ios-speedometer:before, .ion-ios-speedometer-outline:before, .ion-ios-star:before, .ion-ios-star-half:before, .ion-ios-star-outline:before, .ion-ios-stopwatch:before, .ion-ios-stopwatch-outline:before, .ion-ios-sunny:before, .ion-ios-sunny-outline:before, .ion-ios-telephone:before, .ion-ios-telephone-outline:before, .ion-ios-tennisball:before, .ion-ios-tennisball-outline:before, .ion-ios-thunderstorm:before, .ion-ios-thunderstorm-outline:before, .ion-ios-time:before, .ion-ios-time-outline:before, .ion-ios-timer:before, .ion-ios-timer-outline:before, .ion-ios-toggle:before, .ion-ios-toggle-outline:before, .ion-ios-trash:before, .ion-ios-trash-outline:before, .ion-ios-undo:before, .ion-ios-undo-outline:before, .ion-ios-unlocked:before, .ion-ios-unlocked-outline:before, .ion-ios-upload:before, .ion-ios-upload-outline:before, .ion-ios-videocam:before, .ion-ios-videocam-outline:before, .ion-ios-volume-high:before, .ion-ios-volume-low:before, .ion-ios-wineglass:before, .ion-ios-wineglass-outline:before, .ion-ios-world:before, .ion-ios-world-outline:before, .ion-ipad:before, .ion-iphone:before, .ion-ipod:before, .ion-jet:before, .ion-key:before, .ion-knife:before, .ion-laptop:before, .ion-leaf:before, .ion-levels:before, .ion-lightbulb:before, .ion-link:before, .ion-load-a:before, .ion-load-b:before, .ion-load-c:before, .ion-load-d:before, .ion-location:before, .ion-lock-combination:before, .ion-locked:before, .ion-log-in:before, .ion-log-out:before, .ion-loop:before, .ion-magnet:before, .ion-male:before, .ion-man:before, .ion-map:before, .ion-medkit:before, .ion-merge:before, .ion-mic-a:before, .ion-mic-b:before, .ion-mic-c:before, .ion-minus:before, .ion-minus-circled:before, .ion-minus-round:before, .ion-model-s:before, .ion-monitor:before, .ion-more:before, .ion-mouse:before, .ion-music-note:before, .ion-navicon:before, .ion-navicon-round:before, .ion-navigate:before, .ion-network:before, .ion-no-smoking:before, .ion-nuclear:before, .ion-outlet:before, .ion-paintbrush:before, .ion-paintbucket:before, .ion-paper-airplane:before, .ion-paperclip:before, .ion-pause:before, .ion-person:before, .ion-person-add:before, .ion-person-stalker:before, .ion-pie-graph:before, .ion-pin:before, .ion-pinpoint:before, .ion-pizza:before, .ion-plane:before, .ion-planet:before, .ion-play:before, .ion-playstation:before, .ion-plus:before, .ion-plus-circled:before, .ion-plus-round:before, .ion-podium:before, .ion-pound:before, .ion-power:before, .ion-pricetag:before, .ion-pricetags:before, .ion-printer:before, .ion-pull-request:before, .ion-qr-scanner:before, .ion-quote:before, .ion-radio-waves:before, .ion-record:before, .ion-refresh:before, .ion-reply:before, .ion-reply-all:before, .ion-ribbon-a:before, .ion-ribbon-b:before, .ion-sad:before, .ion-sad-outline:before, .ion-scissors:before, .ion-search:before, .ion-settings:before, .ion-share:before, .ion-shuffle:before, .ion-skip-backward:before, .ion-skip-forward:before, .ion-social-android:before, .ion-social-android-outline:before, .ion-social-angular:before, .ion-social-angular-outline:before, .ion-social-apple:before, .ion-social-apple-outline:before, .ion-social-bitcoin:before, .ion-social-bitcoin-outline:before, .ion-social-buffer:before, .ion-social-buffer-outline:before, .ion-social-chrome:before, .ion-social-chrome-outline:before, .ion-social-codepen:before, .ion-social-codepen-outline:before, .ion-social-css3:before, .ion-social-css3-outline:before, .ion-social-designernews:before, .ion-social-designernews-outline:before, .ion-social-dribbble:before, .ion-social-dribbble-outline:before, .ion-social-dropbox:before, .ion-social-dropbox-outline:before, .ion-social-euro:before, .ion-social-euro-outline:before, .ion-social-facebook:before, .ion-social-facebook-outline:before, .ion-social-foursquare:before, .ion-social-foursquare-outline:before, .ion-social-freebsd-devil:before, .ion-social-github:before, .ion-social-github-outline:before, .ion-social-google:before, .ion-social-google-outline:before, .ion-social-googleplus:before, .ion-social-googleplus-outline:before, .ion-social-hackernews:before, .ion-social-hackernews-outline:before, .ion-social-html5:before, .ion-social-html5-outline:before, .ion-social-instagram:before, .ion-social-instagram-outline:before, .ion-social-javascript:before, .ion-social-javascript-outline:before, .ion-social-linkedin:before, .ion-social-linkedin-outline:before, .ion-social-markdown:before, .ion-social-nodejs:before, .ion-social-octocat:before, .ion-social-pinterest:before, .ion-social-pinterest-outline:before, .ion-social-python:before, .ion-social-reddit:before, .ion-social-reddit-outline:before, .ion-social-rss:before, .ion-social-rss-outline:before, .ion-social-sass:before, .ion-social-skype:before, .ion-social-skype-outline:before, .ion-social-snapchat:before, .ion-social-snapchat-outline:before, .ion-social-tumblr:before, .ion-social-tumblr-outline:before, .ion-social-tux:before, .ion-social-twitch:before, .ion-social-twitch-outline:before, .ion-social-twitter:before, .ion-social-twitter-outline:before, .ion-social-usd:before, .ion-social-usd-outline:before, .ion-social-vimeo:before, .ion-social-vimeo-outline:before, .ion-social-whatsapp:before, .ion-social-whatsapp-outline:before, .ion-social-windows:before, .ion-social-windows-outline:before, .ion-social-wordpress:before, .ion-social-wordpress-outline:before, .ion-social-yahoo:before, .ion-social-yahoo-outline:before, .ion-social-yen:before, .ion-social-yen-outline:before, .ion-social-youtube:before, .ion-social-youtube-outline:before, .ion-soup-can:before, .ion-soup-can-outline:before, .ion-speakerphone:before, .ion-speedometer:before, .ion-spoon:before, .ion-star:before, .ion-stats-bars:before, .ion-steam:before, .ion-stop:before, .ion-thermometer:before, .ion-thumbsdown:before, .ion-thumbsup:before, .ion-toggle:before, .ion-toggle-filled:before, .ion-transgender:before, .ion-trash-a:before, .ion-trash-b:before, .ion-trophy:before, .ion-tshirt:before, .ion-tshirt-outline:before, .ion-umbrella:before, .ion-university:before, .ion-unlocked:before, .ion-upload:before, .ion-usb:before, .ion-videocamera:before, .ion-volume-high:before, .ion-volume-low:before, .ion-volume-medium:before, .ion-volume-mute:before, .ion-wand:before, .ion-waterdrop:before, .ion-wifi:before, .ion-wineglass:before, .ion-woman:before, .ion-wrench:before, .ion-xbox:before { display: inline-block; font-family: "Ionicons"; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; text-rendering: auto; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .ion-alert:before { content: "\f101"; } -.icoSecurityalerts-alert:before { content: "\f100"; } +.ion-alert-circled:before { content: "\f100"; } -.icon-controls-add-maximize:before { content: "\f2c7"; } +.ion-android-add:before { content: "\f2c7"; } -.icon-controls-add-maximize-circle:before { content: "\f359"; } +.ion-android-add-circle:before { content: "\f359"; } -.icon-misc-time:before { content: "\f35a"; } +.ion-android-alarm-clock:before { content: "\f35a"; } -.icoSecurityalerts:before { content: "\f35b"; } +.ion-android-alert:before { content: "\f35b"; } -.icon-content-grid:before { content: "\f35c"; } +.ion-android-apps:before { content: "\f35c"; } -.icon-documents-archive:before { content: "\f2c9"; } +.ion-android-archive:before { content: "\f2c9"; } .ion-android-arrow-back:before { content: "\f2ca"; } -.icon-arrows-vertical-arrow-down:before { content: "\f35d"; } +.ion-android-arrow-down:before { content: "\f35d"; } .ion-android-arrow-dropdown:before { content: "\f35f"; } -.icon-arrows-download:before { content: "\f35e"; } +.ion-android-arrow-dropdown-circle:before { content: "\f35e"; } .ion-android-arrow-dropleft:before { content: "\f361"; } -.icon-arrows-incoming-call:before { content: "\f360"; } +.ion-android-arrow-dropleft-circle:before { content: "\f360"; } .ion-android-arrow-dropright:before { content: "\f363"; } -.icoArrows-outgoing-call:before { content: "\f362"; } +.ion-android-arrow-dropright-circle:before { content: "\f362"; } .ion-android-arrow-dropup:before { content: "\f365"; } -.icoArrows-upload:before { content: "\f364"; } +.ion-android-arrow-dropup-circle:before { content: "\f364"; } -.icoArrows-straight-arrow:before { content: "\f30f"; } +.ion-android-arrow-forward:before { content: "\f30f"; } -.icon-arrows-vertical-arrow:before { content: "\f366"; } +.ion-android-arrow-up:before { content: "\f366"; } .ion-android-attach:before { content: "\f367"; } @@ -195,7 +195,7 @@ .ion-android-person:before { content: "\f3a0"; } -.icon-people-userbookmark:before { content: "\f39f"; } +.ion-android-person-add:before { content: "\f39f"; } .ion-android-phone-landscape:before { content: "\f3a1"; } @@ -387,14 +387,13 @@ .ion-checkmark-round:before { content: "\f121"; } -.icon-chevron-down:before { content: "\f123"; } +.ion-chevron-down:before { content: "\f123"; } +.ion-chevron-left:before { content: "\f124"; } -.icon-controls-left:before { content: "\f124"; } +.ion-chevron-right:before { content: "\f125"; } -.icon-controls-right:before { content: "\f125"; } - -.icon-chevron-up:before { content: "\f126"; } +.ion-chevron-up:before { content: "\f126"; } .ion-clipboard:before { content: "\f127"; } @@ -422,7 +421,7 @@ .ion-compose:before { content: "\f12c"; } -.icoDocuments-report:before { content: "\f274"; } +.ion-connection-bars:before { content: "\f274"; } .ion-contrast:before { content: "\f275"; } @@ -442,7 +441,7 @@ .ion-easel:before { content: "\f3c2"; } -.icon-misc-pen:before { content: "\f2bf"; } +.ion-edit:before { content: "\f2bf"; } .ion-egg:before { content: "\f277"; } @@ -456,7 +455,7 @@ .ion-erlenmeyer-flask-bubbles:before { content: "\f3c4"; } -.icon-overview:before { content: "\f133"; } +.ion-eye:before { content: "\f133"; } .ion-eye-disabled:before { content: "\f306"; } @@ -510,7 +509,7 @@ .ion-help-circled:before { content: "\f142"; } -.icon-building-home:before { content: "\f144"; } +.ion-home:before { content: "\f144"; } .ion-icecream:before { content: "\f27d"; } @@ -542,7 +541,7 @@ .ion-ios-arrow-back:before { content: "\f3cf"; } -.icon-controls-down:before { content: "\f3d0"; } +.ion-ios-arrow-down:before { content: "\f3d0"; } .ion-ios-arrow-forward:before { content: "\f3d1"; } @@ -558,7 +557,7 @@ .ion-ios-arrow-thin-up:before { content: "\f3d7"; } -.icon-controls-up:before { content: "\f3d8"; } +.ion-ios-arrow-up:before { content: "\f3d8"; } .ion-ios-at:before { content: "\f3da"; } @@ -588,13 +587,13 @@ .ion-ios-bolt-outline:before { content: "\f3e5"; } -.icon-documents-book:before { content: "\f3e8"; } +.ion-ios-book:before { content: "\f3e8"; } -.icoDocuments-book-outline:before { content: "\f3e7"; } +.ion-ios-book-outline:before { content: "\f3e7"; } -.icoDocuments-bookmarks:before { content: "\f3ea"; } +.ion-ios-bookmarks:before { content: "\f3ea"; } -.icoDocuments-bookmarks-outline:before { content: "\f3e9"; } +.ion-ios-bookmarks-outline:before { content: "\f3e9"; } .ion-ios-box:before { content: "\f3ec"; } @@ -692,7 +691,7 @@ .ion-ios-contact-outline:before { content: "\f419"; } -.icon-documents-copy:before { content: "\f41c"; } +.ion-ios-copy:before { content: "\f41c"; } .ion-ios-copy-outline:before { content: "\f41b"; } @@ -726,7 +725,7 @@ .ion-ios-film-outline:before { content: "\f42a"; } -.icon-content-flag:before { content: "\f42d"; } +.ion-ios-flag:before { content: "\f42d"; } .ion-ios-flag-outline:before { content: "\f42c"; } @@ -838,7 +837,7 @@ .ion-ios-minus-empty:before { content: "\f462"; } -.icon-primary-accordion-minus:before { content: "\f463"; } +.ion-ios-minus-outline:before { content: "\f463"; } .ion-ios-monitor:before { content: "\f466"; } @@ -900,9 +899,9 @@ .ion-ios-photos-outline:before { content: "\f481"; } -.icon-misc-piechart:before { content: "\f484"; } +.ion-ios-pie:before { content: "\f484"; } -.icon-misc-piechart-outline:before { content: "\f483"; } +.ion-ios-pie-outline:before { content: "\f483"; } .ion-ios-pint:before { content: "\f486"; } @@ -916,7 +915,7 @@ .ion-ios-plus-empty:before { content: "\f489"; } -.icon-primary-accordion-plus:before { content: "\f48a"; } +.ion-ios-plus-outline:before { content: "\f48a"; } .ion-ios-pricetag:before { content: "\f48d"; } @@ -1100,7 +1099,7 @@ .ion-log-in:before { content: "\f29e"; } -.icon-building-door:before { content: "\f29f"; } +.ion-log-out:before { content: "\f29f"; } .ion-loop:before { content: "\f201"; } @@ -1140,7 +1139,7 @@ .ion-navicon:before { content: "\f20e"; } -.icon-content-gridguide:before { content: "\f20d"; } +.ion-navicon-round:before { content: "\f20d"; } .ion-navigate:before { content: "\f2a3"; } @@ -1162,11 +1161,11 @@ .ion-pause:before { content: "\f210"; } -.icon-people-oneperson:before { content: "\f213"; } +.ion-person:before { content: "\f213"; } -.icon-people-oneperson-add:before { content: "\f211"; } +.ion-person-add:before { content: "\f211"; } -.icon-people-oneperson-stalker:before { content: "\f212"; } +.ion-person-stalker:before { content: "\f212"; } .ion-pie-graph:before { content: "\f2a5"; } @@ -1180,7 +1179,7 @@ .ion-planet:before { content: "\f343"; } -.icon-controls-pointer:before { content: "\f215"; } +.ion-play:before { content: "\f215"; } .ion-playstation:before { content: "\f30a"; } @@ -1212,7 +1211,7 @@ .ion-record:before { content: "\f21b"; } -.icon-arrows-replay-restart:before { content: "\f21c"; } +.ion-refresh:before { content: "\f21c"; } .ion-reply:before { content: "\f21e"; } @@ -1416,7 +1415,7 @@ .ion-spoon:before { content: "\f2b4"; } -.icon-content-star:before { content: "\f24e"; } +.ion-star:before { content: "\f24e"; } .ion-stats-bars:before { content: "\f2b5"; } @@ -1436,7 +1435,7 @@ .ion-transgender:before { content: "\f4f5"; } -.icon-misc-trash:before { content: "\f252"; } +.ion-trash-a:before { content: "\f252"; } .ion-trash-b:before { content: "\f253"; } @@ -1452,7 +1451,7 @@ .ion-unlocked:before { content: "\f254"; } -.icon-arrows-upload:before { content: "\f255"; } +.ion-upload:before { content: "\f255"; } .ion-usb:before { content: "\f2b8"; } @@ -1479,15 +1478,3 @@ .ion-wrench:before { content: "\f2ba"; } .ion-xbox:before { content: "\f30c"; } - -.icon-user:before { content: "\f213"; } - -.icon-star:before { content: "\f4b3"; } - -.icon-edit:before { content: "\f2bf"; } - -.icon-settings:before { content: "\f13d"; } - -.icon-apps-marketplace:before { content: "\f35c"; } - -.icon-add-widget:before { content: "\f3f0"; } \ No newline at end of file diff --git a/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html b/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html index 36b8c2a42..25c081a9c 100644 --- a/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html +++ b/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html @@ -17,7 +17,7 @@ User ID Manager User ID Edit - Active? + Active? @@ -31,11 +31,12 @@ - +
    diff --git a/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html b/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html index 3b5ef525a..ca317616f 100644 --- a/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html +++ b/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html @@ -4,14 +4,15 @@
    -
    -

    Please edit the profile details below:

    +
    +

    Please use Portal for access management

    +

    Please edit the profile details below:

    - +
    @@ -19,7 +20,7 @@
    - +
    @@ -62,7 +63,7 @@
    - +
    @@ -70,7 +71,7 @@
    - +
    @@ -81,7 +82,7 @@
    - +
    @@ -89,7 +90,7 @@
    - +
    @@ -97,7 +98,7 @@
    - +
    @@ -105,7 +106,7 @@
    - +
    @@ -116,14 +117,14 @@
    - +
    -
    @@ -132,14 +133,14 @@
    - +
    -
    @@ -148,17 +149,17 @@
    -
    -
    - +
    +

    -
    +
    Role
    @@ -168,14 +169,14 @@ Name - Delete + Delete - +
    diff --git a/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/samplePage.html b/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/samplePage.html deleted file mode 100644 index 523bfe71e..000000000 --- a/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/samplePage.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - Sample Page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - diff --git a/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2Header.html b/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2Header.html deleted file mode 100644 index 444514939..000000000 --- a/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2Header.html +++ /dev/null @@ -1,68 +0,0 @@ -
    -
    - -
    -
    diff --git a/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/header-logo.html b/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/header-logo.html new file mode 100644 index 000000000..2eec0cfbb --- /dev/null +++ b/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/DS2-view-models/header-logo.html @@ -0,0 +1,2 @@ + +ONAP Portal \ No newline at end of file diff --git a/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/utils/page-resource-ds2.js b/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/utils/page-resource-ds2.js deleted file mode 100644 index 21b6b0dc1..000000000 --- a/ONAP-SDK-APP/src/main/webapp/app/fusion/scripts/utils/page-resource-ds2.js +++ /dev/null @@ -1,97 +0,0 @@ -function loadjscssfile(filename, filetype){ - if (filetype=="js"){ //if filename is a external JavaScript file - var done = false; - var script = document.createElement('script'); - script.src = filename; - script.async = false; - document.head.appendChild(script); - }else if (filetype=="css"){ //if filename is an external CSS file - var fileref=document.createElement("link") - fileref.setAttribute("rel", "stylesheet") - fileref.setAttribute("type", "text/css") - fileref.setAttribute("async", false) - fileref.setAttribute("href", filename) - document.head.appendChild(fileref); - } -} - -function loadResource(){ - /*********************AngularJs***************************/ - loadjscssfile("./app/fusion/external/angular-1.5/angular.min.js", "js"); - loadjscssfile("./app/fusion/external/angular-1.5/angular-messages.js", "js"); - loadjscssfile("./app/fusion/external/angular-1.5/angular-touch.js", "js"); - loadjscssfile("./app/fusion/external/angular-1.5/angular-sanitize.min.js", "js"); - loadjscssfile("./app/fusion/external/angular-1.5/angular-route.min.js", "js"); - loadjscssfile("./app/fusion/external/angular-1.5/angular-cookies.min.js", "js"); - - loadjscssfile("./app/fusion/external/ds2/js/b2b-angular/b2b-library.min.js", "js"); -/* loadjscssfile("./app/fusion/external/ds2/js/digital-ng-library/digital.ng.library.min.js", "js"); -*/ - loadjscssfile("./app/fusion/external/jquery/dist/jquery.min.js", "js"); - - /*********************Angular Gridster***************************/ - loadjscssfile("./app/fusion/external/angular-gridster/dist/angular-gridster.min.css", "css"); - loadjscssfile("./app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css", "css"); - loadjscssfile("./app/fusion/external/javascript-detect-element-resize/jquery.resize.js", "js"); - loadjscssfile("./app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js", "js"); - loadjscssfile("./app/fusion/external/angular-gridster/dist/angular-gridster.min.js", "js"); - - /*********************Angular UI grid***************************/ - loadjscssfile("./app/fusion/external/angular-ui-grid/ui-grid.js", "js"); - loadjscssfile("./app/fusion/external/angular-ui-grid/ui-grid.css", "css"); - - loadjscssfile("./app/fusion/external/ds2/js/appDS2.js", "js"); - - loadjscssfile("./app/fusion/scripts/DS2-services/headerServiceDS2.js", "js"); - loadjscssfile("./app/fusion/scripts/DS2-services/leftMenuServiceDS2.js", "js"); - loadjscssfile("./app/fusion/scripts/DS2-services/manifestService.js", "js"); - loadjscssfile("./app/fusion/scripts/DS2-directives/footer.js", "js"); - loadjscssfile("./app/fusion/scripts/DS2-directives/ds2Header.js", "js"); - loadjscssfile("./app/fusion/scripts/DS2-directives/ds2LeftMenu.js", "js"); - loadjscssfile("./app/fusion/external/ds2/js/digital-ng-library/digital-design-library.js", "js"); - - /*******DS2 styles*******/ - loadjscssfile("./app/fusion/external/ds2/css/b2b-angular/b2b-angular.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/extras/ds2-accordion.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/extras/ds2-bootstrap-datepicker.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/extras/ds2-cc-input-field.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/extras/ds2-tooltip.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/extras/x-tabs-pills.css", "css"); - - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-accordion.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-bootstrap-datepicker.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-c2c.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-cc-input-field.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-filmstrip.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-filters.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-legacynav-fix.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-marquee.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-pagination.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-popover.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-progressbar.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ds2-tooltip.css", "css"); - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/global.css", "css"); - - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/digital-design-library.css", "css"); - /*******DS2 ICONS*******/ - - loadjscssfile("./app/fusion/external/ds2/css/digital-ng-library/ionicons.css", "css"); - loadjscssfile("./app/fusion/styles/onap.css", "css"); - loadjscssfile("./app/fusion/external/angular-gridster/dist/angular-gridster.min.css", "css"); - -} - -window.onload = loadResource(); -/*window.onload = function(){ - var appLoadingInterval = setInterval(function(){ loadApp() }, 10000); - var count=0; - function loadApp(){ - count++ - if(typeof angular !== 'undefined') { - angular.bootstrap(document, ['abs']); - clearInterval(appLoadingInterval); - }else if(count>10){ - clearInterval(appLoadingInterval); - } - } -}*/ \ No newline at end of file diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/html/data/worddata.csv b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/html/data/worddata.csv index f9a8669ba..3a1a42fe6 100644 --- a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/html/data/worddata.csv +++ b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/html/data/worddata.csv @@ -1 +1 @@ -text,frequency service,98 portal,70 management,70 virtual,56 design,56 VNF,56 studio,42 operations,42 inventory,42 POLO,42 D2.0,42 ASDC,42 router,28 restart,28 process,28 platform,28 manage,28 loop,28 licensing,28 license,28 integrated,28 flow-through,28 enable,28 data,28 controller,28 control,28 configure,28 component,28 common,28 asset,28 application,28 ONAP,28 workflow,14 waterfall,14 visual,14 view,14 vCTS,14 utilization,14 user,14 usage,14 troubleshoot,14 transformation,14 track,14 topolgies,14 topics,14 time,14 tickets,14 thresholds,14 templates,14 structures,14 standards-based,14 software,14 reuse,14 repository,14 reports,14 release,14 recipes,14 real-time,14 provisioning,14 properties,14 project-based,14 processes,14 physical,14 oversight,14 openl-loop,14 network,14 monitor,14 modeling,14 model-driven,14 model,14 message,14 maximize,14 manually,14 machine,14 layer,14 interact,14 instances,14 initiate,14 increase,14 imported,14 impacts,14 host,14 function,14 feeds,14 features,14 faults,14 extended,14 engines,14 engine,14 dynamic,14 document-driven,14 determine,14 dashboard,14 current,14 creation,14 created,14 create,14 configuration,14 composer,14 components,14 collective,14 certification,14 bus,14 basis,14 available,14 automation,14 automated,14 associated,14 assignment,14 appropriate,14 against,14 aervice,14 adminstrators,14 activation,14 action,14 VMs,14 VM,14 VLAN,14 SDN,14 SDK,14 SBG,14 SAM,14 RUBY,14 Policy,14 PODS,14 Ops,14 GFP,14 F5FW,14 DMaaP,14 DCAE,14 DBC,14 CPADS,14 AT&T,14 APP-C,14 AOTS-TM,14 ALTS,14 A&AI,14 +text,frequency service,98 portal,70 management,70 virtual,56 design,56 VNF,56 studio,42 operations,42 inventory,42 POLO,42 D2.0,42 ASDC,42 router,28 restart,28 process,28 platform,28 manage,28 loop,28 licensing,28 license,28 integrated,28 flow-through,28 enable,28 data,28 controller,28 control,28 configure,28 component,28 common,28 asset,28 application,28 ONAP,28 workflow,14 waterfall,14 visual,14 view,14 vCTS,14 utilization,14 user,14 usage,14 troubleshoot,14 transformation,14 track,14 topolgies,14 topics,14 time,14 tickets,14 thresholds,14 templates,14 structures,14 standards-based,14 software,14 reuse,14 repository,14 reports,14 release,14 recipes,14 real-time,14 provisioning,14 properties,14 project-based,14 processes,14 physical,14 oversight,14 openl-loop,14 network,14 monitor,14 modeling,14 model-driven,14 model,14 message,14 maximize,14 manually,14 machine,14 layer,14 interact,14 instances,14 initiate,14 increase,14 imported,14 impacts,14 host,14 function,14 feeds,14 features,14 faults,14 extended,14 engines,14 engine,14 dynamic,14 document-driven,14 determine,14 dashboard,14 current,14 creation,14 created,14 create,14 configuration,14 composer,14 components,14 collective,14 certification,14 bus,14 basis,14 available,14 automation,14 automated,14 associated,14 assignment,14 appropriate,14 against,14 aervice,14 adminstrators,14 activation,14 action,14 VMs,14 VM,14 VLAN,14 SDN,14 SDK,14 SBG,14 SAM,14 RUBY,14 Policy,14 PODS,14 Ops,14 GFP,14 F5FW,14 DMaaP,14 DCAE,14 DBC,14 CPADS,14 AT&T,14 APP-C,14 AOTS-TM,14 ALTS,14 A&AI,14 diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/Calendar-16x16.png b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/Calendar-16x16.png deleted file mode 100644 index ac970bda5..000000000 Binary files a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/Calendar-16x16.png and /dev/null differ diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/arrow-next.png b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/arrow-next.png deleted file mode 100644 index 1a4f72c68..000000000 Binary files a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/arrow-next.png and /dev/null differ diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/arrow-prev.png b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/arrow-prev.png deleted file mode 100644 index 8211eba1d..000000000 Binary files a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/arrow-prev.png and /dev/null differ diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/copyicon.png b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/copyicon.png deleted file mode 100644 index 6c1c3c155..000000000 Binary files a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/copyicon.png and /dev/null differ diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/deleteicon.gif b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/deleteicon.gif deleted file mode 100644 index 4b07af826..000000000 Binary files a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/deleteicon.gif and /dev/null differ diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/example-frame.png b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/example-frame.png deleted file mode 100644 index 31f2fe1cc..000000000 Binary files a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/example-frame.png and /dev/null differ diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/loading.gif b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/loading.gif deleted file mode 100644 index cccb0fc9f..000000000 Binary files a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/images/loading.gif and /dev/null differ diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/js/slides.min.jquery.js b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/js/slides.min.jquery.js deleted file mode 100644 index 1a1fcdd8d..000000000 --- a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/js/slides.min.jquery.js +++ /dev/null @@ -1,20 +0,0 @@ -/* -* Slides, A Slideshow Plugin for jQuery -* Intructions: http://slidesjs.com -* By: Nathan Searles, http://nathansearles.com -* Version: 1.1.9 -* Updated: September 5th, 2011 -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -(function(a){a.fn.slides=function(b){return b=a.extend({},a.fn.slides.option,b),this.each(function(){function w(g,h,i){if(!p&&o){p=!0,b.animationStart(n+1);switch(g){case"next":l=n,k=n+1,k=e===k?0:k,r=f*2,g=-f*2,n=k;break;case"prev":l=n,k=n-1,k=k===-1?e-1:k,r=0,g=0,n=k;break;case"pagination":k=parseInt(i,10),l=a("."+b.paginationClass+" li."+b.currentClass+" a",c).attr("href").match("[^#/]+$"),k>l?(r=f*2,g=-f*2):(r=0,g=0),n=k}h==="fade"?b.crossfade?d.children(":eq("+k+")",c).css({zIndex:10}).fadeIn(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1)}):d.children(":eq("+l+")",c).fadeOut(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing)}):d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing,function(){a.browser.msie&&a(this).get(0).style.removeAttribute("filter")}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+k+")").css({left:r,display:"block"}),b.autoHeight?d.animate({left:g,height:d.children(":eq("+k+")").outerHeight()},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1}):d.animate({left:g},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1})),b.pagination&&(a("."+b.paginationClass+" li."+b.currentClass,c).removeClass(b.currentClass),a("."+b.paginationClass+" li:eq("+k+")",c).addClass(b.currentClass))}}function x(){clearInterval(c.data("interval"))}function y(){b.pause?(clearTimeout(c.data("pause")),clearInterval(c.data("interval")),u=setTimeout(function(){clearTimeout(c.data("pause")),v=setInterval(function(){w("next",i)},b.play),c.data("interval",v)},b.pause),c.data("pause",u)):x()}a("."+b.container,a(this)).children().wrapAll('
    ');var c=a(this),d=a(".slides_control",c),e=d.children().size(),f=d.children().outerWidth(),g=d.children().outerHeight(),h=b.start-1,i=b.effect.indexOf(",")<0?b.effect:b.effect.replace(" ","").split(",")[0],j=b.effect.indexOf(",")<0?i:b.effect.replace(" ","").split(",")[1],k=0,l=0,m=0,n=0,o,p,q,r,s,t,u,v;if(e<2)return a("."+b.container,a(this)).fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()}),a("."+b.next+", ."+b.prev).fadeOut(0),!1;if(e<2)return;h<0&&(h=0),h>e&&(h=e-1),b.start&&(n=h),b.randomize&&d.randomize(),a("."+b.container,c).css({overflow:"hidden",position:"relative"}),d.children().css({position:"absolute",top:0,left:d.children().outerWidth(),zIndex:0,display:"none"}),d.css({position:"relative",width:f*3,height:g,left:-f}),a("."+b.container,c).css({display:"block"}),b.autoHeight&&(d.children().css({height:"auto"}),d.animate({height:d.children(":eq("+h+")").outerHeight()},b.autoHeightSpeed));if(b.preload&&d.find("img:eq("+h+")").length){a("."+b.container,c).css({background:"url("+b.preloadImage+") no-repeat 50% 50%"});var z=d.find("img:eq("+h+")").attr("src")+"?"+(new Date).getTime();a("img",c).parent().attr("class")!="slides_control"?t=d.children(":eq(0)")[0].tagName.toLowerCase():t=d.find("img:eq("+h+")"),d.find("img:eq("+h+")").attr("src",z).load(function(){d.find(t+":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){a(this).css({zIndex:5}),a("."+b.container,c).css({background:""}),o=!0,b.slidesLoaded()})})}else d.children(":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()});b.bigTarget&&(d.children().css({cursor:"pointer"}),d.children().click(function(){return w("next",i),!1})),b.hoverPause&&b.play&&(d.bind("mouseover",function(){x()}),d.bind("mouseleave",function(){y()})),b.generateNextPrev&&(a("."+b.container,c).after('Prev'),a("."+b.prev,c).after('Next')),a("."+b.next,c).click(function(a){a.preventDefault(),b.play&&y(),w("next",i)}),a("."+b.prev,c).click(function(a){a.preventDefault(),b.play&&y(),w("prev",i)}),b.generatePagination?(b.prependPagination?c.prepend("
      "):c.append("
        "),d.children().each(function(){a("."+b.paginationClass,c).append('
      • '+(m+1)+"
      • "),m++})):a("."+b.paginationClass+" li a",c).each(function(){a(this).attr("href","#"+m),m++}),a("."+b.paginationClass+" li:eq("+h+")",c).addClass(b.currentClass),a("."+b.paginationClass+" li a",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$"),n!=q&&w("pagination",j,q),!1}),a("a.link",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$")-1,n!=q&&w("pagination",j,q),!1}),b.play&&(v=setInterval(function(){w("next",i)},b.play),c.data("interval",v))})},a.fn.slides.option={preload:!1,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:!1,next:"next",prev:"prev",pagination:!0,generatePagination:!0,prependPagination:!1,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:!1,randomize:!1,play:0,pause:0,hoverPause:!1,autoHeight:!1,autoHeightSpeed:350,bigTarget:!1,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}},a.fn.randomize=function(b){function c(){return Math.round(Math.random())-.5}return a(this).each(function(){var d=a(this),e=d.children(),f=e.length;if(f>1){e.hide();var g=[];for(i=0;i') - .appendTo(this) - .addClass(opt.loadingClass) - .bind('click', EYE.spacegallery.next); - el.spacegalleryCfg = opt; - el.spacegalleryCfg.images = el.getElementsByTagName('img').length; - el.spacegalleryCfg.loaded = 0; - el.spacegalleryCfg.asin = Math.asin(1); - el.spacegalleryCfg.asins = {}; - el.spacegalleryCfg.tops = {}; - el.spacegalleryCfg.increment = parseInt(el.spacegalleryCfg.perspective/el.spacegalleryCfg.images, 10); - var top = 0; - $('img', el) - .each(function(nr){ - var imgEl = new Image(); - var elImg = this; - el.spacegalleryCfg.asins[nr] = 1 - Math.asin((nr+1)/el.spacegalleryCfg.images)/el.spacegalleryCfg.asin; - top += el.spacegalleryCfg.increment - el.spacegalleryCfg.increment * el.spacegalleryCfg.asins[nr]; - el.spacegalleryCfg.tops[nr] = top; - elImg.spacegallery = {}; - imgEl.src = this.src; - if (imgEl.complete) { - el.spacegalleryCfg.loaded ++; - elImg.spacegallery.origWidth = imgEl.width; - elImg.spacegallery.origHeight = imgEl.height - } else { - imgEl.onload = function() { - el.spacegalleryCfg.loaded ++; - elImg.spacegallery.origWidth = imgEl.width; - elImg.spacegallery.origHeight = imgEl.height - if (el.spacegalleryCfg.loaded == el.spacegalleryCfg.images) { - - EYE.spacegallery.positionImages(el); - } - }; - } - }); - el.spacegalleryCfg.asins[el.spacegalleryCfg.images] = el.spacegalleryCfg.asins[el.spacegalleryCfg.images - 1] * 1.3; - el.spacegalleryCfg.tops[el.spacegalleryCfg.images] = el.spacegalleryCfg.tops[el.spacegalleryCfg.images - 1] * 1.3; - if (el.spacegalleryCfg.loaded == el.spacegalleryCfg.images) { - EYE.spacegallery.positionImages(el); - setInterval(function() { EYE.spacegallery.autoNext(el); }, 4000); - } - } - }); - } - } - }); - - $.fn.extend({ - - /** - * Create a space gallery - * @name spacegallery - * @description create a space gallery - * @option int border Images' border. Default: 6 - * @option int perspective Perpective height. Default: 140 - * @option float minScale Minimum scale for the image in the back. Default: 0.2 - * @option int duration Animation duration. Default: 800 - * @option string loadingClass CSS class applied to the element while looading images. Default: null - * @option function before Callback function triggered before going to the next image - * @option function after Callback function triggered after going to the next image - */ - spacegallery: EYE.spacegallery.init - }); - $.extend($.easing,{ - easeOut:function (x, t, b, c, d) { - return -c *(t/=d)*(t-2) + b; - } - }); -})(jQuery); \ No newline at end of file diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/css/jquery.jOrgChart.css b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/css/jquery.jOrgChart.css deleted file mode 100644 index ffabe2740..000000000 --- a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/css/jquery.jOrgChart.css +++ /dev/null @@ -1,51 +0,0 @@ -/* Basic styling */ -/* Draw the lines */ -.jOrgChart .line { - height : 20px; - width : 4px; -} - -.jOrgChart .down { - background-color : black; - margin : 0px auto; -} - -.jOrgChart .top { - border-top : 3px solid black; -} - -.jOrgChart .left { - border-right : 2px solid black; -} - -.jOrgChart .right { - border-left : 2px solid black; -} - -/* node cell */ -.jOrgChart td { - text-align : center; - vertical-align : top; - padding : 0; -} - -/* The node */ -.jOrgChart .node { - background-color : #35363B; - display : inline-block; - width : 120px; - height : 60px; - z-index : 10; - margin : 0 2px; -} - -/* jQuery drag 'n drop */ - -.drag-active { - border-style : dashed !important; -} - -.drop-hover { - border-style : solid !important; - border-color : #E05E00 !important; -} diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/example.html b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/example.html deleted file mode 100644 index 543b0f924..000000000 --- a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/example.html +++ /dev/null @@ -1,85 +0,0 @@ - - - jOrgChart - A jQuery OrgChart Plugin - - - - - - - - - - - - - - - - - - - -
        - - - - \ No newline at end of file diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/example_vsp.html b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/example_vsp.html deleted file mode 100644 index a2e3703d2..000000000 --- a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/example_vsp.html +++ /dev/null @@ -1,88 +0,0 @@ - - - jOrgChart - A jQuery OrgChart Plugin - - - - - - - - - - - - - - - - - - - -
        - - - - \ No newline at end of file diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/images/bkgd.png b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/images/bkgd.png deleted file mode 100644 index 3bbaf5eee..000000000 Binary files a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/images/bkgd.png and /dev/null differ diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/images/raspberry.jpg b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/images/raspberry.jpg deleted file mode 100644 index e79a0515d..000000000 Binary files a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/images/raspberry.jpg and /dev/null differ diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/jquery.jOrgChart.js b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/jquery.jOrgChart.js deleted file mode 100644 index 89411b290..000000000 --- a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/org_chart/jquery.jOrgChart.js +++ /dev/null @@ -1,267 +0,0 @@ -/** - * jQuery org-chart/tree plugin. - * - * Author: Wes Nolte - * http://twitter.com/wesnolte - * - * Based on the work of Mark Lee - * http://www.capricasoftware.co.uk - * - * Copyright (c) 2011 Wesley Nolte - * Dual licensed under the MIT and GPL licenses. - * - */ -(function($) { - - $.fn.jOrgChart = function(options) { - var opts = $.extend({}, $.fn.jOrgChart.defaults, options); - var $appendTo = $(opts.chartElement); - - // build the tree - $this = $(this); - var $container = $("
        "); - if($this.is("ul")) { - buildNode($this.find("li:first"), $container, 0, opts); - } - else if($this.is("li")) { - buildNode($this, $container, 0, opts); - } - $appendTo.append($container); - - // add drag and drop if enabled - if(opts.dragAndDrop){ - $('div.node').draggable({ - cursor : 'move', - distance : 40, - helper : 'clone', - opacity : 0.8, - revert : true, - revertDuration : 100, - snap : 'div.node.expanded', - snapMode : 'inner', - stack : 'div.node' - }); - - $('div.node').droppable({ - accept : '.node', - activeClass : 'drag-active', - hoverClass : 'drop-hover' - }); - - // Drag start event handler for nodes - $('div.node').bind("dragstart", function handleDragStart( event, ui ){ - - var sourceNode = $(this); - sourceNode.parentsUntil('.node-container') - .find('*') - .filter('.node') - .droppable('disable'); - }); - - // Drag stop event handler for nodes - $('div.node').bind("dragstop", function handleDragStop( event, ui ){ - - /* reload the plugin */ - $(opts.chartElement).children().remove(); - $this.jOrgChart(opts); - }); - - // Drop event handler for nodes - $('div.node').bind("drop", function handleDropEvent( event, ui ) { - var sourceNode = ui.draggable; - var targetNode = $(this); - - // finding nodes based on plaintext and html - // content is hard! - var targetLi = $('li').filter(function(){ - - li = $(this).clone() - .children("ul,li") - .remove() - .end(); - var attr = li.attr('id'); - if (typeof attr !== 'undefined' && attr !== false) { - return li.attr("id") == targetNode.attr("id"); - } - else { - return li.html() == targetNode.html(); - } - - }); - - var sourceLi = $('li').filter(function(){ - - li = $(this).clone() - .children("ul,li") - .remove() - .end(); - var attr = li.attr('id'); - if (typeof attr !== 'undefined' && attr !== false) { - return li.attr("id") == sourceNode.attr("id"); - } - else { - return li.html() == sourceNode.html(); - } - - }); - - var sourceliClone = sourceLi.clone(); - var sourceUl = sourceLi.parent('ul'); - - if(sourceUl.children('li').size() > 1){ - sourceLi.remove(); - }else{ - sourceUl.remove(); - } - - var id = sourceLi.attr("id"); - - if(targetLi.children('ul').size() >0){ - if (typeof id !== 'undefined' && id !== false) { - targetLi.children('ul').append('
      • '+sourceliClone.html()+'
      • '); - }else{ - targetLi.children('ul').append('
      • '+sourceliClone.html()+'
      • '); - } - }else{ - if (typeof id !== 'undefined' && id !== false) { - targetLi.append('
        • '+sourceliClone.html()+'
        '); - }else{ - targetLi.append('
        • '+sourceliClone.html()+'
        '); - } - } - - }); // handleDropEvent - - } // Drag and drop - }; - - // Option defaults - $.fn.jOrgChart.defaults = { - chartElement : 'body', - depth : -1, - chartClass : "jOrgChart", - dragAndDrop: false - }; - - // Method that recursively builds the tree - function buildNode($node, $appendTo, level, opts) { - var $table = $(""); - var $tbody = $(""); - - // Construct the node container(s) - var $nodeRow = $("").addClass("node-cells"); - var $nodeCell = $(""); - var $downLineCell = $(""); - $childNodes.each(function() { - var $left = $("").addClass("line left top"); - var $right = $("").addClass("line right top"); - $linesRow.append($left).append($right); - }); - - // horizontal line shouldn't extend beyond the first and last child branches - $linesRow.find("td:first") - .removeClass("top") - .end() - .find("td:last") - .removeClass("top"); - - $tbody.append($linesRow); - var $childNodesRow = $(""); - $childNodes.each(function() { - var $td = $("
        ").addClass("node-cell").attr("colspan", 2); - var $childNodes = $node.children("ul:first").children("li"); - var $nodeDiv; - - if($childNodes.length > 1) { - $nodeCell.attr("colspan", $childNodes.length * 2); - } - // Draw the node - // Get the contents - any markup except li and ul allowed - var $nodeContent = $node.clone() - .children("ul,li") - .remove() - .end() - .html(); - - var new_node_id = $node.attr("id"); - if (typeof new_node_id !== 'undefined' && new_node_id !== false) { - $nodeDiv = $("
        ").addClass("node").attr("id", $node.attr("id")).append($nodeContent); - }else{ - $nodeDiv = $("
        ").addClass("node").append($nodeContent); - } - - // Expand and contract nodes - if ($childNodes.length > 0) { - $nodeDiv.click(function() { - var $this = $(this); - var $tr = $this.closest("tr"); - - if($tr.hasClass('contracted')){ - $this.css('cursor','n-resize'); - $tr.removeClass('contracted').addClass('expanded'); - $tr.nextAll("tr").css('visibility', ''); - }else{ - $this.css('cursor','s-resize'); - $tr.removeClass('expanded').addClass('contracted'); - $tr.nextAll("tr").css('visibility', 'hidden'); - } - }); - } - - $nodeCell.append($nodeDiv); - $nodeRow.append($nodeCell); - $tbody.append($nodeRow); - - if($childNodes.length > 0) { - // if it can be expanded then change the cursor - $nodeDiv.css('cursor','n-resize').addClass('expanded'); - - // recurse until leaves found (-1) or to the level specified - if(opts.depth == -1 || (level+1 < opts.depth)) { - var $downLineRow = $("
        ").attr("colspan", $childNodes.length*2); - $downLineRow.append($downLineCell); - - // draw the connecting line from the parent node to the horizontal line - $downLine = $("
        ").addClass("line down"); - $downLineCell.append($downLine); - $tbody.append($downLineRow); - - // Draw the horizontal lines - var $linesRow = $("
          
        "); - $td.attr("colspan", 2); - // recurse through children lists and items - buildNode($(this), $td, level+1, opts); - $childNodesRow.append($td); - }); - - } - $tbody.append($childNodesRow); - } - - // any classes on the LI element get copied to the relevant node in the tree - // apart from the special 'collapsed' class, which collapses the sub-tree at this point - if ($node.attr('class') != undefined) { - var classList = $node.attr('class').split(/\s+/); - $.each(classList, function(index,item) { - if (item == 'collapsed') { - $nodeRow.nextAll('tr').css('display', 'none'); - $nodeRow.removeClass('expanded'); - $nodeRow.addClass('contracted'); - $nodeDiv.css('cursor','s-resize'); - } else { - $nodeDiv.addClass(item); - } - }); - } - - $table.append($tbody); - $appendTo.append($table); - - /* Prevent trees collapsing if a link inside a node is clicked */ - $nodeDiv.children('a').click(function(e){ - console.log(e); - e.stopPropagation(); - }); - }; - -})(jQuery); diff --git a/POLICY-SDK-APP/pom.xml b/POLICY-SDK-APP/pom.xml index 5cd0429d3..60bc1c12d 100644 --- a/POLICY-SDK-APP/pom.xml +++ b/POLICY-SDK-APP/pom.xml @@ -49,7 +49,7 @@ UTF-8 - 1.3.1 + 2.1.0-SNAPSHOT 4.2.0.RELEASE 4.3.11.Final true diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java index d65d1da8a..cb373a1bd 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java @@ -33,9 +33,11 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -67,6 +69,7 @@ import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.components.HumanPolicyComponent; import org.onap.policy.controller.PolicyController; import org.onap.policy.controller.PolicyExportAndImportController; +import org.onap.policy.model.Roles; import org.onap.policy.rest.XACMLRest; import org.onap.policy.rest.XACMLRestProperties; import org.onap.policy.rest.adapter.PolicyRestAdapter; @@ -79,8 +82,7 @@ import org.onap.policy.rest.jpa.UserInfo; import org.onap.policy.utils.PolicyUtils; import org.onap.policy.xacml.api.XACMLErrorConstants; import org.onap.policy.xacml.util.XACMLPolicyScanner; -import org.openecomp.policy.model.Roles; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.web.support.UserUtils; import com.att.research.xacml.util.XACMLProperties; import com.fasterxml.jackson.databind.JsonNode; @@ -272,6 +274,12 @@ public class PolicyManagerServlet extends HttpServlet { JSONObject jObj = new JSONObject(sb.toString()); JSONObject params = jObj.getJSONObject("params"); Mode mode = Mode.valueOf(params.getString("mode")); + + String userId = UserUtils.getUserSession(request).getOrgUserId(); + LOGGER.info("****************************************Logging UserID while doing actions on Editor tab*******************************************"); + LOGGER.info("UserId: " + userId + "Action Mode: "+ mode.toString() + "Action Params: "+params.toString()); + LOGGER.info("***********************************************************************************************************************************"); + switch (mode) { case ADDFOLDER: case ADDSUBSCOPE: @@ -623,7 +631,7 @@ public class PolicyManagerServlet extends HttpServlet { if(!(scope.getScopeName().contains(File.separator))){ JSONObject el = new JSONObject(); el.put("name", scope.getScopeName()); - el.put("date", scope.getCreatedDate()); + el.put("date", scope.getModifiedDate()); el.put("size", ""); el.put("type", "dir"); el.put("createdBy", scope.getUserCreatedBy().getUserName()); @@ -638,7 +646,7 @@ public class PolicyManagerServlet extends HttpServlet { if(!scopesList.isEmpty()){ PolicyEditorScopes scopeById = (PolicyEditorScopes) scopesList.get(0); el.put("name", scopeById.getScopeName()); - el.put("date", scopeById.getCreatedDate()); + el.put("date", scopeById.getModifiedDate()); el.put("size", ""); el.put("type", "dir"); el.put("createdBy", scopeById.getUserCreatedBy().getUserName()); @@ -1149,6 +1157,7 @@ public class PolicyManagerServlet extends HttpServlet { entityItem.setPolicyName(policyName); entityItem.setCreatedBy(userId); entityItem.setModifiedBy(userId); + entityItem.setModifiedDate(new Date()); controller.saveData(entityItem); } @@ -1212,9 +1221,9 @@ public class PolicyManagerServlet extends HttpServlet { if(!policyEntityobjects.isEmpty()){ for(Object object : policyEntityobjects){ policyEntity = (PolicyEntity) object; - String groupEntityquery = "from PolicyGroupEntity where policyid = :policyId"; + String groupEntityquery = "from PolicyGroupEntity where policyid ='"+policyEntity.getPolicyId()+"'"; SimpleBindings pgeParams = new SimpleBindings(); - pgeParams.put("policyId", policyEntity.getPolicyId()); + //pgeParams.put("policyIdValue", policyEntity.getPolicyId()); List groupobject = controller.getDataByQuery(groupEntityquery, pgeParams); if(!groupobject.isEmpty()){ pdpCheck = true; @@ -1226,8 +1235,10 @@ public class PolicyManagerServlet extends HttpServlet { //Delete the entity from Policy Entity table controller.deleteData(policyEntity); if(policyNamewithoutExtension.contains("Config_")){ + Files.deleteIfExists(Paths.get(PolicyController.getConfigHome() + File.separator + policyEntity.getConfigurationData().getConfigurationName())); controller.deleteData(policyEntity.getConfigurationData()); }else if(policyNamewithoutExtension.contains("Action_")){ + Files.deleteIfExists(Paths.get(PolicyController.getActionHome() + File.separator + policyEntity.getActionBodyEntity().getActionBodyName())); controller.deleteData(policyEntity.getActionBodyEntity()); } } @@ -1279,8 +1290,10 @@ public class PolicyManagerServlet extends HttpServlet { //Delete the entity from Policy Entity table controller.deleteData(policyEntity); if(policyNamewithoutExtension.contains("Config_")){ + Files.deleteIfExists(Paths.get(PolicyController.getConfigHome() + File.separator + policyEntity.getConfigurationData().getConfigurationName())); controller.deleteData(policyEntity.getConfigurationData()); }else if(policyNamewithoutExtension.contains("Action_")){ + Files.deleteIfExists(Paths.get(PolicyController.getActionHome() + File.separator + policyEntity.getActionBodyEntity().getActionBodyName())); controller.deleteData(policyEntity.getActionBodyEntity()); } @@ -1337,8 +1350,10 @@ public class PolicyManagerServlet extends HttpServlet { controller.deleteData(policyEntity); policyNamewithoutExtension = policyEntity.getPolicyName(); if(policyNamewithoutExtension.contains("Config_")){ + Files.deleteIfExists(Paths.get(PolicyController.getConfigHome() + File.separator + policyEntity.getConfigurationData().getConfigurationName())); controller.deleteData(policyEntity.getConfigurationData()); }else if(policyNamewithoutExtension.contains("Action_")){ + Files.deleteIfExists(Paths.get(PolicyController.getActionHome() + File.separator + policyEntity.getActionBodyEntity().getActionBodyName())); controller.deleteData(policyEntity.getActionBodyEntity()); } } diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyNotificationMail.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyNotificationMail.java index 2326a9fb7..67d9c8813 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyNotificationMail.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyNotificationMail.java @@ -108,6 +108,9 @@ public class PolicyNotificationMail{ } String policyFileName = entityItem.getPolicyName(); String checkPolicyName = policyName; + if(checkPolicyName.endsWith(".xml") || checkPolicyName.contains(".")){ + checkPolicyName = checkPolicyName.substring(0, checkPolicyName.indexOf(".")); + } if(policyFileName.contains("/")){ policyFileName = policyFileName.substring(0, policyFileName.indexOf("/")); policyFileName = policyFileName.replace("/", File.separator); diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyRestController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyRestController.java index 08f80304c..f38f3e266 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyRestController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyRestController.java @@ -52,8 +52,8 @@ import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.PolicyVersion; import org.onap.policy.utils.PolicyUtils; import org.onap.policy.xacml.api.XACMLErrorConstants; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; @@ -108,7 +108,11 @@ public class PolicyRestController extends RestrictedBaseController{ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); try{ JsonNode root = mapper.readTree(request.getReader()); - + + policyLogger.info("****************************************Logging UserID while Create/Update Policy**************************************************"); + policyLogger.info("UserId: " + userId + "Policy Data Object: "+ root.get(PolicyController.getPolicydata()).get("policy").toString()); + policyLogger.info("***********************************************************************************************************************************"); + PolicyRestAdapter policyData = mapper.readValue(root.get(PolicyController.getPolicydata()).get("policy").toString(), PolicyRestAdapter.class); if("file".equals(root.get(PolicyController.getPolicydata()).get(modal).get("type").toString().replace("\"", ""))){ @@ -204,9 +208,13 @@ public class PolicyRestController extends RestrictedBaseController{ HttpEntity requestEntity = new HttpEntity<>(body, headers); ResponseEntity result = null; HttpClientErrorException exception = null; - + String uri = requestURI; + if(uri.startsWith("/")){ + uri = uri.substring(uri.indexOf('/')+1); + } + uri = "onap" + uri.substring(uri.indexOf('/')); try{ - result = restTemplate.exchange(papUrl + requestURI, method, requestEntity, String.class); + result = restTemplate.exchange(papUrl + uri, method, requestEntity, String.class); }catch(Exception e){ policyLogger.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + "Error while connecting to " + papUrl, e); exception = new HttpClientErrorException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage()); @@ -378,11 +386,21 @@ public class PolicyRestController extends RestrictedBaseController{ @RequestMapping(value={"/saveDictionary/*/*"}, method={RequestMethod.POST}) public ModelAndView saveDictionaryController(HttpServletRequest request, HttpServletResponse response) throws IOException{ + String userId = ""; String uri = request.getRequestURI().replace("/saveDictionary", ""); + if(uri.startsWith("/")){ + uri = uri.substring(uri.indexOf('/')+1); + } + uri = "/onap" + uri.substring(uri.indexOf('/')); if(uri.contains(importDictionary)){ - String userId = UserUtils.getUserSession(request).getOrgUserId(); + userId = UserUtils.getUserSession(request).getOrgUserId(); uri = uri+ "?userId=" +userId; } + + policyLogger.info("****************************************Logging UserID while Saving Dictionary*****************************************************"); + policyLogger.info("UserId: " + userId); + policyLogger.info("***********************************************************************************************************************************"); + String body = callPAP(request, "POST", uri.replaceFirst("/", "").trim()); response.getWriter().write(body); return null; @@ -391,6 +409,16 @@ public class PolicyRestController extends RestrictedBaseController{ @RequestMapping(value={"/deleteDictionary/*/*"}, method={RequestMethod.POST}) public ModelAndView deletetDictionaryController(HttpServletRequest request, HttpServletResponse response) throws IOException { String uri = request.getRequestURI().replace("/deleteDictionary", ""); + if(uri.startsWith("/")){ + uri = uri.substring(uri.indexOf('/')+1); + } + uri = "/onap" + uri.substring(uri.indexOf('/')); + + String userId = UserUtils.getUserSession(request).getOrgUserId(); + policyLogger.info("****************************************Logging UserID while Deleting Dictionary*****************************************************"); + policyLogger.info("UserId: " + userId); + policyLogger.info("*************************************************************************************************************************************"); + String body = callPAP(request, "POST", uri.replaceFirst("/", "").trim()); response.getWriter().write(body); return null; @@ -400,6 +428,10 @@ public class PolicyRestController extends RestrictedBaseController{ public ModelAndView searchDictionaryController(HttpServletRequest request, HttpServletResponse response) throws IOException { Object resultList = null; String uri = request.getRequestURI(); + if(uri.startsWith("/")){ + uri = uri.substring(uri.indexOf('/')+1); + } + uri = "/onap" + uri.substring(uri.indexOf('/')); try{ String body = callPAP(request, "POST", uri.replaceFirst("/", "").trim()); if(body.contains("CouldNotConnectException")){ @@ -429,6 +461,10 @@ public class PolicyRestController extends RestrictedBaseController{ public ModelAndView searchPolicy(HttpServletRequest request, HttpServletResponse response) throws IOException{ Object resultList = null; String uri = request.getRequestURI()+"?action=search"; + if(uri.startsWith("/")){ + uri = uri.substring(uri.indexOf('/')+1); + } + uri = "/onap" + uri.substring(uri.indexOf('/')); String body = callPAP(request, "POST", uri.replaceFirst("/", "").trim()); JSONObject json = new JSONObject(body); diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyUserInfoController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyUserInfoController.java index 5020662c8..96205c5b1 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyUserInfoController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyUserInfoController.java @@ -28,9 +28,9 @@ import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/ActionPolicyController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/ActionPolicyController.java index c8b7a9630..0f66a45e6 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/ActionPolicyController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/ActionPolicyController.java @@ -29,9 +29,11 @@ import java.util.Map; import javax.xml.bind.JAXBElement; +import org.onap.policy.common.logging.flexlogger.FlexLogger; +import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.rest.adapter.PolicyRestAdapter; import org.onap.policy.rest.jpa.PolicyEntity; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -48,8 +50,6 @@ import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpressionsType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.RuleType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType; -import org.onap.policy.common.logging.flexlogger.FlexLogger; -import org.onap.policy.common.logging.flexlogger.Logger; @Controller @RequestMapping({ "/" }) diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AdminTabController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AdminTabController.java index 3b88f8472..1a43c7646 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AdminTabController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AdminTabController.java @@ -34,8 +34,9 @@ import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.GlobalRoleSettings; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; @@ -91,6 +92,10 @@ public class AdminTabController extends RestrictedBaseController{ try { ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + String userId = UserUtils.getUserSession(request).getOrgUserId(); + LOGGER.info("****************************************Logging UserID for Application Lockdown Function*****************************************"); + LOGGER.info("UserId: " + userId); + LOGGER.info("*********************************************************************************************************************************"); JsonNode root = mapper.readTree(request.getReader()); GlobalRoleSettings globalRole = mapper.readValue(root.get("lockdowndata").toString(), GlobalRoleSettings.class); globalRole.setRole("super-admin"); diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java index c1468e365..d308e7eda 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/AutoPushController.java @@ -47,6 +47,7 @@ import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.model.PDPGroupContainer; import org.onap.policy.model.PDPPolicyContainer; +import org.onap.policy.model.Roles; import org.onap.policy.rest.adapter.AutoPushTabAdapter; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.PolicyEntity; @@ -55,10 +56,9 @@ import org.onap.policy.xacml.api.XACMLErrorConstants; import org.onap.policy.xacml.api.pap.OnapPDPGroup; import org.onap.policy.xacml.std.pap.StdPDPGroup; import org.onap.policy.xacml.std.pap.StdPDPPolicy; -import org.openecomp.policy.model.Roles; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; @@ -187,6 +187,12 @@ public class AutoPushController extends RestrictedBaseController{ this.container = new PDPGroupContainer(controller.getPapEngine()); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); JsonNode root = mapper.readTree(request.getReader()); + + String userId = UserUtils.getUserSession(request).getOrgUserId(); + logger.info("****************************************Logging UserID while Pushing Policy to PDP Group*****************************************"); + logger.info("UserId: " + userId + "Push Policy Data: "+ root.get("pushTabData").toString()); + logger.info("***********************************************************************************************************************************"); + AutoPushTabAdapter adapter = mapper.readValue(root.get("pushTabData").toString(), AutoPushTabAdapter.class); for (Object pdpGroupId : adapter.getPdpDatas()) { LinkedHashMap selectedPDP = (LinkedHashMap)pdpGroupId; @@ -344,6 +350,12 @@ public class AutoPushController extends RestrictedBaseController{ JsonNode root = mapper.readTree(request.getReader()); StdPDPGroup group = (StdPDPGroup)mapper.readValue(root.get("activePdpGroup").toString(), StdPDPGroup.class); JsonNode removePolicyData = root.get("data"); + + String userId = UserUtils.getUserSession(request).getOrgUserId(); + logger.info("****************************************Logging UserID while Removing Policy from PDP Group*****************************************"); + logger.info("UserId: " + userId + "PDP Group Data: "+ root.get("activePdpGroup").toString() + "Remove Policy Data: "+root.get("data")); + logger.info("***********************************************************************************************************************************"); + policyContainer = new PDPPolicyContainer(group); if(removePolicyData.size() > 0){ for(int i = 0 ; i < removePolicyData.size(); i++){ diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSParamController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSParamController.java index 4dc45425a..33c58837e 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSParamController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateBRMSParamController.java @@ -44,7 +44,7 @@ import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.BRMSParamTemplate; import org.onap.policy.rest.jpa.PolicyEntity; import org.onap.policy.xacml.api.XACMLErrorConstants; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopFaultController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopFaultController.java index 7a8212c7e..839a79f29 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopFaultController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopFaultController.java @@ -39,7 +39,7 @@ import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.OnapName; import org.onap.policy.rest.jpa.PolicyEntity; import org.onap.policy.rest.jpa.VarbindDictionary; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java index 43b62b0c0..7d2fe23c6 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java @@ -73,7 +73,6 @@ import org.json.JSONArray; import org.json.JSONObject; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; -import org.onap.policy.controller.PolicyController; import org.onap.policy.rest.XACMLRestProperties; import org.onap.policy.rest.adapter.PolicyRestAdapter; import org.onap.policy.rest.dao.CommonClassDao; @@ -83,8 +82,8 @@ import org.onap.policy.rest.jpa.PolicyEntity; import org.onap.policy.rest.util.MSAttributeObject; import org.onap.policy.rest.util.MSModelUtils; import org.onap.policy.rest.util.MSModelUtils.MODEL_TYPE; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.JsonMessage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; @@ -141,6 +140,7 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController { Set uniqueDataKeys= new HashSet<>(); StringBuilder dataListBuffer=new StringBuilder(); List dataConstraints= new ArrayList <>(); + Set allManyTrueKeys= new HashSet <>(); public static final String DATATYPE = "data_types.policy.data."; public static final String PROPERTIES=".properties."; @@ -991,11 +991,13 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController { MicroServiceModels returnModel = getAttributeObject(servicename, version); - //get all keys with "MANY-true" defined in their value from subAttribute + //Get all keys with "MANY-true" defined in their value from subAttribute Set allkeys = null; if(returnModel.getSub_attributes() != null && !returnModel.getSub_attributes().isEmpty()){ - JSONObject json = new JSONObject(returnModel.getSub_attributes()); - allkeys = getAllKeys(json); + JSONObject json = new JSONObject(returnModel.getSub_attributes()); + getAllKeys(json); + allkeys = allManyTrueKeys; + allManyTrueKeys = new HashSet <>(); LOGGER.info("allkeys : " + allkeys); } @@ -1044,7 +1046,12 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController { List list = new ArrayList<>(); PrintWriter out = response.getWriter(); String responseString = mapper.writeValueAsString(returnModel); - JSONObject j = new JSONObject("{dcaeModelData: " + responseString + ",jsonValue: " + jsonModel + ",allManyTrueKeys: " + allManyTrueKeys+ "}"); + JSONObject j = null; + if("".equals(allManyTrueKeys)){ + j = new JSONObject("{dcaeModelData: " + responseString + ",jsonValue: " + jsonModel + "}"); + }else{ + j = new JSONObject("{dcaeModelData: " + responseString + ",jsonValue: " + jsonModel + ",allManyTrueKeys: " + allManyTrueKeys+ "}"); + } list.add(j); out.write(list.toString()); return null; @@ -1153,19 +1160,6 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController { return object; } - //call this method to check if the key is in the many-true key set - private boolean isKeyFound(Set allManyTruekeys, String key){ - - if(allManyTruekeys != null && key != null){ - Iterator iter = allManyTruekeys.iterator(); - while(iter.hasNext()){ - if(key.equals(iter.next())){ - return true; - } - } - } - return false; - } public static JSONObject convertToArrayElement(JSONObject json, String keyValue) { return convertToArrayElement(json, new HashSet<>(), keyValue); @@ -1239,7 +1233,7 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController { if(obj instanceof String && ((String) obj).contains("MANY-true")){ LOGGER.info("key : " + key); LOGGER.info("obj : " + obj); - keys.addAll(json.keySet()); + allManyTrueKeys.add(key); } if (obj instanceof JSONObject) keys.addAll(getAllKeys(json.getJSONObject(key))); if (obj instanceof JSONArray) keys.addAll(getAllKeys(json.getJSONArray(key))); @@ -1579,23 +1573,7 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController { } } - - if(!errorMsg.isEmpty()){ - - PrintWriter out = response.getWriter(); - - response.setCharacterEncoding("UTF-8"); - response.setContentType("application / json"); - request.setCharacterEncoding("UTF-8"); - - ObjectMapper mapper = new ObjectMapper(); - JSONObject j = new JSONObject(); - j.put("errorMsg", errorMsg); - out.write(j.toString()); - return; - } - - List fileList = new ArrayList<>();; + List fileList = new ArrayList<>(); this.directory = "model"; if (zip){ extractFolder(this.newFile); diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateFirewallController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateFirewallController.java index 9832f5803..a4b758924 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateFirewallController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateFirewallController.java @@ -39,6 +39,7 @@ import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.rest.adapter.AddressGroupJson; import org.onap.policy.rest.adapter.AddressJson; import org.onap.policy.rest.adapter.AddressMembers; +import org.onap.policy.rest.adapter.AddressMembersJson; import org.onap.policy.rest.adapter.DeployNowJson; import org.onap.policy.rest.adapter.IdMap; import org.onap.policy.rest.adapter.PolicyRestAdapter; @@ -62,12 +63,15 @@ import org.onap.policy.rest.jpa.SecurityZone; import org.onap.policy.rest.jpa.ServiceList; import org.onap.policy.rest.jpa.TermList; import org.onap.policy.xacml.api.XACMLErrorConstants; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; +import com.fasterxml.jackson.core.JsonGenerationException; import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; @@ -84,6 +88,8 @@ import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType; @RequestMapping("/") public class CreateFirewallController extends RestrictedBaseController { private static Logger policyLogger = FlexLogger.getLogger(CreateFirewallController.class); + private static final String ANY="ANY"; + private static final String GROUP="Group_"; @Autowired SessionFactory sessionFactory; @@ -99,7 +105,7 @@ public class CreateFirewallController extends RestrictedBaseController { } private List tagCollectorList; - private String jsonBody; + List expandablePrefixIPList = new ArrayList<>(); List expandableServicesList= new ArrayList<>(); @Autowired @@ -109,14 +115,14 @@ public class CreateFirewallController extends RestrictedBaseController { public CreateFirewallController(){} private List termCollectorList; - private ArrayList attributeList; + public PolicyRestAdapter setDataToPolicyRestAdapter(PolicyRestAdapter policyData){ - - termCollectorList = new ArrayList<>(); - tagCollectorList = new ArrayList<>(); - if(!policyData.getAttributes().isEmpty()){ + String jsonBody=""; + termCollectorList = new ArrayList <>(); + tagCollectorList = new ArrayList <>(); + if(policyData.getAttributes().size() > 0){ for(Object attribute : policyData.getAttributes()){ if(attribute instanceof LinkedHashMap){ String key = ((LinkedHashMap) attribute).get("key").toString(); @@ -139,14 +145,16 @@ public class CreateFirewallController extends RestrictedBaseController { } private List mapping(String expandableList) { + String value = null; + String desc = null; List valueDesc= new ArrayList<>(); List prefixListData = commonClassDao.getData(PrefixList.class); for (int i = 0; i< prefixListData.size(); i++) { PrefixList prefixList = (PrefixList) prefixListData.get(i); if (prefixList.getPrefixListName().equals(expandableList)) { - String value = prefixList.getPrefixListValue(); + value = prefixList.getPrefixListValue(); valueDesc.add(value); - String desc= prefixList.getDescription(); + desc= prefixList.getDescription(); valueDesc.add(desc); break; } @@ -193,6 +201,7 @@ public class CreateFirewallController extends RestrictedBaseController { } public void prePopulateFWPolicyData(PolicyRestAdapter policyAdapter, PolicyEntity entity) { + ArrayList attributeList; attributeList = new ArrayList<>(); if (policyAdapter.getPolicyData() instanceof PolicyType) { Object policyData = policyAdapter.getPolicyData(); @@ -221,7 +230,7 @@ public class CreateFirewallController extends RestrictedBaseController { String data=null; SecurityZone jpaSecurityZone; data = entity.getConfigurationData().getConfigBody(); - tc1 = (TermCollector)mapper.readValue(data, TermCollector.class); + tc1 = mapper.readValue(data, TermCollector.class); List securityZoneData = commonClassDao.getData(SecurityZone.class); for (int i = 0; i < securityZoneData.size() ; i++) { jpaSecurityZone = (SecurityZone) securityZoneData.get(i); @@ -238,7 +247,7 @@ public class CreateFirewallController extends RestrictedBaseController { Map termTagMap=null; if(tc1 != null){ for(int i=0;i(); + termTagMap = new HashMap <>(); String ruleName= tc1.getFirewallRuleList().get(i).getRuleName(); String tagPickerName=tc1.getRuleToTag().get(i).getTagPickerName(); termTagMap.put("key", ruleName); @@ -277,16 +286,16 @@ public class CreateFirewallController extends RestrictedBaseController { String value = (String) attributeValue.getContent().get(0); AttributeDesignatorType designator = match.getAttributeDesignator(); String attributeId = designator.getAttributeId(); - if (attributeId.equals("ConfigName")) { + if (("ConfigName").equals(attributeId)) { policyAdapter.setConfigName(value); } - if (attributeId.equals("RiskType")){ + if (("RiskType").equals(attributeId)){ policyAdapter.setRiskType(value); } - if (attributeId.equals("RiskLevel")){ + if (("RiskLevel").equals(attributeId)){ policyAdapter.setRiskLevel(value); } - if (attributeId.equals("guard")){ + if (("guard").equals(attributeId)){ policyAdapter.setGuard(value); } if (attributeId.equals("TTLDate") && !value.contains("NA")){ @@ -305,14 +314,14 @@ public class CreateFirewallController extends RestrictedBaseController { } @RequestMapping(value={"/policyController/ViewFWPolicyRule.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST}) - public void setFWViewRule(HttpServletRequest request, HttpServletResponse response){ + public ModelAndView setFWViewRule(HttpServletRequest request, HttpServletResponse response){ try { termCollectorList = new ArrayList<>(); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); JsonNode root = mapper.readTree(request.getReader()); - PolicyRestAdapter policyData = (PolicyRestAdapter)mapper.readValue(root.get("policyData").toString(), PolicyRestAdapter.class); - if(!policyData.getAttributes().isEmpty()){ + PolicyRestAdapter policyData = mapper.readValue(root.get("policyData").toString(), PolicyRestAdapter.class); + if(policyData.getAttributes().size() > 0){ for(Object attribute : policyData.getAttributes()){ if(attribute instanceof LinkedHashMap){ String key = ((LinkedHashMap) attribute).get("key").toString(); @@ -332,13 +341,13 @@ public class CreateFirewallController extends RestrictedBaseController { List tmList = commonClassDao.getDataById(TermList.class, "termName", id); jpaTermList = (TermList) tmList.get(0); if (jpaTermList != null){ - ruleSrcList= ((TermList) jpaTermList).getSrcIPList(); + ruleSrcList= jpaTermList.getSrcIPList(); if ((ruleSrcList!= null) && (!ruleSrcList.isEmpty()) && !ruleSrcList.equals("null")){ - displayString.append("Source IP List: " + ((TermList) jpaTermList).getSrcIPList()); + displayString.append("Source IP List: " + jpaTermList.getSrcIPList()); displayString.append(" ; \t\n"); for(String srcList:ruleSrcList.split(",")){ - if(srcList.startsWith("Group_")){ - AddressGroup ag= new AddressGroup(); + if(srcList.startsWith(GROUP)){ + AddressGroup ag; ag= mappingAddressGroup(srcList); displayString.append("\n\t"+"Group has :"+ag.getPrefixList()+"\n"); for(String groupItems:ag.getPrefixList().split(",")){ @@ -351,7 +360,7 @@ public class CreateFirewallController extends RestrictedBaseController { displayString.append("\n"); } }else{ - if(!srcList.equals("ANY")){ + if(!srcList.equals(ANY)){ valueDesc=mapping(srcList); displayString.append("\n\t"+"Name: "+srcList); displayString.append("\n\t"+"Description: "+valueDesc.get(1)); @@ -362,13 +371,13 @@ public class CreateFirewallController extends RestrictedBaseController { } displayString.append("\n"); } - ruleDestList= ((TermList) jpaTermList).getDestIPList(); + ruleDestList= jpaTermList.getDestIPList(); if ( ruleDestList!= null && (!ruleDestList.isEmpty())&& !ruleDestList.equals("null")){ - displayString.append("Destination IP List: " + ((TermList) jpaTermList).getDestIPList()); + displayString.append("Destination IP List: " + jpaTermList.getDestIPList()); displayString.append(" ; \t\n"); for(String destList:ruleDestList.split(",")){ - if(destList.startsWith("Group_")){ - AddressGroup ag= new AddressGroup(); + if(destList.startsWith(GROUP)){ + AddressGroup ag; ag= mappingAddressGroup(destList); displayString.append("\n\t"+"Group has :"+ag.getPrefixList()+"\n"); for(String groupItems:ag.getPrefixList().split(",")){ @@ -379,7 +388,7 @@ public class CreateFirewallController extends RestrictedBaseController { displayString.append("\n\t"); } }else{ - if(!destList.equals("ANY")){ + if(!destList.equals(ANY)){ valueDesc=mapping(destList); displayString.append("\n\t"+"Name: "+destList); displayString.append("\n\t"+"Description: "+valueDesc.get(1)); @@ -391,25 +400,25 @@ public class CreateFirewallController extends RestrictedBaseController { displayString.append("\n"); } - ruleSrcPort=((TermList) jpaTermList).getSrcPortList(); + ruleSrcPort=jpaTermList.getSrcPortList(); if ( ruleSrcPort!= null && (!ruleSrcPort.isEmpty())&& !ruleSrcPort.equals("null")) { displayString.append("\n"+"Source Port List:" + ruleSrcPort); displayString.append(" ; \t\n"); } - ruleDestPort= ((TermList) jpaTermList).getDestPortList(); + ruleDestPort= jpaTermList.getDestPortList(); if (ruleDestPort != null && (!ruleDestPort.isEmpty())&& !ruleDestPort.equals("null")) { displayString.append("\n"+"Destination Port List:" + ruleDestPort); displayString.append(" ; \t\n"); for(String destServices:ruleDestPort.split(",")){ - if(destServices.startsWith("Group_")){ - GroupServiceList sg= new GroupServiceList(); + if(destServices.startsWith(GROUP)){ + GroupServiceList sg; sg= mappingServiceGroup(destServices); displayString.append("\n\t"+"Service Group has :"+sg.getServiceList()+"\n"); for(String groupItems:sg.getServiceList().split(",")){ - ServiceList sl= new ServiceList(); + ServiceList sl; sl= mappingServiceList(groupItems); displayString.append("\n\t"+"Name: "+ sl.getServiceName()); @@ -423,8 +432,8 @@ public class CreateFirewallController extends RestrictedBaseController { } } else{ - if(!destServices.equals("ANY")){ - ServiceList sl= new ServiceList(); + if(!destServices.equals(ANY)){ + ServiceList sl; sl= mappingServiceList(destServices); displayString.append("\n\t"+"Name: "+ sl.getServiceName()); @@ -438,7 +447,7 @@ public class CreateFirewallController extends RestrictedBaseController { } } } - displayString.append("\n"); + displayString.append("\n"); } ruleAction=(jpaTermList).getAction(); @@ -457,9 +466,11 @@ public class CreateFirewallController extends RestrictedBaseController { String responseString = mapper.writeValueAsString(displayString); JSONObject j = new JSONObject("{policyData: " + responseString + "}"); out.write(j.toString()); + return null; } catch (Exception e) { policyLogger.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + e); } + return null; } private String constructJson(PolicyRestAdapter policyData) { @@ -497,6 +508,7 @@ public class CreateFirewallController extends RestrictedBaseController { TagDefines tagDefine= new TagDefines(); List tagList=null; ServiceListJson targetSl=null; + AddressMembers addressMembersJson=null; int i=0; try{ String networkRole=""; @@ -509,7 +521,7 @@ public class CreateFirewallController extends RestrictedBaseController { String tagValues=jpaTagPickerList.getTagValues(); tagList= new ArrayList<>(); for(String val:tagValues.split("#")) { - int index=val.indexOf(":"); + int index=val.indexOf(':'); String keyToStore=val.substring(0,index); String valueToStore=val.substring(index+1,val.length()); @@ -626,12 +638,12 @@ public class CreateFirewallController extends RestrictedBaseController { for(String destServices:destPort_map.get(tl).split(",") ){ ServicesJson destServicesJson= new ServicesJson(); destServicesJson.setType("REFERENCE"); - if(destServices.equals("ANY")){ + if(destServices.equals(ANY)){ destServicesJson.setName("any"); destServicesJsonList.add(destServicesJson); break; }else{ - if(destServices.startsWith("Group_")){ + if(destServices.startsWith(GROUP)){ destServicesJson.setName(destServices.substring(6,destServices.length())); } else{ destServicesJson.setName(destServices); @@ -656,13 +668,13 @@ public class CreateFirewallController extends RestrictedBaseController { List sourceListArrayJson= new ArrayList<>(); for(String srcList:srcIP_map.get(tl).split(",") ){ AddressJson srcListJson= new AddressJson(); - if(srcList.equals("ANY")){ + if(srcList.equals(ANY)){ srcListJson.setType("any"); sourceListArrayJson.add(srcListJson); break; }else{ srcListJson.setType("REFERENCE"); - if(srcList.startsWith("Group_")){ + if(srcList.startsWith(GROUP)){ srcListJson.setName(srcList.substring(6,srcList.length())); }else{ srcListJson.setName(srcList); @@ -677,13 +689,13 @@ public class CreateFirewallController extends RestrictedBaseController { List destListArrayJson= new ArrayList<>(); for(String destList:destIP_map.get(tl).split(",")){ AddressJson destListJson= new AddressJson(); - if(destList.equals("ANY")){ + if(destList.equals(ANY)){ destListJson.setType("any"); destListArrayJson.add(destListJson); break; }else{ destListJson.setType("REFERENCE"); - if(destList.startsWith("Group_")){ + if(destList.startsWith(GROUP)){ destListJson.setName(destList.substring(6,destList.length())); }else{ destListJson.setName(destList); @@ -707,7 +719,7 @@ public class CreateFirewallController extends RestrictedBaseController { expandablePrefixIPList.add(destIP_map.get(tl)); } termList.add(targetTerm); - targetTerm.setPosition("" + (ruleCount++)); + targetTerm.setPosition(Integer.toString (ruleCount++)); } List securityZoneData = commonClassDao.getData(SecurityZone.class); @@ -719,7 +731,7 @@ public class CreateFirewallController extends RestrictedBaseController { idMapInstance.setAstraId(jpaSecurityZone.getZoneValue()); idMapInstance.setVendorId("deviceGroup:dev"); - List idMap = new ArrayList(); + List idMap = new ArrayList <>(); idMap.add(idMapInstance); VendorSpecificData vendorStructure= new VendorSpecificData(); @@ -741,6 +753,7 @@ public class CreateFirewallController extends RestrictedBaseController { Set servListArray = new HashSet<>(); Set servGroupArray= new HashSet<>(); Set addrGroupArray= new HashSet<>(); + Set addrArray= new HashSet<> (); ServiceGroupJson targetSg= null; AddressGroupJson addressSg=null; @@ -750,9 +763,9 @@ public class CreateFirewallController extends RestrictedBaseController { for(String serviceList:expandableServicesList){ for(String t: serviceList.split(",")){ - if((!t.startsWith("Group_"))){ - if(!t.equals("ANY")){ - ServiceList sl = new ServiceList(); + if((!t.startsWith(GROUP))){ + if(!t.equals(ANY)){ + ServiceList sl; targetSl= new ServiceListJson(); sl= mappingServiceList(t); targetSl.setName(sl.getServiceName()); @@ -789,7 +802,7 @@ public class CreateFirewallController extends RestrictedBaseController { servListArray.add(targetAnyUdp); } }else{//This is a group - GroupServiceList sg= new GroupServiceList(); + GroupServiceList sg; targetSg= new ServiceGroupJson(); sg= mappingServiceGroup(t); @@ -804,7 +817,7 @@ public class CreateFirewallController extends RestrictedBaseController { serviceMembers.setName(groupString); servMembersList.add(serviceMembers); //Expand the group Name - ServiceList expandGroupSl = new ServiceList(); + ServiceList expandGroupSl ; targetSl= new ServiceListJson(); expandGroupSl= mappingServiceList(groupString); @@ -826,10 +839,10 @@ public class CreateFirewallController extends RestrictedBaseController { Set prefixIPList = new HashSet<>(); for(String prefixList:expandablePrefixIPList){ for(String prefixIP: prefixList.split(",")){ - if((!prefixIP.startsWith("Group_"))){ - if(!prefixIP.equals("ANY")){ + if((!prefixIP.startsWith(GROUP))){ + if(!prefixIP.equals(ANY)){ List addMembersList= new ArrayList<>(); - List valueDesc= new ArrayList<>(); + List valueDesc; PrefixIPList targetAddressList = new PrefixIPList(); AddressMembers addressMembers= new AddressMembers(); targetAddressList.setName(prefixIP); @@ -853,31 +866,37 @@ public class CreateFirewallController extends RestrictedBaseController { } } else{//This is a group - AddressGroup ag= new AddressGroup(); + AddressGroup ag; addressSg= new AddressGroupJson(); ag= mappingAddressGroup(prefixIP); String name=ag.getGroupName(); //Removing the "Group_" prepending string before packing the JSON addressSg.setName(name.substring(6,name.length())); - - List addrMembersList= new ArrayList<>(); + + List addrMembersList= new ArrayList<>(); for(String groupString: ag.getPrefixList().split(",")){ - List valueDesc= new ArrayList<>(); - AddressMembers addressMembers= new AddressMembers(); - valueDesc= mapping (groupString); - if(valueDesc.size() > 0){ - addressMembers.setValue(valueDesc.get(0)); - } - addressMembers.setType("SUBNET"); + List valueDesc; + AddressMembersJson addressMembers= new AddressMembersJson(); + addressMembers.setType("REFERENCES"); + addressMembers.setName(groupString); addrMembersList.add(addressMembers); //Expand the group Name + PrefixIPList expandGroupPrefix; + addressMembersJson= new AddressMembers(); + valueDesc= mapping (groupString); + + addressMembersJson.setName(groupString); + addressMembersJson.setType("SUBNET"); + addressMembersJson.setValue(valueDesc.get(0)); + + addrArray.add(addressMembersJson); + } addressSg.setMembers(addrMembersList); addrGroupArray.add(addressSg); } - } } @@ -900,6 +919,11 @@ public class CreateFirewallController extends RestrictedBaseController { for(Object addObj1:addrGroupArray){ addressGroup.add(addObj1); } + + for(Object addObj2:addrArray){ + addressGroup.add(addObj2); + } + tc.setServiceGroups(serviceGroup); tc.setAddressGroups(addressGroup); @@ -908,8 +932,10 @@ public class CreateFirewallController extends RestrictedBaseController { ObjectWriter om = new ObjectMapper().writer(); try { json = om.writeValueAsString(tc); - } catch (Exception e) { - policyLogger.error("Exception Occured"+e); + } catch (JsonGenerationException e) { + policyLogger.error("JsonGenerationException Ocured",e); + } catch (JsonMappingException e) { + policyLogger.error("IOException Occured",e); } }catch (Exception e) { diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreatePolicyController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreatePolicyController.java index 71d0b3d03..af4f9ffaf 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreatePolicyController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreatePolicyController.java @@ -31,7 +31,7 @@ import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.rest.adapter.PolicyRestAdapter; import org.onap.policy.rest.jpa.PolicyEntity; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DashboardController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DashboardController.java index aedb94301..dba79e1bb 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DashboardController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DashboardController.java @@ -45,29 +45,28 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; +import org.onap.policy.common.logging.flexlogger.FlexLogger; +import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.dao.SystemLogDbDao; import org.onap.policy.model.PDPGroupContainer; import org.onap.policy.rest.XACMLRestProperties; import org.onap.policy.rest.dao.CommonClassDao; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.policy.xacml.api.XACMLErrorConstants; +import org.onap.policy.xacml.api.pap.OnapPDP; +import org.onap.policy.xacml.api.pap.OnapPDPGroup; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.JsonMessage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; -import org.onap.policy.common.logging.flexlogger.FlexLogger; -import org.onap.policy.common.logging.flexlogger.Logger; -import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; -import org.onap.policy.xacml.api.XACMLErrorConstants; -import org.onap.policy.xacml.api.pap.OnapPDP; -import org.onap.policy.xacml.api.pap.OnapPDPGroup; - import com.att.research.xacml.api.pap.PAPException; import com.att.research.xacml.api.pap.PDP; import com.att.research.xacml.api.pap.PDPGroup; import com.att.research.xacml.api.pap.PDPPolicy; import com.att.research.xacml.util.XACMLProperties; +import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DecisionPolicyController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DecisionPolicyController.java index fc77c9316..8427797e8 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DecisionPolicyController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DecisionPolicyController.java @@ -36,7 +36,7 @@ import org.onap.policy.rest.adapter.PolicyRestAdapter; import org.onap.policy.rest.adapter.RainyDayParams; import org.onap.policy.rest.adapter.YAMLParams; import org.onap.policy.rest.jpa.PolicyEntity; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -82,7 +82,7 @@ public class DecisionPolicyController extends RestrictedBaseController { Object policyData = policyAdapter.getPolicyData(); PolicyType policy = (PolicyType) policyData; policyAdapter.setOldPolicyFileName(policyAdapter.getPolicyName()); - String policyNameValue = policyAdapter.getPolicyName().substring(policyAdapter.getPolicyName().indexOf("_") + 1); + String policyNameValue = policyAdapter.getPolicyName().substring(policyAdapter.getPolicyName().indexOf('_') + 1); policyAdapter.setPolicyName(policyNameValue); String description = ""; try{ diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PDPController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PDPController.java index bb06cb3fe..c0344d337 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PDPController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PDPController.java @@ -38,15 +38,15 @@ import org.onap.policy.admin.RESTfulPAPEngine; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.model.PDPGroupContainer; +import org.onap.policy.model.Roles; import org.onap.policy.xacml.api.XACMLErrorConstants; import org.onap.policy.xacml.api.pap.OnapPDPGroup; import org.onap.policy.xacml.api.pap.PAPPolicyEngine; import org.onap.policy.xacml.std.pap.StdPDP; import org.onap.policy.xacml.std.pap.StdPDPGroup; -import org.openecomp.policy.model.Roles; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -195,6 +195,12 @@ public class PDPController extends RestrictedBaseController { mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); JsonNode root = mapper.readTree(request.getReader()); this.container = new PDPGroupContainer(controller.getPapEngine()); + + String userId = UserUtils.getUserSession(request).getOrgUserId(); + policyLogger.info("****************************************Logging UserID for Save PDP Group Function*****************************************"); + policyLogger.info("UserId: " + userId + "PDP Group Data: "+ root.get("pdpGroupData").toString()); + policyLogger.info("***************************************************************************************************************************"); + StdPDPGroup pdpGroupData = mapper.readValue(root.get("pdpGroupData").toString().replace("groupName", "name"), StdPDPGroup.class); try { if(pdpGroupData.getId() == null){ @@ -241,6 +247,12 @@ public class PDPController extends RestrictedBaseController { JsonNode root = mapper.readTree(request.getReader()); PolicyController controller = getPolicyControllerInstance(); this.container = new PDPGroupContainer(controller.getPapEngine()); + + String userId = UserUtils.getUserSession(request).getOrgUserId(); + policyLogger.info("****************************************Logging UserID for Remove PDP Group Function*****************************************"); + policyLogger.info("UserId: " + userId + "PDP Group Data: "+ root.get("pdpGroupData").toString()); + policyLogger.info("*****************************************************************************************************************************"); + StdPDPGroup pdpGroupData = mapper.readValue(root.get("pdpGroupData").toString(), StdPDPGroup.class); if(pdpGroupData.getName().equals("Default")) { throw new UnsupportedOperationException("You can't remove the Default Group."); @@ -284,6 +296,12 @@ public class PDPController extends RestrictedBaseController { String update = root.get("update").toString(); PdpData pdpGroupData = (PdpData)mapper.readValue(root.get("pdpInGroup").toString(), PdpData.class); StdPDPGroup activeGroupData = mapper.readValue(root.get("activePDP").toString(), StdPDPGroup.class); + + String userId = UserUtils.getUserSession(request).getOrgUserId(); + policyLogger.info("****************************************Logging UserID while Saving pdp in PDP Group*****************************************"); + policyLogger.info("UserId: " + userId + "PDP Group Data: "+ root.get("pdpInGroup").toString() + "Active Group Data: "+ root.get("activePDP").toString()); + policyLogger.info("*******************************************************************************************************************************"); + try { if(update.contains("false")){ @@ -332,6 +350,11 @@ public class PDPController extends RestrictedBaseController { StdPDP deletePdp = mapper.readValue(root.get("data").toString(), StdPDP.class); StdPDPGroup activeGroupData = mapper.readValue(root.get("activePDP").toString(), StdPDPGroup.class); + String userId = UserUtils.getUserSession(request).getOrgUserId(); + policyLogger.info("****************************************Logging UserID while Removing pdp from PDP Group*****************************************"); + policyLogger.info("UserId: " + userId + "Delete PDP Group Data: "+ root.get("data").toString() + "Active Group Data: "+ root.get("activePDP").toString()); + policyLogger.info("***********************************************************************************************************************************"); + this.container.removePDP(deletePdp, activeGroupData); response.setCharacterEncoding("UTF-8"); response.setContentType("application / json"); diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyController.java index 321dc72d2..d244cf528 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyController.java @@ -43,6 +43,7 @@ import org.onap.policy.admin.RESTfulPAPEngine; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.model.PDPGroupContainer; +import org.onap.policy.model.Roles; import org.onap.policy.rest.XACMLRestProperties; import org.onap.policy.rest.XacmlAdminAuthorization; import org.onap.policy.rest.dao.CommonClassDao; @@ -53,10 +54,9 @@ import org.onap.policy.rest.jpa.PolicyVersion; import org.onap.policy.rest.jpa.UserInfo; import org.onap.policy.xacml.api.XACMLErrorConstants; import org.onap.policy.xacml.api.pap.PAPPolicyEngine; -import org.openecomp.policy.model.Roles; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; @@ -203,7 +203,12 @@ public class PolicyController extends RestrictedBaseController { setAutoPushPDPGroup(prop.getProperty("xacml.autopush.pdpGroup")); //Micro Service Properties setMsOnapName(prop.getProperty("xacml.policy.msOnapName")); + if(getMsOnapName() == null){ + setMsOnapName(prop.getProperty("xacml.policy.msEcompName")); + } + policyLogger.info("getMsOnapName => " + getMsOnapName()); setMsPolicyName(prop.getProperty("xacml.policy.msPolicyName")); + policyLogger.info("setMsPolicyName => " + getMsPolicyName()); //WebApp directories setConfigHome(prop.getProperty("xacml.rest.config.webapps") + "Config"); setActionHome(prop.getProperty("xacml.rest.config.webapps") + "Action"); diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyExportAndImportController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyExportAndImportController.java index 856d825bd..78a8c5ad1 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyExportAndImportController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyExportAndImportController.java @@ -49,6 +49,7 @@ import org.apache.poi.ss.usermodel.Workbook; import org.json.JSONObject; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; +import org.onap.policy.model.Roles; import org.onap.policy.rest.adapter.PolicyExportAdapter; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.ActionBodyEntity; @@ -58,9 +59,8 @@ import org.onap.policy.rest.jpa.PolicyEntity; import org.onap.policy.rest.jpa.PolicyVersion; import org.onap.policy.rest.jpa.UserInfo; import org.onap.policy.xacml.api.XACMLErrorConstants; -import org.openecomp.policy.model.Roles; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyNotificationController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyNotificationController.java index f987f906d..845b5f5a7 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyNotificationController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyNotificationController.java @@ -38,8 +38,8 @@ import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.WatchPolicyNotificationTable; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyRolesController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyRolesController.java index 6f8b3de8e..798a39d4d 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyRolesController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyRolesController.java @@ -37,8 +37,9 @@ import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.PolicyEditorScopes; import org.onap.policy.rest.jpa.PolicyRoles; import org.onap.policy.rest.jpa.UserInfo; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; @@ -83,6 +84,7 @@ public class PolicyRolesController extends RestrictedBaseController{ String scopeName = null; ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + String userId = UserUtils.getUserSession(request).getOrgUserId(); JsonNode root = mapper.readTree(request.getReader()); ReadScopes adapter = mapper.readValue(root.get("editRoleData").toString(), ReadScopes.class); for(int i = 0; i < adapter.getScope().size(); i++){ @@ -92,6 +94,9 @@ public class PolicyRolesController extends RestrictedBaseController{ scopeName = scopeName + "," + adapter.getScope().get(i); } } + LOGGER.info("****************************************Logging UserID for Roles Function********************************************************"); + LOGGER.info("UserId: " + userId + "Updating the Scope for following user" + adapter.getLoginId() + "ScopeNames" + adapter.getScope()); + LOGGER.info("*********************************************************************************************************************************"); PolicyRoles roles = new PolicyRoles(); roles.setId(adapter.getId()); roles.setLoginId(adapter.getLoginId()); diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyValidationController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyValidationController.java index a82fac27a..9a1aac1b5 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyValidationController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyValidationController.java @@ -33,8 +33,8 @@ import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.rest.adapter.PolicyRestAdapter; import org.onap.policy.rest.util.PolicyValidation; import org.onap.policy.rest.util.PolicyValidationRequestWrapper; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.web.support.JsonMessage; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; @@ -63,7 +63,7 @@ public class PolicyValidationController extends RestrictedBaseController { PolicyValidationRequestWrapper wrapper = new PolicyValidationRequestWrapper(); StringBuilder responseString; ObjectMapper mapper = new ObjectMapper(); - + PolicyRestAdapter policyData = wrapper.populateRequestParameters(request); responseString = validation.validatePolicy(policyData); diff --git a/POLICY-SDK-APP/src/main/java/org/openecomp/policy/model/Roles.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/model/Roles.java similarity index 98% rename from POLICY-SDK-APP/src/main/java/org/openecomp/policy/model/Roles.java rename to POLICY-SDK-APP/src/main/java/org/onap/policy/model/Roles.java index 31a41ca7b..51e78d0e5 100644 --- a/POLICY-SDK-APP/src/main/java/org/openecomp/policy/model/Roles.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/model/Roles.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.policy.model; +package org.onap.policy.model; import java.io.Serializable; diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java index 22cc82a23..dc2159bc1 100644 --- a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java +++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java @@ -40,6 +40,7 @@ import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.controller.CreateDcaeMicroServiceController; import org.onap.policy.controller.PolicyController; +import org.onap.policy.model.Roles; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.ActionBodyEntity; import org.onap.policy.rest.jpa.ConfigurationDataEntity; @@ -48,7 +49,6 @@ import org.onap.policy.rest.jpa.PolicyEditorScopes; import org.onap.policy.rest.jpa.PolicyEntity; import org.onap.policy.rest.jpa.PolicyVersion; import org.onap.policy.rest.jpa.UserInfo; -import org.openecomp.policy.model.Roles; public class PolicyManagerServletTest extends Mockito{ diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyRestControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyRestControllerTest.java index 1bda7cd41..16cefd854 100644 --- a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyRestControllerTest.java +++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyRestControllerTest.java @@ -45,8 +45,8 @@ import org.onap.policy.rest.jpa.PrefixList; import org.onap.policy.rest.jpa.SecurityZone; import org.onap.policy.rest.jpa.ServiceList; import org.onap.policy.rest.jpa.TermList; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.mock.web.MockHttpServletResponse; public class PolicyRestControllerTest { diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyUserInfoControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyUserInfoControllerTest.java index f4acaeb9a..7a3401568 100644 --- a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyUserInfoControllerTest.java +++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyUserInfoControllerTest.java @@ -29,8 +29,8 @@ import javax.servlet.http.HttpSession; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.mock.web.MockHttpServletResponse; public class PolicyUserInfoControllerTest { diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java index 0109cb503..17ad56457 100644 --- a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java +++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java @@ -19,7 +19,8 @@ */ package org.onap.policy.controller; -import static org.junit.Assert.*; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -30,13 +31,17 @@ import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; import org.junit.Before; import org.junit.Test; +import org.mockito.Mockito; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.GlobalRoleSettings; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.mock.web.MockHttpServletResponse; public class AdminTabControllerTest { @@ -55,6 +60,12 @@ public class AdminTabControllerTest { request = mock(HttpServletRequest.class); response = new MockHttpServletResponse(); + HttpSession mockSession = mock(HttpSession.class); + User user = new User(); + user.setOrgUserId("Test"); + Mockito.when(mockSession.getAttribute(SystemProperties.getProperty("user_attribute_name"))).thenReturn(user); + Mockito.when(request.getSession(false)).thenReturn(mockSession); + AdminTabController.setCommonClassDao(commonClassDao); GlobalRoleSettings globalRole = new GlobalRoleSettings(); diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java index 8433c4740..55a2288c7 100644 --- a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java +++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java @@ -34,10 +34,10 @@ import org.junit.Test; import org.mockito.Mockito; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; +import org.onap.policy.model.Roles; import org.onap.policy.xacml.api.pap.OnapPDPGroup; import org.onap.policy.xacml.std.pap.StdPDPGroup; import org.onap.policy.xacml.std.pap.StdPDPGroupStatus; -import org.openecomp.policy.model.Roles; import org.springframework.mock.web.MockHttpServletResponse;