"""@package src.wi.urls.user.key @author Piotr Wójcik @date 19.11.2010 """ from django.conf.urls import patterns, url, include from django.utils.translation import ugettext_lazy as _ from wi.forms.key import AddKeyForm from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, get_list_generic, \ simple_generic_id, form_generic resources_patterns = patterns( 'wi.views.user.key', url(r'^keys/$', user_permission(direct_to_template), {'template_name': 'resources/keys.html'}, name='res_keys'), url(r'^key_file/$', 'res_key_file', name='res_key_file'), url(r'^ajax/get_table_keys/$', user_permission(get_list_generic), { 'request_url': 'user/key/get_list/', }, name='res_ajax_get_table_keys'), url(r'^ajax/generate_key/$', 'res_ajax_generate_key', name='res_ajax_generate_key'), url(r'^ajax/add_key/$', user_permission(form_generic), { 'template_name': 'generic/form.html',
"""@package src.wi.urls.user.key @author Piotr Wójcik @date 19.11.2010 """ from django.conf.urls import patterns, url, include from django.utils.translation import ugettext_lazy as _ from wi.forms.key import AddKeyForm from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, get_list_generic, \ simple_generic_id, form_generic resources_patterns = patterns('wi.views.user.key', url(r'^keys/$', user_permission(direct_to_template), {'template_name': 'resources/keys.html'}, name='res_keys'), url(r'^key_file/$', 'res_key_file', name='res_key_file'), url(r'^ajax/get_table_keys/$', user_permission(get_list_generic), {'request_url': 'user/key/get_list/', }, name='res_ajax_get_table_keys'), url(r'^ajax/generate_key/$', 'res_ajax_generate_key', name='res_ajax_generate_key'), url(r'^ajax/add_key/$', user_permission(form_generic), {'template_name': 'generic/form.html', 'success_msg': (lambda desc, data: _('You have successfully added a key') % {'desc': desc}), 'confirmation': _('Add'), 'request_url_post': 'user/key/add/', 'form_class': AddKeyForm}, name='res_ajax_add_key'), url(r'^ajax/delete_key/(?P<id1>\d+)/$', user_permission(simple_generic_id), {'template_name': 'generic/simple.html', 'success_msg': (lambda desc: _('You have successfully deleted key <b>%(desc)s</b>.') % {'desc': desc}),
"""@package src.wi.urls.user.public_ip @author Piotr Wójcik @date 19.11.2010 """ from django.conf.urls import patterns, url, include from django.utils.translation import ugettext_lazy as _ from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, get_list_generic, simple_generic, simple_generic_id resources_patterns = patterns('wi.views.user.public_ip', url(r'^$', user_permission(direct_to_template), {'template_name': 'resources/base.html'}, name='res_resources'), url(r'^elastic_ip/$', user_permission(direct_to_template), {'template_name': 'resources/elastic_ip.html'}, name='res_elastic_ip'), url(r'^ajax/ips_table/$', user_permission(get_list_generic), {'request_url': 'user/public_ip/get_list/'}, name='res_ajax_get_ips_table'), url(r'^ajax/add_ip/$', user_permission(simple_generic), {'template_name': 'generic/simple.html', 'success_msg': (lambda desc: _('New IP address has been added.') % {'desc': desc}), 'ask_msg': (lambda desc: _('Do you want to add an IP address?') % {'desc': desc}), 'request_url': 'user/public_ip/request/', }, name='res_ajax_request_ip'), url(r'^ajax/release_ip/(?P<id1>\d+)/$', user_permission(simple_generic_id), {'template_name': 'generic/simple.html', 'success_msg': (lambda desc: _('IP address <b>%(desc)s</b> has been released.') % {'desc': desc}), 'ask_msg': (lambda desc: _('Do you want to release IP address <b>%(desc)s</b>?') % {'desc': desc}), 'request_url': 'user/public_ip/release/',
from django.conf.urls import patterns, url, include from django.utils.translation import ungettext, ugettext_lazy as _ from wi.forms.vm import ChangeVMPasswordForm, EditVMForm, SetSshKeyForm, \ AssignChosenIPForm, CreateVMForm1, CreateVMForm2, CreateVMForm3, CreateVMForm4, \ MonitoringVMForm from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, simple_generic_id, \ form_generic_id, generic_multiple_id, generic_multiple_id_form from wi.views.user.vm import CreateVMWizard vm_patterns = patterns( 'wi.views.user.vm', url(r'^$', user_permission(direct_to_template), {'template_name': 'vms/base.html'}, name='vms_vms'), url(r'^create_vm/$', CreateVMWizard.as_view( [CreateVMForm1, CreateVMForm2, CreateVMForm3, CreateVMForm4]), name='vms_create_vm'), url(r'^show_vm/$', user_permission(direct_to_template), {'template_name': 'vms/show_vm.html'}, name='vms_show_vm'), url(r'^vnc/(?P<vm_id>\d+)/$', 'vms_vnc', name='vms_vnc'), url(r'^ajax/vm_details/(?P<vm_id>\d+)/$', 'vms_ajax_vm_details', name='vms_ajax_vm_details'), url(r'^ajax/get_table/$', 'vms_ajax_get_table', name='vms_ajax_get_table'),
"""@package src.wi.urls.user.group @author Piotr Wójcik """ from django.conf.urls import patterns, url, include from django.utils.translation import ugettext_lazy as _ from wi.forms.group import GroupForm from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, simple_generic_twoid, \ simple_generic_id, form_generic, form_generic_id group_patterns = patterns('wi.views.user.group', url(r'^$', user_permission(direct_to_template), {'template_name': 'groups/base.html'}, name='grp_groups'), url(r'^list_groups/$', user_permission(direct_to_template), {'template_name': 'groups/show_groups.html'}, name='grp_list'), url(r'^my_groups/$', user_permission(direct_to_template), {'template_name': 'groups/my_groups.html'}, name='grp_my_groups'), url(r'^details/(?P<group_id>\d+)/$', 'grp_details', name='grp_details'), url(r'^ajax/get_table_my/$', 'grp_ajax_get_table_my', name='grp_ajax_get_table_my'), url(r'^ajax/grp_details_table/(?P<group_id>\d+)/$', 'grp_ajax_grp_details_table', name='grp_ajax_grp_details_table'), url(r'^ajax/grp_delete_user_my/(?P<id1>\d+)/(?P<id2>\d+)/$', user_permission(simple_generic_twoid), {'template_name': 'generic/simple.html', 'success_msg': (lambda desc: _('You have successfully removed user <b>%(desc)s</b> from this group.') % {'desc': desc}), 'ask_msg': (lambda desc: _('Do you want to remove user <b>%(desc)s</b> from this group?') % {'desc': desc}), 'confirmation': _('Remove'), 'request_url': 'user/group/delete_user/', 'id_key2': 'user_id', 'id_key': 'group_id', },
# limitations under the License. # # @COPYRIGHT_end """@package src.wi.urls.user.user @author Piotr Wójcik @date 1.10.2010 """ from django.conf.urls import patterns, url, include from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, simple_generic, get_list_generic, simple_generic_id account_patterns = patterns('wi.views.user.user', url(r'^$', user_permission(direct_to_template), {'template_name': 'account/base.html'}, name='acc_account'), url(r'^account_data/$', user_permission(direct_to_template), {'template_name': 'account/account_data.html'}, name='acc_account_data'), url(r'^account_data/ajax/get_user_data/$', 'acc_ajax_get_user_data', name='acc_ajax_get_user_data'), url(r'^account_data/ajax/edit/$', 'acc_ajax_account_data_edit', name='acc_ajax_account_data_edit'), url(r'^account_quotas/$', user_permission(direct_to_template), {'template_name': 'account/account_quotas.html'}, name='acc_account_quotas'), url(r'^account_data/ajax/get_user_quotas/$', 'acc_ajax_get_user_quotas', name='acc_ajax_get_user_quotas'), url(r'^password_change/$', 'acc_password_change', name='acc_password_change'), url(r'^ajax/charts/$', user_permission(simple_generic), {'template_name': 'account/ajax/charts.html'}, name='acc_ajax_account_charts'),
"""@package src.wi.urls.user.network @author Piotr Wójcik @date 19.11.2010 """ from django.conf.urls import patterns, url, include from django.utils.translation import ugettext_lazy as _ from wi.forms.network import CreateNetworkForm from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, get_list_generic, simple_generic_id, form_generic resources_patterns = patterns('wi.views.user.network', url(r'^networks/$', user_permission(direct_to_template), {'template_name': 'resources/networks.html'}, name='res_networks'), url(r'^ajax/network_table/$', user_permission(get_list_generic), {'request_url': 'user/network/list_user_networks/'}, name='res_ajax_get_network_table'), url(r'^ajax/add_network/$', user_permission(form_generic), {'template_name': 'generic/form.html', 'success_msg': (lambda desc, data: _('You have successfully added a network') % {'desc': desc}), 'confirmation': _('Create'), 'form_class': CreateNetworkForm, 'request_url_post': 'user/network/request/', }, name='res_ajax_add_network'), url(r'^ajax/release_network/(?P<id1>\d+)/$', user_permission(simple_generic_id), {'template_name': 'generic/simple.html', 'success_msg': (lambda desc: _('You have successfully released network <b>%(desc)s</b>.') % {'desc': desc}), 'ask_msg': (lambda desc: _('Do you want to release network <b>%(desc)s</b>?') % {'desc': desc}), 'request_url': 'user/network/release/', 'id_key': 'network_id', },
"""@package src.wi.urls.user.iso_image @author Piotr Wójcik @date 19.11.2010 """ from django.conf.urls import patterns, url, include from django.utils.translation import ugettext_lazy as _ from wi.forms.iso_image import EditISOForm from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, simple_generic_id, \ form_generic_id resources_patterns = patterns('wi.views.user.iso_image', url(r'^iso/$', user_permission(direct_to_template), {'template_name': 'resources/iso.html'}, name='res_iso'), url(r'^ajax/iso_table/$', 'res_ajax_get_iso_table', name='res_ajax_get_iso_table'), url(r'^ajax/upload_iso_http/$', 'res_ajax_upload_iso_http', name='res_ajax_upload_iso_http'), url(r'^ajax/edit_iso/(?P<id1>\d+)/$', user_permission(form_generic_id), {'template_name': 'generic/form.html', 'success_msg': (lambda desc, data: _('ISO image data edited.') % {'desc': desc}), 'ask_msg': (lambda desc: _('Edit ISO image data:') % {'desc': desc}), 'confirmation': _('Save'), 'request_url_post': 'user/iso_image/edit/', 'request_url_get': 'user/iso_image/get_by_id/', 'request_url_both': {'disk_controllers': 'user/iso_image/get_disk_controllers/'}, 'id_key': 'iso_image_id', 'form_class': EditISOForm}, name='res_ajax_edit_iso'), url(r'^ajax/delete_iso/(?P<id1>\d+)/$', user_permission(simple_generic_id), {'template_name': 'generic/simple.html',
# @COPYRIGHT_end """@package src.wi.urls.user.system_image @author Piotr Wójcik @date 19.11.2010 """ from django.conf.urls import patterns, url, include from django.utils.translation import ugettext_lazy as _ from wi.forms.system_image import EditImageForm, AssignGroupForm from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, simple_generic_id, \ form_generic_id images_patterns = patterns('wi.views.user.system_image', url(r'^$', user_permission(direct_to_template), {'template_name': 'images/base.html'}, name='img_images'), url(r'^images_private/$', user_permission(direct_to_template), {'template_name': 'images/images_private.html'}, name='img_images_private'), url(r'^images_group/$', user_permission(direct_to_template), {'template_name': 'images/images_group.html'}, name='img_images_group'), url(r'^images_public/$', user_permission(direct_to_template), {'template_name': 'images/images_public.html'}, name='img_images_public'), url(r'^ajax/delete/(?P<id1>\d+)/$', user_permission(simple_generic_id), {'template_name': 'generic/simple.html', 'success_msg': (lambda desc: _('You have successfully removed image <b>%(desc)s</b>.') % {'desc': desc}), 'ask_msg': (lambda desc: _('Do you really want to delete image <b>%(desc)s</b>?') % {'desc': desc}), 'request_url': 'user/system_image/delete/', 'id_key': 'system_image_id', }, name='img_ajax_delete'),
""" from django.conf.urls import patterns, url, include from django.utils.translation import ungettext, ugettext_lazy as _ from wi.forms.vm import ChangeVMPasswordForm, EditVMForm, SetSshKeyForm, \ AssignChosenIPForm, CreateVMForm1, CreateVMForm2, CreateVMForm3, CreateVMForm4, \ MonitoringVMForm from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, simple_generic_id, \ form_generic_id, generic_multiple_id, generic_multiple_id_form from wi.views.user.vm import CreateVMWizard vm_patterns = patterns('wi.views.user.vm', url(r'^$', user_permission(direct_to_template), {'template_name': 'vms/base.html'}, name='vms_vms'), url(r'^create_vm/$', CreateVMWizard.as_view([CreateVMForm1, CreateVMForm2, CreateVMForm3, CreateVMForm4]), name='vms_create_vm'), url(r'^show_vm/$', user_permission(direct_to_template), {'template_name': 'vms/show_vm.html'}, name='vms_show_vm'), url(r'^vnc/(?P<vm_id>\d+)/$', 'vms_vnc', name='vms_vnc'), url(r'^ajax/vm_details/(?P<vm_id>\d+)/$', 'vms_ajax_vm_details', name='vms_ajax_vm_details'), url(r'^ajax/get_table/$', 'vms_ajax_get_table', name='vms_ajax_get_table'), url(r'^ajax/ssh_key/$', user_permission(generic_multiple_id_form), {'template_name': 'generic/form.html', 'success_msg': (lambda desc, count: ungettext('SSH key has been copied successfully to <b>%(desc)s</b>.', 'SSH key has been copied successfully to %(count)d virtual machines (<b>%(desc)s</b>).', count) % {'desc': desc, 'count': count}), 'ask_msg': (lambda desc, count: ungettext('Enter a public key to set for machine <b>%(desc)s</b>.', 'Enter a public key to set for %(count)d machines <b>%(desc)s</b>.', count) % {'desc': desc, 'count': count}), 'confirmation': _('Set key'), 'request_url': 'user/ctx/add_ssh_key/',
from django.conf.urls import url, patterns, include from django.utils.translation import ugettext_lazy as _ from wi.utils.decorators import user_permission, admin_clm_permission from wi.forms.news import NewsForm from wi.utils.views import form_generic, simple_generic_id news_patterns = patterns('wi.views.admin_clm.news', url(r'^ajax/add_news/$', admin_clm_permission(form_generic), {'template_name': 'generic/form.html', 'success_msg': (lambda desc, data: _('News entry added.') % {'desc': desc}), 'confirmation': _('Create'), 'request_url_post': 'admin_clm/news/add/', 'form_class': NewsForm}, name='mai_ajax_add_news'), url(r'^ajax/delete_news/(?P<id1>\d+)/$', user_permission(simple_generic_id), {'template_name': 'generic/simple.html', 'success_msg': (lambda desc: _('You have successfully removed news entry <b>%(desc)s</b>.') % {'desc': desc}), 'ask_msg': (lambda desc: _('Do you want to delete news entry <b>%(desc)s</b>?') % {'desc': desc}), 'request_url': 'admin_clm/news/delete/', 'id_key': 'news_id'}, name='mai_ajax_delete_news'), url(r'^ajax/edit_news/(?P<id1>\d+)/$', 'mai_ajax_edit_news', name='mai_ajax_edit_news'), ) urlpatterns = patterns('', url(r'^news/', include(news_patterns)), )
"""@package src.wi.urls.user.storage_image @author Piotr Wójcik @date 19.11.2010 """ from django.conf.urls import patterns, url, include from django.utils.translation import ugettext_lazy as _ from wi.forms.storage_image import ConvertImageForm, EditDiskForm from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, simple_generic_id, \ form_generic_id resources_patterns = patterns('wi.views.user.storage_image', url(r'^disks/$', user_permission(direct_to_template), {'template_name': 'resources/disks.html'}, name='res_disks'), url(r'^ajax/disk_table/$', 'res_ajax_get_disk_table', name='res_ajax_get_disk_table'), url(r'^ajax/upload_disk_http/$', 'res_ajax_upload_disk_http', name='res_ajax_upload_disk_http'), url(r'^ajax/add_disk/$', 'res_ajax_add_disk', name='res_ajax_add_disk'), url(r'^ajax/edit_disk/(?P<id1>\d+)/$', user_permission(form_generic_id), {'template_name': 'generic/form.html', 'success_msg': (lambda desc, data: _('You have successfully edited selected disk.') % {'desc': desc}), 'ask_msg': (lambda desc: _('Edit disk data:') % {'desc': desc}), 'confirmation': _('Save'), 'request_url_post': 'user/storage_image/edit/', 'request_url_get': 'user/storage_image/get_by_id/', 'request_url_both': {'disk_controllers': 'user/storage_image/get_disk_controllers/'}, 'id_key': 'storage_image_id', 'form_class': EditDiskForm}, name='res_ajax_edit_disk'), url(r'^ajax/delete_disk/(?P<id1>\d+)/$', user_permission(simple_generic_id),
@author Piotr Wójcik @date 14.11.2011 """ from django.conf.urls import patterns, url, include from django.utils.translation import ugettext_lazy as _ from wi.forms.farm import CreateFarmForm1, CreateFarmForm2, CreateFarmForm3, CreateFarmForm4 from wi.forms.vm import EditVMForm from wi.utils.decorators import user_permission from wi.utils.views import direct_to_template, simple_generic_id, form_generic_id from wi.views.user.farm import CreateFarmWizard farm_patterns = patterns('wi.views.user.farm', url(r'^$', user_permission(direct_to_template), {'template_name': 'farms/base.html'}, name='far_farms'), url(r'^potato/$', user_permission(direct_to_template), {'template_name': 'farms/potato.html'}, name='far_potato'), url(r'^create_farm/$', CreateFarmWizard.as_view([CreateFarmForm1, CreateFarmForm2, CreateFarmForm3, CreateFarmForm4]), name='far_create_farm'), url(r'^show_farm/$', user_permission(direct_to_template), {'template_name': 'farms/show_farm.html'}, name='far_show_farm'), url(r'^ajax/get_table/$', 'far_ajax_get_table', name='far_ajax_get_table'), url(r'^ajax/destroy_farm/(?P<id1>\d+)/$', user_permission(simple_generic_id), {'template_name': 'generic/simple.html', 'success_msg': (lambda desc: _('You have successfully destroyed farm <b>%(desc)s</b>.') % {'desc': desc}), 'ask_msg': (lambda desc: _('Do you really want to destroy farm <b>%(desc)s</b>?') % {'desc': desc}), 'request_url': 'user/farm/destroy/', 'id_key': 'farm_id', },