Beispiel #1
0
from webterminal.views import Index, SshLogPlay, SshTerminalKill, SshTerminalMonitor, CommandExecute, BatchCommandExecute
from django.contrib.auth.views import LoginView, LogoutView
from django.views.static import serve
from django.conf import settings
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^guacamole/', include('guacamole.urls')),
    url(r'^$', Index.as_view(), name='index'),
    url(r'^commandexecute/$', CommandExecute.as_view(), name='commandexecute'),
    url(r'^batchcommandexecute/$', BatchCommandExecute.as_view(),
        name='batchcommandexecute'),
    url(r'^sshterminalkill/$', SshTerminalKill.as_view(), name='sshterminalkill'),
    url(r'^sshlogplay/(?P<pk>[0-9]+)/',
        SshLogPlay.as_view(), name='sshlogplay'),
    url(r'^sshterminalmonitor/(?P<pk>[0-9]+)/',
        SshTerminalMonitor.as_view(), name='sshterminalmonitor'),
    url(r'^accounts/login/$',
        LoginView.as_view(template_name='admin/login.html'), name='login'),
    url(r'^accounts/logout/$',
        LogoutView.as_view(template_name='registration/logged_out.html'), name='logout'),
    url(r'^elfinder/', include('elfinder.urls')),
    url(r'^permission/', include('permission.urls')),
    url(r'^common/', include('common.urls')),
    url(r'^i18n/', include('django.conf.urls.i18n')),
]


if settings.DEBUG:
    urlpatterns += staticfiles_urlpatterns()
Beispiel #2
0
urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^guacamole/', include('guacamole.urls')),
    url(r'^$', Index.as_view(), name='index'),
    url(r'^sshconnect/(?P<ip>(?:(?:0|1[\d]{0,2}|2(?:[0-4]\d?|5[0-5]?|[6-9])?|[3-9]\d?)\.){3}(?:0|1[\d]{0,2}|2(?:[0-4]\d?|5[0-5]?|[6-9])?|[3-9]\d?))/(?P<serverid>[0-9]+)/$',
        SshConnect.as_view(),
        name='sshconnect'),
    url(r'^commandexecute/$', CommandExecute.as_view(), name='commandexecute'),
    url(r'^batchcommandexecute/$',
        BatchCommandExecute.as_view(),
        name='batchcommandexecute'),
    url(r'^sshterminalkill/$',
        SshTerminalKill.as_view(),
        name='sshterminalkill'),
    url(r'^sshlogplay/(?P<pk>[0-9]+)/',
        SshLogPlay.as_view(),
        name='sshlogplay'),
    url(r'^sshterminalmonitor/(?P<pk>[0-9]+)/',
        SshTerminalMonitor.as_view(),
        name='sshterminalmonitor'),
    url(r'^accounts/login/$',
        LoginView.as_view(template_name='admin/login.html'),
        name='login'),
    url(r'^accounts/logout/$',
        LogoutView.as_view(template_name='registration/logged_out.html'),
        name='logout'),
    url(r'^elfinder/', include('elfinder.urls')),
    url(r'^permission/', include('permission.urls')),
    url(r'^common/', include('common.urls')),
    url(r'^i18n/', include('django.conf.urls.i18n')),
]
Beispiel #3
0
router.register('commandssequence', CommandsSequenceViewSet)
router.register('credential', CredentialViewSet)

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$',Index.as_view(),name='index'),
    url(r'^commands/add/$',Commands.as_view(),name='commandscreate'),
    url(r'^commandexecute/$',CommandExecute.as_view(),name='commandexecute'),
    url(r'^commandslist/$',CommandExecuteList.as_view(),name='commandslist'),
    url(r'^commandsapi/$',CommandExecuteDetailApi.as_view(),name='commandsapi'),
    url(r'^accounts/login/$', LoginView.as_view(template_name='admin/login.html'),name='login'),
    url(r'^accounts/logout/$',LogoutView.as_view(template_name='registration/logged_out.html'),name='logout'),     
    url(r'^credentialcreate/$',CredentialCreate.as_view(),name='credentialcreate'),
    url(r'^credentiallist/$',CredentialList.as_view(),name='credentiallist'),
    url(r'^credentialdetailapi/$',CredentialDetailApi.as_view(),name='credentialdetailapi'),
    url(r'^servercreate/$',ServerCreate.as_view(),name='servercreate'),
    url(r'^serverlist/$',ServerlList.as_view(),name='serverlist'),
    url(r'^groupcreate/$',GroupCreate.as_view(),name='groupcreate'),
    url(r'^grouplist/$',GroupList.as_view(),name='grouplist'),
    url(r'^sshlogslist/$',SshLogList.as_view(),name='sshlogslist'),
    url(r'^sshlogplay/(?P<pk>[0-9]+)/',SshLogPlay.as_view(),name='sshlogplay'),
    url(r'^elfinder/',include('elfinder.urls')),
    url(r'^api/',include(router.urls)),
]


if settings.DEBUG:
    urlpatterns += staticfiles_urlpatterns()
    urlpatterns += [
        url(r'^media/(?P<path>.*)$', serve, { 'document_root': settings.MEDIA_ROOT, }),
    ]