manland / mattermost-plugin-analytics

A mattermost plugin to show analytics of your instance
Apache License 2.0
17 stars 6 forks source link

Separate charts into another plugin #14

Open manland opened 5 years ago

manland commented 5 years ago

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

hanzei commented 5 years ago

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

manland commented 5 years ago

@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?

hanzei commented 5 years ago

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

manland commented 5 years ago

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.

hanzei commented 5 years ago

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

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

hanzei commented 5 years ago

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

manland commented 5 years ago

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.

hanzei commented 5 years ago

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

manland commented 5 years ago

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

hanzei commented 5 years ago

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