diff options
author | Simon Rettberg | 2017-11-29 10:54:40 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-11-29 10:54:40 +0100 |
commit | 7efcf3cfebcec5cf3c154b6eb339ce6794cb1e96 (patch) | |
tree | 629734f08bf2680fff099792ab21cff9a1846963 /modules-available/runmode/page.inc.php | |
parent | [statistics] Introduce state column to get rid of complicated state determina... (diff) | |
download | slx-admin-7efcf3cfebcec5cf3c154b6eb339ce6794cb1e96.tar.gz slx-admin-7efcf3cfebcec5cf3c154b6eb339ce6794cb1e96.tar.xz slx-admin-7efcf3cfebcec5cf3c154b6eb339ce6794cb1e96.zip |
[runmode] Implement delete-machine action
Diffstat (limited to 'modules-available/runmode/page.inc.php')
-rw-r--r-- | modules-available/runmode/page.inc.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules-available/runmode/page.inc.php b/modules-available/runmode/page.inc.php index 05f32f81..24566cec 100644 --- a/modules-available/runmode/page.inc.php +++ b/modules-available/runmode/page.inc.php @@ -48,7 +48,13 @@ class Page_RunMode extends Page } elseif ($action === 'delete-machine') { $machineuuid = Request::post('machineuuid', false, 'string'); if ($machineuuid === false) { - + Message::addError('machine-not-found', $machineuuid); + } else { + if (RunMode::setRunMode($machineuuid, null, null)) { + Message::addSuccess('machine-removed', $machineuuid); + } else { + Message::addWarning('machine-not-runmode', $machineuuid); + } } } } |