Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAYARA-2288 MicroProfile Settings Page - Payara4 #3098

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,30 @@ public static void listRemove(HandlerContext handlerCtx) {
handlerCtx.setOutputValue("result", list);
}

/**
* <p> Get an element form a <code>List</code></p> using the index number provided
* <p> Input list: "list" -- Type: <code>java.util.List</code>
* <p> Input index: "index" -- Type: <code>java.lang.Integer</code>
*
* @param handlerCtx The HandlerContext
*/
@Handler(id="listGet",
input={
@HandlerInput(name="list", type=List.class),
@HandlerInput(name="index", type=Integer.class, required=true)
},
output={
@HandlerOutput(name="result", type=Object.class)}
)
public static void listGet(HandlerContext handlerCtx) {
List list = (List) handlerCtx.getInputValue("list");
int index = (Integer) handlerCtx.getInputValue("index");

if (list != null && index >= 0 && index < list.size()) {
handlerCtx.setOutputValue("result", list.get(index));
}

}

/**
* <p> sort a <code>List</code></p>
Expand Down
87 changes: 87 additions & 0 deletions appserver/admingui/microprofile-console-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.

The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
https://github.com/payara/Payara/blob/master/LICENSE.txt
See the License for the specific
language governing permissions and limitations under the License.

When distributing the software, include this License Header Notice in each
file and include the License file at glassfish/legal/LICENSE.txt.

GPL Classpath Exception:
The Payara Foundation designates this particular file as subject to the "Classpath"
exception as provided by the Payara Foundation in the GPL Version 2 section of the License
file that accompanied this code.

Modifications:
If applicable, add the following below the License Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyright [year] [name of copyright owner]"

Contributor(s):
If you wish your version of this file to be governed by only the CDDL or
only the GPL Version 2, indicate your decision by adding "[Contributor]
elects to include this software in this distribution under the [CDDL or GPL
Version 2] license." If you don't indicate a single choice of license, a
recipient has the option to distribute your version of this file under
either the CDDL, the GPL Version 2 or to extend the choice of license to
its licensees as provided above. However, if you add GPL Version 2 code
and therefore, elected the GPL Version 2 license, then the option applies
only if the new code is made subject to such option by the copyright
holder.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>fish.payara.admingui</groupId>
<artifactId>admingui</artifactId>
<version>4.1.2.183-SNAPSHOT</version>
</parent>
<artifactId>microprofile-console-plugin</artifactId>
<packaging>glassfish-jar</packaging>

<name>MicroProfile Console Plugin</name>

<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>auto-clean</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>**/*.jar</exclude>
</excludes>
</resource>
</resources>
</build>

<dependencies>
<dependency>
<groupId>fish.payara.admingui</groupId>
<artifactId>console-plugin-service</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://github.com/payara/Payara/blob/master/LICENSE.txt
* See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at glassfish/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* The Payara Foundation designates this particular file as subject to the "Classpath"
* exception as provided by the Payara Foundation in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/

package fish.payara.admingui.microprofile;

import java.net.URL;
import org.glassfish.api.admingui.ConsoleProvider;
import org.jvnet.hk2.annotations.Service;

/**
* <p> This is a noop file just to help test out the {@link ConsoleProvider}
* and <code>ConsolePluginService</code> files.</p>
*
* @author Susan Rai
*/
@Service
public class MicroProfilePlugin implements ConsoleProvider {

@Override
public URL getConfiguration() {
return null;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.

The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
https://github.com/payara/Payara/blob/master/LICENSE.txt
See the License for the specific
language governing permissions and limitations under the License.

When distributing the software, include this License Header Notice in each
file and include the License file at glassfish/legal/LICENSE.txt.

GPL Classpath Exception:
The Payara Foundation designates this particular file as subject to the "Classpath"
exception as provided by the Payara Foundation in the GPL Version 2 section of the License
file that accompanied this code.

Modifications:
If applicable, add the following below the License Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyright [year] [name of copyright owner]"

Contributor(s):
If you wish your version of this file to be governed by only the CDDL or
only the GPL Version 2, indicate your decision by adding "[Contributor]
elects to include this software in this distribution under the [CDDL or GPL
Version 2] license." If you don't indicate a single choice of license, a
recipient has the option to distribute your version of this file under
either the CDDL, the GPL Version 2 or to extend the choice of license to
its licensees as provided above. However, if you add GPL Version 2 code
and therefore, elected the GPL Version 2 license, then the option applies
only if the new code is made subject to such option by the copyright
holder.
-->

<console-config id="microprofile">
<integration-point
id="microprofile"
type="org.glassfish.admingui:navNode"
priority="460"
parentId="#{configNameId}"
content="pluginTreeNodeMicroprofile.jsf"
/>

<integration-point
id="microprofileLink"
type="org.glassfish.admingui:configuration"
priority="460"
parentId="propSheetSection"
content="microprofile/microprofileConfigLink.jsf"
/>
</console-config>
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
#
# The contents of this file are subject to the terms of either the GNU
# General Public License Version 2 only ("GPL") or the Common Development
# and Distribution License("CDDL") (collectively, the "License"). You
# may not use this file except in compliance with the License. You can
# obtain a copy of the License at
# https://github.com/payara/Payara/blob/master/LICENSE.txt
# See the License for the specific
# language governing permissions and limitations under the License.
#
# When distributing the software, include this License Header Notice in each
# file and include the License file at glassfish/legal/LICENSE.txt.
#
# GPL Classpath Exception:
# The Payara Foundation designates this particular file as subject to the "Classpath"
# exception as provided by the Payara Foundation in the GPL Version 2 section of the License
# file that accompanied this code.
#
# Modifications:
# If applicable, add the following below the License Header, with the fields
# enclosed by brackets [] replaced by your own identifying information:
# "Portions Copyright [year] [name of copyright owner]"
#
# Contributor(s):
# If you wish your version of this file to be governed by only the CDDL or
# only the GPL Version 2, indicate your decision by adding "[Contributor]
# elects to include this software in this distribution under the [CDDL or GPL
# Version 2] license." If you don't indicate a single choice of license, a
# recipient has the option to distribute your version of this file under
# either the CDDL, the GPL Version 2 or to extend the choice of license to
# its licensees as provided above. However, if you add GPL Version 2 code
# and therefore, elected the GPL Version 2 license, then the option applies
# only if the new code is made subject to such option by the copyright
# holder.
tree.microprofile=MicroProfile
microprofile.configuration.tabSetTitle=MicroProfile Configuration
microprofile.configuration.tabSetTitleToolTip=Configures the MicroProfile.
microprofile.configuration.configTab=Config
microprofile.configuration.faultToleranceTab=Fault Tolerance
microprofile.configuration.healthCheckTab=Health Check
microprofile.configuration.metricsTab=Metrics
microprofile.configuration.openAPITab=OpenAPI
microprofile.configuration.openTracingTab=OpenTracing

microprofile.configuration.configOrdinalTab=Ordinal
microprofile.configuration.configPropertyTab=Property
microprofile.configuration.configOrdinalTab=Ordinal
microprofile.configuration.configSecretsDirectoryTab=Directory

microprofile.specs.configuration.config.pageTitle=Config API
microprofile.specs.configuration.config.pageTitleHelpText=Configuration options for the MicroProfile Config API.
microprofile.specs.configuration.faultTolerance.pageTitle=Fault Tolerance API
microprofile.specs.configuration.faultTolerance.pageTitleHelpText=Configuration options for the MicroProfile Fault Tolerance API.
microprofile.specs.configuration.healthCheck.pageTitle=Health Check API
microprofile.specs.configuration.healthCheck.pageTitleHelpText=Configuration options for the MicroProfile Health Check API.
microprofile.specs.configuration.metrics.pageTitle=Metrics API
microprofile.specs.configuration.metrics.pageTitleHelpText=Configuration options for the MicroProfile Metrics API.
microprofile.specs.configuration.openAPI.pageTitle=OpenAPI API
microprofile.specs.configuration.openAPI.pageTitleHelpText=Configuration option for the MicroProfile OpenAPI API. OpenAPI document will be published at the endpoint <code>/openapi</code></b>.
microprofile.specs.configuration.openTracing.pageTitle=OpenTracing API
microprofile.specs.configuration.openTracing.pageTitleHelpText=OpenTracing is integrated into the Request Tracing Service. You can find configuration options for the Request Tarcing Service <a href="#{request.contextPath}/payaraExtras/requestTracing/requestTracing.jsf?configName=#{pageSession.configName}">here</a>.

faultTolerance.configuration.managedExecutorServiceName=Managed Executor Service Name
faultTolerance.configuration.managedExecutorServiceNameHelp=JNDI name of the Managed Executor Service to look up.
faultTolerance.configuration.managedScheduledExecutorServiceName=Managed Scheduled Executor Service Name.
faultTolerance.configuration.managedScheduledExecutorServiceNameHelp=The JNDI name of the Managed Scheduled Executor Service to look up.

healthCheck.configuration.enabled=Enabled
healthCheck.configuration.enabledHelp=Enables or Disables the Health Check.
healthCheck.configuration.endpoint=EndPoint
healthCheck.configuration.endpointHelp=The context root used to expose the health checks.

metrics.configuration.enabled=Enabled
metrics.configuration.enabledHelp=Enables or Disables the Metrics.
metrics.configuration.dynamic=Dynamic
metrics.configuration.dynamicHelp=If set to true, applies the changes instantly without a restart. Otherwise a restart is required.
metrics.configuration.secureMetrics=Secure Metrics
metrics.configuration.secureMetricsHelp=If set to true, <code>/metrics</code> endpoint can be accessed only via HTTPS and disables the HTTP method with 403 HTTP response.

openAPI.configuration.enabled=Enabled
openAPI.configuration.enabledHelp=Enables or Disables the OpenAPI.

microprofile.specs.configuration.config.ordinal.pageTitle=Ordinal
microprofile.specs.configuration.config.ordinal.pageTitleHelpText=Configuration options to set the ordinal for a given config source. Value of a ordinal must be a number greater than 1. A lower number means lower order of precedence.
microprofile.specs.configuration.config.property.pageTitle=Property
microprofile.specs.configuration.config.property.pageTitleHelpText=Configuration options to set the given property name and value in one of the built-in config sources. <b>Note:</b> For use with microprofile config api properties should be prefixed with payara.microprofile.
microprofile.specs.configuration.config.secretsDirectory.pageTitle=Secrets Directory
microprofile.specs.configuration.config.secretsDirectory.pageTitleHelpText=Sets the directory to be used for the directory config source.

config.ordinal.configuration.application=Application
config.ordinal.configuration.cluster=Cluster
config.ordinal.configuration.config=Config
config.ordinal.configuration.domain=Domain
config.ordinal.configuration.jndi=JNDI
config.ordinal.configuration.module=Module
config.ordinal.configuration.password=Password
config.ordinal.configuration.secretDirectory=Secret Directory
config.ordinal.configuration.server=Server

config.property.configuration.propertyName=Property Name
config.property.configuration.propertyNameHelp=The name of the configuration property to set.
config.property.configuration.propertyValue=Property Value
config.property.configuration.propertyValueHelp=The value of the configuration property to set.
config.property.configuration.source=Source
config.property.configuration.sourceHelp=The ConfigSource where the property is to be stored.
config.property.configuration.sourceName=Source Name
config.property.configuration.sourceNameHelp=The name of the ConfigSource when there may be ambiguity, for example a ConfigSource of type application must specify the name of the application.
config.property.configuration.moduleName=Module Name
config.property.configuration.moduleNameHelp=The name of the module when the ConfigSource is of type module. When this is specified, the sourceName parameter must be provided and must have the name of the application where the module is deployed.

config.secretsDirectory.configuration.directory=Directory
config.secretsDirectory.configuration.directoryHelp=Full path to the directory containing configuration files.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading