<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 18, 2017 at 9:42 AM, Heiko Rupp <span dir="ltr">&lt;<a href="mailto:hrupp@redhat.com" target="_blank">hrupp@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 17 Jul 2017, at 15:59, Caina Costa wrote:<br>
<br>
&gt; If we have a WildflyDomainControllerServer to render, first it will<br>
&gt; try to find WildFlyDomainControllerServerV<wbr>iew, then<br>
<br>
</span><span class="gmail-">I (still) consider that a problem, even if better than what we have now.<br>
</span>I can&#39;t tell e.g. the Infinispan folks &quot;Listen you know your stuff<br>
<span class="gmail-">better than we do, so please start writing Ruby code and create a<br>
pull-request against the hawkular-provider gem&quot;<br></span></blockquote><div><br></div><div>I&#39;ve sent this just to you, instead of the group, so this is my other email:</div><div><br></div><div style="font-size:12.8px">I&#39;m currently developing an extension to this system that allows exactly that, to provide a JSON/YAML structure to dinamically generate views from that. It is just a factory layer to generate views, but it will enable us to do both options, either defining on the repository itself, for more complex schemas, and importing from the server/a plain file for everything else.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Something like that:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">render json: View.from_schema(schema_from_<wbr>server).new(entity) </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I&#39;m still defining the format correctly, but what I&#39;m using right now looks something like this:</div><div style="font-size:12.8px"><div><br></div><div>summary:</div><div>  - name: id</div><div>  - name: name</div><div>  - name: active</div><div>    alias: is_active</div><div>foo:</div><div>  name: foo</div><div><br></div></div><div style="font-size:12.8px">Which, as  json would be something like that:</div><div style="font-size:12.8px"><br></div><div><span style="font-size:12.8px">{&quot;summary&quot;:[{&quot;name&quot;:&quot;id&quot;},{&quot;</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">name&quot;:&quot;name&quot;},{&quot;name&quot;:&quot;active&quot;</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">,&quot;alias&quot;:&quot;is_active&quot;}],&quot;foo&quot;:{</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">&quot;name&quot;:&quot;foo&quot;}}</span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
<br>
My goal really is to externalise that as much as possible (in to the<br>
hawkular-server or agent side), so that it is<br>
possible for other groups to write the description in e.g. JSON for<br>
their UI and the relation between Entities.<br>
<br>
Having that in Hawkular/Agent also allows us to introduce new supported<br>
</span>stuff outside the release cycles of ManageIQ and their downstream<br>
CloudForms.<br>
I am not even sure if e.g. introducing support for Infinispan could be<br>
part of a z-Stream release, which is supposed to be bugfixes only.<br>
<span class="gmail-">So if we&#39;d miss CF 4.6 GA, we can only support Fuse in the CF release<br>
after 4.6 GA, while if the UI is driven from (meta)-data on the Hawkular<br>
side, we can update the Middleware Manager / agent and the support would<br>
show automagically.<br>
Of course we may at some point in time create more specific UIs for some<br>
task, but the 80% case should work without modification of MiQ code.<br>
<br>
</span>We need to generate the views dynamically, by fetching the (meta) data<br>
<span class="gmail-">and the schema and generating the view from that. That means we don&#39;t<br>
need to change anything on ui-classic to add new entity types.<br>
</span><span class="gmail-">Those *EntityView Ruby objects need to be created from data retrieved<br>
from the Hawkular side and not by checking in new code into the<br>
hawkular-provider gem when supporting new Entities.<br>
<br>
</span>The metadata should probably stored inside MiQ for faster access, but<br>
that is a 2ndary concern.<br>
<br>
______________________________<wbr>_________________<br>
hawkular-dev mailing list<br>
<a href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/hawkular-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/hawkular-dev</a><br>
</blockquote></div><br></div></div>