~psivaa/uci-engine/rabbitmq-restish-with-proxy

« back to all changes in this revision

Viewing changes to webui/webui_ticket_detail.js

  • Committer: Chris Johnston
  • Author(s): Joe Talbott, Andy Doan
  • Date: 2014-01-28 17:11:31 UTC
  • mfrom: (126.2.11 webui)
  • Revision ID: chris_johnston-20140128171131-x019i5bbotz14x8w
[r=Andy Doan] Add webui app and charm.

To deploy:

    export JUJU_REPOSITORY=./charms
    juju-deployer -c juju-deployer/webui.yaml

Once deployed you'll need to restart apache to get mod_rewrite working.

    juju ssh wu-app/0 sudo service apache2 restart

The webui currently uses Chris' development Ticket System.  ticket_manager_url in juju-deployer/webui.yaml will need to be changed once the TS is in production.  from Joe Talbott

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
YUI().use('io', 'json-parse', 'querystring', 'node', 'webui', function(Y) {
 
2
 
 
3
  var query = window.location.search.split('?')[1];
 
4
 
 
5
  var ticket_id = null;
 
6
  if (query) {
 
7
    var ob = Y.QueryString.parse(query);
 
8
    var ticket_id = ob.ticket_id;
 
9
  }
 
10
 
 
11
  if (ticket_id) {
 
12
    var ticket = Y.webui.get_ticket(ticket_id, Y.one('#container'));
 
13
  }
 
14
 
 
15
  var refresh_rate = Y.one("#refresh_rate");
 
16
  refresh_timeout = null;
 
17
  refresh_rate.on('change', function(e) {
 
18
    var value = refresh_rate.get('value');
 
19
    if (refresh_timeout) {
 
20
      clearTimeout(refresh_timeout);
 
21
    }
 
22
    interval = parseInt(value) * 1000;
 
23
    Y.webui.update_tickets();
 
24
  });
 
25
 
 
26
});
 
27
 
 
28
/* Unit tests */
 
29
YUI().use('webui', function(Y) {
 
30
 
 
31
});