Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support for custom fields in meta fields of projects.json #327

Open
jsmanrique opened this issue Sep 3, 2019 · 1 comment
Open

Comments

@jsmanrique
Copy link

Based on grimoirelab-elk #678 issue.

I have a projects.json file that include some custom fields inside the meta field like:

"meta": {
    "title": "Awesome Project",
    "type": "Software"
},

In the data discovery tab I see expected cm_title and cm_type fields with the right data. But cm_type cannot be visualized, because it's not in the index pattern. cm_title appears as field with type text.

Would it be great adding any custom field in meta to the index pattern as cm_{custom field name} with type text. Of course, type auto-guessing would be super-helpful, but I am not sure Kibana or Elasticsearch support it.

According to @alpgarcia comments:
This happens when Mordred uploads standard index patterns from Sigils, so any custom field will either not be present or disappear from the index pattern (if you manually added them to the index pattern).

The only way to support this would be checking the projects.json file after uploading standard index patterns and dynamically add custom fields to Kibana index pattern object. That means uploading an index pattern to the dashboard should trigger this check to make sure custom fields are always kept.

Custom fields could be modified in the index pattern by the user, so we couldn't simply overwrite the index pattern and then add them, but we will also need to keep those changes. So, should we consider custom an index pattern having custom fields? (and thus not updating that index pattern and the affected panels anymore)

@valeriocos
Copy link
Member

The problem seems difficult since it's not clear when an index pattern should be updated and how to deal with the changes (maybe it's useful to export the new index pattern with all changes, maybe the changes should be discarded). Furthermore, this adds some complexity to the task panels which should be in charge of just uploading panels.

A possible approach would be to upload panels from any location, and simplify the export of (customized) panels. Archimedes can already do it, but it's not integrated to Mordred.

We should probably revamp the idea of creating a common place to share panels collections. WDYT @sduenas ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants