
resourceNode.targetResourceTableButtons.inc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of console-common Show documentation
Show all versions of console-common Show documentation
This bundle contains common code that may be shared across plugins.
The newest version!
$page{topActionGroup});
/>
$attribute{tableRowGroup});
getSelectedSingleMapRows(TableRowGroup="${tableRowGroup}" selectedRows=>$attribute{selectedRows});
// enable the resource for a target
foreach (var="row" list="#{requestScope.selectedRows}") {
gf.createAttributeMap(keys={"enabled"} values={"true"} map="#{requestScope.attrMap}");
urlencode(value="#{row['Name']}" result="#{requestScope.encodedResName}");
gf.restRequest(
endpoint="#{pageSession.restURL}/#{requestScope.encodedResName}"
method="GET"
result="#{requestScope.result}");
if ("#{requestScope.result.responseCode}=200") {
gf.restRequest(
endpoint="#{pageSession.restURL}/#{requestScope.encodedResName}"
attrs="#{requestScope.attrMap}"
method="POST"
result="#{requestScope.foo}");
}
}
setAttribute(key="selectedRows" value="${selectedRows}");
prepareAlertMsg(summary="$resource{i18n.msg.enableResourceSuccessful}", type="success");
gf.redirect(page="#{pageSession.listLink}&filterValue=#{pageSession.filterValue}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}");
/>
$attribute{tableRowGroup});
getSelectedSingleMapRows(TableRowGroup="${tableRowGroup}" selectedRows=>$attribute{selectedRows});
// disable the resource for a target
foreach (var="row" list="#{requestScope.selectedRows}") {
gf.createAttributeMap(keys={"enabled"} values={"false"} map="#{requestScope.attrMap}");
urlencode(value="#{row['Name']}" result="#{requestScope.encodedResName}");
gf.restRequest(
endpoint="#{pageSession.restURL}/#{requestScope.encodedResName}"
method="GET"
result="#{requestScope.result}");
if ("#{requestScope.result.responseCode}=200") {
gf.restRequest(
endpoint="#{pageSession.restURL}/#{requestScope.encodedResName}"
attrs="#{requestScope.attrMap}"
method="POST"
result="#{requestScope.foo}");
}
}
setAttribute(key="selectedRows" value="${selectedRows}");
prepareAlertMsg(summary="$resource{i18n.msg.disableResourceSuccessful}", type="success");
gf.redirect(page="#{pageSession.listLink}&filterValue=#{pageSession.filterValue}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}");
/>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy