[users at bb.net] template question

Greg MacDonald gmacdonald at trionworlds.com
Thu Jun 16 02:17:34 UTC 2016


Hi Everyone,

I'm having problems figuring out how to get a value into a jade template. I've extended the data and mq api's to include an enabled field on a scheduler so the user can toggle a scheduler on and off. This is working well, but I would like to have a warning appear if the user tries to start a build on a disabled scheduler. In forcedialog.tpl.jade I've tried to add an alert with ng-show = !sch.enabled, but no luck:

.modal-content
    .modal-header
        h4 {{sch.label}}
    .modal-body
        div.form-horizontal
            .alert.alert-danger(ng-show="error") {{error}}
            .alert.alert-danger(ng-show="!sch.enabled") SCHEDULER DISABLED
            forcefield(field="rootfield" ng-if="rootfield")
    .modal-footer
      button.btn.btn-default(ng-click="cancel()") Cancel
      button.btn.btn-primary(ng-click="ok()") Start Build

I was able to use my new enabled property in schedulers.tpl.jade, so I'm lost on what to do next. Any ideas?

-Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20160616/c4ef1d53/attachment.html>


More information about the users mailing list