Changeset 43:af62c7b3e074

Show
Ignore:
Timestamp:
08/07/08 00:13:20 (4 months ago)
Author:
Jeffrey Gelens <jeffrey@…>
Branch:
default
Message:

Interface updates

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • static/js/monitor.actions.js

    r24 r43  
    6565 
    6666}); 
     67 
     68function check_monitors(server_id) { 
     69  var element = $('input.server'+server_id); 
     70  if (element.attr('checked') { 
     71    element.removeAttr('checked'); 
     72  } 
     73  else { 
     74    element.attr('checked', 'checked'); 
     75  } 
     76  return false; 
     77} 
  • templates/collector/server.html

    r42 r43  
    8181    {% if server %}<input type="hidden" name="server" value="{{ server.id }}" />{% endif %} 
    8282    <select name="action"> 
    83       <option disabled="disabled">---</option> 
     83      <option selected="selected" disabled="disabled">---</option> 
    8484      <option value="monitor">Enable Monitors</option> 
    8585      <option value="unmonitor">Disable Monitors</option> 
     
    9494    {% regroup monitors by server as server_list %} 
    9595    {% for monitor_list in server_list %} 
    96     {% if not server %} <h3>{{ monitor_list.grouper }}</h3> {% endif %} 
     96    {% if not server %} 
     97    <h3><a href="{{ monitor_list.grouper.get_absolute_url }}">{{ monitor_list.grouper }}</a> 
     98    </h3> 
     99    <p><a href="#" onclick="check_monitors({{ monitor_list.grouper.id }});">(un)check all</a></p> 
     100    {% endif %} 
    97101      {% for monitor in monitor_list.list %} 
    98102        {% ifchanged monitor.groupname %}<br />{% endifchanged %} 
    99103        <div class="{{ monitor|monitorstatus }}"> 
    100           <input type="checkbox" name="monitors" value="{{ monitor.id }}" /> 
     104          <input type="checkbox" class="server{{ monitor_list.grouper.id }}" name="monitors" value="{{ monitor.id }}" /> 
    101105          <a href="#" id="{{ monitor.id}}" class="monitor_link">{{ monitor.name }}</a> 
    102106        </div>