~fkhan-zivios/zivios/devel

« back to all changes in this revision

Viewing changes to application/modules/ntp/views/scripts/computer/dashboard.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             mod_ntp
 
21
 * @copyright   Copyright (c) 2008 Zivios, LLC. (http://www.zivios.org)
 
22
 * @license             http://www.zivios.org/legal/license
 
23
 * @version             $Id: dashboard.phtml 915 2008-08-25 11:32:48Z fkhan $
 
24
 * @lastchangeddate $LastChangedDate: 2008-08-25 17:32:48 +0600 (Mon, 25 Aug 2008) $
 
25
 **/
 
26
 
 
27
?>
 
28
<br />
 
29
<ul id="pluginnavmenu" style="padding-left: 10px;">
 
30
        <li><a href="#" onclick="javascript:callAction('/ntp/computer/dashview/', 'ntppgupdate','<?php
 
31
                echo $this->obj->getdn(); ?>');">Dashboard</a></li>
 
32
        <li><a href="#" onclick="javascript:callAction('/ntp/computer/serviceconfig/','ntppgupdate','<?php
 
33
                echo $this->obj->getdn(); ?>');">Service Configuration</a></li>
 
34
</ul>
 
35
<br />
 
36
 
 
37
<?php echo $this->render("computer/dashview.phtml"); ?>
 
38
<script language="javascript">
 
39
serviceAction = function(act, dn)
 
40
{
 
41
        switch (act) {
 
42
                case "start":
 
43
                var call = '/ntp/computer/startservice';
 
44
                break;
 
45
 
 
46
                case "stop":
 
47
                var call = '/ntp/computer/stopservice';
 
48
                break;
 
49
        }
 
50
 
 
51
        var div = 'ntppgupdate';
 
52
    var data = {operate_dn: "<?php echo $this->obj->getdn(); ?>"};
 
53
        rpc = Object.toJSON(data);
 
54
 
 
55
        var ma = new Ajax.Updater (
 
56
                {success: div},
 
57
                call,
 
58
                {
 
59
                        method: 'get',
 
60
                        parameters: 'mr='+escape(rpc),
 
61
                        evalScripts: true,
 
62
                        onLoading: function(request) {
 
63
                                showNotify()
 
64
                        },
 
65
                        onComplete: function(request) {
 
66
                                hideNotify()
 
67
                        },
 
68
                }
 
69
        );
 
70
}
 
71
 
 
72
updateClientConfig = function()
 
73
{
 
74
        var call = '/ntp/computer/updateConfig';
 
75
        var div = 'ndiv';
 
76
        var data = {operate_dn: "<?php echo $this->obj->getdn(); ?>"};
 
77
        rpc = Object.toJSON(data);
 
78
 
 
79
        var ma = new Ajax.Updater (
 
80
                {success: div},
 
81
                call,
 
82
                {
 
83
                        method: 'get',
 
84
                        parameters: 'mr='+escape(rpc),
 
85
                        evalScripts: true,
 
86
                        onLoading: function(request) {
 
87
                                showNotify(),
 
88
                                Element.hide('upclconf'),
 
89
                                Element.show('upclprg')
 
90
                        },
 
91
                        onComplete: function(request) {
 
92
                                hideNotify(),
 
93
                                Element.hide('upclprg'),
 
94
                                Element.show('upclconf')
 
95
 
 
96
                        },
 
97
                }
 
98
        );
 
99
}
 
100
</script>
 
 
b'\\ No newline at end of file'