Projet

Général

Profil

« Précédent | Suivant » 

Révision 3877b513

Ajouté par CharlieMarshall il y a plus de 9 ans

improve look of gateways widget

Voir les différences:

usr/local/www/widgets/widgets/gateways.widget.php
44 44

  
45 45
<table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0" summary="gateway status">
46 46
	<tr>
47
	<td class="vncellt" width="30%" id="gatewayname">
48
			Name
49
	</td>
50
	<td width="70%" class="listr">
51
		<table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed;" summary="heading">
52
			<tr>
53
			<td width="25%" class="listhdrr ellipsis">RTT</td>
54
			<td width="25%" class="listhdrr ellipsis">Loss</td>
55
			<td width="50%" class="listhdrr ellipsis">Status</td>
56
			</tr>
57
		</table>
58
	</td>
47
		<td class="listhdrr" id="gatewayname" align="center">Name</td>
48
		<td class="listhdrr" align="center">RTT</td>
49
		<td class="listhdrr" align="center">Loss</td>
50
		<td class="listhdrr" align="center">Status</td>
59 51
	</tr>
60 52
	<?php foreach ($a_gateways as $gname => $gateway) { ?>
61 53
	<tr>
62
	<td class="vncellt" width="30%" id="gateway<?php echo $counter; ?>">
54
	<td class="listhdrr" id="gateway<?php echo $counter; ?>" rowspan="2" align="center">
63 55
		<strong>
64 56
		<?php echo htmlspecialchars($gateway['name']); ?>
65 57
		</strong>
66 58
		<?php $counter++; ?>
67 59
	</td>
68
	<td width="70%" class="listr ellipsis">
69
		<table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed;" summary="address">
70
			<tr>
71
			<td class="vncellt ellipsis" width="100%">
72
				<div id="gateway<?php echo $counter; ?>" style="display:inline">
60
	<td colspan="3" class="listr ellipsis" summary="address" align="center">
61
				<div id="gateway<?php echo $counter; ?>" style="display:inline"><b>
73 62
					<?php
74 63
						$if_gw = '';
75 64
						if (is_ipaddr($gateway['gateway']))
......
84 73
						unset ($if_gw);
85 74
						$counter++;
86 75
					?>
87
				</div>
76
				</b></div>
88 77
			</td>
89
			</tr>
90
		</table>
91
		<table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed;" summary="statistics">
92
			<tr>
93
			<td width="25%" class="listlr ellipsis" align="center" id="gateway<?php echo $counter; ?>">
78
	</tr>
79
	<tr>
80
			<td class="listr ellipsis" align="center" id="gateway<?php echo $counter; ?>">
94 81
			<?php
95 82
				if ($gateways_status[$gname])
96 83
					echo htmlspecialchars($gateways_status[$gname]['delay']);
......
99 86
			?>
100 87
			<?php $counter++; ?>
101 88
			</td>
102
			<td width="25%" class="listr ellipsis" align="center" id="gateway<?php echo $counter; ?>">
89
			<td class="listr ellipsis" align="center" id="gateway<?php echo $counter; ?>">
103 90
			<?php
104 91
				if ($gateways_status[$gname])
105 92
					echo htmlspecialchars($gateways_status[$gname]['loss']);
......
108 95
			?>
109 96
			<?php $counter++; ?>
110 97
			</td>
111
			<td width="50%" class="listr ellipsis" id="gateway<?php echo $counter ?>" >
112
			<table border="0" cellpadding="0" cellspacing="2" style="table-layout: fixed;" summary="status">
113 98
			<?php
114 99
				if ($gateways_status[$gname]) {
115 100
					if (stristr($gateways_status[$gname]['status'], "force_down")) {
......
135 120
					$online = gettext("Unknown");
136 121
					$bgcolor = "#ADD8E6";  // lightblue
137 122
				}
138
				echo "<tr><td class=\"ellipsis\" bgcolor=\"$bgcolor\">&nbsp;$online&nbsp;</td></tr>\n";
123
				echo "<td class=\"ellipsis\" bgcolor=\"$bgcolor\" align=\"center\">$online</td>\n";
139 124
				$counter++;
140 125
			?>
141
			</table>
142
			</td>
143
			</tr>
144
		</table>
145
	</td>
146 126
	</tr>
147 127
	<?php } // foreach ?>
148 128
</table>

Formats disponibles : Unified diff