~fkhan-zivios/zivios/devel

« back to all changes in this revision

Viewing changes to application/modules/default/views/scripts/server/serverentry.phtml

  • Committer: Faraz Khan
  • Date: 2008-09-15 13:29:33 UTC
  • Revision ID: fkhan@zivios.org-20080915132933-d27jml5l29xw4gsr
Initial release to bazaar, code in sync with 0.5.0-release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Copyright (c) 2008 Zivios, LLC.
 
4
 *
 
5
 * This file is part of Zivios.
 
6
 *
 
7
 * Zivios is free software: you can redistribute it and/or modify
 
8
 * it under the terms of the GNU General Public License as published by
 
9
 * the Free Software Foundation, either version 3 of the License, or
 
10
 * (at your option) any later version.
 
11
 *
 
12
 * Zivios is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * GNU General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License
 
18
 * along with Zivios.  If not, see <http://www.gnu.org/licenses/>.
 
19
 *
 
20
 * @package             Zivios
 
21
 * @copyright   Copyright (c) 2008 Zivios, LLC. (http://www.zivios.org)
 
22
 * @license             http://www.zivios.org/legal/license
 
23
 * @version             $Id: serverentry.phtml 890 2008-08-22 11:52:49Z mhashmi $
 
24
 **/
 
25
?>
 
26
<p><b>Viewing Entry for: <?php echo $this->obj->getproperty("cn"); ?> </b></p>
 
27
<div id="tabs">
 
28
  <ul style="width:550px;">
 
29
    <li><a href="#" onClick="toggle_display('system');
 
30
                return false;" title=""><span>System Details</span></a></li>
 
31
 
 
32
    <li><a href="#" onClick="toggle_display('package');
 
33
                return false;" title=""><span>Package Management</span></a></li>
 
34
 
 
35
    <li><a href="#" onClick="toggle_display('availableservices');
 
36
                return false;" title=""><span>Service Management</span></a></li>
 
37
 
 
38
    <li><a href="#" onClick="toggle_display('audit');
 
39
                return false;" title=""><span>Audit Reports</span></a></li>
 
40
 
 
41
    <li><a href="#" onClick="toggle_display('log');
 
42
                return false;" title=""><span>Log Viewer</span></a></li>
 
43
 
 
44
 
 
45
    <li><a href="#" onClick="toggle_display('delete');
 
46
                return false;" title=""><span>Delete</span></a></li>
 
47
  </ul>
 
48
</div>
 
49
 
 
50
<?php
 
51
if (!empty($this->existingModules)) {
 
52
        ?>
 
53
        <div id="tabsI" style="width: 542px;">
 
54
        <ul>
 
55
        <?php
 
56
        foreach ($this->existingModules as $module => $pluginConfig) {
 
57
                /**
 
58
                 * Lookup and display the plugin name. Redirection
 
59
                 * is automated.
 
60
                 */
 
61
                echo '<li><a href="#" onClick="togglePluginDisplay(\''.$module
 
62
                        .'\', \''.$this->obj->getdn().'\', \'computer\'); return false;"><span>'.
 
63
                        $pluginConfig->general->displayname.'</span></a></li>';
 
64
        }
 
65
        ?>
 
66
        </ul>
 
67
        </div>
 
68
        <?php
 
69
}
 
70
?>
 
71
 
 
72
<div id="t">
 
73
        <div class="tabbed" id="system" style="display: block;">
 
74
        <p>
 
75
        <table class="general" width="100%" border="0">
 
76
                <tr>
 
77
                        <th width="100">Hostname</th>
 
78
                        <td><?php echo $this->obj->getProperty("cn");?></td>
 
79
                </tr>
 
80
                <tr>
 
81
                        <th>CPU Info</th>
 
82
                        <td><?php echo $this->obj->getProperty("emscomputervendorclass") . " " .
 
83
                                $this->obj->getproperty("emscomputervendormodel") . " " .
 
84
                                $this->obj->getproperty("emscomputervendorname") . " " .
 
85
                                $this->obj->getproperty("emscomputercpumhz") . " MHz"; ?></td>
 
86
                </tr>
 
87
            <tr>
 
88
                <th>System</th>
 
89
                <td><?php echo $this->obj->getproperty("emscomputersystem") . " " .
 
90
                                $this->obj->getproperty("emscomputertype"); ?></td>
 
91
                </tr>
 
92
            <tr>
 
93
                <th>Distribution</th>
 
94
                <td><?php echo $this->obj->getproperty("emscomputerdistro") . " " .
 
95
                                $this->obj->getproperty("emscomputerdistrorelease"); ?></td>
 
96
                </tr>
 
97
          <tr>
 
98
                <th>Local Storage</th>
 
99
                <td>.. coming soon</td>
 
100
          </tr>
 
101
        </table>
 
102
        </p>
 
103
        </div>
 
104
        <div class="tabbed" id="package" style="display: none;">
 
105
        <p>
 
106
        Package Management
 
107
        </p>
 
108
        </div>
 
109
        <div class="tabbed" id="availableservices" style="display: none;">
 
110
        <p>
 
111
        <?php
 
112
                echo $this->render("server/availableservices.phtml");
 
113
        ?>
 
114
        </p>
 
115
        </div>
 
116
        <div class="tabbed" id="audit" style="display: none;">
 
117
        <p>
 
118
        Audit Reports
 
119
        </p>
 
120
        </div>
 
121
        <div class="tabbed" id="log" style="display: none;">
 
122
        <p>
 
123
        Log viewer
 
124
        </p>
 
125
        </div>
 
126
 
 
127
           <div class="tabbed" id="delete" style="display: none;">
 
128
        <form>
 
129
        <fieldset>
 
130
        <legend><B>Server Delete</b></legend>
 
131
        </p>
 
132
        <br />
 
133
        <p>Deleting a Server will cause all relevant plugins to be deleted, certificates and keytabs revoked
 
134
        <br />
 
135
 
 
136
 
 
137
        <p>This action is currently irreversible
 
138
        <br />
 
139
        <p align=right>
 
140
 
 
141
        <input type="submit" onclick="javascript:callAction('/server/delete/','entry','<?php
 
142
                echo $this->obj->getdn(); ?>'); return false;" value="Delete Server" />
 
143
        </form>
 
144
        </fieldset>
 
145
    </div>
 
146
 
 
147
        <?php
 
148
        /**
 
149
         * Load all plugin divs
 
150
         */
 
151
        if (!empty($this->existingModules)) {
 
152
                foreach ($this->existingModules as $module => $pluginConfig) {
 
153
                        echo '<div class="tabbed" id="'.$module.'" style="display: none;"></div>';
 
154
                }
 
155
        }
 
156
        ?>
 
157
 
 
158
 
 
159
</div>
 
160
 
 
161
<script language="javascript">
 
162
compServiceAction = function(action)
 
163
{
 
164
        if (action == 'sub') {
 
165
                var f = $('serviceSelect').serialize(true);
 
166
                var url = '/server/subService/';
 
167
        } else {
 
168
                var f = $('serviceDeselect').serialize(true);
 
169
                var url = '/server/unsubService/';
 
170
        }
 
171
 
 
172
        var div = 'availableservices';
 
173
        var json = Object.toJSON(f);
 
174
 
 
175
        var ma = new Ajax.Updater (
 
176
                {success: div},
 
177
                url,
 
178
                {
 
179
                        method: 'post',
 
180
                        parameters: 'mr='+escape(json),
 
181
                        evalScripts: true,
 
182
                        onLoading: function(request) {
 
183
                                showNotify()
 
184
                        },
 
185
                        onComplete: function(request) {
 
186
                                hideNotify()
 
187
                        },
 
188
                }
 
189
        );
 
190
 
 
191
}
 
192
</script>
 
 
b'\\ No newline at end of file'