Project

General

Profile

« Previous | Next » 

Revision 1180c752

Added by sbeaver about 10 years ago

status_rrd_graph_settings detail changes per SH

Thanks for the suggestions.

View differences:

usr/local/www/status_rrd_graph_settings.php
94 94
$rrddbpath = "/var/db/rrd/";
95 95
chdir($rrddbpath);
96 96
$databases = glob('*.rrd');
97
chdir($here);       // Need to go back home otherwise the 'include/requires fail!
97
chdir($here);		// Need to go back home otherwise the 'include/requires fail!
98 98

  
99 99
foreach($databases as $database) {
100 100
	if(stristr($database, "wireless")) {
......
118 118

  
119 119
include("head.inc");
120 120

  
121
$tab_array = array();
122
$tabactive = ($curcat == "system") ? True:False;
123
$tab_array[] = array(gettext("System"), $tabactive, "status_rrd_graph.php?cat=system");
124
$tabactive = ($curcat == "traffic") ? True:False;
125
$tab_array[] = array(gettext("Traffic"), $tabactive, "status_rrd_graph.php?cat=traffic");
126
$tabactive = ($curcat == "packets") ? True:False;
127
$tab_array[] = array(gettext("Packets"), $tabactive, "status_rrd_graph.php?cat=packets");
128
$tabactive = ($curcat == "quality") ? True:False;
129
$tab_array[] = array(gettext("Quality"), $tabactive, "status_rrd_graph.php?cat=quality");
121
$tab_array[] = array(gettext("System"), ($curcat == "system"), "status_rrd_graph.php?cat=system");
122
$tab_array[] = array(gettext("Traffic"), ($curcat == "traffic"), "status_rrd_graph.php?cat=traffic");
123
$tab_array[] = array(gettext("Packets"), ($curcat == "packets"), "status_rrd_graph.php?cat=packets");
124
$tab_array[] = array(gettext("Quality"), ($curcat == "quality"), "status_rrd_graph.php?cat=quality");
130 125

  
131 126
if($queues) {
132
	$tabactive = ($curcat == "queues") ? True:False;
133
	$tab_array[] = array(gettext("Queues"), $tabactive, "status_rrd_graph.php?cat=queues");
134
	$tabactive = ($curcat == "queuedrops") ? True:False;
135
	$tab_array[] = array(gettext("QueueDrops"), $tabactive, "status_rrd_graph.php?cat=queuedrops");
127
	$tab_array[] = array(gettext("Queues"), ($curcat == "queues"), "status_rrd_graph.php?cat=queues");
128
	$tab_array[] = array(gettext("QueueDrops"), ($curcat == "queuedrops"), "status_rrd_graph.php?cat=queuedrops");
136 129
}
137 130

  
138
if($wireless) {
139
	$tabactive = ($curcat == "wireless") ? True:False;
140
	$tab_array[] = array(gettext("Wireless"), $tabactive, "status_rrd_graph.php?cat=wireless");
141
}
131
if($wireless)
132
	$tab_array[] = array(gettext("Wireless"), ($curcat == "wireless"), "status_rrd_graph.php?cat=wireless");
142 133

  
143
if($cellular) {
144
	$tabactive = ($curcat == "cellular") ? True:False;
145
	$tab_array[] = array(gettext("Cellular"), $tabactive, "status_rrd_graph.php?cat=cellular");
146
}
134
if($cellular)
135
	$tab_array[] = array(gettext("Cellular"), ($curcat == "cellular"), "status_rrd_graph.php?cat=cellular");
147 136

  
148
if($vpnusers) {
149
	if($curcat == "vpnusers") { $tabactive = True; } else { $tabactive = False; }
150
		$tab_array[] = array(gettext("VPN"), $tabactive, "status_rrd_graph.php?cat=vpnusers");
151
}
152
if($captiveportal) {
153
	$tabactive = ($curcat == "captiveportal") ? True:False;
154
	$tab_array[] = array(gettext("Captive Portal"), $tabactive, "status_rrd_graph.php?cat=captiveportal");
155
}
137
if($vpnusers)
138
	$tab_array[] = array(gettext("VPN"), ($curcat == "vpnusers"), "status_rrd_graph.php?cat=vpnusers");
156 139

  
157
if(isset($config['ntpd']['statsgraph'])) {
158
	$tabactive = ($curcat == "ntpd") ? True:False;
159
	$tab_array[] = array("NTP", $tabactive, "status_rrd_graph.php?cat=ntpd");
160
}
140
if($captiveportal)
141
	$tab_array[] = array(gettext("Captive Portal"), ($curcat == "captiveportal"), "status_rrd_graph.php?cat=captiveportal");
161 142

  
162
$tabactive = ($curcat == "custom") ? True:False;
163
$tab_array[] = array(gettext("Custom"), $tabactive, "status_rrd_graph.php?cat=custom");
143
if(isset($config['ntpd']['statsgraph']))
144
	$tab_array[] = array(gettext("NTP"), ($curcat == "ntpd"), "status_rrd_graph.php?cat=ntpd");
164 145

  
165
$tabactive = ($curcat == "settings") ? True:False;
166
$tab_array[] = array(gettext("Settings"), $tabactive, "status_rrd_graph_settings.php");
146
$tab_array[] = array(gettext("Custom"), ($curcat == "custom"), "status_rrd_graph.php?cat=custom");
147
$tab_array[] = array(gettext("Settings"), ($curcat == "settings"), "status_rrd_graph_settings.php");
167 148

  
168 149
display_top_tabs($tab_array);
169 150

  
......
175 156

  
176 157
require('classes/Form.class.php');
177 158

  
178
$form = new Form(new Form_Button(
179
	'Submit',
180
	'Save'
181
));
159
$form = new Form;
182 160

  
183 161
$section = new Form_Section('Graph settings');
184 162

  
......
208 186
	'Default period',
209 187
	$pconfig['period'],
210 188
	$periods
211
))->setHelp('<strong>Note:</strong> Graphs will not be allowed to be recreated within a 1 minute interval, please ' .
189
))->setHelp('Graphs will not be allowed to be recreated within a 1 minute interval, please ' .
212 190
			'take this into account after changing the style.');
213 191

  
214 192
$form->addGlobal(new Form_Button(

Also available in: Unified diff