Commit 14de7d22 authored by ibuler's avatar ibuler

[Update] 添加alert提示

parent b60f469f
......@@ -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() {
......
......@@ -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: {
......
......@@ -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);
// },
// );
// }
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment