perf: 修改添加downlaod

pull/6718/head
ibuler 2021-09-09 14:58:13 +08:00 committed by Jiangjie.Bai
parent dac3f7fc71
commit d49d1e1414
3 changed files with 43 additions and 2 deletions

View File

@ -32,6 +32,7 @@ app_view_patterns = [
path('ops/', include('ops.urls.view_urls'), name='ops'),
path('common/', include('common.urls.view_urls'), name='common'),
re_path(r'flower/(?P<path>.*)', views.celery_flower_view, name='flower-view'),
path('download/', views.ResourceDownload.as_view(), name='download')
]
if settings.XPACK_ENABLED:

View File

@ -4,7 +4,7 @@ import re
from django.http import HttpResponseRedirect, JsonResponse, Http404
from django.conf import settings
from django.views.generic import View
from django.views.generic import View, TemplateView
from django.shortcuts import redirect
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.csrf import csrf_exempt
@ -16,7 +16,8 @@ from common.http import HttpResponseTemporaryRedirect
__all__ = [
'LunaView', 'I18NView', 'KokoView', 'WsView',
'redirect_format_api', 'redirect_old_apps_view', 'UIView'
'redirect_format_api', 'redirect_old_apps_view', 'UIView',
'ResourceDownload',
]
@ -84,3 +85,6 @@ class KokoView(View):
"</div>If you see this page, prove that you are not accessing the nginx listening port. Good luck.</div>")
return HttpResponse(msg)
class ResourceDownload(TemplateView):
template_name = 'resource_download.html'

View File

@ -0,0 +1,36 @@
{% extends '_without_nav_base.html' %}
{% block body %}
<div style="margin: 0 200px">
<div class="group">
<h2>JumpServer Clients</h2>
<ul>
<li><a href="/download/jumpserver-client.msi.zip">jumpserver-client-windows.msi.zip</a></li>
<li><a href="/download/jumpserver-client.dmg">jumpserver-client-macos.dmg</a></li>
</ul>
</div>
<div class="group">
<h2>RDP Clients</h2>
<ul>
<li><a href="/download/Microsoft_Remote_Desktop_10.6.7_installer.pkg">Microsoft_Remote_Desktop_10.6.7_installer.pkg</a></li>
</ul>
</div>
</div>
<style>
ul {
list-style-type: disc;
}
li a {
color: blue;
}
.group {
padding-top: 40px;
}
.group ul {
padding-top: 10px;
}
</style>
{% endblock %}