First files to the project
This commit is contained in:
commit
cda8eb1232
26 changed files with 2657 additions and 0 deletions
42
templates/admin/add_server.phtml
Normal file
42
templates/admin/add_server.phtml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<%inherit file="dashboard.phtml"/>
|
||||
<%block name="content">
|
||||
<div id="principal_container">
|
||||
<p><a href="${url_for('.pastafari2_dashboard')}">Servers</a> >> ${lang('pastafari2', 'add_server', 'Add server')}</p>
|
||||
<h2>${lang('pastafari2', 'add_server', 'Add server')}</h2>
|
||||
<div class="form">
|
||||
<form method="post" name="add_server" id="add_server_form">
|
||||
<p>Please fill the form for add the new server to the system.</p>
|
||||
<p><label>${lang('pastafari2', 'server_host', 'Server host')}* <span class="pastafari2_error error" id="server_host_error"></span></label> <input type="text" name="server_host" value=""></p>
|
||||
<p><label>${lang('pastafari2', 'server_group', 'Server group')} <span class="pastafari2_error error" id="group_id_error"></span></label> ${group_form.form()|n}</p>
|
||||
<p><label>${lang('pastafari2', 'server_username', 'Server username')} <span class="pastafari2_error error" id="server_username_error"></span></label> <input type="text" name="server_username" value=""></p>
|
||||
<p><label>${lang('pastafari2', 'server_password', 'Server password.')} <span class="pastafari2_error error" id="server_password_error"></span></label> <input type="password" name="server_password" value=""></p>
|
||||
<p><label>${lang('pastafari2', 'repeat_server_password', 'Repeat server password')} <span class="pastafari2_error error" id="repeat_server_password_error"></span></label> <input type="password" name="repeat_server_password" value=""></p>
|
||||
<p><input type="submit" value="${lang('pastafari2', 'send', 'Send')}"/></p>
|
||||
</form>
|
||||
</div>
|
||||
<p><a href="${url_for('.pastafari2_dashboard')}">Servers</a> >> ${lang('pastafari2', 'add_server', 'Add server')}</p>
|
||||
<script type="text/javascript" src="${make_media_url('js/jsutils/posting2.js', 'monit')}"></script>
|
||||
<script>
|
||||
var options={url: "${url_for('.pastafari2_add_server_task')}", loading: '#layer_loading', success: function (data) {
|
||||
|
||||
task_id=data.task_id;
|
||||
|
||||
if(task_id>0) {
|
||||
|
||||
location.href="${url_for('.pastafari2_progress')}?task_id="+task_id;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}, error_data: function (data) {
|
||||
|
||||
console.log(JSON.stringify(data));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
jQuery('#add_server_form').sendPost(options);
|
||||
|
||||
</script>
|
||||
</div>
|
||||
</%block>
|
||||
Loading…
Add table
Add a link
Reference in a new issue