mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-03 05:35:42 +09:00
M #-: Remove sunstone vmrc refs. (#3617)
Signed-off-by: Victor Hansson <vhansson@opennebula.io>
This commit is contained in:
1 parent
5f49524aa4
commit
876b92cd82
7 files changed
+7
-21
No files matched your search
@@ -86,7 +86,7 @@ const PreConsoleButton = memo(
|
||||
/**
|
||||
* @param {object} props - Props
|
||||
* @param {VM} props.vm - Virtual machine
|
||||
* @param {'vnc'|'ssh'|'rdp'|'vmrc'} props.connectionType - Connection type
|
||||
* @param {'vnc'|'ssh'|'rdp'} props.connectionType - Connection type
|
||||
* @param {Function} [props.onClick] - Handle click for button
|
||||
* @returns {ReactElement} - Returns button if current user has permissions about the connection type
|
||||
*/
|
||||
@@ -104,7 +104,7 @@ const PreConsoleButton = memo(
|
||||
}, [view, vm])
|
||||
|
||||
const needNicConfig = useMemo(
|
||||
() => ![VM_ACTIONS.VNC, VM_ACTIONS.VMRC].includes(connectionType),
|
||||
() => ![VM_ACTIONS.VNC].includes(connectionType),
|
||||
[connectionType]
|
||||
)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import PropTypes from 'prop-types'
|
||||
import { ReactElement, useEffect, useMemo } from 'react'
|
||||
import { useHistory } from 'react-router'
|
||||
|
||||
import { STATIC_FILES_URL, T, VM_ACTIONS } from '@ConstantsModule'
|
||||
import { STATIC_FILES_URL, T } from '@ConstantsModule'
|
||||
import { ServiceAPI, VmAPI, useGeneralApi } from '@FeaturesModule'
|
||||
import {
|
||||
getIps,
|
||||
@@ -35,7 +35,7 @@ import { StatusBadge } from '@modules/components/Status'
|
||||
/**
|
||||
* @param {object} props - Props
|
||||
* @param {string} props.id - VM id
|
||||
* @param {'vnc'|'ssh'|'rdp'|'vmrc'} props.type - Connection type
|
||||
* @param {'vnc'|'ssh'|'rdp'} props.type - Connection type
|
||||
* @returns {ReactElement} Header VM information for remote consoles
|
||||
*/
|
||||
const HeaderVmInfo = ({ id, type }) => {
|
||||
@@ -58,7 +58,6 @@ const HeaderVmInfo = ({ id, type }) => {
|
||||
displayName: stateDisplayName,
|
||||
} = getVirtualMachineState(vm) ?? {}
|
||||
const time = timeFromMilliseconds(+vm?.ETIME || +vm?.STIME)
|
||||
const isVMRC = useMemo(() => type === VM_ACTIONS.VMRC, [type])
|
||||
const serviceId = useMemo(() => vm?.USER_TEMPLATE?.SERVICE_ID, [vm])
|
||||
const srcLogo = useMemo(() => vm?.USER_TEMPLATE?.LOGO?.toLowerCase(), [vm])
|
||||
|
||||
@@ -71,11 +70,11 @@ const HeaderVmInfo = ({ id, type }) => {
|
||||
}, [isError])
|
||||
|
||||
useEffect(() => {
|
||||
if (isVMRC && isSuccess && vm) {
|
||||
if (isSuccess && vm) {
|
||||
enqueueError(T.ErrorVmNoLocatedVenter, [vm.ID, vm.NAME])
|
||||
redirectTo(PATH.DASHBOARD)
|
||||
}
|
||||
}, [isVMRC, isSuccess])
|
||||
}, [isSuccess])
|
||||
|
||||
return (
|
||||
<TranslateProvider>
|
||||
@@ -165,7 +164,7 @@ const HeaderVmInfo = ({ id, type }) => {
|
||||
|
||||
HeaderVmInfo.propTypes = {
|
||||
id: PropTypes.string,
|
||||
type: PropTypes.oneOf(['vnc', 'ssh', 'rdp', 'vmrc']),
|
||||
type: PropTypes.oneOf(['vnc', 'ssh', 'rdp']),
|
||||
}
|
||||
|
||||
export default HeaderVmInfo
|
||||
@@ -174,7 +174,6 @@ export const SOCKETS = {
|
||||
PROVISION: 'provision',
|
||||
GUACAMOLE: 'guacamole',
|
||||
EXTERNAL_GUACAMOLE: 'external-guacamole',
|
||||
VMRC: 'vmrc',
|
||||
}
|
||||
|
||||
/** @enum {string} Names of resource */
|
||||
|
||||
@@ -1020,7 +1020,6 @@ module.exports = {
|
||||
Rdp: 'RDP',
|
||||
SshConnection: 'SSH connection',
|
||||
RdpConnection: 'RDP connection',
|
||||
Vmrc: 'VMRC',
|
||||
Sdl: 'SDL',
|
||||
Spice: 'SPICE',
|
||||
CtrlAltDel: 'Ctrl-Alt-Del',
|
||||
@@ -1032,7 +1031,6 @@ module.exports = {
|
||||
LastConnection: 'Last connection',
|
||||
PartOf: 'Part of',
|
||||
GuacamoleState: 'Guacamole State',
|
||||
VMRCState: 'VMRC State',
|
||||
FontSize: 'Font Size',
|
||||
FontName: 'Font Name',
|
||||
RdpLayout: 'RDP keyboard layout',
|
||||
|
||||
@@ -1002,7 +1002,6 @@ export const DUMMY_VM_ACTIONS_BY_STATE = {
|
||||
[VM_ACTIONS.UNRESCHED]: [STATES.RUNNING, STATES.UNKNOWN],
|
||||
|
||||
// REMOTE
|
||||
[VM_ACTIONS.VMRC]: [STATES.RUNNING],
|
||||
[VM_ACTIONS.VNC]: [
|
||||
STATES.RUNNING,
|
||||
STATES.MIGRATE,
|
||||
@@ -1235,7 +1234,6 @@ export const KVM_VM_ACTIONS_BY_STATE = {
|
||||
[VM_ACTIONS.UNRESCHED]: [STATES.RUNNING, STATES.UNKNOWN],
|
||||
|
||||
// REMOTE
|
||||
[VM_ACTIONS.VMRC]: [STATES.RUNNING],
|
||||
[VM_ACTIONS.VNC]: [
|
||||
STATES.RUNNING,
|
||||
STATES.MIGRATE,
|
||||
@@ -1467,7 +1465,6 @@ export const LXC_VM_ACTIONS_BY_STATE = {
|
||||
[VM_ACTIONS.UNRESCHED]: [STATES.RUNNING, STATES.UNKNOWN],
|
||||
|
||||
// REMOTE
|
||||
[VM_ACTIONS.VMRC]: [STATES.RUNNING],
|
||||
[VM_ACTIONS.VNC]: [
|
||||
STATES.RUNNING,
|
||||
STATES.MIGRATE,
|
||||
|
||||
@@ -133,9 +133,7 @@ const defaults = {
|
||||
defaultLogFilename: `${appName}.log`,
|
||||
defaultKeyFilename: `${appName}_key`,
|
||||
defaultSunstoneAuth: 'sunstone_auth',
|
||||
defaultVmrcTokens: 'sunstone_vmrc_tokens/',
|
||||
defaultBaseURL: '',
|
||||
endpointVmrc: `${baseUrl}vmrc`,
|
||||
endpointGuacamole: `${baseUrl}guacamole`,
|
||||
endpointExternalGuacamole: `${baseUrl}external-guacamole`,
|
||||
defaultNamespace: 'one',
|
||||
|
||||
@@ -58,7 +58,6 @@ const {
|
||||
defaultSharePath,
|
||||
defaultSystemPath,
|
||||
defaultSourceSystemPath,
|
||||
defaultVmrcTokens,
|
||||
defaultVarPath,
|
||||
defaultKeyFilename,
|
||||
defaultSunstoneAuth,
|
||||
@@ -554,7 +553,6 @@ const genPathResources = () => {
|
||||
const MODULES_LOCATION =
|
||||
(devMode && resolve(__dirname, '..', '..', '..', 'etc', 'sunstone')) ||
|
||||
`${ETC_LOCATION}/${defaultSunstonePath}`
|
||||
const VMRC_LOCATION = !ONE_LOCATION ? defaultVarPath : ONE_LOCATION
|
||||
|
||||
if (global) {
|
||||
if (!global.paths) {
|
||||
@@ -563,9 +561,6 @@ const genPathResources = () => {
|
||||
if (!global.paths.FIREEDGE_CONFIG) {
|
||||
global.paths.FIREEDGE_CONFIG = `${ETC_LOCATION}/${defaultConfigFile}`
|
||||
}
|
||||
if (!global.paths.VMRC_TOKENS) {
|
||||
global.paths.VMRC_TOKENS = `${VMRC_LOCATION}/${defaultVmrcTokens}`
|
||||
}
|
||||
if (!global.paths.FIREEDGE_LOG) {
|
||||
global.paths.FIREEDGE_LOG = `${LOG_LOCATION}/${defaultLogFilename}`
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user