Skip to content

Commit

Permalink
Merge pull request #1192 from hstastna/Open_vm_console_setVmSessions
Browse files Browse the repository at this point in the history
Allow opening a VM console for all console types
  • Loading branch information
sgratch committed May 12, 2020
2 parents 755fe4a + d36e52d commit 088f401
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
11 changes: 11 additions & 0 deletions src/actions/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
SET_VM_ACTION_RESULT,
SET_VM_DISKS,
SET_VM_NICS,
SET_VM_SESSIONS,
SET_VM_SNAPSHOTS,
SET_VM_SORT,
SHUTDOWN_VM,
Expand Down Expand Up @@ -325,6 +326,16 @@ export function vmActionInProgress ({ vmId, name, started }) {
}
}

export function setVmSessions ({ vmId, sessions }) {
return {
type: SET_VM_SESSIONS,
payload: {
vmId,
sessions,
},
}
}

export function setVmSnapshots ({ vmId, snapshots }) {
return {
type: SET_VM_SNAPSHOTS,
Expand Down
1 change: 1 addition & 0 deletions src/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export const SET_USERMSG_NOTIFIED = 'SET_USERMSG_NOTIFIED'
export const SET_VM_ACTION_RESULT = 'SET_VM_ACTION_RESULT'
export const SET_VM_DISKS = 'SET_VM_DISKS'
export const SET_VM_NICS = 'SET_VM_NICS'
export const SET_VM_SESSIONS = 'SET_VM_SESSIONS'
export const SET_VM_SORT = 'SET_VM_SORT'
export const SET_VNIC_PROFILES = 'SET_VNIC_PROFILES'
export const SET_VM_SNAPSHOTS = 'SET_VM_SNAPSHOTS'
Expand Down
4 changes: 0 additions & 4 deletions src/reducers/vms.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
SET_VM_SORT,
SET_VM_ACTION_RESULT,
SET_VM_CDROM,
SET_VM_CONSOLES,
SET_VM_DISKS,
SET_VM_NICS,
SET_VM_SESSIONS,
Expand Down Expand Up @@ -163,9 +162,6 @@ const vms = actionReducer(initialState, {
}
return state
},
[SET_VM_CONSOLES] (state, { payload: { vmId, consoles } }) {
return state.setIn(['vms', vmId, 'consoles'], Immutable.fromJS(consoles))
},
[SET_VM_SESSIONS] (state, { payload: { vmId, sessions } }) {
let consoleInUse = false
for (var i in sessions) {
Expand Down

0 comments on commit 088f401

Please sign in to comment.