@RequirePOST
    public synchronized HttpResponse doConfigSubmit( StaplerRequest req) throws IOException, ServletException, FormException {
        BulkChange bc = new BulkChange(MONITORS_OWNER);
        try {
            Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
            monitors.rebuild(req,req.getSubmittedForm(),getNodeMonitorDescriptors());

            // add in the rest of instances are ignored instances
            for (Descriptor<NodeMonitor> d : NodeMonitor.all())
                if(monitors.get(d)==null) {
                    NodeMonitor i = createDefaultInstance(d, true);
                    if(i!=null)
                        monitors.add(i);
                }

            // recompute the data
            for (NodeMonitor nm : monitors) {
                nm.triggerUpdate();
            }

            return FormApply.success(".");
        } finally {
            bc.commit();
        }
    }
@ RequirePOST public synchronized HttpResponse doConfigSubmit ( StaplerRequest req ) throws IOException , ServletException , FormException { BulkChange bc = new BulkChange ( MONITORS_OWNER ) ; try { Jenkins . getInstance ( ) . checkPermission ( Jenkins . ADMINISTER ) ; monitors . rebuild ( req , req . getSubmittedForm ( ) , getNodeMonitorDescriptors ( ) ) ; for ( Descriptor < NodeMonitor > d : NodeMonitor . all ( ) ) if ( monitors . get ( d ) == null ) { NodeMonitor i = createDefaultInstance ( d , true ) ; if ( i != null ) monitors . add ( i ) ; } for ( NodeMonitor nm : monitors ) { nm . triggerUpdate ( ) ; } return FormApply . success ( "." ) ; } finally { bc . commit ( ) ; } }
Accepts submission from the configuration page.