Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
truenas-rk3588
webui
Commits
00060278
Commit
00060278
authored
7 years ago
by
Nesma Shah
Browse files
Options
Download
Email Patches
Plain Diff
Changes suggested by @lola27 has been made with
https://github.com/freenas/webui/pull/105
parent
4632b4df
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/app/components/common/dual-list/dual-list.component.ts
+0
-2
src/app/components/common/dual-list/dual-list.component.ts
src/app/components/common/dual-list/models.ts
+2
-0
src/app/components/common/dual-list/models.ts
src/app/services/ws.service.ts
+3
-0
src/app/services/ws.service.ts
with
5 additions
and
2 deletions
+5
-2
src/app/components/common/dual-list/dual-list.component.ts
View file @
00060278
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
src/app/components/common/dual-list/models.ts
View file @
00060278
...
...
@@ -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
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/app/services/ws.service.ts
View file @
00060278
...
...
@@ -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
);
}
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help