From 8fd1bf7b6562424a96b42bf9ad50ce851acd7cab Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Fri, 13 Mar 2009 19:53:56 +0000 Subject: [PATCH] do not allow pcu-add if model is unspecified only display success messages for pcu success on stage8 --- application/controllers/register.php | 9 ++++++-- application/views/stage8_rebootpcu.php | 30 ++++++++++++++++---------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/application/controllers/register.php b/application/controllers/register.php index f7f330d..847eefe 100644 --- a/application/controllers/register.php +++ b/application/controllers/register.php @@ -36,6 +36,7 @@ class Register extends Controller { $this->validation->set_error_delimiters('', ''); + $rules['model'] = "trim|required"; $rules['hostname'] = "trim|required"; $rules['ip'] = "trim|required|valid_ip"; $rules['username'] = "trim"; @@ -43,6 +44,7 @@ class Register extends Controller { $rules['notes'] = "trim"; $this->validation->set_rules($rules); + $fields['model'] = "Model"; $fields['hostname'] = "Hostname"; $fields['ip'] = "IP Address"; $fields['username'] = "Username"; @@ -53,8 +55,11 @@ class Register extends Controller { $data = array(); if ($this->validation->run() == TRUE) { - /* b/c the submit is valid, it doesn't matter if pcu_register is set */ - $this->pcu_id = $this->add_pcu($data); + if ($this->validation->model != "none-selected" ) + { + /* b/c the submit is valid, it doesn't matter if pcu_register is set */ + $this->pcu_id = $this->add_pcu($data); + } } $data = $this->get_stage1_data($person, $data); $data['stage'] = 1; diff --git a/application/views/stage8_rebootpcu.php b/application/views/stage8_rebootpcu.php index 1ef354e..79981a8 100644 --- a/application/views/stage8_rebootpcu.php +++ b/application/views/stage8_rebootpcu.php @@ -11,13 +11,7 @@ -
If Reboot succeeds,
- your machine will reboot, install the bootstrap image, and - contacted PLC. Finally, the boot state will be updated to 'boot'. -
- Continue using the 'Reload' button to check whether the node has - completed its installation. -
+
If Reboot fails,
there will be an error displayed that will assist you in diagnosing the error. Otherwise, please double check the @@ -25,16 +19,30 @@ PCU manually (using it's web or ssh interface).
To try the test again, use 'Test Reboot'.
+ If you need help diagnosing the problem, please contact + PlanetLab Support. +
+
Reboot Failure:
+
+ +
If Reboot succeeds,
+ your machine will reboot, install the bootstrap image, and + contacted PLC. Finally, the boot state will be updated to 'boot'. +
+ Continue using the 'Reload' button to check whether the node has + completed its installation.
+
Reboot without error:
+
No errors were reported for your reboot. Please double check by + confirming at the console. If the reboot failed, please report this + to PlanetLab Feedback. +
+
Success!!
The installation is complete; your machine has reached the final 'boot' state. You can continue to the final stage.
- -
Reboot Failure:
-
- -- 2.43.0