diff options
author | Kotagiri, Ramprasad (rp5662) <rp5662@att.com> | 2020-08-07 15:54:10 -0400 |
---|---|---|
committer | Kotagiri, Ramprasad (rp5662) <rp5662@att.com> | 2020-08-12 12:38:26 -0400 |
commit | 09762dc92a06fb885f7055796db390a3a1baa535 (patch) | |
tree | e377c24a2cccb0a7d90b7b8560a7d8eef048a610 /ccsdk-app-os/src/main | |
parent | f796af3a840d0fd9319e3dfe45ef0e548cd90171 (diff) |
CCSDK DCAE dashboard feature changes
Issue-ID: DCAEGEN2-1857
Issue-ID: DCAEGEN2-2074
Issue-ID: DCAEGEN2-2364
Change-Id: I97f5ec4599512ed848136971b11d4c2a137a4999
Signed-off-by: Kotagiri, Ramprasad (rp5662) <rp5662@att.com>
Diffstat (limited to 'ccsdk-app-os/src/main')
27 files changed, 2453 insertions, 883 deletions
diff --git a/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java b/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java index 807ae78..665e0da 100644 --- a/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java +++ b/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java @@ -21,18 +21,16 @@ package org.onap.portalapp.conf; import java.util.ArrayList; import java.util.List; - -import org.onap.portalapp.lm.FusionLicenseManagerImpl; import org.onap.portalapp.login.LoginStrategyImpl; import org.onap.portalapp.controller.core.SingleSignOnController; import org.onap.portalapp.controller.sample.ElasticSearchController; import org.onap.portalapp.controller.sample.PostDroolsController; +import org.onap.portalapp.interceptor.AuthenticationInterceptor; +import org.onap.portalapp.interceptor.AuthorizationInterceptor; import org.onap.portalapp.scheduler.LogRegistry; 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.lm.FusionLicenseManager; -// import org.onap.portalsdk.core.lm.FusionLicenseManagerUtils; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.portalsdk.core.objectcache.AbstractCacheManager; import org.onap.portalsdk.core.scheduler.CoreRegister; @@ -54,6 +52,7 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; + /** * ECOMP Portal SDK sample application. ECOMP Portal SDK core AppConfig class to * reuse interceptors, view resolvers and other features defined there. @@ -75,6 +74,8 @@ public class ExternalAppConfig extends AppConfig implements Configurable { private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExternalAppConfig.class); + private static final String HEALTH = "/health*"; + @Configuration @Import(SystemProperties.class) static class InnerConfiguration { @@ -133,6 +134,16 @@ public class ExternalAppConfig extends AppConfig implements Configurable { return definitions; } + @Bean + public AuthenticationInterceptor authenticationInterceptor() { + return new AuthenticationInterceptor(); + } + + @Bean + public AuthorizationInterceptor authorizationInterceptor() { + return new AuthorizationInterceptor(); + } + /** * Adds request interceptors to the specified registry by calling * {@link AppConfig#addInterceptors(InterceptorRegistry)}, but excludes @@ -140,6 +151,8 @@ public class ExternalAppConfig extends AppConfig implements Configurable { */ @Override public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(authenticationInterceptor()).addPathPatterns("/nb-api/**"); + registry.addInterceptor(authorizationInterceptor()).addPathPatterns("/nb-api/**"); super.setExcludeUrlPathsForSessionTimeout("/login_external", "*/login_external.htm", "login", "/login.htm", "/api*", "/single_signon.htm", "/single_signon", "/health*", "/nb-api/**"); @@ -171,4 +184,5 @@ public class ExternalAppConfig extends AppConfig implements Configurable { public LoginStrategy loginStrategy() { return new LoginStrategyImpl(); } + } diff --git a/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java b/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java index 9c6b95e..2624e2f 100644 --- a/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java +++ b/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java @@ -19,11 +19,31 @@ */ package org.onap.portalapp.conf; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; + import org.onap.ccsdk.dashboard.util.DashboardProperties; import org.onap.portalsdk.core.conf.AppInitializer; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.core.env.ConfigurableEnvironment; +import org.springframework.web.context.WebApplicationContext; public class ExternalAppInitializer extends AppInitializer { + /* + @Override + protected WebApplicationContext createServletApplicationContext() { + WebApplicationContext context = super.createServletApplicationContext(); + try { + ((ConfigurableEnvironment) context.getEnvironment()).setActiveProfiles("onap"); + } catch (Exception e) { + System.out.println("Unable to set the active profile" + e.getMessage()); + //throw e; + } + return context; + } +*/ @Override protected Class<?>[] getRootConfigClasses() { return super.getRootConfigClasses(); diff --git a/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java b/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java index 673fc8d..844ae36 100644 --- a/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java +++ b/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java @@ -43,8 +43,8 @@ public class HibernateMappingLocations implements HibernateMappingLocatable { // a leading slash gets stripped so don't bother. // new ClassPathResource("../fusion/orm/Fusion.hbm.xml"), // This is a COPY to work around a bug in the 1.1.0 release. - new ClassPathResource("../fusion/orm/Fusion.hbm.xml"), - new ClassPathResource("../oom-app.hbm.xml")}; + new ClassPathResource("../fusion/orm/Fusion.hbm.xml")}; + //new ClassPathResource("../oom-app.hbm.xml")}; } /* diff --git a/ccsdk-app-os/src/main/java/org/onap/portalapp/interceptor/AuthenticationInterceptor.java b/ccsdk-app-os/src/main/java/org/onap/portalapp/interceptor/AuthenticationInterceptor.java new file mode 100644 index 0000000..206f364 --- /dev/null +++ b/ccsdk-app-os/src/main/java/org/onap/portalapp/interceptor/AuthenticationInterceptor.java @@ -0,0 +1,102 @@ +/******************************************************************************* + * =============LICENSE_START========================================================= + * + * ================================================================================= + * Copyright (c) 2020 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.portalapp.interceptor; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +//import javax.xml.bind.DatatypeConverter; +import java.util.Base64; + +import org.apache.http.HttpStatus; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.service.UserProfileService; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.servlet.HandlerInterceptor; +import org.springframework.web.servlet.ModelAndView; + +public class AuthenticationInterceptor implements HandlerInterceptor { + + @Autowired + private UserProfileService userSvc; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { + String authString = request.getHeader("Authorization"); + try { + if(authString == null || authString.isEmpty()) + { + response.setStatus(HttpStatus.SC_UNAUTHORIZED); + response.sendError(HttpStatus.SC_UNAUTHORIZED, "Authentication information is missing"); + return false; //Do not continue with request + } else { + String decodedAuth = ""; + String[] authParts = authString.split("\\s+"); + String authInfo = authParts[1]; + byte[] bytes = null; + bytes = Base64.getDecoder().decode(authInfo); + //DatatypeConverter.parseBase64Binary(authInfo); + decodedAuth = new String(bytes,StandardCharsets.UTF_8); + String[] authen = decodedAuth.split(":"); + + if (authen.length > 1) { + User user = userSvc.getUserByLoginId(authen[0]); + if (user == null) { + response.sendError(HttpStatus.SC_UNAUTHORIZED, "Un-authorized to perform this operation"); + return false; + } +/* ResponseEntity<String> getResponse = + userSrvc.checkUserExists(authen[0], authen[1]); + if (getResponse.getStatusCode().value() != 200) { + response.sendError(HttpStatus.SC_UNAUTHORIZED, "Un-authorized to perform this operation"); + return false; + }*/ + } else { + return false; + } + } + } catch (Exception e) { + try { + response.sendError(HttpStatus.SC_UNAUTHORIZED, e.getMessage()); + } catch (IOException e1) { + return false; + } + return false; + } + return true; //Continue with request + } + + @Override + public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, + ModelAndView modelAndView) throws Exception { + //Ignore + } + + @Override + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) + throws Exception { + //Ignore + } +} diff --git a/ccsdk-app-os/src/main/java/org/onap/portalapp/interceptor/AuthorizationInterceptor.java b/ccsdk-app-os/src/main/java/org/onap/portalapp/interceptor/AuthorizationInterceptor.java new file mode 100644 index 0000000..2f3362b --- /dev/null +++ b/ccsdk-app-os/src/main/java/org/onap/portalapp/interceptor/AuthorizationInterceptor.java @@ -0,0 +1,62 @@ +/******************************************************************************* + * =============LICENSE_START========================================================= + * + * ================================================================================= + * Copyright (c) 2020 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.portalapp.interceptor; + +import java.util.HashSet; +import java.util.Set; +import java.util.TreeSet; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.HandlerInterceptor; +import org.springframework.web.servlet.ModelAndView; + +import com.fasterxml.jackson.databind.ObjectMapper; + +public class AuthorizationInterceptor implements HandlerInterceptor { + + protected final ObjectMapper objectMapper = new ObjectMapper(); + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + Set<String> userRoleSet = new HashSet<String>(); + Set<String> userApps = new TreeSet<>(); + userRoleSet.add("Standard User"); + userRoleSet.add("ECOMPC_DCAE_WRITE"); + userApps.add("dcae"); + request.setAttribute("userRoles", userRoleSet); + request.setAttribute("userApps", userApps); + return true; //Continue with request + } + + @Override + public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, + ModelAndView modelAndView) throws Exception { + //Ignore + } + + @Override + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) + throws Exception { + //Ignore + } +} diff --git a/ccsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java b/ccsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java index b628772..d7c9ab7 100644 --- a/ccsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java +++ b/ccsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java @@ -20,22 +20,129 @@ package org.onap.portalapp.login; +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Predicate; + 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.command.LoginBean; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.domain.FusionObject.Parameters; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.menu.MenuProperties; import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; import org.onap.portalsdk.core.onboarding.util.CipherUtil; import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.service.LoginService; +import org.onap.portalsdk.core.service.RoleService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.web.support.UserUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.servlet.ModelAndView; public class LoginStrategyImpl extends LoginStrategy { EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LoginStrategyImpl.class); + @Autowired + private LoginService loginService; + + @Autowired + private RoleService roleService; + + @Override + public ModelAndView doExternalLogin(HttpServletRequest request, HttpServletResponse response) throws IOException { + + invalidateExistingSession(request); + + LoginBean commandBean = new LoginBean(); + String loginId = request.getParameter("loginId"); + String password = request.getParameter("password"); + commandBean.setLoginId(loginId); + commandBean.setLoginPwd(password); + //commandBean.setUserid(loginId); + commandBean = loginService.findUser(commandBean, + (String) request.getAttribute(MenuProperties.MENU_PROPERTIES_FILENAME_KEY), new HashMap()); + List<RoleFunction> roleFunctionList = roleService.getRoleFunctions(loginId); + + if (commandBean.getUser() == null) { + String loginErrorMessage = (commandBean.getLoginErrorMessage() != null) ? commandBean.getLoginErrorMessage() + : "login.error.external.invalid - User name and/or password incorrect"; + Map<String, String> model = new HashMap<>(); + model.put("error", loginErrorMessage); + return new ModelAndView("login_external", "model", model); + } else { + // store the currently logged in user's information in the session + UserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(), + commandBean.getBusinessDirectMenu(), + SystemProperties.getProperty(SystemProperties.LOGIN_METHOD_BACKDOOR), roleFunctionList); + // set the user's max role level in session + final String adminRole = "System Administrator"; + final String standardRole = "Standard User"; + final String readRole = "Read Access"; + final String writeRole = "Write Access"; + + String maxRole = ""; + String authType = "READ"; + String accessLevel = "app"; + + Predicate<Role> adminRoleFilter = + p -> p.getName() != null && p.getName().equalsIgnoreCase(adminRole); + + Predicate<Role> writeRoleFilter = + p -> p.getName() != null && (p.getName().equalsIgnoreCase(writeRole) || p.getName().equalsIgnoreCase(standardRole)); + + Predicate<Role> readRoleFilter = + p -> p.getName() != null && (p.getName().equalsIgnoreCase(readRole) ); + + if (UserUtils.getUserSession(request) != null) { + @SuppressWarnings("unchecked") + Collection<org.onap.portalsdk.core.domain.Role> userRoles = + UserUtils.getRoles(request).values(); + if (userRoles.stream().anyMatch(adminRoleFilter) ) { + maxRole = "admin"; + } else if (userRoles.stream().anyMatch(writeRoleFilter) ) { + maxRole = "write"; + } else if (userRoles.stream().anyMatch(readRoleFilter) ) { + maxRole = "read"; + } + switch(maxRole) { + case "admin": + authType = "ADMIN"; + accessLevel = "ops"; + break; + case "write": + authType = "WRITE"; + accessLevel = "dev"; + break; + case "read": + authType = "READ"; + accessLevel = "dev"; + break; + default: + accessLevel = "app"; + } + } + AppUtils.getSession(request).setAttribute("role_level", accessLevel); + AppUtils.getSession(request).setAttribute("auth_role", authType); + initateSessionMgtHandler(request); + // user has been authenticated, now take them to the welcome page + return new ModelAndView("redirect:welcome"); + } + } + @Override public ModelAndView doLogin(HttpServletRequest request, HttpServletResponse response) throws Exception { diff --git a/ccsdk-app-os/src/main/resources/portal.properties b/ccsdk-app-os/src/main/resources/portal.properties index 88ef37c..1ab01ef 100644 --- a/ccsdk-app-os/src/main/resources/portal.properties +++ b/ccsdk-app-os/src/main/resources/portal.properties @@ -27,6 +27,9 @@ portal.api.prefix = /api max.idle.time = 5
user.attribute.name = user_attribute
+# CSP Global Log On for single sign on
+ecomp_redirect_url = https://webtest.csp.att.com/ecompportal/
+
# URL of the ECOMP Portal REST API
ecomp_rest_url = http://portal.api.simpledemo.openecomp.org/ecompportal/auxapi
diff --git a/ccsdk-app-os/src/main/resources/swagger.json b/ccsdk-app-os/src/main/resources/swagger.json index 9335e72..7a02e5a 100644 --- a/ccsdk-app-os/src/main/resources/swagger.json +++ b/ccsdk-app-os/src/main/resources/swagger.json @@ -2,14 +2,14 @@ "swagger": "2.0", "info": { "description": "API to manage deployment of microservices using blueprints.", - "version": "1.3.0", + "version": "1.4.0", "title": "DCAE Dashboard API", "contact": { "email": "rp5662@att.com" } }, "host": "dcae-dashboard:8080", - "basePath": "/ccsdk-app/nb-api", + "basePath": "/ccsdk-app/nb-api/v2", "tags": [ { "name": "Blueprints", @@ -22,10 +22,6 @@ { "name": "Tenants", "description": "Query Cloudify Tenants" - }, - { - "name": "Components", - "description": "Query on-boarded components" } ], "schemes": [ @@ -61,73 +57,12 @@ } } }, - "/components": { - "get": { - "tags": [ - "Components" - ], - "summary": "Lists all application components", - "description": "Query all components from database", - "operationId": "List Components", - "produces": [ - "application/json" - ], - "parameters": [], - "responses": { - "200": { - "description": "successful operation", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Component" - } - } - }, - "400": { - "description": "Invalid status value" - } - } - }, - "post": { - "tags": [ - "Components" - ], - "summary": "add an application component", - "description": "Insert a component into database", - "operationId": "Add Component", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "description": "New component input", - "required": true, - "schema": { - "$ref": "#/definitions/ComponentInput" - } - } - ], - "responses": { - "200": { - "description": "successful operation", - "schema": { - "type": "object" - } - }, - "400": { - "description": "Invalid status value" - } - } - } - }, "/deployments": { "get": { "tags": [ "Deployments" ], - "summary": "Lists all Deployments", + "summary": "List all Deployments", "description": "Query all deployments or Service objects from Inventory", "operationId": "List Deployments", "produces": [ @@ -287,7 +222,7 @@ "tags": [ "Deployments" ], - "summary": "Gets a Deployment", + "summary": "Get a Deployment", "description": "Query a deployment or Service object from Inventory", "operationId": "Get Deployment", "produces": [ @@ -318,51 +253,6 @@ } } }, - "/deployments/{deploymentId}/update": { - "put": { - "tags": [ - "Deployments" - ], - "summary": "Update an existing deployment", - "description": "Dispatch a request to Deployment handler mS to use Cloudify deployment update operation ", - "operationId": "Update Deployment", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "deploymentId", - "in": "path", - "description": "ID of deployment to update", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "description": "Inputs to initiate a deployment: blueprint ID from inventory, Cloudify tenant name, blueprint inputs", - "required": true, - "schema": { - "$ref": "#/definitions/DeploymentInput" - } - } - ], - "responses": { - "400": { - "description": "Invalid ID supplied" - }, - "404": { - "description": "Deployment not found" - }, - "405": { - "description": "Validation exception" - } - } - } - }, "/deployments/{deploymentId}/executions": { "get": { "tags": [ @@ -622,56 +512,6 @@ } } } - }, - "/blueprints/findByName": { - "get": { - "tags": [ - "Blueprints" - ], - "summary": "Find a blueprint by a name pattern", - "description": "Fetch the blueprint objects from inventory whose names match a string pattern", - "operationId": "Get Blueprint", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "name pattern to filter by", - "required": true, - "type": "string" - }, - { - "name": "_include", - "in": "query", - "description": "blueprint object properties need to be considered for filter", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "typeName", - "typeId", - "typeVersion" - ], - "default": "typeName" - }, - "collectionFormat": "multi" - } - ], - "responses": { - "200": { - "description": "List of `DCAEServiceType` objects", - "schema": { - "$ref": "#/definitions/InlineResponse200" - } - }, - "400": { - "description": "Invalid tag value" - } - } - } } }, "responses": { @@ -694,22 +534,6 @@ } } }, - "Component": { - "type": "object", - "properties": { - "compId": { - "type": "integer" - }, - "cname": { - "type": "string", - "description": "component namespace name" - }, - "dname": { - "type": "string", - "description": "component display name" - } - } - }, "ComponentInput": { "type": "object", "properties": { @@ -1218,4 +1042,4 @@ "description": "Find out more about Swagger", "url": "http://swagger.io" } -} +}
\ No newline at end of file diff --git a/ccsdk-app-os/src/main/webapp/WEB-INF/conf/dashboard.properties b/ccsdk-app-os/src/main/webapp/WEB-INF/conf/dashboard.properties index 9e221cd..a43f85c 100644 --- a/ccsdk-app-os/src/main/webapp/WEB-INF/conf/dashboard.properties +++ b/ccsdk-app-os/src/main/webapp/WEB-INF/conf/dashboard.properties @@ -21,24 +21,25 @@ # Properties for the ONAP Controller Dashboard webapp -# Set to true to use local copies of controller data -controller.mock.data = false +# dashboard.properties -# for ONAP or other type -controller.type = os +# Properties for the Dashboard webapp +# YAML would represent this more elegantly, but Spring likes properties. +# Controllers - a key for each set of properties "key.propKey" below. controller.env = dev -# YAML would represent this more elegantly, but Spring likes properties. -controller.key.list = dev +controller.site.list = primary -dev.name = Local -dev.url = https://dashboard.onap.svc.cluster.local/api/v3.1 -dev.inventory.url = https://inventory.onap.svc.cluster.local:8443/ -dev.dhandler.url = https://dplh.onap.svc.cluster.local:8443/ -dev.consul.url = https://cnsl.onap.svc.cluster.local:9500/ +site.primary.name = mtn23a +site.primary.cloudify.url = https://eom-orcl-d14.ecomp.idns.cip.att.com/api/v3.1 +site.primary.consul.url = https://eom-cnsl-d14.ecomp.idns.cip.att.com:9500/ +site.primary.inventory.url = https://eom-invt-d14.ecomp.idns.cip.att.com:30123 +site.primary.dhandler.url = https://eom-dplh-d14.ecomp.idns.cip.att.com:30125/ +site.primary.dbcl.url = https://ecompc-dbclgui-dev-s5.ecomp.idns.cip.att.com:30162/dmaap-bc-app/doLogin +site.primary.feed_m.url = https://feedM.com +site.primary.cloudify.username = admin +site.primary.cloudify.password = Cloudify_local +site.primary.cloudify.is_encrypted = false -dev.username = admin -dev.password = admin -dev.is_encrypted = false diff --git a/ccsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp b/ccsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp index b0b63dd..f54662f 100644 --- a/ccsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp +++ b/ccsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp @@ -24,6 +24,9 @@ final String appDisplayName = SystemProperties.containsProperty(SystemProperties.APP_DISPLAY_NAME)
? SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME)
: SystemProperties.APP_DISPLAY_NAME;
+ String signUpPage = "signup.htm";
+ String signupUrl = (request.isSecure() ? "https://" : "http://") + request.getServerName() + ":"
+ + request.getServerPort() + request.getContextPath() + "/" + signUpPage;
%>
<html>
@@ -73,6 +76,30 @@ margin-left: auto;
margin-right: auto;
}
+ .formIn {
+ width: 200px;
+ height:25px;
+ border-radius: 4px;
+ font-size:18px;
+ padding-left:5px;
+ background-color: #f1ecec;
+ }
+ #regLink {
+ background: #0081a4;
+ border-radius: 3px;
+ padding: 4px;
+ font-size: large;
+ font-weight: bold;
+ text-decoration: none;
+ color: black;
+ }
+ #formDiv {
+ background-color: #0081a4b0;
+ width: 300px;
+ margin-left: auto;
+ margin-right: auto;
+ padding-bottom: 10px;
+ }
</style>
</head>
<body>
@@ -81,19 +108,20 @@ <h2>
<%=appDisplayName%>
</h2>
- <br />
- <form action="login_external" method="POST">
- <label for="loginId">Login ID:</label>
- <input id="loginId" name="loginId" type="text" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;" maxlength="30">
- <br/>
- <br/>
- <label for="password">Password:</label>
- <input id="password" name="password" type="password" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;"
- maxlength="30" >
- <br />
- <br />
- <input id="loginBtn" type="submit" alt="Login" value="Login">
- </form>
+ <div id="formDiv">
+ <form action="login_external" method="POST">
+ <h3> Login </h3>
+ <input class="formIn" id="loginId" name="loginId" type="text" maxlength="30" placeholder="User ID">
+ <br>
+ <br>
+ <input class="formIn" id="password" name="password" type="password" maxlength="30" placeholder="Password">
+ <br>
+ <br>
+ <input id="loginBtn" type="submit" alt="Login" value="LOG IN" style="width: 200px; font-weight: bolder;">
+ </form>
+ <br>
+ <p>Not registered yet? <a id="regLink" href="<%=signupUrl%>">Sign up</a></p>
+ </div>
</div>
<br />
<br />
diff --git a/ccsdk-app-os/src/main/webapp/WEB-INF/jsp/signup.jsp b/ccsdk-app-os/src/main/webapp/WEB-INF/jsp/signup.jsp new file mode 100644 index 0000000..421f72a --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/WEB-INF/jsp/signup.jsp @@ -0,0 +1,128 @@ +<%@ page import="org.onap.portalsdk.core.util.SystemProperties"%> +<!DOCTYPE html> +<% + // Name is defined by app; do not throw if missing + final String appDisplayName = SystemProperties.containsProperty(SystemProperties.APP_DISPLAY_NAME) + ? SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME) + : SystemProperties.APP_DISPLAY_NAME; + String loginPage = "login_external.htm"; + String loginUrl = (request.isSecure() ? "https://" : "http://") + request.getServerName() + ":" + + request.getServerPort() + request.getContextPath() + "/" + loginPage; +%> +<html> +<head> +<meta charset="ISO-8859-1"> +<title>Sign up / Register</title> +<style> + html { + font-family: Verdana, Arial, Helvetica, sans-serif; + } + body { + padding-top: 15px; + } + .logo { + position: fixed; + left: 15px; + top: 15px; + z-index: -1; + } + .loginError { + font-size: 18px; + color: red; + text-align: center; + } + .login { + font-size: 16px; + display: block; + margin-left: auto; + margin-right: auto; + text-align: center; + width: 100%; + } + .login input[type=submit] { + font-size: 16px; + } + .terms { + font-size: 10px; + text-align: center; + margin-left: auto; + margin-right: auto; + } + .terms a { + font-size: 10px; + text-align: center; + margin-left: auto; + margin-right: auto; + } + .formIn { + width: 200px; + height:25px; + border-radius: 4px; + font-size:18px; + padding-left:5px; + background-color: #f1ecec; + } + #regLink { + background: #0081a4; + border-radius: 3px; + padding: 4px; + font-size: large; + font-weight: bold; + text-decoration: none; + color: black; + } + #formDiv { + background-color: #0081a4b0; + width: 300px; + margin-left: auto; + margin-right: auto; + padding-bottom: 10px; + } + </style> + +</head> +<body> + <div class="login"> + <img src="app/ccsdk/images/onap_logo_2257x496.png" style="height: 150px;" /> + <h2> + <%=appDisplayName%> + </h2> + <div id="formDiv"> + <form action="signup" method="POST"> + <h3>Sign Up</h3> + <input id="first" class="formIn" name="first" type="text" maxlength="30" placeholder="First Name"> + <br/> + <br/> + <input id="last" class="formIn" name="last" type="text" maxlength="30" placeholder="Last Name"> + <br/> + <br/> + <input id="loginId" class="formIn" name="loginId" type="text" maxlength="30" placeholder="User ID"> + <br/> + <br/> + <input id="password" class="formIn" name="password" type="password" maxlength="30" placeholder="Password"> + <br /> + <br /> + <input id="email" class="formIn" name="email" type="text" maxlength="30" placeholder="Email"> + <br /> + <br /> + <input id="loginBtn" type="submit" alt="Login" value="SIGN UP" style="width: 200px; font-weight: bolder;"> + </form> + <br> + <p>Already registered? <a id="regLink" href="<%=loginUrl%>"> Login</a></p> + </div> + </div> + <br /> + <br /> + <div class="loginError">${model.error}</div> + <br /> + <br /> + <br /> + <div id="footer"> + <div class="terms"> + <p class="copyright-text"> + © 2020 ONAP. The Linux Foundation. + </p> + </div> + </div> +</body> +</html>
\ No newline at end of file diff --git a/ccsdk-app-os/src/main/webapp/WEB-INF/oom-app-definitions.xml b/ccsdk-app-os/src/main/webapp/WEB-INF/oom-app-definitions.xml new file mode 100644 index 0000000..5fcc6c8 --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/WEB-INF/oom-app-definitions.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + =============LICENSE_START========================================================= + + ================================================================================= + 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========================================================= + + ECOMP is a trademark and service mark of AT&T Intellectual Property. + --> + +<!DOCTYPE tiles-definitions PUBLIC + "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN" + "http://tiles.apache.org/dtds/tiles-config_3_0.dtd"> +<tiles-definitions> + + <!-- Main page for the single-page app --> + <definition name="ecd_home_tdkey" template="/app/ccsdk/home/oom_spa.html"/> + <definition name="welcome" + template="/app/fusion/scripts/DS2-view-models/welcome.html" /> +</tiles-definitions> diff --git a/ccsdk-app-os/src/main/webapp/WEB-INF/oom-app.hbm.xml b/ccsdk-app-os/src/main/webapp/WEB-INF/oom-app.hbm.xml new file mode 100644 index 0000000..b302346 --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/WEB-INF/oom-app.hbm.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<!-- + =============LICENSE_START========================================================= + + ================================================================================= + 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========================================================= + + ECOMP is a trademark and service mark of AT&T Intellectual Property. + --> + +<!DOCTYPE hibernate-mapping PUBLIC + "-//Hibernate/Hibernate Mapping DTD 3.0//EN" + "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> + +<hibernate-mapping package="org.onap.ccsdk.dashboard.domain"> + + <!-- class mapping details --> + <class name="ControllerEndpoint" table="ecd_endpoint"> + <id name="userId" column="user_id" /> + <property name="name" column="name"/> + <property name="url" column="url"/> + </class> + <class name="EcdComponent" table="ecd_component"> + <id name="compId" column="ecd_component_id"> + <generator class="native"> + <param name="sequence">seq_ecd_component</param> + </generator> + </id> + <property name="cname" column="ecd_component_name"/> + <property name="dname" column="ecd_component_display"/> + </class> + <query name="getAllComponents"> + FROM EcdComponent + </query> + +</hibernate-mapping> diff --git a/ccsdk-app-os/src/main/webapp/api-specs.html b/ccsdk-app-os/src/main/webapp/api-specs.html index e5c5dfc..9a7d498 100644 --- a/ccsdk-app-os/src/main/webapp/api-specs.html +++ b/ccsdk-app-os/src/main/webapp/api-specs.html @@ -1500,7 +1500,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc <ul class="toc-list-h1"> <li> - <a href="#dcae-dashboard-api" class="toc-h1 toc-link" data-title="DCAE Dashboard API v1.0.0">DCAE Dashboard API v1.0.0</a> + <a href="#dcae-dashboard-api" class="toc-h1 toc-link" data-title="DCAE Dashboard API v1.4.0">DCAE Dashboard API v1.4.0</a> </li> @@ -1510,27 +1510,22 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc <ul class="toc-list-h2"> <li> - <a href="#find-all-blueprint-templates" class="toc-h2 toc-link" data-title="">Find all blueprint templates</a> + <a href="#list-blueprints" class="toc-h2 toc-link" data-title="">List Blueprints</a> </li> <li> - <a href="#create-upload-a-new-blueprint-template" class="toc-h2 toc-link" data-title="">Create/Upload a new blueprint template</a> + <a href="#create-blueprint" class="toc-h2 toc-link" data-title="">Create Blueprint</a> </li> <li> - <a href="#delete-a-blueprint-template" class="toc-h2 toc-link" data-title="">Delete a blueprint template</a> + <a href="#delete-blueprint" class="toc-h2 toc-link" data-title="">Delete Blueprint</a> </li> <li> - <a href="#get-services-mapped-to-a-blueprint-template" class="toc-h2 toc-link" data-title="">Get Services mapped to a blueprint template</a> - - </li> - - <li> - <a href="#find-a-blueprint-by-a-name-pattern" class="toc-h2 toc-link" data-title="">Find a blueprint by a name pattern</a> + <a href="#get-deployments-for-a-blueprint" class="toc-h2 toc-link" data-title="">Get Deployments for a blueprint</a> </li> @@ -1544,47 +1539,42 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc <ul class="toc-list-h2"> <li> - <a href="#lists-all-deployments" class="toc-h2 toc-link" data-title="">Lists all Deployments</a> - - </li> - - <li> - <a href="#initiate-a-deployment--install--operation-for-an-application-or-service" class="toc-h2 toc-link" data-title="">Initiate a deployment (install) operation for an application or service</a> + <a href="#list-deployments" class="toc-h2 toc-link" data-title="">List Deployments</a> </li> <li> - <a href="#initiate-an-uninstall-operation-for-an-application-or-service" class="toc-h2 toc-link" data-title="">Initiate an uninstall operation for an application or service</a> + <a href="#create-deployment" class="toc-h2 toc-link" data-title="">Create Deployment</a> </li> <li> - <a href="#upgrade-or-rollback-an-existing-deployment-using-cloudify-helm-plugin" class="toc-h2 toc-link" data-title="">Upgrade or Rollback an existing deployment using Cloudify Helm plugin</a> + <a href="#delete-deployment" class="toc-h2 toc-link" data-title="">Delete Deployment</a> </li> <li> - <a href="#gets-a-deployment" class="toc-h2 toc-link" data-title="">Gets a Deployment</a> + <a href="#upgrade_rollback-deployment" class="toc-h2 toc-link" data-title="">Upgrade_Rollback Deployment</a> </li> <li> - <a href="#update-an-existing-deployment" class="toc-h2 toc-link" data-title="">Update an existing deployment</a> + <a href="#get-deployment" class="toc-h2 toc-link" data-title="">Get Deployment</a> </li> <li> - <a href="#deployment-execution-status" class="toc-h2 toc-link" data-title="">Deployment execution status</a> + <a href="#deployment-status" class="toc-h2 toc-link" data-title="">Deployment Status</a> </li> <li> - <a href="#deployment-health-status" class="toc-h2 toc-link" data-title="">Deployment health status</a> + <a href="#deployment-health" class="toc-h2 toc-link" data-title="">Deployment health</a> </li> <li> - <a href="#deployment-inputs" class="toc-h2 toc-link" data-title="">Deployment inputs</a> + <a href="#deployment-inputs" class="toc-h2 toc-link" data-title="">Deployment Inputs</a> </li> @@ -1598,26 +1588,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc <ul class="toc-list-h2"> <li> - <a href="#lists-all-cloudify-tenants" class="toc-h2 toc-link" data-title="">Lists all Cloudify Tenants</a> - - </li> - - </ul> - - </li> - - <li> - <a href="#dcae-dashboard-api-components" class="toc-h1 toc-link" data-title="Components">Components</a> - - <ul class="toc-list-h2"> - - <li> - <a href="#lists-all-application-components" class="toc-h2 toc-link" data-title="">Lists all application components</a> - - </li> - - <li> - <a href="#add-an-application-component" class="toc-h2 toc-link" data-title="">add an application component</a> + <a href="#list-tenants" class="toc-h2 toc-link" data-title="">List Tenants</a> </li> @@ -1636,11 +1607,6 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc </li> <li> - <a href="#tocscomponent" class="toc-h2 toc-link" data-title="">Component</a> - - </li> - - <li> <a href="#tocscomponentinput" class="toc-h2 toc-link" data-title="">ComponentInput</a> </li> @@ -1747,7 +1713,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc <div class="page-wrapper"> <div class="dark-box"></div> <div class="content"> - <h1 id="dcae-dashboard-api">DCAE Dashboard API v1.0.0</h1> + <h1 id="dcae-dashboard-api">DCAE Dashboard API v1.4.0</h1> <blockquote> <p>Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.</p> </blockquote> @@ -1755,16 +1721,16 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc <p>Base URLs:</p> <ul> <li> -<p><a href="https://dcae-dashboard:8080/ccsdk-app/nb-api">https://dcae-dashboard:8080/ccsdk-app/nb-api</a></p> +<p><a href="https://dcae-dashboard:8080/ccsdk-app/nb-api/v2">https://dcae-dashboard:8080/ccsdk-app/nb-api/v2</a></p> </li> <li> -<p><a href="http://dcae-dashboard:8080/ccsdk-app/nb-api">http://dcae-dashboard:8080/ccsdk-app/nb-api</a></p> +<p><a href="http://dcae-dashboard:8080/ccsdk-app/nb-api/v2">http://dcae-dashboard:8080/ccsdk-app/nb-api/v2</a></p> </li> </ul> <p>Email: <a href="mailto:rp5662@att.com">Support</a></p> <h1 id="dcae-dashboard-api-blueprints">Blueprints</h1> <p>Query blueprint information</p> -<h2 id="find-all-blueprint-templates">Find all blueprint templates</h2> +<h2 id="list-blueprints">List Blueprints</h2> <p><a id="opIdList Blueprints"></a></p> <blockquote> <p>Code samples</p> @@ -1774,7 +1740,7 @@ headers = { <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> } -r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints'</span>, params={ +r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/blueprints'</span>, params={ <span class="hljs-string">'pageNum'</span>: <span class="hljs-string">'string'</span>, <span class="hljs-string">'viewPerPage'</span>: <span class="hljs-string">'string'</span> }, headers = headers) @@ -1782,13 +1748,14 @@ r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-ap </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints?pageNum=string&viewPerPage=string \ +curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/blueprints?pageNum=string&viewPerPage=string \ -H <span class="hljs-string">'Accept: application/json'</span> </code></pre> <p><code>GET /blueprints</code></p> +<p><em>Find all blueprint templates</em></p> <p>Fetch the blueprints data from inventory</p> -<h3 id="find-all-blueprint-templates-parameters">Parameters</h3> +<h3 id="list-blueprints-parameters">Parameters</h3> <table> <thead> <tr> @@ -1917,13 +1884,13 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints?pageNum=stri }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"deactivated"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span> + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"deactivated"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span> } ] } </code></pre> -<h3 id="find-all-blueprint-templates-responses">Responses</h3> +<h3 id="list-blueprints-responses">Responses</h3> <table> <thead> <tr> @@ -1951,7 +1918,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints?pageNum=stri <aside class="success"> This operation does not require authentication </aside> -<h2 id="create-upload-a-new-blueprint-template">Create/Upload a new blueprint template</h2> +<h2 id="create-blueprint">Create Blueprint</h2> <p><a id="opIdCreate Blueprint"></a></p> <blockquote> <p>Code samples</p> @@ -1962,7 +1929,7 @@ headers = { <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> } -r = requests.post(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints'</span>, params={ +r = requests.post(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/blueprints'</span>, params={ }, headers = headers) @@ -1970,12 +1937,13 @@ r = requests.post(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-a </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X POST https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints \ +curl -X POST https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/blueprints \ -H <span class="hljs-string">'Content-Type: application/json'</span> \ -H <span class="hljs-string">'Accept: application/json'</span> </code></pre> <p><code>POST /blueprints</code></p> +<p><em>Create/Upload a new blueprint template</em></p> <p>Upload a new blueprint template into inventory</p> <blockquote> <p>Body parameter</p> @@ -1989,7 +1957,7 @@ curl -X POST https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints \ <span class="hljs-attr">"component"</span>: <span class="hljs-string">"string"</span> } </code></pre> -<h3 id="create-upload-a-new-blueprint-template-parameters">Parameters</h3> +<h3 id="create-blueprint-parameters">Parameters</h3> <table> <thead> <tr> @@ -2081,13 +2049,13 @@ curl -X POST https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints \ }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"deactivated"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span> + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"deactivated"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span> } ] } </code></pre> -<h3 id="create-upload-a-new-blueprint-template-responses">Responses</h3> +<h3 id="create-blueprint-responses">Responses</h3> <table> <thead> <tr> @@ -2115,14 +2083,14 @@ curl -X POST https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints \ <aside class="success"> This operation does not require authentication </aside> -<h2 id="delete-a-blueprint-template">Delete a blueprint template</h2> +<h2 id="delete-blueprint">Delete Blueprint</h2> <p><a id="opIdDelete Blueprint"></a></p> <blockquote> <p>Code samples</p> </blockquote> <pre class="highlight tab tab-python"><code><span class="hljs-keyword">import</span> requests -r = requests.delete(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints/{typeId}'</span>, params={ +r = requests.delete(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/blueprints/{typeId}'</span>, params={ ) @@ -2130,12 +2098,13 @@ r = requests.delete(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X DELETE https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints/{typeId} +curl -X DELETE https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/blueprints/{typeId} </code></pre> <p><code>DELETE /blueprints/{typeId}</code></p> +<p><em>Delete a blueprint template</em></p> <p>Delete a blueprint template from inventory</p> -<h3 id="delete-a-blueprint-template-parameters">Parameters</h3> +<h3 id="delete-blueprint-parameters">Parameters</h3> <table> <thead> <tr> @@ -2156,7 +2125,7 @@ curl -X DELETE https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints/{typeId} </tr> </tbody> </table> -<h3 id="delete-a-blueprint-template-responses">Responses</h3> +<h3 id="delete-blueprint-responses">Responses</h3> <table> <thead> <tr> @@ -2178,14 +2147,14 @@ curl -X DELETE https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints/{typeId} <aside class="success"> This operation does not require authentication </aside> -<h2 id="get-services-mapped-to-a-blueprint-template">Get Services mapped to a blueprint template</h2> +<h2 id="get-deployments-for-a-blueprint">Get Deployments for a blueprint</h2> <p><a id="opIdGet Deployments for a blueprint"></a></p> <blockquote> <p>Code samples</p> </blockquote> <pre class="highlight tab tab-python"><code><span class="hljs-keyword">import</span> requests -r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints/{typeId}/services'</span>, params={ +r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/blueprints/{typeId}/services'</span>, params={ ) @@ -2193,12 +2162,13 @@ r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-ap </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints/{typeId}/services +curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/blueprints/{typeId}/services </code></pre> <p><code>GET /blueprints/{typeId}/services</code></p> +<p><em>Get Services mapped to a blueprint template</em></p> <p>Get Deployment References existing for a blueprint</p> -<h3 id="get-services-mapped-to-a-blueprint-template-parameters">Parameters</h3> +<h3 id="get-deployments-for-a-blueprint-parameters">Parameters</h3> <table> <thead> <tr> @@ -2219,7 +2189,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints/{typeId}/ser </tr> </tbody> </table> -<h3 id="get-services-mapped-to-a-blueprint-template-responses">Responses</h3> +<h3 id="get-deployments-for-a-blueprint-responses">Responses</h3> <table> <thead> <tr> @@ -2241,189 +2211,9 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints/{typeId}/ser <aside class="success"> This operation does not require authentication </aside> -<h2 id="find-a-blueprint-by-a-name-pattern">Find a blueprint by a name pattern</h2> -<p><a id="opIdGet Blueprint"></a></p> -<blockquote> -<p>Code samples</p> -</blockquote> -<pre class="highlight tab tab-python"><code><span class="hljs-keyword">import</span> requests -headers = { - <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> -} - -r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints/findByName'</span>, params={ - <span class="hljs-string">'name'</span>: <span class="hljs-string">'string'</span> -}, headers = headers) - -<span class="hljs-keyword">print</span> r.json() - -</code></pre> -<pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/blueprints/findByName?name=string \ - -H <span class="hljs-string">'Accept: application/json'</span> - -</code></pre> -<p><code>GET /blueprints/findByName</code></p> -<p>Fetch the blueprint objects from inventory whose names match a string pattern</p> -<h3 id="find-a-blueprint-by-a-name-pattern-parameters">Parameters</h3> -<table> -<thead> -<tr> -<th>Name</th> -<th>In</th> -<th>Type</th> -<th>Required</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td>name</td> -<td>query</td> -<td>string</td> -<td>true</td> -<td>name pattern to filter by</td> -</tr> -<tr> -<td>_include</td> -<td>query</td> -<td>array[string]</td> -<td>false</td> -<td>blueprint object properties need to be considered for filter</td> -</tr> -</tbody> -</table> -<h4 id="enumerated-values">Enumerated Values</h4> -<table> -<thead> -<tr> -<th>Parameter</th> -<th>Value</th> -</tr> -</thead> -<tbody> -<tr> -<td>_include</td> -<td>typeName</td> -</tr> -<tr> -<td>_include</td> -<td>typeId</td> -</tr> -<tr> -<td>_include</td> -<td>typeVersion</td> -</tr> -</tbody> -</table> -<blockquote> -<p>Example responses</p> -</blockquote> -<blockquote> -<p>200 Response</p> -</blockquote> -<pre class="highlight tab tab-json"><code>{ - <span class="hljs-attr">"links"</span>: { - <span class="hljs-attr">"previousLink"</span>: { - <span class="hljs-attr">"title"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"rel"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"uri"</span>: <span class="hljs-string">"http://example.com"</span>, - <span class="hljs-attr">"uriBuilder"</span>: {}, - <span class="hljs-attr">"rels"</span>: [ - <span class="hljs-string">"string"</span> - ], - <span class="hljs-attr">"params"</span>: { - <span class="hljs-attr">"property1"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"property2"</span>: <span class="hljs-string">"string"</span> - }, - <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> - }, - <span class="hljs-attr">"nextLink"</span>: { - <span class="hljs-attr">"title"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"rel"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"uri"</span>: <span class="hljs-string">"http://example.com"</span>, - <span class="hljs-attr">"uriBuilder"</span>: {}, - <span class="hljs-attr">"rels"</span>: [ - <span class="hljs-string">"string"</span> - ], - <span class="hljs-attr">"params"</span>: { - <span class="hljs-attr">"property1"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"property2"</span>: <span class="hljs-string">"string"</span> - }, - <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> - } - }, - <span class="hljs-attr">"totalCount"</span>: <span class="hljs-number">0</span>, - <span class="hljs-attr">"items"</span>: [ - { - <span class="hljs-attr">"owner"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"typeName"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"typeVersion"</span>: <span class="hljs-number">0</span>, - <span class="hljs-attr">"blueprintTemplate"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"serviceIds"</span>: [ - <span class="hljs-string">"string"</span> - ], - <span class="hljs-attr">"vnfTypes"</span>: [ - <span class="hljs-string">"string"</span> - ], - <span class="hljs-attr">"serviceLocations"</span>: [ - <span class="hljs-string">"string"</span> - ], - <span class="hljs-attr">"asdcServiceId"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"asdcResourceId"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"asdcServiceURL"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"typeId"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"selfLink"</span>: { - <span class="hljs-attr">"title"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"rel"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"uri"</span>: <span class="hljs-string">"http://example.com"</span>, - <span class="hljs-attr">"uriBuilder"</span>: {}, - <span class="hljs-attr">"rels"</span>: [ - <span class="hljs-string">"string"</span> - ], - <span class="hljs-attr">"params"</span>: { - <span class="hljs-attr">"property1"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"property2"</span>: <span class="hljs-string">"string"</span> - }, - <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> - }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"deactivated"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span> - } - ] -} -</code></pre> -<h3 id="find-a-blueprint-by-a-name-pattern-responses">Responses</h3> -<table> -<thead> -<tr> -<th>Status</th> -<th>Meaning</th> -<th>Description</th> -<th>Schema</th> -</tr> -</thead> -<tbody> -<tr> -<td>200</td> -<td><a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">OK</a></td> -<td>List of <code>DCAEServiceType</code> objects</td> -<td><a href="#schemainlineresponse200">InlineResponse200</a></td> -</tr> -<tr> -<td>400</td> -<td><a href="https://tools.ietf.org/html/rfc7231#section-6.5.1">Bad Request</a></td> -<td>Invalid tag value</td> -<td>None</td> -</tr> -</tbody> -</table> -<aside class="success"> -This operation does not require authentication -</aside> <h1 id="dcae-dashboard-api-deployments">Deployments</h1> <p>Manage deployments</p> -<h2 id="lists-all-deployments">Lists all Deployments</h2> +<h2 id="list-deployments">List Deployments</h2> <p><a id="opIdList Deployments"></a></p> <blockquote> <p>Code samples</p> @@ -2433,7 +2223,7 @@ headers = { <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> } -r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments'</span>, params={ +r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments'</span>, params={ <span class="hljs-string">'pageNum'</span>: <span class="hljs-string">'string'</span>, <span class="hljs-string">'viewPerPage'</span>: <span class="hljs-string">'string'</span> }, headers = headers) @@ -2441,13 +2231,14 @@ r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-ap </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments?pageNum=string&viewPerPage=string \ +curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments?pageNum=string&viewPerPage=string \ -H <span class="hljs-string">'Accept: application/json'</span> </code></pre> <p><code>GET /deployments</code></p> +<p><em>List all Deployments</em></p> <p>Query all deployments or Service objects from Inventory</p> -<h3 id="lists-all-deployments-parameters">Parameters</h3> +<h3 id="list-deployments-parameters">Parameters</h3> <table> <thead> <tr> @@ -2498,8 +2289,8 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments?pageNum=str }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, <span class="hljs-attr">"typeLink"</span>: { <span class="hljs-attr">"title"</span>: <span class="hljs-string">"string"</span>, <span class="hljs-attr">"rel"</span>: <span class="hljs-string">"string"</span>, @@ -2549,8 +2340,8 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments?pageNum=str }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, <span class="hljs-attr">"componentType"</span>: <span class="hljs-string">"string"</span>, <span class="hljs-attr">"componentSource"</span>: <span class="hljs-string">"DCAEController"</span>, <span class="hljs-attr">"status"</span>: <span class="hljs-string">"string"</span>, @@ -2562,7 +2353,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments?pageNum=str } ] </code></pre> -<h3 id="lists-all-deployments-responses">Responses</h3> +<h3 id="list-deployments-responses">Responses</h3> <table> <thead> <tr> @@ -2587,7 +2378,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments?pageNum=str </tr> </tbody> </table> -<h3 id="lists-all-deployments-responseschema">Response Schema</h3> +<h3 id="list-deployments-responseschema">Response Schema</h3> <p>Status Code <strong>200</strong></p> <table> <thead> @@ -2834,7 +2625,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments?pageNum=str <aside class="success"> This operation does not require authentication </aside> -<h2 id="initiate-a-deployment--install--operation-for-an-application-or-service">Initiate a deployment (install) operation for an application or service</h2> +<h2 id="create-deployment">Create Deployment</h2> <p><a id="opIdCreate Deployment"></a></p> <blockquote> <p>Code samples</p> @@ -2845,7 +2636,7 @@ headers = { <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> } -r = requests.post(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments'</span>, params={ +r = requests.post(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments'</span>, params={ }, headers = headers) @@ -2853,12 +2644,13 @@ r = requests.post(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-a </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X POST https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments \ +curl -X POST https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments \ -H <span class="hljs-string">'Content-Type: application/json'</span> \ -H <span class="hljs-string">'Accept: application/json'</span> </code></pre> <p><code>POST /deployments</code></p> +<p><em>Initiate a deployment (install) operation for an application or service</em></p> <p>Controller sends the blueprint and required inputs to Deployment Handler microservice to initiate the deployment process</p> <blockquote> <p>Body parameter</p> @@ -2873,7 +2665,7 @@ curl -X POST https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments \ <span class="hljs-attr">"inputs"</span>: {} } </code></pre> -<h3 id="initiate-a-deployment--install--operation-for-an-application-or-service-parameters">Parameters</h3> +<h3 id="create-deployment-parameters">Parameters</h3> <table> <thead> <tr> @@ -2909,7 +2701,7 @@ curl -X POST https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments \ } } </code></pre> -<h3 id="initiate-a-deployment--install--operation-for-an-application-or-service-responses">Responses</h3> +<h3 id="create-deployment-responses">Responses</h3> <table> <thead> <tr> @@ -2937,7 +2729,7 @@ curl -X POST https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments \ <aside class="success"> This operation does not require authentication </aside> -<h2 id="initiate-an-uninstall-operation-for-an-application-or-service">Initiate an uninstall operation for an application or service</h2> +<h2 id="delete-deployment">Delete Deployment</h2> <p><a id="opIdDelete Deployment"></a></p> <blockquote> <p>Code samples</p> @@ -2947,7 +2739,7 @@ headers = { <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> } -r = requests.delete(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}'</span>, params={ +r = requests.delete(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId}'</span>, params={ <span class="hljs-string">'tenant'</span>: <span class="hljs-string">'string'</span> }, headers = headers) @@ -2955,13 +2747,14 @@ r = requests.delete(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X DELETE https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}?tenant=string \ +curl -X DELETE https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId}?tenant=string \ -H <span class="hljs-string">'Accept: application/json'</span> </code></pre> <p><code>DELETE /deployments/{deploymentId}</code></p> +<p><em>Initiate an uninstall operation for an application or service</em></p> <p>Controller sends the deployment reference to Deployment Handler microservice to initiate the uninstall process</p> -<h3 id="initiate-an-uninstall-operation-for-an-application-or-service-parameters">Parameters</h3> +<h3 id="delete-deployment-parameters">Parameters</h3> <table> <thead> <tr> @@ -2997,7 +2790,7 @@ curl -X DELETE https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploym </blockquote> <pre class="highlight tab tab-json"><code><span class="hljs-string">"string"</span> </code></pre> -<h3 id="initiate-an-uninstall-operation-for-an-application-or-service-responses">Responses</h3> +<h3 id="delete-deployment-responses">Responses</h3> <table> <thead> <tr> @@ -3025,7 +2818,7 @@ curl -X DELETE https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploym <aside class="success"> This operation does not require authentication </aside> -<h2 id="upgrade-or-rollback-an-existing-deployment-using-cloudify-helm-plugin">Upgrade or Rollback an existing deployment using Cloudify Helm plugin</h2> +<h2 id="upgrade_rollback-deployment">Upgrade_Rollback Deployment</h2> <p><a id="opIdUpgrade/Rollback Deployment"></a></p> <blockquote> <p>Code samples</p> @@ -3035,7 +2828,7 @@ headers = { <span class="hljs-string">'Content-Type'</span>: <span class="hljs-string">'application/json'</span> } -r = requests.put(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}'</span>, params={ +r = requests.put(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId}'</span>, params={ }, headers = headers) @@ -3043,11 +2836,12 @@ r = requests.put(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-ap </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X PUT https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId} \ +curl -X PUT https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId} \ -H <span class="hljs-string">'Content-Type: application/json'</span> </code></pre> <p><code>PUT /deployments/{deploymentId}</code></p> +<p><em>Upgrade or Rollback an existing deployment using Cloudify Helm plugin</em></p> <p>Upgrade or Rollback an existing deployment using Cloudify Helm plugin</p> <blockquote> <p>Body parameter</p> @@ -3061,7 +2855,7 @@ curl -X PUT https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment <span class="hljs-attr">"workflow"</span>: <span class="hljs-string">"string"</span> } </code></pre> -<h3 id="upgrade-or-rollback-an-existing-deployment-using-cloudify-helm-plugin-parameters">Parameters</h3> +<h3 id="upgrade_rollback-deployment-parameters">Parameters</h3> <table> <thead> <tr> @@ -3089,7 +2883,7 @@ curl -X PUT https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment </tr> </tbody> </table> -<h3 id="upgrade-or-rollback-an-existing-deployment-using-cloudify-helm-plugin-responses">Responses</h3> +<h3 id="upgrade_rollback-deployment-responses">Responses</h3> <table> <thead> <tr> @@ -3123,7 +2917,7 @@ curl -X PUT https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment <aside class="success"> This operation does not require authentication </aside> -<h2 id="gets-a-deployment">Gets a Deployment</h2> +<h2 id="get-deployment">Get Deployment</h2> <p><a id="opIdGet Deployment"></a></p> <blockquote> <p>Code samples</p> @@ -3133,7 +2927,7 @@ headers = { <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> } -r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}'</span>, params={ +r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId}'</span>, params={ }, headers = headers) @@ -3141,13 +2935,14 @@ r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-ap </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId} \ +curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId} \ -H <span class="hljs-string">'Accept: application/json'</span> </code></pre> <p><code>GET /deployments/{deploymentId}</code></p> +<p><em>Get a Deployment</em></p> <p>Query a deployment or Service object from Inventory</p> -<h3 id="gets-a-deployment-parameters">Parameters</h3> +<h3 id="get-deployment-parameters">Parameters</h3> <table> <thead> <tr> @@ -3191,8 +2986,8 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, <span class="hljs-attr">"typeLink"</span>: { <span class="hljs-attr">"title"</span>: <span class="hljs-string">"string"</span>, <span class="hljs-attr">"rel"</span>: <span class="hljs-string">"string"</span>, @@ -3242,8 +3037,8 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, <span class="hljs-attr">"componentType"</span>: <span class="hljs-string">"string"</span>, <span class="hljs-attr">"componentSource"</span>: <span class="hljs-string">"DCAEController"</span>, <span class="hljs-attr">"status"</span>: <span class="hljs-string">"string"</span>, @@ -3255,7 +3050,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment } ] </code></pre> -<h3 id="gets-a-deployment-responses">Responses</h3> +<h3 id="get-deployment-responses">Responses</h3> <table> <thead> <tr> @@ -3280,7 +3075,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment </tr> </tbody> </table> -<h3 id="gets-a-deployment-responseschema">Response Schema</h3> +<h3 id="get-deployment-responseschema">Response Schema</h3> <p>Status Code <strong>200</strong></p> <table> <thead> @@ -3527,106 +3322,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment <aside class="success"> This operation does not require authentication </aside> -<h2 id="update-an-existing-deployment">Update an existing deployment</h2> -<p><a id="opIdUpdate Deployment"></a></p> -<blockquote> -<p>Code samples</p> -</blockquote> -<pre class="highlight tab tab-python"><code><span class="hljs-keyword">import</span> requests -headers = { - <span class="hljs-string">'Content-Type'</span>: <span class="hljs-string">'application/json'</span> -} - -r = requests.put(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}/update'</span>, params={ - -}, headers = headers) - -<span class="hljs-keyword">print</span> r.json() - -</code></pre> -<pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X PUT https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}/update \ - -H <span class="hljs-string">'Content-Type: application/json'</span> - -</code></pre> -<p><code>PUT /deployments/{deploymentId}/update</code></p> -<p>Dispatch a request to Deployment handler mS to use Cloudify deployment update operation</p> -<blockquote> -<p>Body parameter</p> -</blockquote> -<pre class="highlight tab tab-json"><code>{ - <span class="hljs-attr">"component"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"tag"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"blueprintId"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"blueprintName"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"blueprintVersion"</span>: <span class="hljs-number">0</span>, - <span class="hljs-attr">"tenant"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"inputs"</span>: {} -} -</code></pre> -<h3 id="update-an-existing-deployment-parameters">Parameters</h3> -<table> -<thead> -<tr> -<th>Name</th> -<th>In</th> -<th>Type</th> -<th>Required</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td>deploymentId</td> -<td>path</td> -<td>string</td> -<td>true</td> -<td>ID of deployment to update</td> -</tr> -<tr> -<td>body</td> -<td>body</td> -<td><a href="#schemadeploymentinput">DeploymentInput</a></td> -<td>true</td> -<td>Inputs to initiate a deployment: blueprint ID from inventory, Cloudify tenant name, blueprint inputs</td> -</tr> -</tbody> -</table> -<h3 id="update-an-existing-deployment-responses">Responses</h3> -<table> -<thead> -<tr> -<th>Status</th> -<th>Meaning</th> -<th>Description</th> -<th>Schema</th> -</tr> -</thead> -<tbody> -<tr> -<td>400</td> -<td><a href="https://tools.ietf.org/html/rfc7231#section-6.5.1">Bad Request</a></td> -<td>Invalid ID supplied</td> -<td>None</td> -</tr> -<tr> -<td>404</td> -<td><a href="https://tools.ietf.org/html/rfc7231#section-6.5.4">Not Found</a></td> -<td>Deployment not found</td> -<td>None</td> -</tr> -<tr> -<td>405</td> -<td><a href="https://tools.ietf.org/html/rfc7231#section-6.5.5">Method Not Allowed</a></td> -<td>Validation exception</td> -<td>None</td> -</tr> -</tbody> -</table> -<aside class="success"> -This operation does not require authentication -</aside> -<h2 id="deployment-execution-status">Deployment execution status</h2> +<h2 id="deployment-status">Deployment Status</h2> <p><a id="opIdDeployment Status"></a></p> <blockquote> <p>Code samples</p> @@ -3636,7 +3332,7 @@ headers = { <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> } -r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}/executions'</span>, params={ +r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId}/executions'</span>, params={ <span class="hljs-string">'tenant'</span>: <span class="hljs-string">'string'</span> }, headers = headers) @@ -3644,13 +3340,14 @@ r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-ap </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}/executions?tenant=string \ +curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId}/executions?tenant=string \ -H <span class="hljs-string">'Accept: application/json'</span> </code></pre> <p><code>GET /deployments/{deploymentId}/executions</code></p> +<p><em>Deployment execution status</em></p> <p>Query deployment workflow execution status</p> -<h3 id="deployment-execution-status-parameters">Parameters</h3> +<h3 id="deployment-status-parameters">Parameters</h3> <table> <thead> <tr> @@ -3695,7 +3392,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment } ] </code></pre> -<h3 id="deployment-execution-status-responses">Responses</h3> +<h3 id="deployment-status-responses">Responses</h3> <table> <thead> <tr> @@ -3720,7 +3417,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment </tr> </tbody> </table> -<h3 id="deployment-execution-status-responseschema">Response Schema</h3> +<h3 id="deployment-status-responseschema">Response Schema</h3> <p>Status Code <strong>200</strong></p> <table> <thead> @@ -3787,7 +3484,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment <aside class="success"> This operation does not require authentication </aside> -<h2 id="deployment-health-status">Deployment health status</h2> +<h2 id="deployment-health">Deployment health</h2> <p><a id="opIdDeployment health"></a></p> <blockquote> <p>Code samples</p> @@ -3797,7 +3494,7 @@ headers = { <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> } -r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}/health'</span>, params={ +r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId}/health'</span>, params={ }, headers = headers) @@ -3805,13 +3502,14 @@ r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-ap </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}/health \ +curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId}/health \ -H <span class="hljs-string">'Accept: application/json'</span> </code></pre> <p><code>GET /deployments/{deploymentId}/health</code></p> +<p><em>Deployment health status</em></p> <p>Query consul for service health using deployment ID filter</p> -<h3 id="deployment-health-status-parameters">Parameters</h3> +<h3 id="deployment-health-parameters">Parameters</h3> <table> <thead> <tr> @@ -3847,7 +3545,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment <span class="hljs-attr">"serviceName"</span>: <span class="hljs-string">"string"</span> } </code></pre> -<h3 id="deployment-health-status-responses">Responses</h3> +<h3 id="deployment-health-responses">Responses</h3> <table> <thead> <tr> @@ -3869,7 +3567,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deployment <aside class="success"> This operation does not require authentication </aside> -<h2 id="deployment-inputs">Deployment inputs</h2> +<h2 id="deployment-inputs">Deployment Inputs</h2> <p><a id="opIdDeployment Inputs"></a></p> <blockquote> <p>Code samples</p> @@ -3879,7 +3577,7 @@ headers = { <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> } -r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}/inputs'</span>, params={ +r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId}/inputs'</span>, params={ <span class="hljs-string">'tenant'</span>: <span class="hljs-string">'string'</span> }, headers = headers) @@ -3887,11 +3585,12 @@ r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-ap </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/deployments/{deploymentId}/inputs?tenant=string \ +curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/deployments/{deploymentId}/inputs?tenant=string \ -H <span class="hljs-string">'Accept: application/json'</span> </code></pre> <p><code>GET /deployments/{deploymentId}/inputs</code></p> +<p><em>Deployment inputs</em></p> <p>Get blueprint inputs used to create deployment</p> <h3 id="deployment-inputs-parameters">Parameters</h3> <table> @@ -3960,7 +3659,7 @@ This operation does not require authentication </aside> <h1 id="dcae-dashboard-api-tenants">Tenants</h1> <p>Query Cloudify Tenants</p> -<h2 id="lists-all-cloudify-tenants">Lists all Cloudify Tenants</h2> +<h2 id="list-tenants">List Tenants</h2> <p><a id="opIdList Tenants"></a></p> <blockquote> <p>Code samples</p> @@ -3970,7 +3669,7 @@ headers = { <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> } -r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/tenants'</span>, params={ +r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/tenants'</span>, params={ }, headers = headers) @@ -3978,11 +3677,12 @@ r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-ap </code></pre> <pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/tenants \ +curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/v2/tenants \ -H <span class="hljs-string">'Accept: application/json'</span> </code></pre> <p><code>GET /tenants</code></p> +<p><em>Lists all Cloudify Tenants</em></p> <p>Query all Tenant names from Cloudify</p> <blockquote> <p>Example responses</p> @@ -3996,7 +3696,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/tenants \ } ] </code></pre> -<h3 id="lists-all-cloudify-tenants-responses">Responses</h3> +<h3 id="list-tenants-responses">Responses</h3> <table> <thead> <tr> @@ -4021,7 +3721,7 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/tenants \ </tr> </tbody> </table> -<h3 id="lists-all-cloudify-tenants-responseschema">Response Schema</h3> +<h3 id="list-tenants-responseschema">Response Schema</h3> <p>Status Code <strong>200</strong></p> <table> <thead> @@ -4053,207 +3753,6 @@ curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/tenants \ <aside class="success"> This operation does not require authentication </aside> -<h1 id="dcae-dashboard-api-components">Components</h1> -<p>Query on-boarded components</p> -<h2 id="lists-all-application-components">Lists all application components</h2> -<p><a id="opIdList Components"></a></p> -<blockquote> -<p>Code samples</p> -</blockquote> -<pre class="highlight tab tab-python"><code><span class="hljs-keyword">import</span> requests -headers = { - <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span> -} - -r = requests.get(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/components'</span>, params={ - -}, headers = headers) - -<span class="hljs-keyword">print</span> r.json() - -</code></pre> -<pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X GET https://dcae-dashboard:8080/ccsdk-app/nb-api/components \ - -H <span class="hljs-string">'Accept: application/json'</span> - -</code></pre> -<p><code>GET /components</code></p> -<p>Query all components from database</p> -<blockquote> -<p>Example responses</p> -</blockquote> -<blockquote> -<p>200 Response</p> -</blockquote> -<pre class="highlight tab tab-json"><code>[ - { - <span class="hljs-attr">"compId"</span>: <span class="hljs-number">0</span>, - <span class="hljs-attr">"cname"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"dname"</span>: <span class="hljs-string">"string"</span> - } -] -</code></pre> -<h3 id="lists-all-application-components-responses">Responses</h3> -<table> -<thead> -<tr> -<th>Status</th> -<th>Meaning</th> -<th>Description</th> -<th>Schema</th> -</tr> -</thead> -<tbody> -<tr> -<td>200</td> -<td><a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">OK</a></td> -<td>successful operation</td> -<td>Inline</td> -</tr> -<tr> -<td>400</td> -<td><a href="https://tools.ietf.org/html/rfc7231#section-6.5.1">Bad Request</a></td> -<td>Invalid status value</td> -<td>None</td> -</tr> -</tbody> -</table> -<h3 id="lists-all-application-components-responseschema">Response Schema</h3> -<p>Status Code <strong>200</strong></p> -<table> -<thead> -<tr> -<th>Name</th> -<th>Type</th> -<th>Required</th> -<th>Restrictions</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td><em>anonymous</em></td> -<td>[<a href="#schemacomponent">Component</a>]</td> -<td>false</td> -<td>none</td> -<td>none</td> -</tr> -<tr> -<td>» compId</td> -<td>integer</td> -<td>false</td> -<td>none</td> -<td>none</td> -</tr> -<tr> -<td>» cname</td> -<td>string</td> -<td>false</td> -<td>none</td> -<td>component namespace name</td> -</tr> -<tr> -<td>» dname</td> -<td>string</td> -<td>false</td> -<td>none</td> -<td>component display name</td> -</tr> -</tbody> -</table> -<aside class="success"> -This operation does not require authentication -</aside> -<h2 id="add-an-application-component">add an application component</h2> -<p><a id="opIdAdd Component"></a></p> -<blockquote> -<p>Code samples</p> -</blockquote> -<pre class="highlight tab tab-python"><code><span class="hljs-keyword">import</span> requests -headers = { - <span class="hljs-string">'Content-Type'</span>: <span class="hljs-string">'application/json'</span>, - <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'*/*'</span> -} - -r = requests.post(<span class="hljs-string">'https://dcae-dashboard:8080/ccsdk-app/nb-api/components'</span>, params={ - -}, headers = headers) - -<span class="hljs-keyword">print</span> r.json() - -</code></pre> -<pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span> -curl -X POST https://dcae-dashboard:8080/ccsdk-app/nb-api/components \ - -H <span class="hljs-string">'Content-Type: application/json'</span> \ - -H <span class="hljs-string">'Accept: */*'</span> - -</code></pre> -<p><code>POST /components</code></p> -<p>Insert a component into database</p> -<blockquote> -<p>Body parameter</p> -</blockquote> -<pre class="highlight tab tab-json"><code>{ - <span class="hljs-attr">"cname"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"dname"</span>: <span class="hljs-string">"string"</span> -} -</code></pre> -<h3 id="add-an-application-component-parameters">Parameters</h3> -<table> -<thead> -<tr> -<th>Name</th> -<th>In</th> -<th>Type</th> -<th>Required</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td>body</td> -<td>body</td> -<td><a href="#schemacomponentinput">ComponentInput</a></td> -<td>true</td> -<td>New component input</td> -</tr> -</tbody> -</table> -<blockquote> -<p>Example responses</p> -</blockquote> -<blockquote> -<p>200 Response</p> -</blockquote> -<h3 id="add-an-application-component-responses">Responses</h3> -<table> -<thead> -<tr> -<th>Status</th> -<th>Meaning</th> -<th>Description</th> -<th>Schema</th> -</tr> -</thead> -<tbody> -<tr> -<td>200</td> -<td><a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">OK</a></td> -<td>successful operation</td> -<td>Inline</td> -</tr> -<tr> -<td>400</td> -<td><a href="https://tools.ietf.org/html/rfc7231#section-6.5.1">Bad Request</a></td> -<td>Invalid status value</td> -<td>None</td> -</tr> -</tbody> -</table> -<h3 id="add-an-application-component-responseschema">Response Schema</h3> -<aside class="success"> -This operation does not require authentication -</aside> <h1 id="schemas">Schemas</h1> <h2 id="tocstenant">Tenant</h2> <p><a id="schematenant"></a></p> @@ -4283,50 +3782,6 @@ This operation does not require authentication </tr> </tbody> </table> -<h2 id="tocscomponent">Component</h2> -<p><a id="schemacomponent"></a></p> -<pre class="highlight tab tab-json"><code>{ - <span class="hljs-attr">"compId"</span>: <span class="hljs-number">0</span>, - <span class="hljs-attr">"cname"</span>: <span class="hljs-string">"string"</span>, - <span class="hljs-attr">"dname"</span>: <span class="hljs-string">"string"</span> -} - -</code></pre> -<h3 id="properties">Properties</h3> -<table> -<thead> -<tr> -<th>Name</th> -<th>Type</th> -<th>Required</th> -<th>Restrictions</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td>compId</td> -<td>integer</td> -<td>false</td> -<td>none</td> -<td>none</td> -</tr> -<tr> -<td>cname</td> -<td>string</td> -<td>false</td> -<td>none</td> -<td>component namespace name</td> -</tr> -<tr> -<td>dname</td> -<td>string</td> -<td>false</td> -<td>none</td> -<td>component display name</td> -</tr> -</tbody> -</table> <h2 id="tocscomponentinput">ComponentInput</h2> <p><a id="schemacomponentinput"></a></p> <pre class="highlight tab tab-json"><code>{ @@ -4430,8 +3885,8 @@ This operation does not require authentication }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"deactivated"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span> + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"deactivated"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span> } ] } @@ -4597,8 +4052,8 @@ This operation does not require authentication }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, <span class="hljs-attr">"typeLink"</span>: { <span class="hljs-attr">"title"</span>: <span class="hljs-string">"string"</span>, <span class="hljs-attr">"rel"</span>: <span class="hljs-string">"string"</span>, @@ -4648,8 +4103,8 @@ This operation does not require authentication }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, <span class="hljs-attr">"componentType"</span>: <span class="hljs-string">"string"</span>, <span class="hljs-attr">"componentSource"</span>: <span class="hljs-string">"DCAEController"</span>, <span class="hljs-attr">"status"</span>: <span class="hljs-string">"string"</span>, @@ -4810,8 +4265,8 @@ This operation does not require authentication }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, <span class="hljs-attr">"typeLink"</span>: { <span class="hljs-attr">"title"</span>: <span class="hljs-string">"string"</span>, <span class="hljs-attr">"rel"</span>: <span class="hljs-string">"string"</span>, @@ -4861,8 +4316,8 @@ This operation does not require authentication }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, <span class="hljs-attr">"componentType"</span>: <span class="hljs-string">"string"</span>, <span class="hljs-attr">"componentSource"</span>: <span class="hljs-string">"DCAEController"</span>, <span class="hljs-attr">"status"</span>: <span class="hljs-string">"string"</span>, @@ -5024,8 +4479,8 @@ This operation does not require authentication }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"modified"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, <span class="hljs-attr">"componentType"</span>: <span class="hljs-string">"string"</span>, <span class="hljs-attr">"componentSource"</span>: <span class="hljs-string">"DCAEController"</span>, <span class="hljs-attr">"status"</span>: <span class="hljs-string">"string"</span>, @@ -5232,8 +4687,8 @@ This operation does not require authentication }, <span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span> }, - <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span>, - <span class="hljs-attr">"deactivated"</span>: <span class="hljs-string">"2020-02-05T21:21:26Z"</span> + <span class="hljs-attr">"created"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span>, + <span class="hljs-attr">"deactivated"</span>: <span class="hljs-string">"2020-08-12T15:08:29Z"</span> } </code></pre> diff --git a/ccsdk-app-os/src/main/webapp/app/ccsdk/home/api_view.html b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/api_view.html new file mode 100644 index 0000000..7561c73 --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/api_view.html @@ -0,0 +1,5 @@ +<div id="page-content"> + <iframe scrolling="yes" frameborder="0" style="width:100%; height: 800px;" + ng-src="api-specs.html"> + </iframe> +</div>
\ No newline at end of file diff --git a/ccsdk-app-os/src/main/webapp/app/ccsdk/home/app-router.js b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/app-router.js new file mode 100644 index 0000000..10337ba --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/app-router.js @@ -0,0 +1,105 @@ +/******************************************************************************* + * =============LICENSE_START========================================================= + * + * ================================================================================= + * Copyright (c) 2020 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========================================================= + * + *******************************************************************************/ +appDS2.config(function($routeProvider) { + $routeProvider + .when('/api', { + templateUrl: 'app/ccsdk/home/api_view.html', + controller : '' + }) + .when('/api-spec', { + templateUrl: 'app/ccsdk/home/rest-api-spec.html', + controller : 'apiDocsController' + }) + .when('/ibp', { + templateUrl: 'app/ccsdk/inventory/inventory_blueprint_table.html', + controller : 'inventoryBlueprintTableController' + }) + .when('/ibp/:bpId', { + templateUrl: 'app/ccsdk/inventory/inventory_blueprint_table.html', + controller : 'inventoryBlueprintTableController' + }) + .when('/idep', { + templateUrl: 'app/ccsdk/cloudify/deployment_table.html', + controller : 'deploymentTableController' + }) + .when('/idep/:depId', { + templateUrl: 'app/ccsdk/cloudify/deployment_table.html', + controller : 'deploymentTableController' + }) + .when('/iplug', { + templateUrl: 'app/ccsdk/cloudify/plugin_table.html', + controller : 'PluginsTableController' + }) + .when('/sh', { + templateUrl: 'app/ccsdk/consul/service_health_table.html', + controller : 'serviceHealthTableController' + }) + .when('/nh', { + templateUrl: 'app/ccsdk/consul/node_table.html', + controller : 'nodeTableController' + }) + .when('/dc', { + templateUrl: 'app/ccsdk/consul/datacenter_table.html', + controller : 'datacenterTableController' + }) + .when('/profile/:profileId', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html', + controller: 'selfProfileController' + }) + .when('/profile_search', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html', + controller : "profileSearchCtrlDS2" + }) + .when('/post_search', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/post.html', + controller: 'postController' + }) + .when('/self_profile', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html', + controller: 'selfProfileController' + }) + .when('/role_list', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/role_list.html', + controller : 'adminController' + }) + .when('/role_function_list', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/role-function.html', + controller : "adminController" + }) + .when('/jcs_admin', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/jcs_admin.html', + controller: 'adminController' + }) + .when('/admin_menu_edit', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/admin-menu-edit.html', + controller: 'AdminMenuEditController' + }) + .when('/usage_list', { + templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/usage.html', + controller: 'usageListControllerDS2' + }) + .otherwise({ + templateUrl: 'app/ccsdk/home/executions_view.html', + controller : 'executionsViewController' + }) + ; + +});
\ No newline at end of file diff --git a/ccsdk-app-os/src/main/webapp/app/ccsdk/home/executions-view-controller.js b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/executions-view-controller.js new file mode 100644 index 0000000..fd2dd79 --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/executions-view-controller.js @@ -0,0 +1,415 @@ +appDS2.controller('executionsViewController', + function($scope, $rootScope, ControllerService, $modal, ExecutionService, + InventoryDeploymentService, DeploymentService, InventoryBlueprintService, + InventoryExecutionService, localStorageService, $log, $interval) { + + var coll = document.getElementsByClassName("collapsible"); + var i; + for (i = 0; i < coll.length; i++) { + coll[i].addEventListener("click", function() { + this.classList.toggle("active"); + var content = this.nextElementSibling; + if (content.style.display === "" || content.style.display === "block") { + content.style.display = "none"; + content.style.maxHeight = null; + } else { + content.style.display = "block"; + content.style.maxHeight = content.scrollHeight + "px"; + } + }); + } + var stop; + $scope.ecdapp = {}; + $scope.ecdapp.isDataLoading = false; + $scope.ecdapp.appLabel = ""; + $scope.ecdapp.bpCount = 0; + $scope.ecdapp.depCount = 0; + $scope.ecdapp.pluginCount = 0; + $scope.ecdapp.filterByUser = true; + $scope.ecdapp.searchByBp = 'owner:' + $scope.userId + ';'; + $scope.ecdapp.searchByDep = 'owner:' + $scope.userId + ';'; + $scope.ecdapp.bpObjList = []; + $scope.ecdapp.depObjList = []; + $scope.ecdapp.currentBpId = ''; + $scope.ecdapp.currentDep; + $scope.ecdapp.isBpDataLoading = false; + $scope.ecdapp.isDepDataLoading = false; + $scope.ecdapp.isPluginDataLoading = false; + $scope.ecdapp.isExecDataLoading = false; + $scope.ecdapp.level_options = { + "off":"Group", + "on":"User" + }; + $scope.ecdapp.inv_query_options = { + "off":"Off", + "on":"On" + }; + + $scope.ecdapp.showingMoreFilters = false; + + $scope.ecdapp.toggleMoreFilters = function() { + $scope.ecdapp.showingMoreFilters = !$scope.ecdapp.showingMoreFilters; + }; + $scope.ecdapp.availableStatus = + ['pending','started','cancelling','force_cancelling','cancelled','terminated','failed']; + $scope.ecdapp.selectedStatus = 'started'; + $scope.ecdapp.level_switch = { + value: true + }; + $scope.ecdapp.inv_load = { + value: false + }; + + $scope.ecdapp.currentPage = 1; + $scope.ecdapp.viewPerPage = 10; + $scope.ecdapp.selectedTenant = ''; + $scope.ecdapp.execId = ''; + + var debug = false; + + $scope.ecdapp.resetFilters = function() { + $scope.ecdapp.selectedTenant = ''; + $scope.ecdapp.selectedStatus = ''; + }; + + $scope.ecdapp.extendedfilterSrch = function() { + $scope.ecdapp.showingMoreFilters = !$scope.ecdapp.showingMoreFilters; + $scope.ecdapp.searchExecTable(); + }; + + $scope.ecdapp.searchExecTable = function() { + $scope.ecdapp.currentPage = 1; + $scope.ecdapp.viewPerPage = 10; + if ($scope.ecdapp.execId != '') { + getExecutionForId(); + } else { + if ($scope.ecdapp.selectedTenant == '') { + getActiveExecutions(); + } else { + getPerTenantExecutions(); + } + } + }; + + $scope.ecdapp.toggleUserFilt = function() { + if ($scope.ecdapp.level_switch.value) { + $scope.ecdapp.searchByBp = 'owner:' + $scope.userId + ';'; + $scope.ecdapp.searchByDep = 'owner:' + $scope.userId + ';'; + } else { + $scope.ecdapp.searchByBp = null; + $scope.ecdapp.searchByDep = null; + } + getBlueprintsCount(); + getDeploymentsCount(); + }; + + $scope.$watch('ecdapp.inv_load["value"]', function(newValue,oldValue,scope) { + if (newValue != oldValue) { + if (newValue === true) { + $scope.ecdapp.toggleUserFilt(); + $scope.ecdapp.searchExecTable(); + stop = $interval( function(){ $scope.ecdapp.toggleUserFilt(); $scope.ecdapp.searchExecTable(); }, 60000, 100, false); + } else { + $scope.ecdapp.stopLoading(); + } + } + }, true); + + $scope.ecdapp.stopLoading = function() { + if (angular.isDefined(stop)) { + $interval.cancel(stop); + stop = undefined; + } + }; + + var getTenants = function() { + var tenantStr = localStorageService.get('tenants'); + if (!tenantStr) { + ControllerService.getTenants() + .then(function(jsonObj) { + if (jsonObj.error) { + $log.error("executionsViewController.getTenants failed: " + jsonObj.error); + $scope.ecdapp.isRequestFailed = true; + $scope.ecdapp.errMsg = jsonObj.error; + } else { + var tenants = []; + for (var tenIndx = 0; tenIndx < jsonObj.items.length; tenIndx++) { + tenants.push(jsonObj.items[tenIndx].name); + } + localStorageService.set('tenants', JSON.stringify(tenants)); + $scope.ecdapp.availableTenants = tenants; + } + }, function(error) { + $log.error("executionsViewController.loadTable failed: " + error); + $scope.ecdapp.isRequestFailed = true; + $scope.ecdapp.errMsg = error; + }); + } else { + $scope.ecdapp.availableTenants = JSON.parse(tenantStr); + } + getActiveExecutions(); + }; + + var getAppLabel = function() { + var label = localStorageService.get('appLabel'); + if (!label) { + ControllerService.getAppLabel().then(function(jsonObj) { + if (debug) { + $log.debug("Controller.getAppLabel succeeded: " + JSON.stringify(jsonObj)); + } + localStorageService.set('appLabel', JSON.stringify(jsonObj)); + $scope.ecdapp.appLabel = jsonObj; + }, function(error) { + $log.error("Controller.getAppLabel failed: " + error); + }); + } else { + $scope.ecdapp.appLabel = JSON.parse(label); + } + }; + + var getBlueprintsCount = function() { + $scope.ecdapp.bpObjList = []; + $scope.ecdapp.currentBpId = ''; + $scope.ecdapp.isBpDataLoading = true; + InventoryBlueprintService.getBlueprintIdsList($scope.ecdapp.searchByBp).then( + function(jsonObj) { + if (jsonObj.error) { + $log.error("execViewCtlr.getBlueprintsCount failed: " + + jsonObj.error); + $scope.ecdapp.bpCount = 0; + $scope.ecdapp.isBpDataLoading = false; + $scope.ecdapp.bpObjList = []; + } else { + $scope.ecdapp.bpCount = jsonObj.totalItems; + $scope.ecdapp.bpObjList = jsonObj.items; + $scope.ecdapp.isBpDataLoading = false; + } + }, + function(error) { + $log.error("execViewCtlr.getBlueprintsCount failed: " + + error); + $scope.ecdapp.bpCount = 0; + $scope.ecdapp.bpObjList = []; + $scope.ecdapp.isBpDataLoading = false; + }); + }; + + $scope.ecdapp.updateDepl = function() { + $scope.ecdapp.currentDep = ''; + if ($scope.ecdapp.currentBpId != '') { + $scope.ecdapp.isDeplDataLoading = true; + $scope.ecdapp.depObjList = []; + $scope.ecdapp.execData = []; + var srvcIds = []; + var srvcTypIds = []; + srvcTypIds.push($scope.ecdapp.currentBpId); + InventoryBlueprintService.getDeploymentForBp(srvcTypIds) + .then(function(jsonObj) { + if (jsonObj.error) { + $scope.ecdapp.depObjList = []; + $scope.ecdapp.isDeplDataLoading = false; + } else { + for (var typIndx = 0; typIndx < jsonObj.length; typIndx++) { + for (var depIndx = 0; depIndx < jsonObj[typIndx].serviceRefList.items.length; depIndx++) { + srvcIds.push(jsonObj[typIndx].serviceRefList.items[depIndx]); + } + } + $scope.ecdapp.depObjList = srvcIds; + //$scope.ecdapp.currentDep = $scope.ecdapp.depObjList[0]; + $scope.ecdapp.isDeplDataLoading = false; + } + }, function(error) { + $log.error("inventoryBlueprintController.updateTable failed: " + error); + bpDepls = []; + $scope.ecdapp.isDeplDataLoading = false; + }); + } + }; + $scope.ecdapp.copyStringToClipboard = function(str) { + // Create new element + var el = document.createElement('textarea'); + // Set value (string to be copied) + el.value = str; + // Set non-editable to avoid focus and move outside of view + el.setAttribute('readonly', ''); + el.style = {position: 'absolute', left: '-9999px'}; + document.body.appendChild(el); + // Select text inside element + el.select(); + // Copy text to clipboard + document.execCommand('copy'); + // Remove temporary element + document.body.removeChild(el); + }; + + $scope.ecdapp.updateExec = function() { + if ($scope.ecdapp.currentDep != '') { + $scope.ecdapp.isExecDataLoading = true; + $scope.ecdapp.resetFilters(); + var currentDeplId = $scope.ecdapp.currentDep.split(":")[0]; + var currentDeplTenant = $scope.ecdapp.currentDep.split(":")[1]; + InventoryExecutionService.getExecutionsByDeployment(currentDeplId, + currentDeplTenant, + 1, + 1000).then( + function(jsonObj) { + if (jsonObj.error) { + $scope.ecdapp.execData = []; + $scope.ecdapp.isExecDataLoading = false; + } else { + $scope.ecdapp.totalPages = jsonObj.totalPages; + $scope.ecdapp.execData = jsonObj.items; + $scope.ecdapp.isExecDataLoading = false; + } + }, function(error) { + $log.error("execViewCtlr.updateExec failed: " + error); + $scope.ecdapp.isExecDataLoading = false; + }); + } + }; + + var getActiveExecutions = function() { + $scope.ecdapp.isExecDataLoading = true; + InventoryExecutionService.getActiveExecutions($scope.ecdapp.currentPage, $scope.ecdapp.viewPerPage) + .then( + function(jsonObj) { + if (jsonObj.error) { + $scope.ecdapp.execData = []; + $scope.ecdapp.isExecDataLoading = false; + } else { + $scope.ecdapp.totalPages = jsonObj.totalPages; + $scope.ecdapp.execData = jsonObj.items; + $scope.ecdapp.isExecDataLoading = false; + } + }, function(error) { + $log.error("execViewCtlr.updateExec failed: " + error); + $scope.ecdapp.isExecDataLoading = false; + }); + }; + + var getPerTenantExecutions = function() { + $scope.ecdapp.isExecDataLoading = true; + InventoryExecutionService.getExecutionsByTenant($scope.ecdapp.selectedTenant, + $scope.ecdapp.selectedStatus, $scope.ecdapp.currentPage, $scope.ecdapp.viewPerPage) + .then( + function(jsonObj) { + if (jsonObj.error) { + $scope.ecdapp.execData = []; + $scope.ecdapp.isExecDataLoading = false; + } else { + $scope.ecdapp.totalPages = jsonObj.totalPages; + $scope.ecdapp.execData = jsonObj.items; + $scope.ecdapp.isExecDataLoading = false; + } + }, function(error) { + $log.error("execViewCtlr.updateExec failed: " + error); + $scope.ecdapp.isExecDataLoading = false; + }); + }; + + var getExecutionForId = function() { + $scope.ecdapp.isExecDataLoading = true; + InventoryExecutionService.getExecutionsById($scope.ecdapp.execId, + $scope.ecdapp.selectedTenant, $scope.ecdapp.currentPage, $scope.ecdapp.viewPerPage) + .then( + function(jsonObj) { + if (jsonObj.error) { + $scope.ecdapp.execData = []; + $scope.ecdapp.isExecDataLoading = false; + } else { + $scope.ecdapp.totalPages = jsonObj.totalPages; + $scope.ecdapp.execData = jsonObj.items; + $scope.ecdapp.isExecDataLoading = false; + } + }, function(error) { + $log.error("execViewCtlr.getExecutionsById failed: " + error); + $scope.ecdapp.isExecDataLoading = false; + }); + }; + /** + * Invoked at first page load AND when + * user clicks on the B2B pagination control. + */ + $scope.pageChangeHandler = function(page) { + $scope.ecdapp.currentPage = page; + if ($scope.ecdapp.selectedTenant != '') { + getPerTenantExecutions(); + } + } + + var getDeploymentsCount = function() { + $scope.ecdapp.isDepDataLoading = true; + $scope.ecdapp.execData = []; + InventoryDeploymentService.getDeploymentCount($scope.ecdapp.searchByDep).then( + function(jsonObj) { + if (jsonObj.error) { + $log.error("execViewCtlr.getDeploymentscount failed: " + + jsonObj.error); + $scope.ecdapp.depCount = 0; + $scope.ecdapp.depObjList = []; + } else { + $scope.ecdapp.depCount = jsonObj.totalItems; + $scope.ecdapp.depObjList = jsonObj.items; + $scope.ecdapp.isDepDataLoading = false; + } + }, + function(error) { + $log.error("execViewCtlr.getDeploymentscount failed: " + + error); + $scope.ecdapp.isDepDataLoading = false; + $scope.ecdapp.depCount = 0; + }); + }; + + var getPluginsCount = function() { + $scope.ecdapp.isPluginDataLoading = true; + ControllerService.getPluginsCount().then( + function(jsonObj) { + if (jsonObj.error) { + $log.error("execViewCtlr.getPluginsCount failed: " + + jsonObj.error); + $scope.ecdapp.isPluginDataLoading = false; + $scope.ecdapp.pluginCount = 0; + } else { + $scope.ecdapp.pluginCount = jsonObj.totalItems; + $scope.ecdapp.isPluginDataLoading = false; + } + }, + function(error) { + $log.error("execViewCtlr.getPluginsCount failed: " + + error); + $scope.ecdapp.pluginCount = 0; + $scope.ecdapp.isPluginDataLoading = false; + }); + }; + var getOwners = function() { + InventoryBlueprintService.getOwnersList().then( + function(jsonObj) { + if (jsonObj.error) { + $log.error("execViewCtlr.getOwnersList failed: " + + jsonObj.error); + $scope.ecdapp.bpOwners = []; + } else { + $scope.ecdapp.bpOwners = jsonObj; + localStorageService.set('bpOwners', JSON.stringify(jsonObj)); + } + }, + function(error) { + $log.error("execViewCtlr.getOwnersList failed: " + + error); + $scope.ecdapp.bpOwners = []; + }); + }; + + // Initialize the page + getTenants(); + getAppLabel(); + getBlueprintsCount(); + getDeploymentsCount(); + getOwners(); + getPluginsCount(); + getActiveExecutions(); + $scope.$on('$destroy', function() { + $scope.ecdapp.stopLoading(); + }); +}); diff --git a/ccsdk-app-os/src/main/webapp/app/ccsdk/home/executions_view.html b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/executions_view.html new file mode 100644 index 0000000..09d9814 --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/executions_view.html @@ -0,0 +1,377 @@ +<div id="page-content"> + <br> + <h4 class="heading-page" id="controllers">Dashboard</h4> + <hr class="lite"> + <div class="span3 form-row btn-switch-label" style="margin-top: -60px;float: right;"> + <div class="tooltip" b2b-tooltip trigger="focus"> + <a href="javascript:void(0)" class="tooltip-element" data-placement="left" role="button" + style="text-decoration: none; margin-right: 10px;"> + Access Type + <div class="arrow"></div> + </a> + <div class="tooltip-wrapper" role="tooltip" aria-live="polite" aria-atomic="false" style="z-index:1111"> + <div class="tooltip-size-control"> + <div class="helpertext" tabindex="-1" role="tooltip" id="tooltiptext1"> + <div class="popover-title">My Dashboard</div> + <div class="popover-content"> + <p>Toggle access type selection between logged in user's data or user role group data.</p> + <strong class="hidden-spoken">Double tap to close help message.</strong> + </div> + </div> + </div> + </div> + </div> + <!-- <span aria-hidden="true">Access level</span>--> + <div b2b-switches-v2 id="switch1" style="margin-top: -5px;" ng-model="ecdapp.level_switch.value" options="ecdapp.level_options" ng-disabled="allDisabled" ng-change="ecdapp.toggleUserFilt()"> + </div> + </div> + <div class="span3 form-row btn-switch-label"> + <div class="tooltip" b2b-tooltip trigger="focus"> + <a href="javascript:void(0)" class="tooltip-element" data-placement="left" role="button" + style="text-decoration: none; margin-right: 10px;"> + Auto Refresh + <div class="arrow"></div> + </a> + <div class="tooltip-wrapper" role="tooltip" aria-live="polite" aria-atomic="false" style="z-index:1111"> + <div class="tooltip-size-control"> + <div class="helpertext" tabindex="-1" role="tooltip" id="tooltiptext1"> + <div class="popover-title">Reload data automatically</div> + </div> + </div> + </div> + </div> + <!-- <span aria-hidden="true">Access level</span>--> + <div b2b-switches-v2 id="switch2" ng-model="ecdapp.inv_load.value" options="ecdapp.inv_query_options" > + </div> + </div> + <button title="Expand/Collapse Tiles Container" class="collapsible"></button> + <div class="content"> + <div class="b2b-card-container"> + <div class="row"> + <div class="span3 b2b-card-wid"> + <div class="b2b-cards" style="border-radius: 8px;text-shadow: 1px 1px 7px #0574ac;border: 1px solid gray;border-top: 5px solid #0574ac;"> + <div ng-show="ecdapp.isBpDataLoading" class="ng-scope ng-hide"> + <div class="span" style="margin-bottom: 5px;"> + <i class="icon-spinner small" role="img"></i> + </div> + </div> + <span class="tooltip" b2b-tooltip style="float: right; margin-top: -10px;"> + <a href="#" class="icon-tooltip tooltip-element" tabindex="0" role="button" data-placement="bottom" aria-label="Help" aria-describedby="tooltiptextRadio" > + <span class="arrow"></span> + </a> + <span class="tooltip-wrapper"> + <span class="tooltip-size-control"> + <span id="tooltiptextRadio" role="tooltip" aria-live="polite" aria-hidden="true" class="helpertext" tabindex="-1"> + <span class="popover-title">Aggregate count of blueprints for user/role set</span> + <span class="popover-content"> + <span>Navigation link to blueprints Inventory screen</span> + <strong class="hidden-spoken hidden-desktop">Double tap to close help message.</strong> + </span> + </span> + </span> + </span> + </span> + <a ng-if="ecdapp.level_switch.value" href="ecd#/ibp/owner:{{userId}}"> + <div class="b2b-card-header"> + <i class="icon-documents-document" role="img" style="font-size: 35px;margin-top: -20px;margin-left: -20px;"></i> + <span class="b2b-title" > {{ecdapp.bpCount}} </span> + </div> + <div class="b2b-card-content" + style="text-align: center;"> + BLUEPRINTS + </div> + </a> + <a ng-if="!ecdapp.level_switch.value" href="ecd#/ibp/owner:group"> + <div class="b2b-card-header"> + <i class="icon-documents-document" role="img" style="margin-top: -20px; + margin-left: -20px; font-size: 35px"></i> + <span class="b2b-title" > {{ecdapp.bpCount}} </span> + </div> + <div class="b2b-card-content" + style="text-align: center;"> + BLUEPRINTS + </div> + </a> + </div> + </div> + <div class="span3 b2b-card-wid"> + <div class="b2b-cards" style="text-shadow: 1px 1px 7px #008744;border-radius:8px;border: 1px solid gray;border-top: 5px solid #008744;"> + <div ng-show="ecdapp.isDepDataLoading" class="ng-scope ng-hide"> + <div class="span" style="margin-bottom: 5px;"> + <i class="icon-spinner small" role="img"></i> + </div> + </div> + <span class="tooltip" b2b-tooltip style="float: right; margin-top: -10px;"> + <a href="#" class="icon-tooltip tooltip-element" tabindex="0" role="button" data-placement="bottom" aria-label="Help" aria-describedby="tooltiptextRadio" > + <span class="arrow"></span> + </a> + <span class="tooltip-wrapper"> + <span class="tooltip-size-control"> + <span id="tooltiptextRadio" role="tooltip" aria-live="polite" aria-hidden="true" class="helpertext" tabindex="-1"> + <span class="popover-title">Aggregate count of deployments for user/role set</span> + <span class="popover-content"> + <span>Navigation link to cloudify deployments Inventory screen</span> + <strong class="hidden-spoken hidden-desktop">Double tap to close help message.</strong> + </span> + </span> + </span> + </span> + </span> + <a ng-if="ecdapp.level_switch.value" href="ecd#/idep/owner:{{userId}}"> + <div class="b2b-card-header"> + <i class="icon-misc-business" role="img" style="margin-top: -20px; + margin-left: -20px; font-size: 35px"></i> + <span class="b2b-title"> {{ecdapp.depCount}} </span> + </div> + <div class="b2b-card-content" + style="text-align: center;"> + DEPLOYMENTS + </div> + </a> + <a ng-if="!ecdapp.level_switch.value" href="ecd#/idep/owner:group"> + <div class="b2b-card-header"> + <i class="icon-misc-business" role="img" style="font-size: 35px;margin-top: -20px;margin-left: -20px;"></i> + <span class="b2b-title"> {{ecdapp.depCount}} </span> + </div> + <div class="b2b-card-content" + style="text-align: center;"> + DEPLOYMENTS + </div> + </a> + </div> + </div> + <div class="span3 b2b-card-wid"> + <div class="b2b-cards" style="text-shadow: 1px 1px 7px #e7d81e;border-radius:8px;border: 1px solid gray;border-top: 5px solid #e7d81e;"> + <div ng-show="ecdapp.isPluginDataLoading" class="ng-scope ng-hide"> + <div class="span" style="margin-bottom: 5px;"> + <i class="icon-spinner small" role="img"></i> + </div> + </div> + <span class="tooltip" b2b-tooltip style="float: right; margin-top: -10px;"> + <a href="#" class="icon-tooltip tooltip-element" tabindex="0" role="button" data-placement="bottom" aria-label="Help" aria-describedby="tooltiptextRadio" > + <span class="arrow"></span> + </a> + <span class="tooltip-wrapper"> + <span class="tooltip-size-control"> + <span id="tooltiptextRadio" role="tooltip" aria-live="polite" aria-hidden="true" class="helpertext" tabindex="-1"> + <span class="popover-title">Aggregate count of cloudify plugins</span> + <span class="popover-content"> + <span>Navigation link to cloudify plugins screen</span> + <strong class="hidden-spoken hidden-desktop">Double tap to close help message.</strong> + </span> + </span> + </span> + </span> + </span> + <a href="ecd#/iplug"> + <div class="b2b-card-header"> + <i class="icon-controls-gear" role="img" style="font-size: 35px;margin-top: -20px;margin-left: -20px;"></i> + <span class="b2b-title"> {{ecdapp.pluginCount}} </span> + </div> + <div class="b2b-card-content" + style="text-align: center;"> + PLUGINS + </div> + </a> + </div> + </div> + </div> + </div> + <div class="span9 row-nowrap" style="margin-bottom: 10px; float: right; margin-top: -30px;"> + <div class="span6 form-row"> + <div class="span12 field-group"> + <input class="span12" list="bpList" type="input" ng-model="ecdapp.currentBpId" ng-change="ecdapp.updateDepl()" placeholder="Blueprints"/> + <span class="tooltip" style="float: right; margin-top: -30px;" b2b-tooltip> + <a href="#" class="icon-tooltip tooltip-element" tabindex="0" role="button" data-placement="bottom" aria-label="Help" aria-describedby="tooltiptextRadio" > + <span class="arrow"></span> + </a> + <span class="tooltip-wrapper"> + <span class="tooltip-size-control"> + <span id="tooltiptextRadio" role="tooltip" aria-live="polite" aria-hidden="true" class="helpertext" tabindex="-1"> + <span class="popover-title">Blueprints list</span> + <span class="popover-content"> + <span>autocomplete dropdown list of blueprints, a selection will trigger deployment list query</span> + <strong class="hidden-spoken hidden-desktop">Double tap to close help message.</strong> + </span> + </span> + </span> + </span> + </span> + <datalist id="bpList"> + <option ng-repeat="d in ecdapp.bpObjList" value="{{d.typeId}}">{{d.typeName}}</option> + </datalist> + </div> + </div> + <div class="span1 form-row"> + <div ng-show="ecdapp.isDeplDataLoading" class="ng-scope ng-hide"> + <div class="span" style="margin-bottom: 5px;"> + <i class="icon-spinner small" role="img"></i> + </div> + </div> + </div> + <div class="span6 form-row"> + <!-- <label for="depl">Deployments</label>--> + + <div class="span12 field-group"> + <input id="depInput" class="span12" list="depList" type="input" ng-model="ecdapp.currentDep" ng-change="ecdapp.updateExec()" placeholder="Deployments"/> + <span class="tooltip" style="float: right; margin-top: -30px;" b2b-tooltip> + <a href="#" class="icon-tooltip tooltip-element" tabindex="0" role="button" data-placement="bottom" aria-label="Help" aria-describedby="tooltiptextRadio" > + <span class="arrow"></span> + </a> + <span class="tooltip-wrapper"> + <span class="tooltip-size-control"> + <span id="tooltiptextRadio" role="tooltip" aria-live="polite" aria-hidden="true" class="helpertext" tabindex="-1"> + <span class="popover-title">Deployments list</span> + <span class="popover-content"> + <span>autocomplete dropdown list of deployments, a selection will trigger deployment executions query</span> + <strong class="hidden-spoken hidden-desktop">Double tap to close help message.</strong> + </span> + </span> + </span> + </span> + </span> + <datalist id="depList"> + <option ng-repeat="d in ecdapp.depObjList" value="{{d.id}}:{{d.tenant_name}}">{{d.id}}</option> + </datalist> + </div> + </div> + </div> + </div> + <div ng-hide="ecdapp.errMsg" style="margin-top: 40px;border: 1px solid gray;border-radius: 5px;padding: 10px;clear: both;border-top: 2px solid #0d2dca;"> + <label for="executions-table">Executions</label> + <span class="tooltip" b2b-tooltip style="float: right; margin-top: -10px;"> + <a href="#" class="icon-tooltip tooltip-element" tabindex="0" role="button" data-placement="bottom" aria-label="Help" aria-describedby="tooltiptextRadio" > + <span class="arrow"></span> + </a> + <span class="tooltip-wrapper"> + <span class="tooltip-size-control"> + <span id="tooltiptextRadio" role="tooltip" aria-live="polite" aria-hidden="true" class="helpertext" tabindex="-1"> + <span class="popover-title">Executions summary table</span> + <span class="popover-content"> + <span>Current active executions are displayed by default. Use the search box to specify additional query filters for deployment executions. A deployment selection will automatically trigger a refresh of the executions table.</span> + <strong class="hidden-spoken hidden-desktop">Double tap to close help message.</strong> + </span> + </span> + </span> + </span> + </span> + <div id="button-search-row" style="float: right;width: 50%;"> + <div class="advanced-search"> + <input tabindex="0" style="padding-left: 50px;" + placeholder="Enter search filters from the dropdown menu" + class="advanced-search-input" type="text"></input> + <button type="button" id="show-menu-filters" + class="btn dropdown-toggle" + ng-click="ecdapp.toggleMoreFilters()" data-toggle="dropdown" + title="More Filters"> + <i class="icon-controls-down"></i> + </button> + </div> + <div class="menu-filters" ng-show="ecdapp.showingMoreFilters" style="width: 40%;"> + <div class="group"> + <label class="col-sm-3 control-label">Execution ID: </label> <input + tabindex="0" class="advanced-search-input" type="text" + title="Search by execution ID" + ng-model="ecdapp.execId"></input> + </div> + <div class="group"> + <label class="col-sm-3 control-label">Tenants: </label> + <div class="field-group"> + <select class="span12" name="tenant" b2b-dropdown placeholder-text="Select Tenant" ng-model="ecdapp.selectedTenant"> + <option b2b-dropdown-list option-repeat="d in ecdapp.availableTenants" value="{{d}}">{{d}}</option> + </select> + </div> + </div> + <div class="group"> + <label class="col-sm-3 control-label">Status: </label> + <div class="field-group"> + <select class="span12" name="status" b2b-dropdown placeholder-text="Select status" ng-model="ecdapp.selectedStatus"> + <option b2b-dropdown-list option-repeat="d in ecdapp.availableStatus" value="{{d}}">{{d}}</option> + </select> + </div> + </div> + <div class="group" style="float: right;"> + <button tabindex="-1" class="btn btn-small" + title="Reset Filters" type="button" + ng-click="ecdapp.resetFilters()"> + <i class="icon-arrows-update-refresh-sync"></i> + </button> + <button tabindex="1" class="btn btn-small" + title="Filtered search" type="button" + ng-click="ecdapp.extendedfilterSrch()"> + <i class="icon-controls-magnifyingglass"></i> + </button> + </div> + </div> + </div> + <hr class="lite" style="margin-top: 20px;"> + <div ng-show="ecdapp.isExecDataLoading" class="ng-scope ng-hide"> + <div class="span" style="margin-bottom: 5px;"> + <i class="icon-spinner small" role="img"></i> + </div> + </div> + <div b2b-table id="executions-table" class="b2b-table-div" + table-data="ecdapp.execData" search-string="ecdapp.searchString" + current-page="ecdapp.currentPageIgnored" + next-sort="ecdapp.nextSortIgnored"> + <table> + <thead b2b-table-row type="header"> + <tr id="th-header-row"> + <th b2b-table-header key="index"></th> + <th b2b-table-header key="deployment_id">Deployment</th> + <th b2b-table-header key="workflow_id">Workflow</th> + <th b2b-table-header key="created_at">Created</th> + <th b2b-table-header key="ended_at">Ended</th> + <th b2b-table-header key="tenant_name">Tenant</th> + <th b2b-table-header key="status">Status</th> + </tr> + </thead> + <tbody b2b-table-row type="body" + ng-repeat="rowData in ecdapp.execData"> + <tr id="tr-rowData"> + <td b2b-table-body> + <div class="id-tooltip"><span>ID</span> + <div class="wrapper"> + <button style="border-radius: 5px;margin-right: 20px;font-weight: lighter;border: 1px solid black;" + ng-click="ecdapp.copyStringToClipboard(rowData.id)" class="">Copy ID</button> + <span class="id-tooltiptext">{{rowData.id}}</span> + </div> + </div> + </td> + <!-- <td b2b-table-body>ID</td>--> + <td b2b-table-body> + <a href="ecd#/idep/tenant:{{rowData.tenant_name}};serviceRef:{{rowData.deployment_id}}"> + {{rowData.deployment_id}} + </a> + </td> + <td b2b-table-body ng-bind="rowData.workflow_id" /> + <td b2b-table-body ng-bind="rowData.created_at" /> + <td b2b-table-body ng-bind="rowData.ended_at" /> + <td b2b-table-body ng-bind="rowData.tenant_name" /> + <!-- <td b2b-table-body ng-bind="rowData.id" />--> + <td b2b-table-body ng-if="rowData.status == 'pending'" > + <span class="ng-scope" style="background-color: #edef8e;padding: 5px;border-radius: 3px; opacity: 0.6; font-weight: bold;">waiting to start</span></td> + <td b2b-table-body ng-if="rowData.status == 'started'" > + <span class="ng-scope" style="background-color: ##f0fd2e;padding: 5px;border-radius: 3px; opacity: 0.6; font-weight: bold;">in-progress</span></td> + <td b2b-table-body ng-if="rowData.status == 'cancelling'" > + <span class="ng-scope" style="background-color: #cabdbd;padding: 5px;border-radius: 3px;opacity: 0.6; font-weight: bold;">cancel in progress</span></td> + <td b2b-table-body ng-if="rowData.status == 'force_cancelling'" > + <span class="ng-scope" style="background-color: #cabdbd;padding: 5px;border-radius: 3px;opacity: 0.6; font-weight: bold;"">force-cancelling in progress</span> </td> + <td b2b-table-body ng-if="rowData.status == 'cancelled'" > + <span class="ng-scope" style="background-color: #9a9690;padding: 5px;border-radius: 3px;opacity: 0.6; font-weight: bold;">cancelled</span> + </td> + <td b2b-table-body ng-if="rowData.status == 'terminated'" > + <span class="ng-scope" style="background-color: #62d826;padding: 5px;border-radius: 3px;opacity: 0.6; font-weight: bold;">successful</span> + </td> + <td b2b-table-body ng-if="rowData.status == 'failed'"> + <span class="ng-scope" style="background-color: #fd2e2e;padding: 5px;border-radius: 3px;opacity: 0.6; font-weight: bold;">failed</span> + </td> + </tr> + </tbody> + </table> + </div> + <div b2b-pagination="" total-pages="ecdapp.totalPages" + current-page="ecdapp.currentPageNum" + click-handler="pageChangeHandler" role="navigation"></div> + </div> +</div>
\ No newline at end of file diff --git a/ccsdk-app-os/src/main/webapp/app/ccsdk/home/oom-style.css b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/oom-style.css new file mode 100644 index 0000000..df3e489 --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/oom-style.css @@ -0,0 +1,658 @@ +/* Styles for ECOMP Controller Dashboard */ + +.content-container { + min-height: 650px; + width: calc(100% - 50px); +} + +.ecd-error-message { + font-size: 14px; + font-weight: bold; + color: red; +} + +.ecd-icon-display { + font-size: 18px; +} + +.ecd-icon-action { + font-size: 18px; +} + +.ecd-icon-action:hover { + color: red; + text-decoration: none; +} + +.selected { + background-color:#abb5e6; + color:black; + font-weight:bold; +} +.red-background { + background-color: #ff0000b3; + } +.green-background { + background-color: #bbf0bb; + } +.td-error { + border-top: 2px dotted red; + border-bottom: 2px dotted red; + background-color: rgb(210, 190, 190); + } +.menu { + display: none; + z-index: 1000; + border: 1px dotted; + border-radius: 5px; + padding: 10px; + width: 40%; + background: azure; + position: fixed; + overflow: scroll; + background: slategray; + color: white; + right: 20px; +} + +.show-menu { + z-index: 800; +} + +#show-menu { + display: none; +} + +#show-menu:checked ~ .menu { + display: block; +} + +#show-menu:checked ~ .show-menu { + color: blue; +} + +.menu-off { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 700; + display: none; +} + +.menu-off { + display: none; +} + +#show-menu:checked ~ .menu-off { + display: block; +} + +#show-menu:checked ~ .show-menu { + display: none; +} + +.menu-off input[type=checkbox]:checked ~ .menu { + display: none; +} + +.menu-off input[type=checkbox]:checked ~ .show-menu { + display: block; +} + +.menu-filters { + display: block; + z-index: 1000; + border: 1px dotted; + border-radius: 5px; + padding: 10px; + width: 48%; + background: #ffffff; + position: absolute; + overflow: scroll; +} + +.show-menu-filters { + z-index: 800; + color: blue; +} + +#show-menu-filters[aria-expanded="true"] ~ .menu-filters { + display: block; +} + +#show-menu-filters:checked ~ .show-menu-filters { + color: blue; +} + +.menu-filters-off { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 700; + display: none; +} + +.menu-filters-off { + display: none; +} + +#show-menu-filters:checked ~ .menu-filters-off { + display: block; +} + +#show-menu-filters:checked ~ .show-menu-filters { + display: none; +} + +.menu-filters-off input[type=checkbox]:checked ~ .menu-filters { + display: none; +} + +.menu-filters-off input[type=checkbox]:checked ~ .show-menu-filters { + display: block; +} + +.ui-select-match .btn { + font-size: 1.5rem; + padding: 5px; +} + +.ui-select-multiple.ui-select-bootstrap .ui-select-match .close { + font-size: 1.0em; + margin-left: 10px; +} +.advanced-search { + display: block; + position: relative; +} + +.advanced-search .btn{ + box-shadow: none; + position: absolute; + top: 5px; + right: 3px; + min-width: 10px; + width: 25px; + height: 25px; + padding: 1px 1px 1px 1px; + +} + +.advanced-search i { + position: relative; + top: 0px; + right: 0px; + width: 20px; + height: 20px; + padding: 0px 0px 0px 0px; + margin: 0px 0px 0px 0px; +} + +.advanced-search-input { + padding: 10px 19px 9px 18px; + font-size: 1.5rem; + border-radius: 8px; + width: 100%; +} +td > .btn-group { + min-width: 0; + width: auto; +} + +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle:focus { + outline: 0; +} +.dropdown-menu { + position: absolute; + z-index: 1000; + display: none; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + text-align: left; + list-style: none; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + top: 30px; + left: -10px; +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + color: #262626; + text-decoration: none; + background-color: #f5f5f5; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #fff; + text-decoration: none; + background-color: #337ab7; + outline: 0; +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #777; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.open > .dropdown-menu { + display: block; +} +.open > a { + outline: 0; +} +.dropdown-menu-right { + right: 0; + left: auto; +} +.dropdown-menu-left { + right: auto; + left: 0; +} +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.42857143; + color: #777; + white-space: nowrap; +} +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + content: ""; + border-top: 0; + border-bottom: 4px dashed; + border-bottom: 4px solid \9; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 2px; +} +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto; + } + .navbar-right .dropdown-menu-left { + right: auto; + left: 0; + } +} + +.dropdown-menu li { + margin-bottom: 5px; +} + +.dropdown-menu li div { + padding-left: 5px; +} + +.dropdown-menu li div i { + margin-right: 5px; +} + +td > .btn-group > .btn { + min-width: 0; + color: #0568ae; +} + +td > .btn-group > .btn> i { + font-size: 30px; +} + +li > a.active { + font-weight: bolder; + outline: thin dotted #666; +} + +tr:hover { + background-color: #f2f2f2; +} + +tr:focus { + background-color: #f2f2f2; +} + +.modalwrapper.modal-docked .modal-jumbo { + max-height: 100%; + height: 100%; + overflow: hidden; + top: 0; + width: 100%; + max-width: 100%; +} + +#addAppDiv { + padding-left: 10px; + background: lightgray; + border-radius: 5px; + padding-bottom: 15px; +} + +.field-group.error .error-msg { + color: red; + display: block; + font-size: 14px; + line-height: 14px; + font-family: "Omnes-ATT-W02-Medium"; + position: relative; + padding-left: 18px; + margin-top: 10px; +} + +.heading-page { + margin-bottom: 20px; +} + +.footer-container { + top: 25px; +} +.b2b-dragdrop { + padding: 10px; +} + +.my-tooltip { + position: relative; + display: inline; +} + +.id-tooltip { + position: relative; + display: inline; +} + +.id-tooltip > .id-tooltiptext, .id-tooltip > .wrapper { + display: flex; + visibility: hidden; + width: 400px; + background-color: #dbdde3; + white-space: pre-line; + border-radius: 6px; + padding: 10px; + position: absolute; + bottom: 25%; + left: 80%; + transition: opacity 0.3s; + border: 1px solid gray; +} + +.id-tooltip:hover > .id-tooltiptext, .id-tooltip:hover > .wrapper { + pointer-events: auto; + visibility: visible; + opacity: 1; +} +.wrapper > .id-tooltiptext { + overflow-y: auto; + max-height: 400px; + display: block; + clear: both; +} + +.id-tooltip .id-tooltiptext::after { + content: ""; + position: absolute; + top: 40%; + right: 100%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: transparent #544f4f transparent transparent; +} + +.wrapper { + position:relative; +} + +.my-tooltip > .my-tooltiptext, .my-tooltip > .wrapper { + visibility: hidden; + width: 600px; + background-color: #647dd6; + color: #fff; + white-space: pre-line; + border-radius: 6px; + padding: 10px; + position: absolute; + z-index: 1; + bottom: 90%; + left: -5%; + opacity: 0; + transition: opacity 0.3s; + overflow: visible; +} + +.my-tooltip .my-tooltiptext::after { + content: ""; + position: absolute; + top: 100%; + left: 50%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: #555 transparent transparent transparent; +} + +.my-tooltip:hover > .my-tooltiptext, .my-tooltip:hover > .wrapper { + pointer-events: auto; + visibility: visible; + opacity: 1; +} +.wrapper > .my-tooltiptext { + overflow-y: auto; + max-height: 400px; + display: block; + clear: both; +} + +.stat_tooltip { + position: relative; + display: inline-block; + top: -10px; +} + +.gen_tooltip { + display: inline-block; + position: relative; +} + +.gen_tooltip .gen_tooltiptext_r { + visibility: hidden; + width: 250px; + background-color: #647dd6; + color: #000; + text-align: center; + border-radius: 2px; + border: 1px solid rgba(0, 0, 0, .15); + padding: 5px 0; + position: absolute; + z-index: 100; + left: 110%; + top: -50%; +} + +.gen_tooltip .gen_tooltiptext_r::after { + content: ""; + position: absolute; + top: 50%; + right: 100%; /* to the left of tooltip */ + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: transparent #fff transparent transparent; +} + +.gen_tooltip:hover .gen_tooltiptext_r { + visibility: visible; +} + +.stat_tooltip .stat_tooltiptext, .stat_tooltip .wrapper { + visibility: hidden; + width: 500px; + background-color: #c8d1f0; + color: #000; + text-align: left; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .15); + padding: 5px 0; + position: absolute; + z-index: 100; + bottom: 100%; + height: 200px; +} + +.stat_tooltip .stat_tooltiptext::after, .stat_tooltip .wrapper::after { + content: ""; + position: absolute; + top: 100%; + left: 4%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: rgba(0, 0, 0, .15) transparent transparent transparent; +} + +.stat_tooltip:hover .stat_tooltiptext, .stat_tooltip:hover .wrapper { + visibility: visible; +} + +.stat_tooltip .wrapper .clip-btn-div { + display: inline; + left: 50px; + top: 80px; +} + +.b2b-card-container { + background-color: #ffffff; +} + +.b2b-cards { + transition: .5s; + opacity: .7; +} +.b2b-cards a { + text-decoration: none; +} + +.b2b-cards:hover { + box-shadow: 0px 0px 20px 10px #eccc5e; + text-shadow: none !important; + background-color: #ffffff !important; + opacity: 1; + +} + +.b2b-cards .tooltip { + visibility: hidden; +} + +.b2b-cards:hover .tooltip { + visibility: visible; +} + +.b2b-cards .b2b-card-footer-flyout { + visibility: hidden; +} + +.b2b-cards:hover .b2b-card-footer-flyout { + visibility: visible; +} +.b2b-card-header { + text-align: center; +} + +.b2b-card-header i { + font-size: 35px; +} +.b2b-card-container .b2b-title { + font-size: 50px; +} +.b2b-card-content { + text-align: center; +} + +.collapsible { + color: #2196F3; + cursor: pointer; + padding: 18px; + width: 100%; + border: none; + outline: none; + font-size: 25px; + font-weight: bolder; + background-color: #ffffff; + height: 2px; + margin-top: -30px; +} + +.collapsible:after { + content: "\2796"; + color: #2196F3; + float: right; + margin-left: 5px; +} + +.collapsible.active:after { + content: '\02795'; +} + +.content { + padding: 0 18px; + height: auto; + display: block; + transition: max-height 0.2s ease-out; + +} diff --git a/ccsdk-app-os/src/main/webapp/app/ccsdk/home/oom_spa.html b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/oom_spa.html new file mode 100644 index 0000000..378ddfe --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/app/ccsdk/home/oom_spa.html @@ -0,0 +1,151 @@ +<!-- + ============LICENSE_START========================================== + =================================================================== + Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the "License"); + you may not use this software 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============================================ + --> + +<!DOCTYPE html> +<!-- DCAE Dashboard single-page application using B2B/DS2. --> +<html> + <head> + <meta charset="UTF-8"> + <title>DCAE Dashboard</title> + <link rel="icon" type="image/ico" href="app/ccsdk/images/onap_32x32.ico" /> + + <!-- Third-party scripts from EPSDK overlay --> + <script src="app/fusion/external/angular-1.4.13/angular.js"></script> + <script src="app/fusion/external/angular-1.4.13/angular-cookies.js"></script> + <script src="app/fusion/external/angular-1.4.13/angular-messages.js"></script> + <script src="app/fusion/external/angular-1.4.13/angular-route.js"></script> + <script src="app/fusion/external/angular-1.4.13/angular-sanitize.js"></script> + <script src="app/fusion/external/angular-1.4.13/angular-touch.js"></script> + <script src="app/fusion/external/jquery/dist/jquery.min.js"></script> + <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script> + + <!-- Third-party scripts from app --> + <script src="app/ccsdk/external/bootstrap.min.js" type="text/javascript"></script> + <script src="app/ccsdk/external/yaml.js" type="text/javascript"></script> + <script src="app/ccsdk/external/index.js" type="text/javascript"></script> + <script src="app/ccsdk/external/select.js" type="text/javascript"></script> + <script src="app/ccsdk/external/angular-local-storage.js" type="text/javascript"></script> + <script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.js"></script> + + <!-- Tweaked CSS --> + <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css"> + <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/font_icons.css"> + + <!-- icons in open source --> + <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css"> + <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css"> + + <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css"> + <link rel="stylesheet" type="text/css" href="app/ccsdk/external/select.css"> + <link rel="stylesheet" href="app/ccsdk/home/oom-style.css"/> + + <!-- main app --> + <script src="app/ccsdk/home/modal-service.js"></script> + <script src="app/ccsdk/home/appDS2.js"></script> + + <!-- directives and services --> + <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script> + <script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script> + <script src="app/fusion/scripts/DS2-services/manifestService.js"></script> + <script src="app/fusion/scripts/DS2-directives/footer.js"></script> + <script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script> + <script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script> + <script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script> + <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script> + + <!-- OOM home --> + <script src="app/ccsdk/home/controller-service.js"></script> + <script src="app/ccsdk/home/executions-view-controller.js"></script> + <script src="app/ccsdk/home/api-docs-controller.js"></script> + + <!-- Cloudify --> + <script src="app/ccsdk/cloudify/deployment-service.js"></script> + <script src="app/ccsdk/cloudify/deployment-controllers.js"></script> + <script src="app/ccsdk/cloudify/execution-service.js"></script> + <script src="app/ccsdk/cloudify/plugin-table-controller.js"></script> + <script src="app/ccsdk/cloudify/plugin-service.js"></script> + + <!--Inventory--> + <script src="app/ccsdk/inventory/blueprint-service.js"></script> + <script src="app/ccsdk/inventory/blueprint-controllers.js"></script> + <script src="app/ccsdk/inventory/deployment-service.js"></script> + <script src="app/ccsdk/inventory/execution-service.js"></script> + + <!-- Consul --> + <script src="app/ccsdk/consul/service-health-service.js"></script> + <script src="app/ccsdk/consul/service-controllers.js"></script> + <script src="app/ccsdk/consul/node-table-controller.js"></script> + <script src="app/ccsdk/consul/node-health-service.js"></script> + <script src="app/ccsdk/consul/node-services-controller.js"></script> + <script src="app/ccsdk/consul/datacenter-table-controller.js"></script> + <script src="app/ccsdk/consul/datacenter-health-service.js"></script> + + <!-- user admin pages --> + <script src="app/fusion/scripts/DS2-services/adminService.js"></script> + <script src="app/fusion/scripts/DS2-services/ds2-profile/selfProfileService.js"></script> + <script src="app/fusion/scripts/DS2-services/profileServiceDS2.js"></script> + <script src="app/fusion/scripts/DS2-controllers/ds-profile/post-controller.js"></script> + <script src="app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js"></script> + <script src="app/fusion/scripts/DS2-services/postSearch.js"></script> + <script src="app/fusion/scripts/DS2-controllers/profile-search-controller-DS2.js"></script> + + <!-- app admin pages --> + <script src="app/fusion/scripts/DS2-services/adminMenuService.js"></script> + <script src="app/fusion/scripts/DS2-controllers/admin-controller.js"></script> + <script src="app/fusion/scripts/DS2-controllers/admin-menu-edit.js"></script> + <script src="app/fusion/scripts/DS2-controllers/usage-list-controller.js"></script> + <script src="app/fusion/scripts/DS2-controllers/fn-menu-add-popup-controller.js"></script> + + <!-- main page --> + <script src="app/ccsdk/home/app-router.js"></script> + + <style> + .csep-root1{ + background: white; + } + .dropdown-submenu { + position: relative; + } + + .dropdown-submenu .dropdown-menu { + top: 0; + left: 100%; + margin-top: -1px; + } + </style> + + </head> + <body class="appBody" ng-app="abs"> + <!-- double quotation marks are required for the popup templates - values are string literals --> + <div ng-include src="'app/ccsdk/home/ecd_popup_templates.html'"></div> + <div ng-include src="'app/ccsdk/cloudify/deployment_popups.html'"></div> + <div ng-include src="'app/ccsdk/inventory/inventory_blueprint_popups.html'"></div> + <div ng-include src="'app/ccsdk/inventory/inventory_execution_popups.html'"></div> + <div ng-include src="'app/ccsdk/inventory/inventory_deployment_popups.html'"></div> + <div ng-include src="'app/ccsdk/consul/service_popups.html'"></div> + <div ng-include src="'app/ccsdk/consul/node_popups.html'"></div> + <div ds2-header id="header" class="header-container"></div> + <div ds2-menu id="menu-container" class="menu-container"></div> + <div ng-view id="rightContentProfile" class="content-container"></div> + <div ds2-footer class="footer-container"></div> + </body> +</html> diff --git a/ccsdk-app-os/src/main/webapp/app/ccsdk/images/ecomp.png b/ccsdk-app-os/src/main/webapp/app/ccsdk/images/ecomp.png Binary files differnew file mode 100644 index 0000000..b355f10 --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/app/ccsdk/images/ecomp.png diff --git a/ccsdk-app-os/src/main/webapp/app/ccsdk/images/onap_16x16.ico b/ccsdk-app-os/src/main/webapp/app/ccsdk/images/onap_16x16.ico Binary files differnew file mode 100644 index 0000000..8eb0495 --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/app/ccsdk/images/onap_16x16.ico diff --git a/ccsdk-app-os/src/main/webapp/app/ccsdk/images/onap_32x32.ico b/ccsdk-app-os/src/main/webapp/app/ccsdk/images/onap_32x32.ico Binary files differnew file mode 100644 index 0000000..e434286 --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/app/ccsdk/images/onap_32x32.ico diff --git a/ccsdk-app-os/src/main/webapp/app/ccsdk/images/onap_logo_2257x496.png b/ccsdk-app-os/src/main/webapp/app/ccsdk/images/onap_logo_2257x496.png Binary files differnew file mode 100644 index 0000000..36ee1f5 --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/app/ccsdk/images/onap_logo_2257x496.png diff --git a/ccsdk-app-os/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css b/ccsdk-app-os/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css index 8a27586..88bab24 100644 --- a/ccsdk-app-os/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css +++ b/ccsdk-app-os/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css @@ -56,7 +56,7 @@ .icon-misc-trash:before, .icon-misc-pen:before, .ion-navicon:before, -.icon-primary-close:before, .close:before, .reset-field:before, +.icon-primary-close:before, .reset-field:before, .icon-datanetwork-softwareasaservice:before, .icon-datanetwork-messaging2:before, .icon-controls-settingsconnectedactivity:before, @@ -184,7 +184,7 @@ .icon-content-star:before { content: "\f24e"; } -.icon-primary-close:before, .close:before, .reset-field:before { content: "\f129"; } +.icon-primary-close:before, .reset-field:before { content: "\f129"; } .icon-datanetwork-softwareasaservice:before { content: "\f40c"; } diff --git a/ccsdk-app-os/src/main/webapp/index.jsp b/ccsdk-app-os/src/main/webapp/index.jsp new file mode 100644 index 0000000..e02bb6b --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/index.jsp @@ -0,0 +1,5 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + +<%-- Redirected because we can't set the welcome page to a virtual URL. --%> +<%-- Forward to the intended start page to reduce frustration for new users. --%> +<c:redirect url="/ecd"></c:redirect> diff --git a/ccsdk-app-os/src/main/webapp/manifest.jsp b/ccsdk-app-os/src/main/webapp/manifest.jsp new file mode 100644 index 0000000..417825f --- /dev/null +++ b/ccsdk-app-os/src/main/webapp/manifest.jsp @@ -0,0 +1,28 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<% + // Read contents of maven-generated manifest file. + final String path = "/META-INF/MANIFEST.MF"; + java.io.InputStream input = getServletContext().getResourceAsStream(path); + java.io.InputStreamReader reader = new java.io.InputStreamReader(input, "UTF-8"); + char [] buf = new char[1024]; + int length = reader.read(buf, 0, buf.length); + final String manifest = new String(buf, 0, length); + reader.close(); + input.close(); +%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Manifest</title> +</head> +<body> +<h2> +Contents of file <%= path %>: +</h2> +<pre> +<%= manifest %> +</pre> +</body> +</html> |