Commit 00060278 authored by Nesma Shah's avatar Nesma Shah
Browse files

Changes suggested by @lola27 has been made with https://github.com/freenas/webui/pull/105

parent 4632b4df
No related merge requests found
Showing with 5 additions and 2 deletions
+5 -2
......@@ -32,7 +32,6 @@ export class DualListboxComponent implements OnInit {
}
select() {
console.log('selected items called');
const { from, to } = transfer(this.availableItems, this.selectedItems);
this.availableItems = from;
this.selectedItems = to;
......@@ -40,7 +39,6 @@ export class DualListboxComponent implements OnInit {
}
return() {
console.log('return items called');
const { from, to } = transfer(this.selectedItems, this.availableItems);
this.selectedItems = from;
this.availableItems = to;
......
......@@ -31,6 +31,8 @@ export class ListSelectionImpl implements ListSelection {
select(item: any): void {
if (!this.isSelected(item)) {
this._selectedItems.push(item);
} else {
this.unselect(item);
}
}
......
......@@ -34,12 +34,14 @@ export class WebSocketService {
this.socket = new WebSocket(
(window.location.protocol == 'https:' ? 'wss://' : 'ws://') +
environment.remote + '/websocket');
console.log(this.socket);
this.socket.onmessage = this.onmessage.bind(this);
this.socket.onopen = this.onopen.bind(this);
this.socket.onclose = this.onclose.bind(this);
}
onopen(event) {
console.log('onpen event happened');
this.onOpenSubject.next(true);
this.send({"msg" : "connect", "version" : "1", "support" : [ "1" ]});
}
......@@ -117,6 +119,7 @@ export class WebSocketService {
send(payload) {
if (this.socket.readyState == WebSocket.OPEN) {
this.socket.send(JSON.stringify(payload));
console.log('send payload', this.socket.readyState, payload);
} else {
this.pendingMessages.push(payload);
}
......
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