All Downloads are FREE. Search and download functionalities are using the official Maven repository.

resourceNode.targetResourceTableButtons.inc Maven / Gradle / Ivy

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