On Tue, Jul 18, 2017 at 9:42 AM, Heiko Rupp <hrupp(a)redhat.com> wrote:
On 17 Jul 2017, at 15:59, Caina Costa wrote:
> If we have a WildflyDomainControllerServer to render, first it will
> try to find WildFlyDomainControllerServerView, then
I (still) consider that a problem, even if better than what we have now.
I can't tell e.g. the Infinispan folks "Listen you know your stuff
better than we do, so please start writing Ruby code and create a
pull-request against the hawkular-provider gem"
I've sent this just to you, instead of the group, so this is my other email:
I'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.
Something like that:
render json: View.from_schema(schema_from_server).new(entity)
I'm still defining the format correctly, but what I'm using right now looks
something like this:
summary:
- name: id
- name: name
- name: active
alias: is_active
foo:
name: foo
Which, as json would be something like that:
{"summary":[{"name":"id"},{"name":"name"},{"name":"active"
,"alias":"is_active"}],"foo":{"name":"foo"}}
My goal really is to externalise that as much as possible (in to the
hawkular-server or agent side), so that it is
possible for other groups to write the description in e.g. JSON for
their UI and the relation between Entities.
Having that in Hawkular/Agent also allows us to introduce new supported
stuff outside the release cycles of ManageIQ and their downstream
CloudForms.
I am not even sure if e.g. introducing support for Infinispan could be
part of a z-Stream release, which is supposed to be bugfixes only.
So if we'd miss CF 4.6 GA, we can only support Fuse in the CF release
after 4.6 GA, while if the UI is driven from (meta)-data on the Hawkular
side, we can update the Middleware Manager / agent and the support would
show automagically.
Of course we may at some point in time create more specific UIs for some
task, but the 80% case should work without modification of MiQ code.
We need to generate the views dynamically, by fetching the (meta) data
and the schema and generating the view from that. That means we don't
need to change anything on ui-classic to add new entity types.
Those *EntityView Ruby objects need to be created from data retrieved
from the Hawkular side and not by checking in new code into the
hawkular-provider gem when supporting new Entities.
The metadata should probably stored inside MiQ for faster access, but
that is a 2ndary concern.
_______________________________________________
hawkular-dev mailing list
hawkular-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hawkular-dev