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
bcfe82f1
Commit
bcfe82f1
authored
Dec 12, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 优化错误颜色
parent
82af5f8f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
command_execution_create.html
apps/ops/templates/ops/command_execution_create.html
+17
-1
No files found.
apps/ops/templates/ops/command_execution_create.html
View file @
bcfe82f1
...
...
@@ -171,7 +171,7 @@ function initResultTerminal() {
cursorBlink
:
false
,
screenKeys
:
false
,
fontFamily
:
'"Monaco", "Consolas", "monospace"'
,
fontSize
:
1
2
,
fontSize
:
1
3
,
rightClickSelectsWord
:
true
,
disableStdin
:
true
,
theme
:
{
...
...
@@ -182,6 +182,10 @@ function initResultTerminal() {
term
.
write
(
"选择左侧资产, 选择运行的系统用户,批量执行命令
\
r
\n
"
)
}
function
wrapperError
(
msg
)
{
return
'
\
033[31m'
+
msg
+
'
\
033[0m'
+
'
\
r
\
n'
;
}
function
execute
()
{
if
(
!
term
)
{
initResultTerminal
()
...
...
@@ -192,6 +196,18 @@ function execute() {
var
hosts
=
getSelectedAssetsNode
().
map
(
function
(
node
)
{
return
node
.
id
;
});
if
(
hosts
.
length
===
0
)
{
term
.
write
(
wrapperError
(
'没有选中资产'
));
return
}
if
(
!
command
)
{
term
.
write
(
wrapperError
(
'没有输入命令'
));
return
}
if
(
!
run_as
)
{
term
.
write
(
wrapperError
(
'没有选择运行用户'
));
return
}
var
data
=
{
hosts
:
hosts
,
run_as
:
run_as
,
...
...
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