Skip to content

Commit

Permalink
fix(setup): docker image build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed Aug 18, 2017
1 parent 099406f commit 59c9630
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/api/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ function execTty(id: string, cmd: string, args: string[] = []): Subject<any> {
let msg: TTYMessage = { id: id, type: 'data', data: null, status: 'queued' };
observer.next(msg);

let buildMsg: TTYMessage = {
id: id,
type: 'data',
data: '==> Build Docker Image',
status: 'running'
};

observer.next(buildMsg);

ps.on('data', data => {
let msg: TTYMessage = { id: id, type: 'data', data: data, status: 'running' };
observer.next(msg);
Expand Down
10 changes: 10 additions & 0 deletions src/app/components/app-terminal/app-terminal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ export class AppTerminalComponent implements OnInit {
return cmd;
});
}

this.checkScrollBottom();
}

checkScrollBottom(): void {
// TODO: make this work actually
// const element = window.document.documentElement;
// if (element.scrollTop + element.clientHeight == element.scrollHeight) {
window.scrollTo(0, document.body.scrollHeight);
// }
}

toogleCommand(index: number) {
Expand Down

0 comments on commit 59c9630

Please sign in to comment.