From f8e82b55e391fc1b52292ed761b9317cdd4c54e8 Mon Sep 17 00:00:00 2001 From: Karsten Heiken Date: Wed, 10 Aug 2011 20:40:05 +0200 Subject: [PATCH] Rename server detail view and insert basic infos --- application/controllers/admin/servers.php | 61 ++++++++++++++++++++++ application/views/admin/server/detail.php | 35 +++++++++++++ application/views/admin/server/details.php | 35 ------------- 3 files changed, 96 insertions(+), 35 deletions(-) create mode 100644 application/controllers/admin/servers.php create mode 100644 application/views/admin/server/detail.php delete mode 100644 application/views/admin/server/details.php diff --git a/application/controllers/admin/servers.php b/application/controllers/admin/servers.php new file mode 100644 index 0000000..1fa15be --- /dev/null +++ b/application/controllers/admin/servers.php @@ -0,0 +1,61 @@ + + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * Server management. + * + * @author Karsten Heiken + */ +class Servers extends CI_Controller { + + /** + * Constructor. + */ + function __construct() { + parent::__construct(); + + $this->load->model('server'); + } + + /** + * List all servers. + */ + function index() { + $tpl->servers = $this->server->get()->all; + + $this->load->view('admin/server/list', $tpl); + } + + /** + * Retrieve details of a server. + * + * @param type $server_id + */ + function detail($server_id) { + $tpl->server = $this->server->where('id', $server_id)->get(); + + $this->load->view('admin/server/detail', $tpl); + } + +} \ No newline at end of file diff --git a/application/views/admin/server/detail.php b/application/views/admin/server/detail.php new file mode 100644 index 0000000..5c047e3 --- /dev/null +++ b/application/views/admin/server/detail.php @@ -0,0 +1,35 @@ +load->view('header'); ?> + +
+ +
+

Serververwaltung: id?>

+
+ +
+

Miscellaneous

+

Location

+

location)?>

+ +

Owner

+

Jörg Thomaschewski

+ +

Technical information

+

Hardware & OS

+

+ CPU: Intel Xeon E5540, 2533 MHz
+ Uptime: 254 Tage, 13 Stunden
+ OS: Debian/GNU 5.0r1
+ Workload: 2.01, 1.05, 0.85 +

+ +

ScattPort-Statistics

+

+ Completed jobs: 47
+ Available programs: PYTHA, ABC, DEF +

+
+ +
+ +load->view('footer'); ?> diff --git a/application/views/admin/server/details.php b/application/views/admin/server/details.php deleted file mode 100644 index 178964a..0000000 --- a/application/views/admin/server/details.php +++ /dev/null @@ -1,35 +0,0 @@ -load->view('header'); ?> - -
- -
-

Serververwaltung

-
- - -
-

SP-EMD-01

-

Standort

-

Hochschule Emden, Technikum, Raum E10

- -

Besitzer

-

Jörg Thomaschewski

- -

Serverinformationen

-

- Prozessor: Intel Xeon E5540, 2533 MHz
- Uptime: 254 Tage, 13 Stunden
- Betriebssystem: Debian/GNU 5.0r1
- Workload: 2.01, 1.05, 0.85 -

- -

ScattPort-Statistik

-

- Durchgeführte Berechnungen: 47
- Verfügbare Programme: PYTHA, ABC, DEF -

-
- -
- -load->view('footer'); ?>