We decided to make a repo where default graph-panel represented as a legit plugin with it’s version, repo and bugtracker. This is how it looks like https://github.com/CorpGlory/grafana-graph-panel
We think that each plugin should has it’s own repo.
This allows easier to make plugins based on default plugins and make your contributions.
For example, if I have a plugin which is fork of default plugin, I can much easier merge updates to my fork.
Now I am working on implementing this https://github.com/grafana/grafana/issues/870
So I started with creating a separate plugin which I can hack and test.
The idea comes from d3.js library: it is a big library which depend on smaller git repos.
Hey @daniellee, what do you think?
1 Like
There is a problem with taking this plugin out of Grafana: we got 404 error when importing modules: colors, event_manager and time_series2. So we had to copy these modules in repo (https://github.com/CorpGlory/grafana-graph-panel/tree/master/src/vendor/grafana).
It doesn’t seem like a good idea because it makes harder to keep plugin up to date with Grafana.
Thereby, I have a question to Grafana developers:
Is there a way to access them without having in bundle?
1 Like
Also I think it is right that default plugins also has it’s own version
When i cloned this repo in data/plugins then after opening the multibar chart panel its giving
Plugin Error
Fetch error: 404 Not Found Instantiating http://localhost:8000/public/plugins/corpglory-multibar-graph-panel/module.js Loading plugins/corpglory-multibar-graph-panel/module
can u explain what is this plugin for and how it works
Hey, the problem is that dist
folder doesn’t have build (we havent made a release yet)
You need to go to repo folder and make
npm install
npm run build
in the cloned folder.
But this thread is about default graph panel fork (this is basis for multibar) panel.
I encourage you to ask this kind of questions in project issues: https://github.com/CorpGlory/grafana-multibar-graph-panel/issues
1 Like
We in the core Grafana team do not agree that each core panel/data source should have its own repo.
- Introduces tons of problems around building, data migration and packaging
- Introduces more work by having multiple sub-repos on a code level and on a support level.
However, it is totally fine that you have created your own graph panel repo and that you use that as a starting point for your plugins. And if it is of good quality then I am sure other people will use it too - although it contains much more than most people need I would say.
2 Likes
Hi Daniellee,
I try to draw two bar for each week for using graphs plugin but it gives me tolal valus’s open and closed columns as one bar. Is there any way?
Week Open Closed
W1 1 3
W2 5 8
…
.
Select t1.week, t1.time_sec,t1.open,t2.closed from
(SELECT
concat(‘W’, cast(weekofyear(str_to_date(reportdate,’%d-%m-%Y’)) as char)) as week,
str_to_date(reportdate,’%d-%m-%Y’) as time_sec,
count(*) as open
from maximo_sr group by week) t1
inner join
(SELECT
concat(‘W’, cast(weekofyear(str_to_date(statusdate,’%d-%m-%Y’)) as char)) as week,
str_to_date(statusdate,’%d-%m-%Y’) as time_sec,
count(*) as closed
from maximo_sr group by week) t2
on t1.week = t2.week
Thanks.
Hello,
Still need to help:)