Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
792fc3b0
Commit
792fc3b0
authored
Oct 21, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 添加koko访问错误说明
parent
673ebbec
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
2 deletions
+11
-2
settings.py
apps/jumpserver/settings.py
+1
-1
urls.py
apps/jumpserver/urls.py
+2
-1
views.py
apps/jumpserver/views.py
+7
-0
jumpserver.js
apps/static/js/jumpserver.js
+1
-0
No files found.
apps/jumpserver/settings.py
View file @
792fc3b0
...
@@ -331,7 +331,7 @@ LOCALE_PATHS = [
...
@@ -331,7 +331,7 @@ LOCALE_PATHS = [
# Static files (CSS, JavaScript, Images)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/
# https://docs.djangoproject.com/en/1.10/howto/static-files/
STATIC_URL
=
'
/static/'
STATIC_URL
=
'
{}/static/'
.
format
(
CONFIG
.
FORCE_SCRIPT_NAME
)
STATIC_ROOT
=
os
.
path
.
join
(
PROJECT_DIR
,
"data"
,
"static"
)
STATIC_ROOT
=
os
.
path
.
join
(
PROJECT_DIR
,
"data"
,
"static"
)
STATIC_DIR
=
os
.
path
.
join
(
BASE_DIR
,
"static"
)
STATIC_DIR
=
os
.
path
.
join
(
BASE_DIR
,
"static"
)
...
...
apps/jumpserver/urls.py
View file @
792fc3b0
...
@@ -65,7 +65,8 @@ urlpatterns = [
...
@@ -65,7 +65,8 @@ urlpatterns = [
path
(
'api/v2/'
,
include
(
api_v2
)),
path
(
'api/v2/'
,
include
(
api_v2
)),
re_path
(
'api/(?P<app>
\
w+)/(?P<version>v
\
d)/.*'
,
views
.
redirect_format_api
),
re_path
(
'api/(?P<app>
\
w+)/(?P<version>v
\
d)/.*'
,
views
.
redirect_format_api
),
path
(
'api/health/'
,
views
.
HealthCheckView
.
as_view
(),
name
=
"health"
),
path
(
'api/health/'
,
views
.
HealthCheckView
.
as_view
(),
name
=
"health"
),
path
(
'luna/'
,
views
.
LunaView
.
as_view
(),
name
=
'luna-view'
),
re_path
(
'luna/.*'
,
views
.
LunaView
.
as_view
(),
name
=
'luna-view'
),
re_path
(
'koko/.*'
,
views
.
KokoView
.
as_view
(),
name
=
'koko-view'
),
re_path
(
'ws/.*'
,
views
.
WsView
.
as_view
(),
name
=
'ws-view'
),
re_path
(
'ws/.*'
,
views
.
WsView
.
as_view
(),
name
=
'ws-view'
),
path
(
'i18n/<str:lang>/'
,
views
.
I18NView
.
as_view
(),
name
=
'i18n-switch'
),
path
(
'i18n/<str:lang>/'
,
views
.
I18NView
.
as_view
(),
name
=
'i18n-switch'
),
path
(
'settings/'
,
include
(
'settings.urls.view_urls'
,
namespace
=
'settings'
)),
path
(
'settings/'
,
include
(
'settings.urls.view_urls'
,
namespace
=
'settings'
)),
...
...
apps/jumpserver/views.py
View file @
792fc3b0
...
@@ -234,3 +234,10 @@ class WsView(APIView):
...
@@ -234,3 +234,10 @@ class WsView(APIView):
.
format
(
self
.
ws_port
))
.
format
(
self
.
ws_port
))
return
JsonResponse
({
"msg"
:
msg
})
return
JsonResponse
({
"msg"
:
msg
})
class
KokoView
(
View
):
def
get
(
self
,
request
):
msg
=
_
(
"<div>Koko is a separately deployed program, you need to deploy Koko, configure nginx for url distribution,</div> "
"</div>If you see this page, prove that you are not accessing the nginx listening port. Good luck.</div>"
)
return
HttpResponse
(
msg
)
apps/static/js/jumpserver.js
View file @
792fc3b0
...
@@ -141,6 +141,7 @@ function activeNav(prefix) {
...
@@ -141,6 +141,7 @@ function activeNav(prefix) {
var
path
=
document
.
location
.
pathname
;
var
path
=
document
.
location
.
pathname
;
if
(
prefix
)
{
if
(
prefix
)
{
path
=
path
.
replace
(
prefix
,
''
);
path
=
path
.
replace
(
prefix
,
''
);
console
.
log
(
path
);
}
}
var
urlArray
=
path
.
split
(
"/"
);
var
urlArray
=
path
.
split
(
"/"
);
var
app
=
urlArray
[
1
];
var
app
=
urlArray
[
1
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment