FIxes in nav urls
This commit is contained in:
parent
6dbf62477e
commit
aff9bad483
7 changed files with 17 additions and 17 deletions
|
|
@ -650,7 +650,7 @@ def edit_virtualhost(virtualhost_id):
|
||||||
virtual=VirtualHost(db)
|
virtual=VirtualHost(db)
|
||||||
|
|
||||||
#arr_vhost=virtual.select_a_row(virtualhost_id, [], True)
|
#arr_vhost=virtual.select_a_row(virtualhost_id, [], True)
|
||||||
with virtual.query('select virtualhost.*, webserver.id, serverdbtask.distro, serverdbtask.id from virtualhost, webserver, serverdbtask WHERE virtualhost.id=%s AND virtualhost.webserver_id=webserver.id AND webserver.server_id=serverdbtask.id', [virtualhost_id]) as cursor:
|
with virtual.query('select virtualhost.*, webserver.id, serverdbtask.distro, serverdbtask.id, serverdbtask.hostname from virtualhost, webserver, serverdbtask WHERE virtualhost.id=%s AND virtualhost.webserver_id=webserver.id AND webserver.server_id=serverdbtask.id', [virtualhost_id]) as cursor:
|
||||||
|
|
||||||
arr_vhost=cursor.fetchone()
|
arr_vhost=cursor.fetchone()
|
||||||
|
|
||||||
|
|
@ -748,7 +748,7 @@ def edit_virtualhost(virtualhost_id):
|
||||||
|
|
||||||
form=show_form(arr_vhost, arr_form, t, yes_error=True, pass_values=True, modelform_tpl='forms/modelform.phtml')
|
form=show_form(arr_vhost, arr_form, t, yes_error=True, pass_values=True, modelform_tpl='forms/modelform.phtml')
|
||||||
|
|
||||||
return t.load_template('edit_virtualhost.phtml', title=_('Edit Virtual Host'), path_module='admin_app.webservers', form=form, webserver_id=arr_vhost['webserver_id'], virtualhost_id=virtualhost_id)
|
return t.load_template('edit_virtualhost.phtml', title=_('Edit Virtual Host'), path_module='admin_app.webservers', form=form, webserver_id=arr_vhost['webserver_id'], hostname=arr_vhost['hostname'], virtualhost_id=virtualhost_id)
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,13 +58,13 @@ def webapps(virtualhost_id):
|
||||||
|
|
||||||
if arr_vhost:
|
if arr_vhost:
|
||||||
|
|
||||||
with db.query('select serverdbtask.id from serverdbtask, webserver WHERE webserver.id=%s AND serverdbtask.id=webserver.server_id', [arr_vhost['webserver_id']]) as cursor:
|
with db.query('select serverdbtask.id, serverdbtask.hostname from serverdbtask, webserver WHERE webserver.id=%s AND serverdbtask.id=webserver.server_id', [arr_vhost['webserver_id']]) as cursor:
|
||||||
|
|
||||||
arr_server=cursor.fetchone()
|
arr_server=cursor.fetchone()
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return t.load_template('webapps.phtml', title=_('Webapps'), path_module='admin_app.webservers', domain=arr_vhost['domain'], webserver_id=arr_vhost['webserver_id'], virtualhost_id=virtualhost_id, server_id=arr_server['id'])
|
return t.load_template('webapps.phtml', title=_('Webapps'), path_module='admin_app.webservers', domain=arr_vhost['domain'], webserver_id=arr_vhost['webserver_id'], virtualhost_id=virtualhost_id, server_id=arr_server['id'], hostname=arr_server['hostname'])
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
@ -130,10 +130,10 @@ def add_new_app(virtualhost_id):
|
||||||
if arr_vhost:
|
if arr_vhost:
|
||||||
|
|
||||||
#arr_server=serverdb.set_conditions('WHERE id=%s', [arr_vhost
|
#arr_server=serverdb.set_conditions('WHERE id=%s', [arr_vhost
|
||||||
with vhost.query('select serverdbtask.id as server_id, serverdbtask.ip, webserver.id from serverdbtask, webserver WHERE webserver.id=%s AND webserver.server_id=serverdbtask.id', [arr_vhost['webserver_id']]) as cursor:
|
with vhost.query('select serverdbtask.id as server_id, serverdbtask.ip, serverdbtask.hostname, webserver.id from serverdbtask, webserver WHERE webserver.id=%s AND webserver.server_id=serverdbtask.id', [arr_vhost['webserver_id']]) as cursor:
|
||||||
arr_server=cursor.fetchone()
|
arr_server=cursor.fetchone()
|
||||||
|
|
||||||
return t.load_template('add_webapp.phtml', title=_('Add webapp'), path_module='admin_app.webservers', domain=arr_vhost['domain'], webserver_id=arr_vhost['webserver_id'], virtualhost_id=virtualhost_id, scripts_lists=scripts_lists, server_id=arr_server['server_id'])
|
return t.load_template('add_webapp.phtml', title=_('Add webapp'), path_module='admin_app.webservers', domain=arr_vhost['domain'], webserver_id=arr_vhost['webserver_id'], virtualhost_id=virtualhost_id, scripts_lists=scripts_lists, server_id=arr_server['server_id'], hostname=arr_server['hostname'])
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class WebAppTask(Task):
|
||||||
|
|
||||||
webserver_id=0
|
webserver_id=0
|
||||||
|
|
||||||
with self.connection.query('select webserver_id from virtualhost WHERE id=%s', [self.data['virtualhost_id']]) as cursor:
|
with self.connection.query('select virtualhost.webserver_id, webserver.id, serverdbtask.hostname from virtualhost, webserver, serverdbtask WHERE virtualhost.id=%s AND virtualhost.webserver_id=webserver.id AND webserver.server_id=serverdbtask.id', [self.data['virtualhost_id']]) as cursor:
|
||||||
|
|
||||||
arr_vhost=cursor.fetchone()
|
arr_vhost=cursor.fetchone()
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ class WebAppTask(Task):
|
||||||
|
|
||||||
#<p><a href="/webservers/servers/">Webservers list</a> >> <a href="/webservers/virtualhost/40">Websites</a> >> <a href="/webapps/77">Webapps</a> >> <a href="/add_new_app/77">Add webapp</a></p>
|
#<p><a href="/webservers/servers/">Webservers list</a> >> <a href="/webservers/virtualhost/40">Websites</a> >> <a href="/webapps/77">Webapps</a> >> <a href="/add_new_app/77">Add webapp</a></p>
|
||||||
|
|
||||||
self.links='<p><a href="{}">{}</a> >> <a href="{}">{}</a> >> <a href="{}">{}</a> >> <a href="{}">{}</a></p>'.format(make_url('webservers/servers'), I18n.lang('webservers', 'webservers_list', 'Webservers list'), make_url('webservers/virtualhost/'+str(webserver_id)), I18n.lang('webservers', 'websites', 'Websites'), make_url('webapps/'+str(self.data['virtualhost_id'])), I18n.lang('webservers', 'webapps', 'Webapps'), make_url('add_new_app/'+str(self.data['virtualhost_id'])), I18n.lang('webservers', 'add_webapp', 'Add webapp'))
|
self.links='<p><a href="{}">{}</a> >> <a href="{}">{}</a> >> <a href="{}">{}</a> >> <a href="{}">{}</a></p>'.format(make_url('webservers/servers'), I18n.lang('webservers', 'webservers_list', 'Webservers list'), make_url('webservers/virtualhost/'+str(webserver_id)), I18n.lang('webservers', 'websites', 'Websites')+' - '+arr_vhost['hostname'], make_url('webapps/'+str(self.data['virtualhost_id'])), I18n.lang('webservers', 'webapps', 'Webapps'), make_url('add_new_app/'+str(self.data['virtualhost_id'])), I18n.lang('webservers', 'add_webapp', 'Add webapp'))
|
||||||
|
|
||||||
self.delete_task=False
|
self.delete_task=False
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ ids=json.dumps([server_id])
|
||||||
|
|
||||||
%>
|
%>
|
||||||
<h3>${domain}</h3>
|
<h3>${domain}</h3>
|
||||||
<p><a href="${url_for('admin_app.webservers')}">${lang('webservers', 'webservers_list', 'Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${lang('webservers', 'websites', 'Websites')}</a> >> <a href="${url_for('admin_app.webapps', virtualhost_id=virtualhost_id)}">${lang('webservers', 'webapps', 'Webapps')}</a> >> ${lang('webservers', 'add_webapp', 'Add webapp')}</p>
|
<p><a href="${url_for('admin_app.webservers')}">${lang('webservers', 'webservers_list', 'Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${_('Websites')} - ${hostname}</a> >> <a href="${url_for('admin_app.webapps', virtualhost_id=virtualhost_id)}">${_('Webapps')}</a> >> ${_('Add webapp')}</p>
|
||||||
<form method="post" name="add_app" id="add_app" action="${url_for('.pastafari2_make_task', virtualhost_id=virtualhost_id)}">
|
<form method="post" name="add_app" id="add_app" action="${url_for('.pastafari2_make_task', virtualhost_id=virtualhost_id)}">
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<p><label for="select_app">${lang('webservers', 'choose_app', 'Choose app')}</label>
|
<p><label for="select_app">${_('Choose app')}</label>
|
||||||
<select name="task" id="task">
|
<select name="task" id="task">
|
||||||
% for k,v in scripts_lists.items():
|
% for k,v in scripts_lists.items():
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@ ids=json.dumps([server_id])
|
||||||
</div>
|
</div>
|
||||||
<p><input type="submit" value="${lang('webservers', 'add_website', 'Add website')}" />
|
<p><input type="submit" value="${lang('webservers', 'add_website', 'Add website')}" />
|
||||||
</form>
|
</form>
|
||||||
<p><a href="${url_for('admin_app.webservers')}">${lang('webservers', 'webservers_list', 'Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${lang('webservers', 'websites', 'Websites')}</a> >> <a href="${url_for('admin_app.webapps', virtualhost_id=virtualhost_id)}">${lang('webservers', 'webapps', 'Webapps')}</a> >> ${lang('webservers', 'add_webapp', 'Add webapp')}</p>
|
<p><a href="${url_for('admin_app.webservers')}">${lang('webservers', 'webservers_list', 'Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${_('Websites')} - ${hostname}</a> >> <a href="${url_for('admin_app.webapps', virtualhost_id=virtualhost_id)}">${_('Webapps')}</a> >> ${_('Add webapp')}</p>
|
||||||
</%block>
|
</%block>
|
||||||
<%block name="jscript_block">
|
<%block name="jscript_block">
|
||||||
<script language="Javascript" src="${make_media_url('js/jsutils/posting2.js', 'pastafari2')}"></script>
|
<script language="Javascript" src="${make_media_url('js/jsutils/posting2.js', 'pastafari2')}"></script>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<%block name="extra_css">
|
<%block name="extra_css">
|
||||||
</%block>
|
</%block>
|
||||||
<%block name="content">
|
<%block name="content">
|
||||||
<p><a href="${url_for('admin_app.webservers')}">${lang('webservers', 'webservers_list', 'Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${lang('webservers', 'websites', 'Websites')}</a> >> ${lang('webservers', 'edit_website', 'Edit website')}</p>
|
<p><a href="${url_for('admin_app.webservers')}">${_('Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${_('Websites')} - ${hostname}</a> >> ${_('Edit website')}</p>
|
||||||
<form method="post" name="edit_virtualhost" id="edit_virtualhost">
|
<form method="post" name="edit_virtualhost" id="edit_virtualhost">
|
||||||
${form|n}
|
${form|n}
|
||||||
<!--<div id="ssl_files" style="display:none;">
|
<!--<div id="ssl_files" style="display:none;">
|
||||||
|
|
@ -11,7 +11,7 @@ ${form|n}
|
||||||
</div>-->
|
</div>-->
|
||||||
<p><input type="submit" value="${lang('webservers', 'save_website', 'Save website')}" />
|
<p><input type="submit" value="${lang('webservers', 'save_website', 'Save website')}" />
|
||||||
</form>
|
</form>
|
||||||
<p><a href="${url_for('admin_app.webservers')}">${lang('webservers', 'webservers_list', 'Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${lang('webservers', 'websites', 'Websites')}</a> >> ${lang('webservers', 'edit_website', 'Edit website')}</p>
|
<p><a href="${url_for('admin_app.webservers')}">${_('Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${_('Websites')} - ${hostname}</a> >> ${_( 'Edit website')}</p>
|
||||||
</%block>
|
</%block>
|
||||||
<%block name="jscript_block">
|
<%block name="jscript_block">
|
||||||
<script language="Javascript" src="${make_media_url('js/jsutils/posting2.js', 'pastafari2')}"></script>
|
<script language="Javascript" src="${make_media_url('js/jsutils/posting2.js', 'pastafari2')}"></script>
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,11 @@
|
||||||
% endfor
|
% endfor
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p><a href="${url_for('admin_app.webservers')}">${_('Webservers list')}</a> >> ${hostname} >> ${_('Websites')}</p>
|
<p><a href="${url_for('admin_app.webservers')}">${_('Webservers list')}</a> >> ${_('Websites')}</p>
|
||||||
<p><a href="${url_for('admin_app.add_virtualhost', webserver_id=webserver_id)}">${_('Add new website')}</a><!-- - <a href="${url_for('admin_app.users_list')}">${lang('webservers', 'webserver_users', 'Webserver users')}</a>--></p>
|
<p><a href="${url_for('admin_app.add_virtualhost', webserver_id=webserver_id)}">${_('Add new website')}</a><!-- - <a href="${url_for('admin_app.users_list')}">${lang('webservers', 'webserver_users', 'Webserver users')}</a>--></p>
|
||||||
<div id="table_servers">
|
<div id="table_servers">
|
||||||
</div>
|
</div>
|
||||||
<p><a href="${url_for('admin_app.webservers')}">${_('Webservers list')}</a> >> ${hostname} >> ${_('Websites')}</p>
|
<p><a href="${url_for('admin_app.webservers')}">${_('Webservers list')}</a> >> ${_('Websites')}</p>
|
||||||
<div id="popup_change" style="display:none;">
|
<div id="popup_change" style="display:none;">
|
||||||
<div class="title title_popup" style="">
|
<div class="title title_popup" style="">
|
||||||
${lang('webservers', 'change_user_ssh_key', 'Change user ssh key for access')} <a href="#" class="close_icon close_popup"><i class="fa fa-window-close" aria-hidden="true"></i></a>
|
${lang('webservers', 'change_user_ssh_key', 'Change user ssh key for access')} <a href="#" class="close_icon close_popup"><i class="fa fa-window-close" aria-hidden="true"></i></a>
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,10 @@ ids=json.dumps([server_id])
|
||||||
%>
|
%>
|
||||||
<h3>${domain}</h3>
|
<h3>${domain}</h3>
|
||||||
<p><a href="${url_for('admin_app.add_new_app', virtualhost_id=virtualhost_id)}">${lang('webservers', 'add_new_app', 'Add new app')}</a></p>
|
<p><a href="${url_for('admin_app.add_new_app', virtualhost_id=virtualhost_id)}">${lang('webservers', 'add_new_app', 'Add new app')}</a></p>
|
||||||
<p><a href="${url_for('admin_app.webservers')}">${lang('webservers', 'webservers_list', 'Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${lang('webservers', 'websites', 'Websites')}</a> >> ${lang('webservers', 'webapps', 'Webapps')}</p>
|
<p><a href="${url_for('admin_app.webservers')}">${lang('webservers', 'webservers_list', 'Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${_('Websites')} - ${hostname}</a> >> ${_('Webapps')}</p>
|
||||||
<div id="table_webapps">
|
<div id="table_webapps">
|
||||||
</div>
|
</div>
|
||||||
<p><a href="${url_for('admin_app.webservers')}">${lang('webservers', 'webservers_list', 'Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${lang('webservers', 'websites', 'Websites')}</a> >> ${lang('webservers', 'webapps', 'Webapps')}</p>
|
<p><a href="${url_for('admin_app.webservers')}">${lang('webservers', 'webservers_list', 'Webservers list')}</a> >> <a href="${url_for('admin_app.virtualhost', webserver_id=webserver_id)}">${_('Websites')} - ${hostname}</a> >> ${_('Webapps')}</p>
|
||||||
<div id="popup_delete" style="display:none;">
|
<div id="popup_delete" style="display:none;">
|
||||||
<div class="title title_popup" style="">
|
<div class="title title_popup" style="">
|
||||||
${lang('webservers', 'delete_webapp', 'Delete webapp')} <a href="#" class="close_icon close_popup"><i class="fa fa-window-close" aria-hidden="true"></i></a>
|
${lang('webservers', 'delete_webapp', 'Delete webapp')} <a href="#" class="close_icon close_popup"><i class="fa fa-window-close" aria-hidden="true"></i></a>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue