Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
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
luna
Commits
ac55d7bf
Unverified
Commit
ac55d7bf
authored
Jan 09, 2018
by
liuzheng712
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复多用户弹窗选择后无法登陆
parent
abe51e44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
16 deletions
+38
-16
mock.py
mock.py
+8
-0
cleftbar.component.ts
src/app/ControlPage/cleftbar/cleftbar.component.ts
+30
-16
No files found.
mock.py
View file @
ac55d7bf
...
...
@@ -117,6 +117,14 @@ def asset_groups_assets():
"protocol"
:
"ssh"
,
"auth_method"
:
"P"
,
"auto_push"
:
True
},
{
"id"
:
2
,
"name"
:
"liuzheng"
,
"username"
:
"liuzheng"
,
"protocol"
:
"ssh"
,
"auth_method"
:
"P"
,
"auto_push"
:
True
}
]
},
...
...
src/app/ControlPage/cleftbar/cleftbar.component.ts
View file @
ac55d7bf
...
...
@@ -98,6 +98,7 @@ export class CleftbarComponent implements OnInit {
Connect
(
host
)
{
// console.log(host);
let
userid
:
string
;
const
that
=
this
;
if
(
host
.
system_users_granted
.
length
>
1
)
{
let
options
=
''
;
for
(
let
u
of
host
.
system_users_granted
)
{
...
...
@@ -112,6 +113,19 @@ export class CleftbarComponent implements OnInit {
content
:
'<select id="selectuser">'
+
options
+
'</select>'
,
yes
:
function
(
index
,
layero
)
{
userid
=
jQuery
(
'#selectuser'
).
val
();
if
(
host
.
plantform
===
'Linux'
)
{
jQuery
(
'app-ssh'
).
show
();
jQuery
(
'app-rdp'
).
hide
();
that
.
_term
.
TerminalConnect
(
host
,
userid
);
}
else
if
(
host
.
plantform
===
'Windows'
)
{
jQuery
(
'app-ssh'
).
hide
();
jQuery
(
'app-rdp'
).
show
();
that
.
_rdp
.
Connect
(
host
,
userid
);
}
else
{
jQuery
(
'app-ssh'
).
show
();
jQuery
(
'app-rdp'
).
hide
();
that
.
_term
.
TerminalConnect
(
host
,
userid
);
}
layer
.
close
(
index
);
},
btn2
:
function
(
index
,
layero
)
{
...
...
@@ -123,22 +137,22 @@ export class CleftbarComponent implements OnInit {
});
}
else
if
(
host
.
system_users_granted
.
length
===
1
)
{
userid
=
host
.
system_users_granted
[
0
].
id
;
}
if
(
userid
===
''
)
{
return
;
}
if
(
host
.
plantform
===
'Linux'
)
{
jQuery
(
'app-ssh'
).
show
();
jQuery
(
'app-rdp'
).
hide
(
);
this
.
_term
.
TerminalConnect
(
host
,
userid
);
}
else
if
(
host
.
plantform
===
'Windows'
)
{
jQuery
(
'app-ssh'
).
hide
();
jQuery
(
'app-rdp'
).
show
(
);
this
.
_rdp
.
Connect
(
host
,
userid
);
}
else
{
jQuery
(
'app-ssh'
).
show
();
jQuery
(
'app-rdp'
).
hide
(
);
this
.
_term
.
TerminalConnect
(
host
,
userid
);
if
(
userid
===
''
)
{
return
;
}
if
(
host
.
plantform
===
'Linux'
)
{
jQuery
(
'app-ssh'
).
show
();
jQuery
(
'app-rdp'
).
hide
();
this
.
_term
.
TerminalConnect
(
host
,
userid
);
}
else
if
(
host
.
plantform
===
'Windows'
)
{
jQuery
(
'app-ssh'
).
hide
();
jQuery
(
'app-rdp'
).
show
();
this
.
_rdp
.
Connect
(
host
,
userid
);
}
else
{
jQuery
(
'app-ssh'
).
show
();
jQuery
(
'app-rdp'
).
hide
();
this
.
_term
.
TerminalConnect
(
host
,
userid
);
}
}
}
...
...
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