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
0f63eadf
Commit
0f63eadf
authored
Nov 12, 2014
by
guanghongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
4844f786
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
main.js
webroot/AutoSa/static/js/main.js
+1
-2
base.html
webroot/AutoSa/templates/base.html
+3
-1
logView.html
webroot/AutoSa/templates/logView.html
+8
-0
No files found.
webroot/AutoSa/static/js/main.js
View file @
0f63eadf
...
@@ -29,7 +29,7 @@ $.fn.webSocket = function(opt){
...
@@ -29,7 +29,7 @@ $.fn.webSocket = function(opt){
var
init
=
function
(
e
){
var
init
=
function
(
e
){
var
socket
=
io
.
connect
(
'ws://
172.10.10.9:3000'
);
var
socket
=
io
.
connect
(
'ws://
'
+
globalConfig
.
SOCKET_HOST
);
var
node
=
$
(
e
.
target
);
var
node
=
$
(
e
.
target
);
message
.
id
=
genUid
();
message
.
id
=
genUid
();
message
.
filename
=
node
.
attr
(
'filename'
);
message
.
filename
=
node
.
attr
(
'filename'
);
...
@@ -47,7 +47,6 @@ $.fn.webSocket = function(opt){
...
@@ -47,7 +47,6 @@ $.fn.webSocket = function(opt){
//去除log中的颜色控制字符
//去除log中的颜色控制字符
var
regx
=
/
\x
1B
\[([
0-9
]{1,3}((
;
[
0-9
]{1,3})
*
)?)?[
m|K
]
/g
;
var
regx
=
/
\x
1B
\[([
0-9
]{1,3}((
;
[
0-9
]{1,3})
*
)?)?[
m|K
]
/g
;
tag
.
append
(
'<p>'
+
escapeString
(
obj
.
content
.
replace
(
regx
,
''
))
+
'</p>'
);
tag
.
append
(
'<p>'
+
escapeString
(
obj
.
content
.
replace
(
regx
,
''
))
+
'</p>'
);
tag
.
animate
({
scrollTop
:
tag
[
0
].
scrollHeight
},
1000
);
});
});
return
tag
[
0
];
return
tag
[
0
];
}
,
}
,
...
...
webroot/AutoSa/templates/base.html
View file @
0f63eadf
...
@@ -18,8 +18,9 @@
...
@@ -18,8 +18,9 @@
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script
src=
"/static/js/bootstrap.min.js"
></script>
<script
src=
"/static/js/bootstrap.min.js"
></script>
<script
src=
"/static/js/bootstrap-dialog.js"
></script>
<script
src=
"/static/js/bootstrap-dialog.js"
></script>
<script
src=
"http://172.10.10.9:3000/socket.io/socket.io.js"
></script>
<script
src=
"/static/js/main.js"
></script>
<script
src=
"/static/js/main.js"
></script>
</head>
</head>
<body>
<body>
...
@@ -145,6 +146,7 @@
...
@@ -145,6 +146,7 @@
{% block content %}{% endblock %}
{% block content %}{% endblock %}
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</body>
</html>
</html>
webroot/AutoSa/templates/logView.html
View file @
0f63eadf
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
{% load mytags %}
{% load mytags %}
{% block content %}
{% block content %}
<form
method=
"post"
action=
""
>
<form
method=
"post"
action=
""
>
<table
class=
"table table-striped table-hover table-condensed"
>
<table
class=
"table table-striped table-hover table-condensed"
>
<thead>
<thead>
...
@@ -38,6 +39,9 @@
...
@@ -38,6 +39,9 @@
{% endfor %}
{% endfor %}
</tbody>
</tbody>
</table>
</table>
<script
src=
"http://{{ web_socket_host }}:3000/socket.io/socket.io.js"
></script>
<script >
<script >
$
(
'.log_command'
).
on
(
'click'
,
function
(){
$
(
'.log_command'
).
on
(
'click'
,
function
(){
var
url
=
$
(
this
).
attr
(
'href'
);
var
url
=
$
(
this
).
attr
(
'href'
);
...
@@ -46,7 +50,11 @@
...
@@ -46,7 +50,11 @@
}});
}});
return
false
;
return
false
;
})
})
globalConfig
=
{
SOCKET_HOST
:
"{{ web_socket_host }}"
}
$
(
".monitor"
).
webSocket
()
$
(
".monitor"
).
webSocket
()
</script>
</script>
<!--<button class="btn btn-primary">删除</button>-->
<!--<button class="btn btn-primary">删除</button>-->
</form>
</form>
...
...
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