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
14de7d22
Commit
14de7d22
authored
May 22, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 添加alert提示
parent
b60f469f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
22 deletions
+12
-22
term.component.ts
src/app/elements/term/term.component.ts
+7
-1
globals.ts
src/app/globals.ts
+1
-0
replay.component.ts
src/app/pages/replay/replay.component.ts
+4
-21
No files found.
src/app/elements/term/term.component.ts
View file @
14de7d22
...
...
@@ -7,6 +7,8 @@ import 'rxjs/Observable';
import
'rxjs/add/operator/debounceTime'
;
import
'rxjs/add/operator/distinctUntilChanged'
;
import
{
NavList
}
from
'../../pages/control/control/control.component'
;
@
Component
({
selector
:
'elements-term'
,
...
...
@@ -28,7 +30,11 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
.
distinctUntilChanged
();
this
.
winSizeChange$
.
subscribe
(()
=>
this
.
resizeTerm
());
.
subscribe
(()
=>
{
if
(
NavList
.
List
[
NavList
.
Active
].
type
===
'ssh'
)
{
this
.
resizeTerm
();
}
});
}
ngAfterViewInit
()
{
...
...
src/app/globals.ts
View file @
14de7d22
...
...
@@ -2,6 +2,7 @@
import
*
as
io
from
'socket.io-client'
;
import
{
Terminal
}
from
'xterm'
;
// 由于没有真正Upgrade到websocket协议,所以禁用重连截止,否则会用户闪断
export
const
TermWS
=
io
.
connect
(
'/ssh'
,
{
'reconnection'
:
false
});
export
const
sep
=
'/'
;
export
let
Video
:
{
...
...
src/app/pages/replay/replay.component.ts
View file @
14de7d22
...
...
@@ -27,31 +27,14 @@ export class PagesReplayComponent implements OnInit {
this
.
_http
.
get_replay_json
(
token
)
.
subscribe
(
data
=>
{
// this.replay = data.json() as Replay;
this
.
replay
.
type
=
data
[
'type'
];
this
.
replay
.
src
=
data
[
'src'
];
this
.
replay
.
id
=
data
[
'id'
];
},
err
=>
{
this
.
_http
.
get_replay
(
token
);
alert
(
'没找到录像文件'
);
}
// err => {
// this._http.get_replay(token)
// .subscribe(
// data => {
// this.replay.type = 'json';
// this.replay.json = data;
// this.replay.src = 'READY';
// this.replay.timelist = Object.keys(this.replay.json).map(Number);
// this.replay.timelist = this.replay.timelist.sort(function (a, b) {
// return a - b;
// });
// this.replay.totalTime = this.replay.timelist[this.replay.timelist.length - 1] * 1000;
//
// }, err2 => {
// alert('无法下载');
// this._logger.error(err2);
// },
// );
// }
);
}
}
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