Class SystemControllerImpl
java.lang.Object
uk.ac.manchester.spinnaker.alloc.web.SystemControllerImpl
- All Implemented Interfaces:
SystemController
@Controller("mvc.mainUI")
public class SystemControllerImpl
extends Object
implements SystemController
The main web interface controller.
- Author:
- Donal Fellows
-
Field Summary
Fields inherited from interface uk.ac.manchester.spinnaker.alloc.web.SystemController
ROOT_PATH, USER_MAY_CHANGE_PASSWORD, USER_PASSWORD_CHANGE_ATTR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondestroyJob(int id, String reason) Delete a job.getJobInfo(int id) Get the view for some job details.Get the view for the general job list.getMachineInfo(String machine) Get the view for some machine details.Get the view for the general machine list.getPasswordChangeForm(Principal principal) Get the view and model for the password change form.index()Get the view for the main page of the service.listProcesses(int id, int x, int y) Get job processes on a chip.login()Get the login form page.performLogout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Log the user out.postPasswordChangeForm(PasswordChangeRecord user, Principal principal) Carry out a password change.powerJob(int id, boolean power) Set the power of a job.
-
Constructor Details
-
SystemControllerImpl
public SystemControllerImpl()
-
-
Method Details
-
index
Description copied from interface:SystemControllerGet the view for the main page of the service.- Specified by:
indexin interfaceSystemController- Returns:
- View (
index.jsp)
-
login
Description copied from interface:SystemControllerGet the login form page. Note that this must be a resource that can be accessed without authentication; it is part of the auth flow!- Specified by:
loginin interfaceSystemController- Returns:
- View (
login.jsp)
-
getPasswordChangeForm
Description copied from interface:SystemControllerGet the view and model for the password change form.- Specified by:
getPasswordChangeFormin interfaceSystemController- Parameters:
principal- Who is changing their password.- Returns:
- View (
password.jsp) and model (based onPasswordChangeRecord)
-
postPasswordChangeForm
Description copied from interface:SystemControllerCarry out a password change.- Specified by:
postPasswordChangeFormin interfaceSystemController- Parameters:
user- The description of what to change.principal- Who is changing their password.- Returns:
- View (
password.jsp) and model (based onPasswordChangeRecord)
-
performLogout
public String performLogout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Description copied from interface:SystemControllerLog the user out.- Specified by:
performLogoutin interfaceSystemController- Parameters:
request- What request was maderesponse- What response to build- Returns:
- Redirect to the login page
- See Also:
-
getMachineList
Description copied from interface:SystemControllerGet the view for the general machine list.- Specified by:
getMachineListin interfaceSystemController- Returns:
- View (
listmachines.jsp) and model (based onMachineListEntryRecord)
-
getMachineInfo
Description copied from interface:SystemControllerGet the view for some machine details.- Specified by:
getMachineInfoin interfaceSystemController- Parameters:
machine- Which machine is being asked for- Returns:
- View (
machinedetails.jsp) and model (based onMachineDescription)
-
getJobList
Description copied from interface:SystemControllerGet the view for the general job list.- Specified by:
getJobListin interfaceSystemController- Returns:
- View (
listjobs.jsp) and model (based onJobListEntryRecord)
-
getJobInfo
Description copied from interface:SystemControllerGet the view for some job details.- Specified by:
getJobInfoin interfaceSystemController- Parameters:
id- Which job is being asked for- Returns:
- View (
jobdetails.jsp) and model (based onJobDescription)
-
destroyJob
Description copied from interface:SystemControllerDelete a job.- Specified by:
destroyJobin interfaceSystemController- Parameters:
id- Which job is being deletedreason- Why the job is being deleted- Returns:
- View (
jobdetails.jsp) and model (based onJobDescription)
-
powerJob
Description copied from interface:SystemControllerSet the power of a job.- Specified by:
powerJobin interfaceSystemController- Parameters:
id- Which job is being deletedpower- Whether to power on or off- Returns:
- View (
jobdetails.jsp) and model (based onJobDescription)
-
listProcesses
Description copied from interface:SystemControllerGet job processes on a chip.- Specified by:
listProcessesin interfaceSystemController- Parameters:
id- Which job is being asked forx- The x coordinate of the chipy- The y coordinate of the chip- Returns:
- List of Processes. Note all cores are returned though there may be no process on some of them and some may be dead cores.
-