Class TooManyJobsButNoView
- All Implemented Interfaces:
ExtensionPoint,ModelObject,SearchableModelObject,SearchItem,org.kohsuke.stapler.StaplerProxy
I noticed at an user visit that some users didn't notice the '+' icon in the tab bar.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsFields inherited from class hudson.model.AdministrativeMonitor
id -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoAct(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Depending on whether the user said "yes" or "no", send him to the right place.Required permission to view this admin monitor.booleanReturns true if this monitor is activated and wants to produce a warning message.Methods inherited from class hudson.model.AdministrativeMonitor
all, checkRequiredPermission, disable, doDisable, getSearchUrl, getTarget, getUrl, hasPermissionToDisplay, hasRequiredPermission, isActivationFake, isEnabled, isSecurityMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIcon
-
Field Details
-
THRESHOLD
public static final int THRESHOLD- See Also:
-
-
Constructor Details
-
TooManyJobsButNoView
public TooManyJobsButNoView()
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classAdministrativeMonitor
-
isActivated
public boolean isActivated()Description copied from class:AdministrativeMonitorReturns true if this monitor is activated and wants to produce a warning message.This method is called from the HTML rendering thread, so it should run efficiently.
- Specified by:
isActivatedin classAdministrativeMonitor
-
doAct
public void doAct(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException Depending on whether the user said "yes" or "no", send him to the right place.- Throws:
IOException
-
getRequiredPermission
Description copied from class:AdministrativeMonitorRequired permission to view this admin monitor. By defaultJenkins.ADMINISTER, butJenkins.SYSTEM_READorJenkins.MANAGEare also supported.Changing this permission check to return
Jenkins.SYSTEM_READwill make the active administrative monitor appear onManageJenkinsActionto users without Administer permission.AdministrativeMonitor.doDisable(StaplerRequest2, StaplerResponse2)will still always require Administer permission.This method only allows for a single permission to be returned. If more complex permission checks are required, override
AdministrativeMonitor.checkRequiredPermission()andAdministrativeMonitor.hasRequiredPermission()instead.Implementers need to ensure that
doActand other web methods perform necessary permission checks: Users with System Read permissions are expected to be limited to read-only access. Form UI elements that change system state, e.g. toggling a feature on or off, need to be hidden from users lacking Administer permission.- Overrides:
getRequiredPermissionin classAdministrativeMonitor
-