~fkhan-zivios/zivios/devel

« back to all changes in this revision

Viewing changes to application/modules/openafs/views/scripts/service/listvolumes.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_openafs
 
21
 * @copyright   Copyright (c) 2008 Zivios, LLC. (http://www.zivios.org)
 
22
 * @license             http://www.zivios.org/legal/license
 
23
 * @version             $Id: listvolumes.phtml 919 2008-08-25 11:45:23Z fkhan $
 
24
 * @lastchangeddate $LastChangedDate: 2008-08-25 17:45:23 +0600 (Mon, 25 Aug 2008) $
 
25
 **/
 
26
 
 
27
?>
 
28
<style type="text/css">
 
29
.voltable {
 
30
        width: auto;
 
31
        height: auto;
 
32
        overflow: auto;
 
33
        border: 0px;
 
34
        margin: 0px;
 
35
        max-width: 650px;
 
36
}
 
37
 
 
38
table.afsvols {
 
39
        font: 10px/22px Verdana, Arial, Helvetica, sans-serif;
 
40
        width: 650px;
 
41
        background-color: #fafafa;
 
42
        border: 1px #ccc solid;
 
43
        border-collapse: collapse;
 
44
        border-spacing: 2px;
 
45
}
 
46
 
 
47
table.afsvols td.header {
 
48
        border-bottom: 2px solid #ccc;
 
49
        border-left: 1px solid #ccc;
 
50
        background-color: #e5e5e5;
 
51
        text-align: right;
 
52
        font: 10px/22px Verdana, Arial, Helvetica, sans-serif;
 
53
        color: #666;
 
54
        padding: 4px;
 
55
}
 
56
 
 
57
 
 
58
table.afsvols td {
 
59
        border-bottom: 1px solid #ccc;
 
60
        font: 10px/22px Verdana, Arial, Helvetica, sans-serif;
 
61
        color: #000;
 
62
        background-color: #f5f5f5;
 
63
        text-align: left;
 
64
        padding: 2px;
 
65
}
 
66
 
 
67
table.afsvols td.switch {
 
68
        background-color: #e7e7e7;
 
69
        border-left: 1px solid #ccc;
 
70
}
 
71
table.afsvols td.default {
 
72
        border-left: 1px solid #ccc;
 
73
}
 
74
 
 
75
</style>
 
76
<br />
 
77
<div class="voltable">
 
78
<table class="afsvols">
 
79
<tr><td colspan="6" class="header"> | <a href="#" onClick="javascript:resyncVolListing();">Resync Volume Listing</a></td></tr>
 
80
<tr>
 
81
        <td>Volume ID</td>
 
82
        <td>Volume Name</td>
 
83
        <td>Status</td>
 
84
        <td>In Use</td>
 
85
        <td>Max Quota</td>
 
86
        <td>Partition</td>
 
87
</tr>
 
88
<?php
 
89
$c = 1;
 
90
foreach ($this->vols as $vol) {
 
91
        if ($c % 2) {
 
92
                $tdbg = "switch";
 
93
        } else {
 
94
                $tdbg= "default";
 
95
        }
 
96
 
 
97
        echo '<tr>';
 
98
        echo '<td bgcolor="#F5FFFA"><a href="#" onClick="javascript:getVolDetails(\'/openafs/server/getvoldetails\',\'pgupdate\', \''. $vol->getdn() . '\');">' . $vol->getProperty('emsafsvolid') . '</td>';
 
99
        echo '<td class="'.$tdbg.'">' . $vol->getProperty("cn") . '</td>';
 
100
        echo '<td class="'.$tdbg.'">';
 
101
 
 
102
        // Display Green if status is okay, otherwise red.
 
103
        if ($vol->getProperty('emsafsvolstatus') == "OK")
 
104
                echo '<font color="green">';
 
105
        else
 
106
                echo '<font color="red">';
 
107
 
 
108
        echo $vol->getProperty('emsafsvolstatus') . '</font></td>';
 
109
        echo '<td class="'.$tdbg.'">' . $vol->getProperty('emsafsvolinuse') . '</td>';
 
110
        echo '<td class="'.$tdbg.'">' . Ecl_Util::formatSize(($vol->getProperty('emsafsvolmaxquota') * 1024), null, '%01.0f (%s)', true) . '</td>';
 
111
        echo '<td class="'.$tdbg.'">' . $vol->getProperty('emsafsvolpartition') . '</td>';
 
112
        echo '</tr>';
 
113
        $c++;
 
114
}
 
115
echo "</table>";
 
116
?>
 
117
</div>
 
 
b'\\ No newline at end of file'