Changeset 6cac7d2


Ignore:
Timestamp:
05/27/11 17:04:51 (2 years ago)
Author:
Tomas Edwardsson <tommi@…>
Branches:
master
Children:
349a990
Parents:
d92ba08 (diff), 58641b0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Tomas Edwardsson <tommi@…> (05/27/11 17:04:51)
git-committer:
Tomas Edwardsson <tommi@…> (05/27/11 17:04:51)
Message:

Merge branch 'master' of ssh://opensource.is/var/www/git/okconfig

Location:
adagios
Files:
7 added
6 edited

Legend:

Unmodified
Added
Removed
  • adagios/configurator/okconfig/__init__.py

    r66fc4db r6cac7d2  
    164164        pass 
    165165 
     166def check_agent(host_name): 
     167        """ Checks a remote host if it has a valid okconfig client configuration 
     168         
     169        Args: 
     170                host_name -- hostname (or ip address of remote host) 
     171        Returns: 
     172                True/False, [ "List","of","messages" ] 
     173        """ 
     174        pass 
     175 
    166176def install_nrpe(remote_host, username, password=None): 
    167177        """ Logs into remote (unix) host and install nrpe-client. 
  • adagios/configurator/views.py

    rcaac8dd r6cac7d2  
    3535        c['contacts'] = get_contacts() 
    3636        return render_to_response('configurator/list_contacts.html', c) 
    37  
    3837 
    3938def host(request, host_name=None): 
  • adagios/templates/configurator/contact.html

    rfa5f57a rc0847d6  
    55{% block content %} 
    66 
     7 
     8{% if messages %} 
     9        <h1> Messages from the developers </h1> 
     10        <ul> 
     11        {% for message in messages %} 
     12                <li>{{ message }}</li> 
     13        {% endfor %} 
     14        </ul> 
     15{% endif %} 
    716 
    817{% if contact %} 
  • adagios/templates/configurator/index.html

    rfa5f57a rc0847d6  
    99        <ul> 
    1010        {% for host in hosts %} 
    11                 <li><a href="/adagios/configurator/host/{{ host.host_name }}">{{ host.host_name }} </a></li> 
     11                <li><a href="host/{{ host.host_name }}">{{ host.host_name }} </a></li> 
    1212        {% endfor %} 
    1313        </ul> 
  • adagios/media/css/style.css

    r63cbec6 rd92ba08  
    119119        display: none; 
    120120} 
     121 
     122 
     123 
     124fieldset .subtemplate { 
     125        display: none; 
     126} 
  • adagios/templates/configurator/addhost.html

    r63cbec6 rd92ba08  
    22{% extends "configurator/base.html" %} 
    33 
    4 {% block title %}Characters{% endblock %} 
     4{% block title %}Adagios - Add Host{% endblock %} 
    55 
    66{% block sidebar %}arg {% endblock %} 
     
    99                $(document).ready(function() { 
    1010                        $('#hostname').focus(); 
     11                        $.getJSON("/adagios/api/get_templates.json", function(json) { 
     12                                deferred = []; 
     13                                $.each(json.templates, function(key, object) { 
     14                                        if (object.parents.length == 0) { 
     15                                                 
     16                                                $('#os').append($('<option></option>').val(key).text(object.name)); 
     17                                                $('#subtemplates').append("<fieldset class='subtemplate' id='subtemplate_" + key + "'><legend>Templates</legend></fieldset>"); 
     18                                        } else { 
     19                                                deferred.push(key); 
     20                                        } 
     21                                                        /* <p><input type="checkbox" class="left" /> <label>Microsoft Exchange</p> 
     22                                                        <p style="clear: both"><input type="checkbox" class="left" /> <label>Microsoft SQL Server</p> 
     23                                        <fieldset class="subtemplates" id="subtemplates"> 
     24                                                    <legend>Templates</legend> 
     25                                                  </fieldset> */ 
     26                                }); 
     27                                $.each(deferred, function(key, template) { 
     28                                        $.each(json.templates[template].parents, function(i, parent) { 
     29                                                $('#subtemplate_' + parent).append('<p style="clear: both"><input type="checkbox" name="' + template + ' class="left" /> <label>' + json.templates[template].name + '</p>'); 
     30                                        }); 
     31                                }); 
     32                        }); 
    1133                }); 
    1234 
     
    108130                                                    <select id="os"> 
    109131                                                      <option value="none">-- select --</option> 
    110                                                       <option value="windows">Microsoft Windows</option> 
    111                                                       <option value="linux">Linux</option> 
    112                                                       <option value="switch">Switch</option> 
    113132                                                    </select> 
    114133                                                </p> 
    115                                                 <p> 
    116                                                   <fieldset id="subtemplates"> 
    117                                                     <legend>Templates</legend> 
    118                                                         <p><input type="checkbox" class="left" /> <label>Microsoft Exchange</p> 
    119                                                         <p style="clear: both"><input type="checkbox" class="left" /> <label>Microsoft SQL Server</p> 
    120                                                   </fieldset> 
     134                                                <p id="subtemplates"> 
     135                                                   
    121136                                                </p> 
    122137                        </fieldset> 
     
    137152        <button class="custom prev">&laquo; Previous</button> 
    138153        <button class="custom next">Next &raquo;</button> 
    139  
    140154</p> 
    141155 
     
    174188                                 
    175189                                $('#os').change(function() { 
    176                                         $('#subtemplates').show(); 
     190                                        $('.subtemplate').hide();                                        
     191                                        $('#subtemplate_' + $('#os').val()).show(); 
    177192                                }); 
    178193                                 
Note: See TracChangeset for help on using the changeset viewer.