mattermost-plugin-analytics icon indicating copy to clipboard operation
mattermost-plugin-analytics copied to clipboard

Separate charts into another plugin

Open manland opened this issue 6 years ago • 10 comments

It could serve to another purpose. Check if plugin discovery is possible.

manland avatar Feb 24 '19 22:02 manland

Could you elaborate a bit? Do you want to move the "chart serving" into another plugin?

hanzei avatar Feb 27 '19 10:02 hanzei

@hanzei yes exactly, I think of a Prometheus plugin or a chat renderer when you upload CSV files...

I can make a separate plugin and force user to install it, or make a special package and use it in other plugin (more like a lib)

Any thought about that?

manland avatar Feb 27 '19 17:02 manland

Maybe I'm not getting your point. But why would you do this? These charts are specific to this plugin.

hanzei avatar Feb 27 '19 17:02 hanzei

These charts are not specific. I build an url containing all data necessary to draw the chart : ![users bar chart](http://127.0.0.1:8065/plugins/com.github.manland.mattermost-plugin-analytics/bar.svg?manland=3&sysadmin=37&user-1=3) I can change manland=3&sysadmin=37&user-1=3 with anything I want to draw (key=value) for bar chart. Its the same for pie and line charts.

manland avatar Feb 27 '19 20:02 manland

Ah, I see. Yes, that would make sense then.

Forcing the installation of another plugin is not strait forward but deficiently possible.

hanzei avatar Feb 28 '19 09:02 hanzei

I would like to look into this, once I have the time :man_shrugging:

hanzei avatar Feb 28 '19 09:02 hanzei

Only one life, so many things to do...

I know, I know :D

And yes I think a lib for plugins is better than an other plugin. In user perspective is not easy to understand the need of install 2 plugins.

manland avatar Feb 28 '19 10:02 manland

I would expect this plugin taking care of installing all needed plugins.

hanzei avatar Feb 28 '19 10:02 hanzei

Oo wouhaou i didn't see this like that :D Interesting! I will take a look at this.

manland avatar Feb 28 '19 10:02 manland

Just call `GetPlugins and check the result. You could even offer the system admin to install the plugin for him.

hanzei avatar Feb 28 '19 11:02 hanzei