<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Pierre,</p>
    <p>Thanks for solution, it works. :) Should find it myself, it IS in
      docs. Now I know the purpose of that dictionaries  in www plugins
      config. :)<br>
    </p>
    <p>Aleksey<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 20.04.2017 14:40, Pierre Tardy
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAJ+soVeHKhj=ifE8O=LHHKqNozrMHDvuDAqTJRWkkirHLZdi2w@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Alexey,
        <div>Glad to see you are trying yourself at www plugin!</div>
        <div><br>
        </div>
        <div>www plugins are configured in c['www']</div>
        <div><br>
        </div>
        <div>when you say</div>
        <div>c['www'] = {</div>
        <div>[...]</div>
        <div>'plugins': {</div>
        <div>'myplugins': True</div>
        <div>}</div>
        <div>You can also say</div>
        <div>
          <div>c['www'] = {</div>
          <div>[...]</div>
          <div>'plugins': {</div>
          <div>'myplugin': {'config1: 'foo', 'config2': 'bar'}</div>
          <div>}</div>
        </div>
        <div>this dictionary will then be automatically passed via the
          'config' angularJS constant.</div>
        <div><br>
        </div>
        <div>buildbot_travis was using this feature in its first
          implementation (now it is using a custom REST api in order to
          implement authz)</div>
        <div><br>
        </div>
        <div>Pierre</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Thu, Apr 20, 2017 at 1:30 PM Alexey Demakov
          <<a moz-do-not-send="true" href="mailto:demakov@ispras.ru">demakov@ispras.ru</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000">
            <p>My www plugin requires some static info from
              configuration's global properties. I've read <a
                moz-do-not-send="true"
href="http://docs.buildbot.net/current/developer/config.html#configuration-in-angularjs"
                target="_blank">3.1.7. Configuration in AngularJS</a>
              but not found a solution. I found <tt>config</tt>
              constant but it contains not all properties.</p>
            <p>This constant is initialized in www/config.py:
              IndexResource.renderIndex() method. I added my property
              and successfully got it in AngularJS controller.</p>
            <p>Is it possible to expose global property to AngularJS
              code without modifying buildbot's code?</p>
            <p>Regards, Aleksey<br>
            </p>
          </div>
          _______________________________________________<br>
          users mailing list<br>
          <a moz-do-not-send="true" href="mailto:users@buildbot.net"
            target="_blank">users@buildbot.net</a><br>
          <a moz-do-not-send="true"
            href="https://lists.buildbot.net/mailman/listinfo/users"
            rel="noreferrer" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a></blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>