Closed algenty closed 4 years ago
Hi, Progress bar seems to work
new snapshot builded https://algenty.github.io/flowcharting-repository/ARCHIVES.html
Event Expand/Collapse implemented
Event resize width/height implemented
width positive: size width to the right width negative : size width to the left height positive : size to top height negative : size to bottom
Another example
You can use custom valariables, see https://algenty.github.io/flowcharting-repository/VARIABLES.html
You can use variables in xml définition or url in link.
Be carreful, at this time, only uncompressed xml supports variables.
Syntax : ${myVariable}
Supported field with variables :
Custom variables and eval are availables on fields :
List of custom variables :
${_formated} : Formated value according to the type and unit
Javascript code supports like it :
// Percent for 10 levels
${_level} * 100
// Boolean like
${_value} > 50 ? 1 : 0
and more
New snapshot available
Just tried it.
Worked one time. But did not work next time. Just to be sure, the width of the shape will be 13804585666.133333 when Value is set to {$_value} and 13.80 when Value is set to ${_formated}. My shape is just a simple rectangle
What am I missing? Any logs that I can inspect?
Hi @paregupt, Thx for tried 0.8.0 I don't see values in your color table, normal ? Don't use ${_formated} because in you case, Flowcharting try to convert "13.80 Gps" to a number of pixel and ${_value} is too big for the width. the fied value must be a number of pixels for width and height
You can try : Math.round(${_value}/10000000000) with more or less 0 Other solution, define more level in thresholds like it :
A little animation to explain, thx for your feedback, i need to doc more
BR Arnaud
Thanks Arnaud. It works for me now. Looks like setting up the Thresholds correctly was mandatory.
Anything you want me to test while this is running in my environment?
Overall, you and the team of the contributors are making it into a killer panel. Great work and than you.
Hi, THANKS A LOT !! I'm alone with a little help from grafana or other users like xkilian and Dennis, for me it's a game, not a job. But I spent some personal money on this project, that's why I opened the "sponsor" section to hope that it will bring me some money.
Draw.io is also an amazing tool, for me, better than visio
BR, Arnaud
Animation of events implemented :
@paregupt, Since your test, i modified input help, you can seeen example here
New snapshot pushed https://algenty.github.io/flowcharting-repository/ARCHIVES.html
Just nuts. Bravo! I will definitely setup 8.0 next week. The latest flowcharts, I set up at work were well received. Can't wait for new requirements to come in to get this up and running. We have a DCIM projet with industrial controls for ventilation and cooling, so the timing is great. I will see if I can get a sponsored feature. :-) If I haven't said enough, great work and I wish there wasn't this virus crazyness, because I could see us presenting something smashing at a conference. Cheers! X
Another example created within one hour
Super cool. Wondering what was your approach to make this?
Progress bar: Did you use two rectangles, one as base and another on top of that with solid color?
The VMware topology on right: Is that a static diagram or is it dynamic?
What data source did you use and what was the query?
For the first, 2 rectangles, one solide in back, the width never changes (note the size, here 120px) The second on front , with event width, field When : All, field value : ${_value} 1.2 why 1.2? because, size must be 120px (1001,2) when value is 100%
For the 3d progress bar, it's more difficult, i have 2 shapes for each. For the base = ${_value} ratio For the transparent shape on top = -(100 - ${_value}) ratio minus to invert it.
NB : To test, i often use a random value with this formule :
Math.floor(Math.random() * 101);
// returns a random integer from 0 to 100
Awesome demos @algenty Wonder if it's possible to dinamically alter the layout.
@xkilian, Be carefull 0.8.0 is an alpha, not stable, with many trace in console. Not ready for the production. But i need you to test and return a feedback. eval in fields is not secure at this time : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval
@CrashLaker Not in this version, because here, it's not a modification of an existant shape nut new shapes. You need to generate dynamically your xml by calling an api and download it in flowchart section : Check download case, and enter your api url or full path of xml repo.
Agree. I had a prototype of XML fetched from a local http server. Every box had its own XML block. I had a template block and replicating the xml code based on the number of items. Worked like a charm but haven’t productized it yet.
@paregupt Can you elaborate more on the 'Every box had its own XML block' part? From what I saw the steps would be to programatically arrange the "new" shapes in Draw.io to then convert it to XML. Any helpful documentation on that first part? It would be a sick view to have something like kubeopsview
in flowcharting
@CrashLaker this is cool view. My guess is this should be possible. Here is what I am thinking:
Make the outer container and keep it static in size and numbers. The number of inner containers can be dynamic. See this draw.io XML code
<mxGraphModel dx="1422" dy="769" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="2XeZK5cxxPYDBJWcH2Gj-1" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;" vertex="1" parent="1">
<mxGeometry x="360" y="280" width="130" height="140" as="geometry" />
</mxCell>
<mxCell id="2XeZK5cxxPYDBJWcH2Gj-2" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="370" y="390" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="2XeZK5cxxPYDBJWcH2Gj-3" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="400" y="390" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="2XeZK5cxxPYDBJWcH2Gj-4" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="430" y="390" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="2XeZK5cxxPYDBJWcH2Gj-5" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="460" y="390" width="20" height="20" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
You can copy this and throw it into https://app.diagrams.net > Extras > Edit Diagram.
The inner container code is
<mxCell id="2XeZK5cxxPYDBJWcH2Gj-5" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="460" y="390" width="20" height="20" as="geometry" />
</mxCell>
Make this code a template and add more as more inner-containers are required, with different coordinates and different id.
When I was trying before, I had this logic sitting outside Grafana. The flowcharting panel was fetching it a local http server. There may be better ways though.
@paregupt but one'd still need to bind the new metric labels to the shapes.
That’s right. The way I did this is via pre-defining the patterns of shape ID and Query ID and sync up these values in the injected XML and the flow charting panel. There can be better ways though...
@paregupt @algenty
Is there a way to bind the Alias
(or metric target from QueryInspector) received from the Query
to the shapeIDs
in the diagram with a single rule?
this way I could dynamically generate the layout and also the rules.
@CrashLaker I can't, if i add an eval on each field, the the performances are less good
New snapshot available :
With a stamp of approval like that, I will run it production right now! lol Errh mm... I will get some test dashboards going in a prepod instance. I do have to know how to do the diagrams correctly and make sure no existing dashboards explode! ;-) Some simple gauges will be good and then maybe something that show an open or closed object. Easiest is probably just to change the whole object, switching from A to B. Hours of fun ahead!
The challenge will be to make it simple enough that people can use it without having their brains explode through configuration complexity. It is an iterative process. We have a way to do it, now it is refining it so that it is easier. (good onscreen controls, good onscreen help/hints, documentation, ways to debug, tutorials, pre-built objects that can be used for complex behaviours, etc.) Arnaud, you will have to think how people will be able to contribute to the code, I think you mentioned there was some housekeeping to be done before you were comfortable with PRs. Somehow, I think your plugin will become a lot more popular! I hope to come back with intelligent and enlightening feedback. No pressure eh.
The date on the snapshot in the archives is 2020-04-15. So I think the latest one did not make it there.
@algenty
I can't, if i add an eval on each field, the the performances are less good
even though the intention is to bind all metric Alias to all shape IDs? the sugestion was to solve this with a single rule instead of processing it manually a "thousand times"
@xkilian yes i forgot to push sorry it's done
@paregupt thank you for the idea. it's a little bit laggy but it worked just fine
Great! Thanks to Arnaud for this plugin. Please document the how-to please. Would love to productize this in the future.
@paregupt Nice demo, can you try with disabled animation in flowcharting section ? And can you give me a screen shot of your rules (only) header to see exetec times?
The way I did it was to plot everything up then bind 1 rule per block so it has nearly 200 rules. Couldn't find where to disable the animation.
found it. without animation it works super smooth
Disco ! Very good With the same goal. You can use a draw.io Container to hide/collapse a group and/or regular expression in id field. When you hide a contain, all in shapes inside are hidden. First rename Id in Inspect section (don't forget to apply change and save dashboard like me) An example
@algenty problem is: i didn't want it to have empty cells but rather a dynamically placement approach as I won't know the exact number of VMs (larger blocks) and PODs (smaller ones)
In your example the more fluid behaviour when A hides would be for B to go to A's spot followed by C -> B's old spot.
Another plus (suggestion) to the actions list we could also offset elements from the X and Y sides.
this way we could float objects around. not only change position in bar
but rather use the whole plot.
@CrashLaker Not in this version because only one parameter by event in this version to keep simpliest
@algenty
It could be as simple as Change height
and Change width
.
>Shape: Collapse/Expande (0|1)
+Position: Change X offset (number)
+Position: Change Y offset (number)
>Label: Replace text(text)
>...
I close the list of events for this version maybe in next version. Now i need to spend time to stable it and write doc.
ok. thank you for the active development :) awesome project
1 - Small issue I noticed, if an object, a square for example has a transparent fill of 0%. If I assign a rule That will change the color to red, then the value becomes null, the color defaults back to white instead of transparent. It seems that the transparency is lost when the threshold fill color is released. With 8.0 latest, though this probably applies to all of them. 2 - The blinking event does not seem to work well. Works inconsistently, I will have to do more testing, in some flowcharts it works (so-so) in others not. Will do more digging. ps. Did some new designs using the prometheus ALERT metrics, works well, to aggregate alarms related to a service or host.
@xkilian Thanks for this feedback. For the blink, when the tab lost focus, it didnt work any more. I use setTimeout, i search a solution
New snapshot available
Another demo
@algenty Will you publish those demos somewhere? couldn't find them here https://play.grafana.org/d/Unu5JcjWk/flowcharting-index?orgId=1
I can't on play, only grafana team can. Can you try https://flowcharting.grafana.net/?orgId=1 ?
BR Arnaud
Here, you can found adding and fix for the next version : Try it and reply issues and suggestions,
[0.8.0 SNAPSHOT] - 2020-04-13
Add
Fix