summaryrefslogtreecommitdiffstats
path: root/modules-available/runmode/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2017-11-29 10:54:40 +0100
committerSimon Rettberg2017-11-29 10:54:40 +0100
commit7efcf3cfebcec5cf3c154b6eb339ce6794cb1e96 (patch)
tree629734f08bf2680fff099792ab21cff9a1846963 /modules-available/runmode/page.inc.php
parent[statistics] Introduce state column to get rid of complicated state determina... (diff)
downloadslx-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.php8
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);
+ }
}
}
}