[users at bb.net] Passing parameters to plugins via master.cfg

Gabriel Nagy gabrielnagy at me.com
Fri Oct 27 07:55:29 UTC 2017


Hi Pierre,

Thanks for the advice and the quick answer. I managed to partly implement
what you mentioned. Now my dashboard plugin generates as many pages as I
tell it to in the master.cfg file. However, I don't seem to get how to
properly name the templates. In the old dashboard I had one
dashboard.tpl.jade file. Do I need multiple template files now? My current
state points to this:

templateUrl: "dashboards/#{project}/index.html"

And my src/module folder structure is this:

.
├── dashboard.route.coffee
├── dashboard.tpl.jade
├── main.module.coffee
└── main.module.spec.coffee

Sorry for the seemingly dumb question, but this project has actually been
my starting point for learning Angular and I haven't yet managed to get a
grip of it :)

Thanks,
Gabe

2017-10-26 17:10 GMT+03:00 Pierre Tardy <tardyp at gmail.com>:

> Hi Gabe,
>
> You can have one dashboard plugin generate several pages.
>
> This is what the wsgi_dashboard is doing, and I would suggest to get
> inspiration from it:
> https://github.com/buildbot/buildbot/blob/master/www/wsgi_
> dashboards/src/module/dashboards.route.coffee#L4
>
> your config would look like:
>
> c['www'] = dict(port=8020,
>                 plugins=dict(waterfall_view={}, console_view={},
> grid_view={}, my_dashboard={projects: ['proj1', 'proj2', 'proj3', 'proj4']
> }))
>
>
> Regards,
>
> Le jeu. 26 oct. 2017 à 11:30, Gabriel Nagy <gabrielnagy at me.com> a écrit :
>
>> Hi guys,
>>
>> I've been developing my own web interface dashboard thingy based on
>> Pierre's tutorial here: https://medium.com/buildbot/
>> buildbot-ui-plugin-for-python-developer-ef9dcfdedac0
>>
>> My CI setup is as follows:
>> 4 projects with about 6-7 builders each, and 1 dashboard per project that
>> does mostly what Console View does, except it filters by the project
>> parameter of my user try jobs.
>>
>> The master setup is as follows:
>>
>> c['www'] = dict(port=8020,
>>                 plugins=dict(waterfall_view={}, console_view={},
>> grid_view={}, my_dashboard_1={}, my_dashboard_2={}, my_dashboard_3={},
>> my_dashboard_4={}))
>>
>> My question is how can I have only one plugin, and pass some parameters
>> to it so I can run something like this:
>>
>> c['www'] = dict(port=8020,
>>                 plugins=dict(waterfall_view={}, console_view={},
>> grid_view={}, my_dashboard={project: 'proj1'}, my_dashboard={project:
>> 'proj2'}, my_dashboard={project: 'proj3'}, my_dashboard={project: 'proj4'}))
>>
>> Is something like this even possible? I find it redundant to create 4
>> separate dashboard plugins where the only difference is one line in the
>> controller file. There isn't much documentation on this side, and I have to
>> admit I'm a bit of a newbie concerning web development.
>>
>> Thanks,
>> Gabe
>> _______________________________________________
>> users mailing list
>> users at buildbot.net
>> https://lists.buildbot.net/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20171027/5e6e1679/attachment.html>


More information about the users mailing list