Skip to content

Commit

Permalink
Merge pull request #6784 from NotedSalmon/FISH-8855-Auto-Name-DepGroup
Browse files Browse the repository at this point in the history
FISH-8855-Added Auto name for deployment group
  • Loading branch information
NotedSalmon authored Jun 28, 2024
2 parents 6035ce1 + 712ec52 commit 2d9c298
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
18 changes: 13 additions & 5 deletions appserver/admingui/cluster/src/main/resources/dg/dgNew.jsf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
only if the new code is made subject to such option by the copyright
holder.

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

-->

Expand Down Expand Up @@ -69,6 +69,7 @@
}

gf.getChildrenNamesList(endpoint="#{sessionScope.REST_URL}/nodes/node", result="#{pageSession.nodesList}");
setPageSessionAttribute(key="autoNameSelected" value="#{false}");
/>
</event>
<sun:form id="propertyForm" autoComplete="off">
Expand All @@ -80,8 +81,12 @@
<sun:button id="newButton" text="$resource{i18n.button.OK}"
onClick="if (guiValidate('#{reqMsg}','#{reqInt}','#{reqPort}')) {submitAndDisable(this, '$resource{i18n.button.Processing}');}; return false;" >
<!command
setAttribute(key="nameToCheck" value="#{pageSession.name}");
gfj.checkNameExist();
py.generateInstanceNameIfRequired(name="#{pageSession.name}", autoname="#{pageSession.autoNameSelected}", instanceName="#{pageSession.name}");
if (!#{pageSession.autoNameSelected}) {
setAttribute(key="nameToCheck" value="#{pageSession.name}");
gfj.checkNameExist();
}

createMap(result="#{requestScope.ct}");
mapPut(map="#{requestScope.ct}" key="id" value="#{pageSession.name}" );
gf.createEntity( endpoint="#{sessionScope.REST_URL}/deployment-groups/deployment-group" attrs="#{requestScope.ct}")
Expand All @@ -98,6 +103,7 @@

py.createDeploymentGroupInstances(deploymentGroupName="#{pageSession.name}", instanceRow="#{instances}");
gf.redirect(page="#{request.contextPath}/cluster/dg/dgs.jsf?alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}");
setPageSessionAttribute(key="autoNameSelected" value="#{false}");
/>
</sun:button>
<sun:button id="cancelButton" immediate="#{true}" text="$resource{i18n.button.Cancel}" primary="#{false}" >
Expand All @@ -114,9 +120,11 @@
<sun:propertySheet id="propertySheet">
<sun:propertySheetSection id="propertySectionTextField">
<sun:property id="NameTextProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18ncs.dg.dgName}" >
<sun:textField id="NameText" text="#{pageSession.name}" styleClass="required" columns="$int{55}" maxLength="#{sessionScope.fieldLengths['maxLength.dg.dgName']}" required="#{true}" />
<sun:textField id="NameText" text="#{pageSession.name}" columns="$int{55}" maxLength="#{sessionScope.fieldLengths['maxLength.dg.dgName']}" required="#{false}" />
</sun:property>

<sun:property id="AutoNameProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18ncs.autoName}" helpText="$resource{i18ncs.autoName.helpDg}" >
<sun:checkbox id="AutoName" selected="#{pageSession.autoNameSelected}" selectedValue="#{true}" />
</sun:property>
<sun:property id="avaliableInstances" visible="#{pageSession.showInstancesSection}" labelAlign="left" noWrap="#{true}" overlapLabel="#{true}">
<sun:addRemove id="deploymentGroupAddRemove"
selectAll="$boolean{true}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# only if the new code is made subject to such option by the copyright
# holder.
#
# Portions Copyright [2016-2022] [Payara Foundation and/or its affiliates]
# Portions Copyright [2016-2024] [Payara Foundation and/or its affiliates]

tree.clusters=Clusters (Deprecated)
tree.dgs=Deployment Groups
Expand Down Expand Up @@ -448,4 +448,5 @@ clusters.ejbTimers.TimerCountCol=Timer Count
general.serverNameCol=Server Name

autoName=Auto Name
autoName.helpDg=When enabled, will generate a name for your deployment group if none is provided, or will otherwise resolve any name conflicts.
autoName.help=When enabled, will generate a name for your instance if none is provided, or will otherwise resolve any name conflicts.

0 comments on commit 2d9c298

Please sign in to comment.