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
639fc343
Unverified
Commit
639fc343
authored
Jan 10, 2018
by
liuzheng712
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
1daf16a3
a19010da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
26 deletions
+39
-26
cleftbar.component.ts
src/app/ControlPage/cleftbar/cleftbar.component.ts
+37
-21
ssh.component.ts
src/app/ControlPage/control/ssh/ssh.component.ts
+2
-5
No files found.
src/app/ControlPage/cleftbar/cleftbar.component.ts
View file @
639fc343
...
@@ -116,7 +116,7 @@ export class CleftbarComponent implements OnInit {
...
@@ -116,7 +116,7 @@ export class CleftbarComponent implements OnInit {
Connect
(
host
)
{
Connect
(
host
)
{
// console.log(host);
// console.log(host);
let
user
id
:
string
;
let
user
:
any
;
const
that
=
this
;
const
that
=
this
;
if
(
host
.
system_users_granted
.
length
>
1
)
{
if
(
host
.
system_users_granted
.
length
>
1
)
{
let
options
=
''
;
let
options
=
''
;
...
@@ -131,8 +131,14 @@ export class CleftbarComponent implements OnInit {
...
@@ -131,8 +131,14 @@ export class CleftbarComponent implements OnInit {
btn
:
[
'确定'
,
'取消'
],
btn
:
[
'确定'
,
'取消'
],
content
:
'<select id="selectuser">'
+
options
+
'</select>'
,
content
:
'<select id="selectuser">'
+
options
+
'</select>'
,
yes
:
function
(
index
,
layero
)
{
yes
:
function
(
index
,
layero
)
{
userid
=
jQuery
(
'#selectuser'
).
val
();
let
userid
=
jQuery
(
'#selectuser'
).
val
();
that
.
login
(
host
,
userid
);
for
(
let
i
of
host
.
system_users_granted
)
{
if
(
i
.
id
===
userid
)
{
user
=
i
;
break
;
}
}
that
.
login
(
host
,
user
);
layer
.
close
(
index
);
layer
.
close
(
index
);
},
},
btn2
:
function
(
index
,
layero
)
{
btn2
:
function
(
index
,
layero
)
{
...
@@ -143,28 +149,38 @@ export class CleftbarComponent implements OnInit {
...
@@ -143,28 +149,38 @@ export class CleftbarComponent implements OnInit {
}
}
});
});
}
else
if
(
host
.
system_users_granted
.
length
===
1
)
{
}
else
if
(
host
.
system_users_granted
.
length
===
1
)
{
user
id
=
host
.
system_users_granted
[
0
].
id
;
user
=
host
.
system_users_granted
[
0
]
;
this
.
login
(
host
,
user
id
);
this
.
login
(
host
,
user
);
}
}
}
}
login
(
host
,
userid
)
{
login
(
host
,
user
)
{
if
(
userid
===
''
)
{
if
(
user
)
{
return
;
if
(
user
.
procotol
===
'ssh'
)
{
}
jQuery
(
'app-ssh'
).
show
();
if
(
host
.
plantform
.
toLowerCase
()
===
'linux'
)
{
jQuery
(
'app-rdp'
).
hide
();
jQuery
(
'app-ssh'
).
show
();
this
.
_term
.
TerminalConnect
(
host
,
user
.
id
);
jQuery
(
'app-rdp'
).
hide
();
}
else
if
(
user
.
procotol
===
'rdp'
)
{
this
.
_term
.
TerminalConnect
(
host
,
userid
);
jQuery
(
'app-ssh'
).
hide
();
}
else
if
(
host
.
plantform
.
toLowerCase
()
===
'windows'
)
{
jQuery
(
'app-rdp'
).
show
();
jQuery
(
'app-ssh'
).
hide
();
this
.
_rdp
.
Connect
(
host
,
user
.
id
);
jQuery
(
'app-rdp'
).
show
();
}
this
.
_rdp
.
Connect
(
host
,
userid
);
}
else
{
jQuery
(
'app-ssh'
).
show
();
jQuery
(
'app-rdp'
).
hide
();
this
.
_term
.
TerminalConnect
(
host
,
userid
);
}
}
// if (host.plantform) {
// if (host.plantform.toLowerCase() === 'linux') {
// jQuery('app-ssh').show();
// jQuery('app-rdp').hide();
// this._term.TerminalConnect(host, user.id);
// } else if (host.plantform.toLowerCase() === 'windows') {
// jQuery('app-ssh').hide();
// jQuery('app-rdp').show();
// this._rdp.Connect(host, user.id);
// } else {
// jQuery('app-ssh').show();
// jQuery('app-rdp').hide();
// this._term.TerminalConnect(host, user.id);
// }
// }
}
}
Search
(
q
)
{
Search
(
q
)
{
...
...
src/app/ControlPage/control/ssh/ssh.component.ts
View file @
639fc343
...
@@ -30,11 +30,8 @@ export class SshComponent implements OnInit {
...
@@ -30,11 +30,8 @@ export class SshComponent implements OnInit {
static
TerminalDisconnectAll
()
{
static
TerminalDisconnectAll
()
{
alert
(
'TerminalDisconnectAll'
);
alert
(
'TerminalDisconnectAll'
);
for
(
let
_i
=
0
;
_i
<
NavList
.
List
.
length
;
_i
++
)
{
for
(
let
i
=
0
;
i
<
NavList
.
List
.
length
;
i
++
)
{
SshComponent
.
TerminalDisconnect
(
_i
);
SshComponent
.
TerminalDisconnect
(
NavList
.
List
[
i
]);
// TermStore.term[i]["connected"] = false;
// TermStore.term[i]["socket"].destroy();
// TermStore.term[i]["term"].write('\r\n\x1b[31mBye Bye!\x1b[m\r\n');
}
}
}
}
...
...
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