mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-03 21:52:31 +09:00
B OpenNebula/one#5434: Fix minor
This commit is contained in:
4 files changed
+9
-11
No files matched your search
@@ -69,7 +69,7 @@ const Permissions = React.memo(({
|
||||
const newPermission = { [name]: Helper.stringToBoolean(value) ? '0' : '1' }
|
||||
const response = await changePermissions(id, newPermission)
|
||||
|
||||
String(response?.data) === String(id) &&
|
||||
String(response) === String(id) &&
|
||||
setPermissions(prev => ({ ...prev, ...newPermission }))
|
||||
}
|
||||
|
||||
|
||||
@@ -22,23 +22,22 @@ import NetworkList from 'client/components/Tabs/Vm/Network/List'
|
||||
import * as VirtualMachine from 'client/models/VirtualMachine'
|
||||
import * as Helper from 'client/models/Helper'
|
||||
|
||||
const VmNetworkTab = ({ tabProps, ...data }) => {
|
||||
const VmNetworkTab = ({ tabProps, ...vm }) => {
|
||||
const { actions = [] } = tabProps
|
||||
|
||||
const nics = VirtualMachine.getNics(data, { groupAlias: true })
|
||||
const hypervisor = VirtualMachine.getHypervisor(data)
|
||||
const nics = VirtualMachine.getNics(vm, { groupAlias: true })
|
||||
const hypervisor = VirtualMachine.getHypervisor(vm)
|
||||
const actionsAvailable = Helper.getActionsAvailable(actions, hypervisor)
|
||||
|
||||
return (
|
||||
<NetworkList actions={actionsAvailable} nics={nics} />
|
||||
<NetworkList vmId={vm.ID} actions={actionsAvailable} nics={nics} />
|
||||
)
|
||||
}
|
||||
|
||||
VmNetworkTab.propTypes = {
|
||||
tabProps: PropTypes.shape({
|
||||
actions: PropTypes.object
|
||||
}),
|
||||
actions: PropTypes.array
|
||||
})
|
||||
}
|
||||
|
||||
VmNetworkTab.displayName = 'VmNetworkTab'
|
||||
|
||||
@@ -27,10 +27,9 @@ export const getSunstoneViews = createAsyncThunk(
|
||||
async (_, { dispatch }) => {
|
||||
try {
|
||||
const views = await authService.getSunstoneViews() ?? {}
|
||||
const config = await authService.getSunstoneConfig() ?? {}
|
||||
// const config = await authService.getSunstoneConfig() ?? {}
|
||||
|
||||
return {
|
||||
config,
|
||||
views,
|
||||
view: Object.keys(views)[0]
|
||||
}
|
||||
|
||||
@@ -53,8 +53,8 @@ export const requestConfig = (data, command) => {
|
||||
/* Spread 'from' values in current params */
|
||||
const mappedParams =
|
||||
Object.entries(params)?.reduce(
|
||||
(acc, [paraName, { from }]) => ({
|
||||
...acc,
|
||||
(params, [paraName, { from }]) => ({
|
||||
...params,
|
||||
[paraName]: { from, value: data[paraName] }
|
||||
}),
|
||||
{}
|
||||
|
||||
Reference in new issue
Block a user