From 30ec390479c9b7eeeaa90f036be02162c29ae918 Mon Sep 17 00:00:00 2001 From: "guillaume.lambert" Date: Tue, 14 Sep 2021 12:32:24 +0200 Subject: [COMMON] Add and run pre-commit linters via tox - create a .pre-commit-config.yaml configuration file with * gitlint * trailing blanks linter * tabs removal linter - exclude .git folder from it - exclude Makefiles since tabs are mandatory by default in them - create a tox pre-commit profile to run it from tox note gitlint is not runnable at this pre-commit stage - create pre-commit-install and pre-commit-uninstall tox profiles to (un)install hooks locally and (un)perform tests at each "git commit" call (i.e. without calling manually the pre-commit tox profile) - precise pre-commit stages/types in the pre-commit configuration file so that hooks are installed correctly. This avoids messages about skipped tests when they are run at a wrong stage. Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert Change-Id: Ie95bb4f6f90be80b05a1398973caffeff7936881 --- .../properties/ONAPPORTAL/fusion.properties | 2 +- .../deliveries/properties/ONAPPORTAL/logback.xml | 516 ++++++++++----------- .../properties/ONAPPORTAL/system.properties | 26 +- .../components/portal-app/resources/server/web.xml | 234 +++++----- 4 files changed, 389 insertions(+), 389 deletions(-) (limited to 'kubernetes/portal/components/portal-app/resources') diff --git a/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/fusion.properties b/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/fusion.properties index 3dbf434322..7020a40bb4 100755 --- a/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/fusion.properties +++ b/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/fusion.properties @@ -44,7 +44,7 @@ account_admin_role_id = 999 restricted_app_role_id = 900 # Home Page index html -home_page = /index.html +home_page = /index.html authentication_mechanism =DBAUTH diff --git a/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/logback.xml b/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/logback.xml index e707e259ca..325da8e9e3 100644 --- a/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/logback.xml +++ b/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/logback.xml @@ -4,7 +4,7 @@ ONAP Portal =================================================================== Copyright © 2017 AT&T Intellectual Property. All rights reserved. - Modifications Copyright © 2018 Amdocs, Bell Canada + Modifications Copyright © 2018 Amdocs, Bell Canada ==================================================================== Unless otherwise specified, all software contained herein is licensed under the Apache License, Version 2.0 (the “License”); @@ -37,264 +37,264 @@ - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${applicationLoggerPattern} - - - - - - - - - - - - ${logDirectory}/${generalLogName}.log - - - ${logDirectory}/${generalLogName}.log.%d{yyyy-MM-dd}.zip - - 30 - - - ${applicationLoggerPattern} - - - - - - 256 - - true - - - - - - - - - - - - - - - - - - - ${logDirectory}/${auditLogName}.log - - - ${logDirectory}/${auditLogName}.log.%d{yyyy-MM-dd}.zip - - 30 - - - ${auditLoggerPattern} - - - - 256 - - - - - ${logDirectory}/${metricsLogName}.log - - - ${logDirectory}/${metricsLogName}.log.%d{yyyy-MM-dd}.zip - - 30 - - - ${metricsLoggerPattern} - - - - - - 256 - - - - - ${logDirectory}/${errorLogName}.log - - - ${logDirectory}/${errorLogName}.log.%d{yyyy-MM-dd}.zip - - 30 - - - ${errorLoggerPattern} - - - - - 256 - - - - - ${debugLogDirectory}/${debugLogName}.log - - - ${logDirectory}/${debugLogName}.log.%d{yyyy-MM-dd}.zip - - 30 - - - ${defaultLoggerPattern} - - - - - 256 - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${applicationLoggerPattern} + + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + + ${logDirectory}/${generalLogName}.log.%d{yyyy-MM-dd}.zip + + 30 + + + ${applicationLoggerPattern} + + + + + + 256 + + true + + + + + + + + + + + + + + + + + + + ${logDirectory}/${auditLogName}.log + + + ${logDirectory}/${auditLogName}.log.%d{yyyy-MM-dd}.zip + + 30 + + + ${auditLoggerPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + + ${logDirectory}/${metricsLogName}.log.%d{yyyy-MM-dd}.zip + + 30 + + + ${metricsLoggerPattern} + + + + + + 256 + + + + + ${logDirectory}/${errorLogName}.log + + + ${logDirectory}/${errorLogName}.log.%d{yyyy-MM-dd}.zip + + 30 + + + ${errorLoggerPattern} + + + + + 256 + + + + + ${debugLogDirectory}/${debugLogName}.log + + + ${logDirectory}/${debugLogName}.log.%d{yyyy-MM-dd}.zip + + 30 + + + ${defaultLoggerPattern} + + + + + 256 + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/system.properties b/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/system.properties index d246a6b0b1..34c7f1dee0 100755 --- a/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/system.properties +++ b/kubernetes/portal/components/portal-app/resources/config/deliveries/properties/ONAPPORTAL/system.properties @@ -45,20 +45,20 @@ application_user_id = 30000 post_default_role_id = 1 #Enable Fusion Mobile capabilities for the application -mobile_enable = false +mobile_enable = false cache_config_file_path = /WEB-INF/conf/cache.ccf cache_switch = 1 cache_load_on_startup = false -user_name = fullName -decryption_key = AGLDdG4D04BKm2IxIWEr8o== +user_name = fullName +decryption_key = AGLDdG4D04BKm2IxIWEr8o== #Cron Schedules cron_site_name = one log_cron = 0 * * * * ? * -sessiontimeout_feed_cron = 0 0/5 * * * ? * +sessiontimeout_feed_cron = 0 0/5 * * * ? * #Front end URL frontend_url = https://{{.Values.global.portalHostName}}:{{.Values.global.portalFEPort}}/ONAPPORTAL/applicationsHome @@ -69,22 +69,22 @@ frontend_url = https://{{.Values.global.portalHostName}}:{{.Val # This value must be generated and updated at the time of # the deployment. # Online Unique UUID generator - https://www.uuidgenerator.net/ -instance_uuid = 90bc9497-10e6-49fe-916b-dcdfaa972383 +instance_uuid = 90bc9497-10e6-49fe-916b-dcdfaa972383 -elastic_search_url = http:// -contact_us_link = http:// -user_guide_link = http:// +elastic_search_url = http:// +contact_us_link = http:// +user_guide_link = http:// # Contact Us page properties -ush_ticket_url = http:// -feedback_email_address = portal@lists.onap.org -portal_info_url = https:// +ush_ticket_url = http:// +feedback_email_address = portal@lists.onap.org +portal_info_url = https:// #Online user bar refresh interval, in seconds -online_user_update_rate = 30 +online_user_update_rate = 30 #Online user bar refresh total duration, in seconds -online_user_update_duration = 300 +online_user_update_duration = 300 #authenticate user server authenticate_user_server=http://{{.Values.global.portalHostName}}:8383/openid-connect-server-webapp/allUsers diff --git a/kubernetes/portal/components/portal-app/resources/server/web.xml b/kubernetes/portal/components/portal-app/resources/server/web.xml index 8f88e12666..7c4f2a7275 100644 --- a/kubernetes/portal/components/portal-app/resources/server/web.xml +++ b/kubernetes/portal/components/portal-app/resources/server/web.xml @@ -5,151 +5,151 @@ =================================================================== Copyright (C) 2017 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. - + Unless otherwise specified, all documentation contained herein is licensed under the Creative Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except in compliance with the License. You may obtain a copy of the License at - + https://creativecommons.org/licenses/by/4.0/ - + Unless required by applicable law or agreed to in writing, documentation 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============================================ - - + + --> - fusion - - - - - - - - - - - org.onap.portalapp.portal.listener.UserSessionListener - - - - CorsFilter - org.apache.catalina.filters.CorsFilter - - cors.allowed.origins - http://www.portal.onap.org:9200,http://www.portal.onap.org:9000 - - - cors.allowed.methods - GET,POST,HEAD,OPTIONS,PUT,DELETE - - - cors.allowed.headers - EPService,JSESSIONID,X-ECOMP-RequestID,X-Widgets-Type,Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers - - - cors.exposed.headers - Access-Control-Allow-Origin,Access-Control-Allow-Credentials - - - cors.support.credentials - true - - - cors.preflight.maxage - 10 - - - + fusion + + + + + + + + + + + org.onap.portalapp.portal.listener.UserSessionListener + + + + CorsFilter + org.apache.catalina.filters.CorsFilter + + cors.allowed.origins + http://www.portal.onap.org:9200,http://www.portal.onap.org:9000 + + + cors.allowed.methods + GET,POST,HEAD,OPTIONS,PUT,DELETE + + + cors.allowed.headers + EPService,JSESSIONID,X-ECOMP-RequestID,X-Widgets-Type,Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers + + + cors.exposed.headers + Access-Control-Allow-Origin,Access-Control-Allow-Credentials + + + cors.support.credentials + true + + + cors.preflight.maxage + 10 + + + CorsFilter /* - - - SecurityXssFilter - org.onap.portalapp.filter.SecurityXssFilter - - - - SecurityXssFilter - /* - - - - - - + + + SecurityXssFilter + org.onap.portalapp.filter.SecurityXssFilter + + + + SecurityXssFilter + /* + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + -- cgit 1.2.3-korg