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

FISH-8855-Added Auto name for deployment group #6784

Merged
merged 3 commits into from
Jun 28, 2024
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
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.
NotedSalmon marked this conversation as resolved.
Show resolved Hide resolved