mini-/micrographs stacked / aggregated?
![](https://secure.gravatar.com/avatar/f372a017f4b302e81427d30c92f91881.jpg?s=120&d=mm&r=g)
Greetings
Is there a way we can create "aggregated" (or "stacked") mini-/micrographs for the frontpage? using this syntax
$config['frontpage']['minigraphs']['ids'] = "19418,port_bits,Dist76-01.AMS4;19496,port_bits,NAME"; or this: $config['frontpage']['micrographs']['RING']['ids'] = "19414,port_bits,NAME;19492,port_bits,NAME2;19439,port_bits,NAME3";
results in several graphs next to each other.
what we are after is in "mini" or "micro" what we can do it using "custom" traffic graphs - but they are too big for what we are trying to do...
$config['frontpage']['custom_traffic']['ids'] = "19418,19496"; <-- this actually stacks the data into one graph
thanks for any pointers!
Andreas
![](https://secure.gravatar.com/avatar/1c685a39a957c5e4dd2544f4cdc48c02.jpg?s=120&d=mm&r=g)
On 10/23/2013 11:09 PM, Andreas Rüdel wrote:
Greetings
Is there a way we can create "aggregated" (or "stacked") mini-/micrographs for the frontpage? using this syntax
$config['frontpage']['minigraphs']['ids'] = "19418,port_bits,Dist76-01.AMS4;19496,port_bits,NAME"; or this: $config['frontpage']['micrographs']['RING']['ids'] = "19414,port_bits,NAME;19492,port_bits,NAME2;19439,port_bits,NAME3";
results in several graphs next to each other.
what we are after is in "mini" or "micro" what we can do it using "custom" traffic graphs - but they are too big for what we are trying to do...
$config['frontpage']['custom_traffic']['ids'] = "19418,19496"; <-- this actually stacks the data into one graph
I made the micrographs patch and did some tweaks on the minigraphs at the same time. I'm happy to work on a patch for you if you can explain it a little more for me. Would something that allows you to specify minigraphs like this work?
$config['frontpage']['minigraphs']['ids'] = "19418/19496,custom_traffic,Dist76-01.AMS4;12345,port_bits,NAME";
That way you would get one (daily) minigraph for each custom_traffic entry you put in the minigraphs string.
Regards, Paul
![](https://secure.gravatar.com/avatar/0fa97865a0e1ab36152b6b2299eedb49.jpg?s=120&d=mm&r=g)
On 2013-10-23 22:40, Paul Gear wrote:
On 10/23/2013 11:09 PM, Andreas Rüdel wrote: Greetings
Is there a way we can create "aggregated" (or "stacked") mini-/micrographs for the frontpage? using this syntax
$config['frontpage']['minigraphs']['ids'] = "19418,port_bits,Dist76-01.AMS4;19496,port_bits,NAME"; or this: $config['frontpage']['micrographs']['RING']['ids'] = "19414,port_bits,NAME;19492,port_bits,NAME2;19439,port_bits,NAME3";
results in several graphs next to each other.
what we are after is in "mini" or "micro" what we can do it using "custom" traffic graphs - but they are too big for what we are trying to do...
$config['frontpage']['custom_traffic']['ids'] = "19418,19496"; <-- this actually stacks the data into one graph
I made the micrographs patch and did some tweaks on the minigraphs at the same time. I'm happy to work on a patch for you if you can explain it a little more for me. Would something that allows you to specify minigraphs like this work?
$config['frontpage']['minigraphs']['ids'] = "19418/19496,custom_traffic,Dist76-01.AMS4;12345,port_bits,NAME";
If I was stupid enough to believe in god, I would definitely accuse you of making baby Jesus cry with this.
Define rows and graphs within rows as arrays containing arrays of attributes, that way you don't even need to parse it.
Look at how we build the navbars from an array, this is probably how it should be done.
adam.
![](https://secure.gravatar.com/avatar/1c685a39a957c5e4dd2544f4cdc48c02.jpg?s=120&d=mm&r=g)
On 10/24/2013 07:46 AM, Adam Armstrong wrote:
On 2013-10-23 22:40, Paul Gear wrote:
... I made the micrographs patch and did some tweaks on the minigraphs at the same time. I'm happy to work on a patch for you if you can explain it a little more for me. Would something that allows you to specify minigraphs like this work?
$config['frontpage']['minigraphs']['ids'] = "19418/19496,custom_traffic,Dist76-01.AMS4;12345,port_bits,NAME";
... Define rows and graphs within rows as arrays containing arrays of attributes, that way you don't even need to parse it.
Look at how we build the navbars from an array, this is probably how it should be done.
I was merely preserving backwards compatibility with what was there. If we use a different key instead of ids, then we could do it without breaking compatibility with existing configs.
Or would you rather I just chuck the whole thing and tell people who use it to update their configs?
Paul
![](https://secure.gravatar.com/avatar/21caf0a08d095be7196a1648d20942be.jpg?s=120&d=mm&r=g)
On 24/10/2013 00:34, Paul Gear wrote:
On 10/24/2013 07:46 AM, Adam Armstrong wrote:
On 2013-10-23 22:40, Paul Gear wrote:
... I made the micrographs patch and did some tweaks on the minigraphs at the same time. I'm happy to work on a patch for you if you can explain it a little more for me. Would something that allows you to specify minigraphs like this work?
$config['frontpage']['minigraphs']['ids'] = "19418/19496,custom_traffic,Dist76-01.AMS4;12345,port_bits,NAME";
... Define rows and graphs within rows as arrays containing arrays of attributes, that way you don't even need to parse it.
Look at how we build the navbars from an array, this is probably how it should be done.
I was merely preserving backwards compatibility with what was there. If we use a different key instead of ids, then we could do it without breaking compatibility with existing configs.
Or would you rather I just chuck the whole thing and tell people who use it to update their configs?
Tom
![](https://secure.gravatar.com/avatar/1c685a39a957c5e4dd2544f4cdc48c02.jpg?s=120&d=mm&r=g)
On 10/24/2013 08:54 AM, Tom Laermans wrote:
On 24/10/2013 00:34, Paul Gear wrote:
On 10/24/2013 07:46 AM, Adam Armstrong wrote:
On 2013-10-23 22:40, Paul Gear wrote:
... I made the micrographs patch and did some tweaks on the minigraphs at the same time. I'm happy to work on a patch for you if you can explain it a little more for me. Would something that allows you to specify minigraphs like this work?
$config['frontpage']['minigraphs']['ids'] = "19418/19496,custom_traffic,Dist76-01.AMS4;12345,port_bits,NAME";
... Define rows and graphs within rows as arrays containing arrays of attributes, that way you don't even need to parse it.
Look at how we build the navbars from an array, this is probably how it should be done.
I was merely preserving backwards compatibility with what was there. If we use a different key instead of ids, then we could do it without breaking compatibility with existing configs.
Or would you rather I just chuck the whole thing and tell people who use it to update their configs?
But then you have to keep the old code next to the new code. And we all know how much Adam loves cruft.
But doing that would be my preference, since it's nice to users.
Paul
![](https://secure.gravatar.com/avatar/21caf0a08d095be7196a1648d20942be.jpg?s=120&d=mm&r=g)
On 24/10/2013 01:30, Paul Gear wrote:
On 10/24/2013 08:54 AM, Tom Laermans wrote:
On 24/10/2013 00:34, Paul Gear wrote:
On 10/24/2013 07:46 AM, Adam Armstrong wrote:
On 2013-10-23 22:40, Paul Gear wrote:
... I made the micrographs patch and did some tweaks on the minigraphs at the same time. I'm happy to work on a patch for you if you can explain it a little more for me. Would something that allows you to specify minigraphs like this work?
$config['frontpage']['minigraphs']['ids'] = "19418/19496,custom_traffic,Dist76-01.AMS4;12345,port_bits,NAME";
... Define rows and graphs within rows as arrays containing arrays of attributes, that way you don't even need to parse it.
Look at how we build the navbars from an array, this is probably how it should be done.
I was merely preserving backwards compatibility with what was there. If we use a different key instead of ids, then we could do it without breaking compatibility with existing configs.
Or would you rather I just chuck the whole thing and tell people who use it to update their configs?
But then you have to keep the old code next to the new code. And we all know how much Adam loves cruft.
But doing that would be my preference, since it's nice to users.
If you do the check first, and convert it to the new array with only a single entry, and use 1 code block to parse that, it's only a little cruft. :)
There's quite a bit of this going on in definitions.inc.php for old settings. Also rancid path was only one var instead of an array once, I'm sure there's is_array() in there, etc...
Tom
![](https://secure.gravatar.com/avatar/0fa97865a0e1ab36152b6b2299eedb49.jpg?s=120&d=mm&r=g)
On 2013-10-24 00:30, Paul Gear wrote:
On 10/24/2013 08:54 AM, Tom Laermans wrote: On 24/10/2013 00:34, Paul Gear wrote: On 10/24/2013 07:46 AM, Adam Armstrong wrote: On 2013-10-23 22:40, Paul Gear wrote: ... I made the micrographs patch and did some tweaks on the minigraphs at the same time. I'm happy to work on a patch for you if you can explain it a little more for me. Would something that allows you to specify minigraphs like this work?
$config['frontpage']['minigraphs']['ids'] = "19418/19496,custom_traffic,Dist76-01.AMS4;12345,port_bits,NAME"; ... Define rows and graphs within rows as arrays containing arrays of attributes, that way you don't even need to parse it.
Look at how we build the navbars from an array, this is probably how it should be done.
I was merely preserving backwards compatibility with what was there. If we use a different key instead of ids, then we could do it without breaking compatibility with existing configs.
Or would you rather I just chuck the whole thing and tell people who use it to update their configs? http://be2.php.net/is_array ?
But then you have to keep the old code next to the new code. And we all know how much Adam loves cruft.
But doing that would be my preference, since it's nice to users.
I hope you now have some small amount of understanding about why I didn't want to commit the patch in the first place, and why we tend to view contributions as often more of a burden than a help.
An analogy I've often made is that "donating" code to an open source project is like "donating" a child to an orphanage. Thankfully in this case, the original deadbeat dad has come back to clean up the poop.
My guess is that 3 people are using this, and they would be happy to rewrite their configuration parts if it meant that it works better. They'd have to be pretty adventurous to be using it in the first place, after all!
adam.
![](https://secure.gravatar.com/avatar/1c685a39a957c5e4dd2544f4cdc48c02.jpg?s=120&d=mm&r=g)
On 10/24/2013 10:15 AM, Adam Armstrong wrote:
... I hope you now have some small amount of understanding about why I didn't want to commit the patch in the first place, and why we tend to view contributions as often more of a burden than a help.
An analogy I've often made is that "donating" code to an open source project is like "donating" a child to an orphanage. Thankfully in this case, the original deadbeat dad has come back to clean up the poop.
You've been reading Dale Carnegie again, haven't you, Adam?
Great way to ensure that I leave you with the dirty nappy...
Paul
![](https://secure.gravatar.com/avatar/0fa97865a0e1ab36152b6b2299eedb49.jpg?s=120&d=mm&r=g)
On 2013-10-24 02:25, Paul Gear wrote:
On 10/24/2013 10:15 AM, Adam Armstrong wrote: ... I hope you now have some small amount of understanding about why I didn't want to commit the patch in the first place, and why we tend to view contributions as often more of a burden than a help.
An analogy I've often made is that "donating" code to an open source project is like "donating" a child to an orphanage. Thankfully in this case, the original deadbeat dad has come back to clean up the poop.
You've been reading Dale Carnegie again, haven't you, Adam?
That is unlikely, unless it has a lot of pictures.
adam.
![](https://secure.gravatar.com/avatar/b3a546cd599e8024ed2790e548f4c63b.jpg?s=120&d=mm&r=g)
Lol
http://en.wikipedia.org/wiki/How_to_Win_Friends_and_Influence_People
On 24/10/13 12:18 PM, "Adam Armstrong" adama@memetic.org wrote:
On 2013-10-24 02:25, Paul Gear wrote:
On 10/24/2013 10:15 AM, Adam Armstrong wrote: ... I hope you now have some small amount of understanding about why I didn't want to commit the patch in the first place, and why we tend to view contributions as often more of a burden than a help.
An analogy I've often made is that "donating" code to an open source project is like "donating" a child to an orphanage. Thankfully in this case, the original deadbeat dad has come back to clean up the poop.
You've been reading Dale Carnegie again, haven't you, Adam?
That is unlikely, unless it has a lot of pictures.
adam. _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
participants (5)
-
Adam Armstrong
-
Andreas Rüdel
-
Paul Gear
-
Peter Childs
-
Tom Laermans