@cryptotaxi247 / netdata-1 / commits / a943c5f0e

added support for ordering graphs

box@home root committed Jun 20, 2013 at 00:27 UTC a943c5f0ee71e2b0c0fab255b4e01313483eb343
1 file changed +13 -2
netdata.start
+13 -2
@@ -151,7 +151,6 @@ do
151 drawChart('${x}', '${x}_div', width, height, "data/${x}.json", "${t}");
152 EOF2
153 done
154 -set|grep ^NETDATA_TITLE_ >all.config
154
155 ref=4
156 tim=1000
@@ -185,18 +184,30 @@ cat >>all.html <<EOF3
184 -->
185 EOF3
186
187 +tmp="/tmp/$RANDOM.netdata.$$.$RANDOM"
188 for x in $all
189 do
190 + eval "NETDATA_PRIORITY_${x}=\${NETDATA_PRIORITY_${x}:-${x}}"
191 + eval "t=\${NETDATA_PRIORITY_${x}}"
192 + echo "${t}.${x}"
193 +done >"${tmp}"
194 +
195 +for x in `cat "${tmp}" | sort`
196 +do
197 + n="`echo "$x" | cut -d '.' -f 2-`"
198 cat >>all.html <<EOF4
191 - <div id="${x}_div"></div>
199 + <div id="${n}_div"></div>
200 EOF4
201 done
202 +rm -f "${tmp}"
203
204 cat >>all.html <<EOF5
205 </body>
206 </html>
207 EOF5
208
209 +set|grep ^NETDATA_ >all.config
210 +
211 echo "All Done."
212 echo "Just hit all.html from your browser."
213