From 539f0d91faeb6beee3db259f0b03deb26ab3b9ac Mon Sep 17 00:00:00 2001 From: Sergey Grigoriev Date: Fri, 19 Jul 2024 10:42:34 +0200 Subject: [PATCH] chore: use about.jsp from generic --- .../excel-importer-admin/pages/about.jsp | 104 +----------------- 1 file changed, 1 insertion(+), 103 deletions(-) diff --git a/src/main/resources/webapp/excel-importer-admin/pages/about.jsp b/src/main/resources/webapp/excel-importer-admin/pages/about.jsp index cf9ff7a..352d08f 100644 --- a/src/main/resources/webapp/excel-importer-admin/pages/about.jsp +++ b/src/main/resources/webapp/excel-importer-admin/pages/about.jsp @@ -1,103 +1 @@ -<%@ page import="ch.sbb.polarion.extension.generic.properties.CurrentExtensionConfiguration" %> -<%@ page import="ch.sbb.polarion.extension.generic.rest.model.Version" %> -<%@ page import="ch.sbb.polarion.extension.generic.util.ExtensionInfo" %> -<%@ page import="ch.sbb.polarion.extension.generic.util.VersionUtils" %> -<%@ page import="java.util.Collections" %> -<%@ page import="java.util.Properties" %> -<%@ page import="java.io.InputStream" %> -<%@ page import="java.nio.charset.StandardCharsets" %> -<%@ page import="java.util.List" %> -<%@ page import="java.util.Set" %> -<%@ page import="java.util.ArrayList" %> -<%@ page contentType="text/html; charset=UTF-8" %> - - - -<%! - private static final String ABOUT_TABLE_ROW = "%s%s"; - private static final String CONFIGURATION_PROPERTIES_TABLE_ROW = "%s%s"; - - Version version = ExtensionInfo.getInstance().getVersion(); - Properties properties = CurrentExtensionConfiguration.getInstance().getExtensionConfiguration().getProperties(); -%> - - - - - - - - - -
-

About

- -
- - -

Extension info

- - - - - - - - - - <% - out.println(ABOUT_TABLE_ROW.formatted(VersionUtils.BUNDLE_NAME, version.getBundleName())); - out.println(ABOUT_TABLE_ROW.formatted(VersionUtils.BUNDLE_VENDOR, version.getBundleVendor())); - if (version.getSupportEmail() != null) { - String mailToLink = "%s".formatted(version.getSupportEmail(), version.getSupportEmail()); - out.println(ABOUT_TABLE_ROW.formatted(VersionUtils.SUPPORT_EMAIL, mailToLink)); - } - out.println(ABOUT_TABLE_ROW.formatted(VersionUtils.AUTOMATIC_MODULE_NAME, version.getAutomaticModuleName())); - out.println(ABOUT_TABLE_ROW.formatted(VersionUtils.BUNDLE_VERSION, version.getBundleVersion())); - out.println(ABOUT_TABLE_ROW.formatted(VersionUtils.BUNDLE_BUILD_TIMESTAMP, version.getBundleBuildTimestamp())); - %> - -
Manifest entryValue
- -

Extension configuration properties

- - - - - - - - - - <% - Set keySet = properties.keySet(); - List propertyNames = new ArrayList<>(); - for (Object key : keySet) { - propertyNames.add((String) key); - } - Collections.sort(propertyNames); - - for (String key : propertyNames) { - String value = properties.getProperty(key); - String row = CONFIGURATION_PROPERTIES_TABLE_ROW.formatted(key, value); - out.println(row); - } - %> - -
Configuration propertyValue
- - "/> - -
- <% - try (InputStream inputStream = ExtensionInfo.class.getResourceAsStream("/webapp/excel-importer-admin/html/about.html")) { - assert inputStream != null; - String configurationHelp = new String(inputStream.readAllBytes(), StandardCharsets.UTF_8); - out.println(configurationHelp); - } - %> -
-
-
- - + \ No newline at end of file