Skip to content

Commit

Permalink
Merge pull request #3423 from MeroRai/PAYARA-3159
Browse files Browse the repository at this point in the history
PAYARA-3159 Creation of config parameters on MicroProfile page of WebConsole is wrong
  • Loading branch information
arjantijms authored Nov 14, 2018
2 parents 1bbb804 + 122d49b commit daff6db
Show file tree
Hide file tree
Showing 20 changed files with 826 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ resourcesTable.resources=Resources
#Cluster Instances
PropertiesTitle=Properties
SystemPropertiesTitle=System Properties
MicroProfileTitle=MicroProfile Properties

## Group Management Service
gms.TitlePage=Edit Group Management Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
only if the new code is made subject to such option by the copyright
holder.

Portions Copyright [2018] [Payara Foundation and/or its affiliates]

-->

<!-- standalone/standaloneInstanceProperties.jsf -->
Expand Down Expand Up @@ -68,21 +70,24 @@

gf.restRequest(endpoint="#{pageSession.selfUrl}/property", method="GET", result="#{requestScope.propTable}");
gf.isInstanceName(instanceName="#{pageSession.instanceName}");
setPageSessionAttribute(key="tableList", value="#{requestScope.propTable.data.extraProperties.properties}");
setPageSessionAttribute(key="properties", value="#{requestScope.propTable.data.extraProperties.properties}");
py.onlyGetConfigurationProps(props="#{pageSession.properties}" modifiedProps="#{pageSession.modifiedProps}");
setPageSessionAttribute(key="tableList", value="#{pageSession.modifiedProps}");
setPageSessionAttribute(key="isMicroProfileProps", value="#{false}");
/>
</event>
<sun:form id="propertyForm">
#include "/cluster/standalone/standaloneInstanceTabs.inc"
<sun:title id="propertyContentPage" title="$resource{i18ncs.PropertiesTitle}" helpText="$resource{i18nc.microprofile.properties.description}">
#include "/cluster/shared/instancePropertiesButtons.jsf"
<sun:title id="propertyContentPage" title="$resource{i18ncs.PropertiesTitle}">
#include "/common/appServer/propertiesButtons.jsf"
</sun:title>
#include "/common/shared/alertMsg_1.inc"
#include "/common/shared/nameSection.inc"

#include "/common/shared/propertyDescTable.inc"

<sun:title id="bottomTitle">
#include "/cluster/shared/instancePropertiesButtons.jsf"
#include "/common/appServer/propertiesButtons.jsf"
</sun:title>

<sun:hidden id="helpKey" value="$resource{help_cluster.standaloneInstanceProperties}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
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.
Portions Copyright [2018] [Payara Foundation and/or its affiliates]
-->

Expand Down Expand Up @@ -82,6 +84,12 @@
gf.redirect(page="#{request.contextPath}/cluster/standalone/standaloneInstanceProperties.jsf?instanceName=#{pageSession.encodedInstanceName}");
/>
</sun:tab>
<sun:tab id="microProfileProps" immediate="$boolean{true}" text="$resource{i18n.inst.tab.MicroProfileProperties}" >
<!command
setSessionAttribute(key="standaloneInstanceTabs" value="microProfileProps");
gf.redirect(page="#{request.contextPath}/cluster/standalone/standaloneMicroProfileProperties.jsf?instanceName=#{pageSession.encodedInstanceName}");
/>
</sun:tab>
</sun:tab>
</sun:tabSet>
<event>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<!--

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.

-->

<!initPage
setResourceBundle(key="i18nc" bundle="org.glassfish.common.admingui.Strings")
setResourceBundle(key="i18ncs" bundle="org.glassfish.cluster.admingui.Strings")
setResourceBundle(key="help_cluster" bundle="org.glassfish.cluster.admingui.Helplinks");
/>
<!-- i18n -->
<!composition template="/templates/default.layout" guiTitle="Standalone Instance #{pageSession.instanceName} $resource{i18ncs.MicroProfileTitle}" >
<!define name="content">
<event>
<!beforeCreate
getRequestValue(key="instanceName" value="#{pageSession.instanceName}");
urlencode(value="#{pageSession.instanceName}" encoding="UTF-8" result="#{pageSession.encodedInstanceName}");
setSessionAttribute(key="clusterTabs" value="clusterInstanceProps");
setSessionAttribute(key="standaloneInstanceTabs" value="microProfileProps");

setPageSessionAttribute(key="parentPage", value="#{request.contextPath}/cluster/standalone/standaloneInstanceGeneral.jsf?instanceName=#{pageSession.encodedInstanceName}");
setPageSessionAttribute(key="selfPage", value="#{request.contextPath}/cluster/standalone/standaloneMicroProfileProperties.jsf?instanceName=#{pageSession.encodedInstanceName}");
setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/servers/server/#{pageSession.encodedInstanceName}");
setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}");

setPageSessionAttribute(key="rest-api" value="true");
setPageSessionAttribute(key="edit" value="#{true}" );
setPageSessionAttribute(key="hasPropertyTable" value="#{true}" );
setPageSessionAttribute(key="showDefaultButton" value="#{false}" );

gf.restRequest(endpoint="#{pageSession.selfUrl}/property", method="GET", result="#{requestScope.propTable}");
gf.isInstanceName(instanceName="#{pageSession.instanceName}");
setPageSessionAttribute(key="properties", value="#{requestScope.propTable.data.extraProperties.properties}");
py.onlyGetMicroProfileProps(props="#{pageSession.properties}" modifiedProps="#{pageSession.modifiedProps}");
py.convertToConfigProperties(props="#{pageSession.modifiedProps}" convertedProps="#{pageSession.convertedProps}");
setPageSessionAttribute(key="tableList", value="#{pageSession.convertedProps}");
setPageSessionAttribute(key="isMicroProfileProps", value="#{true}");
/>
</event>
<sun:form id="propertyForm">
#include "/cluster/standalone/standaloneInstanceTabs.inc"
<sun:title id="propertyContentPage" title="$resource{i18ncs.MicroProfileTitle}">
#include "/common/appServer/propertiesButtons.jsf"
</sun:title>
#include "/common/shared/alertMsg_1.inc"
#include "/common/shared/nameSection.inc"

#include "/common/shared/propertyDescTable.inc"

<sun:title id="bottomTitle">
#include "/common/appServer/propertiesButtons.jsf"
</sun:title>

<sun:hidden id="helpKey" value="$resource{help_cluster.standaloneInstanceProperties}" />

</sun:form>
#include "/common/shared/changeButtonsJS.inc"
</define>
</composition>
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import org.glassfish.admingui.common.util.DeployUtil;
import org.glassfish.admingui.common.util.GuiUtil;
import org.glassfish.admingui.common.util.RestUtil;
Expand Down
Loading

0 comments on commit daff6db

Please sign in to comment.