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

« back to all changes in this revision

Viewing changes to webui/webui_ticket_list.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('node', 'datatable-mutable', 'webui', function(Y) {
 
2
 
 
3
  Y.webui.make_main_table('#table');
 
4
 
 
5
  Y.delegate('click', function(e) {
 
6
    var target = e.currentTarget;
 
7
    var id = target.ancestor('tr').get('id');
 
8
    var ticket_id = this.getRecord(id).get('ticket_id');
 
9
    var url = "/ticket.html?ticket_id=" + ticket_id;
 
10
 
 
11
    location = url;
 
12
  }, '#table', 'td', Y.webui.main_table);
 
13
 
 
14
  Y.webui.get_tickets();
 
15
 
 
16
  var refresh_rate = Y.one("#refresh_rate");
 
17
  refresh_timeout = null;
 
18
  refresh_rate.on('change', function(e) {
 
19
    var value = refresh_rate.get('value');
 
20
    if (refresh_timeout) {
 
21
      clearTimeout(refresh_timeout);
 
22
    }
 
23
    interval = parseInt(value) * 1000;
 
24
    Y.webui.update_tickets();
 
25
  });
 
26
 
 
27
});
 
28
 
 
29
/* Unit tests */
 
30
YUI().use('webui', function(Y) {
 
31
 
 
32
});