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:SystemController
Get the view for the main page of the service.- Specified by:
index
in interfaceSystemController
- Returns:
- View (
index.jsp
)
-
login
Description copied from interface:SystemController
Get 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:
login
in interfaceSystemController
- Returns:
- View (
login.jsp
)
-
getPasswordChangeForm
Description copied from interface:SystemController
Get the view and model for the password change form.- Specified by:
getPasswordChangeForm
in interfaceSystemController
- Parameters:
principal
- Who is changing their password.- Returns:
- View (
password.jsp
) and model (based onPasswordChangeRecord
)
-
postPasswordChangeForm
Description copied from interface:SystemController
Carry out a password change.- Specified by:
postPasswordChangeForm
in 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:SystemController
Log the user out.- Specified by:
performLogout
in interfaceSystemController
- Parameters:
request
- What request was maderesponse
- What response to build- Returns:
- Redirect to the login page
- See Also:
-
getMachineList
Description copied from interface:SystemController
Get the view for the general machine list.- Specified by:
getMachineList
in interfaceSystemController
- Returns:
- View (
listmachines.jsp
) and model (based onMachineListEntryRecord
)
-
getMachineInfo
Description copied from interface:SystemController
Get the view for some machine details.- Specified by:
getMachineInfo
in interfaceSystemController
- Parameters:
machine
- Which machine is being asked for- Returns:
- View (
machinedetails.jsp
) and model (based onMachineDescription
)
-
getJobList
Description copied from interface:SystemController
Get the view for the general job list.- Specified by:
getJobList
in interfaceSystemController
- Returns:
- View (
listjobs.jsp
) and model (based onJobListEntryRecord
)
-
getJobInfo
Description copied from interface:SystemController
Get the view for some job details.- Specified by:
getJobInfo
in interfaceSystemController
- Parameters:
id
- Which job is being asked for- Returns:
- View (
jobdetails.jsp
) and model (based onJobDescription
)
-
destroyJob
Description copied from interface:SystemController
Delete a job.- Specified by:
destroyJob
in 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:SystemController
Set the power of a job.- Specified by:
powerJob
in 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:SystemController
Get job processes on a chip.- Specified by:
listProcesses
in 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.
-