diff --git a/src/fireedge/src/modules/components/Buttons/ConsoleAction.js b/src/fireedge/src/modules/components/Buttons/ConsoleAction.js index 2b5f0d5cab..97fc004abf 100644 --- a/src/fireedge/src/modules/components/Buttons/ConsoleAction.js +++ b/src/fireedge/src/modules/components/Buttons/ConsoleAction.js @@ -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] ) diff --git a/src/fireedge/src/modules/components/Consoles/HeaderVmInfo.js b/src/fireedge/src/modules/components/Consoles/HeaderVmInfo.js index 378c816c45..1ec0016514 100644 --- a/src/fireedge/src/modules/components/Consoles/HeaderVmInfo.js +++ b/src/fireedge/src/modules/components/Consoles/HeaderVmInfo.js @@ -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 ( @@ -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 diff --git a/src/fireedge/src/modules/constants/index.js b/src/fireedge/src/modules/constants/index.js index febc770078..13969489d1 100644 --- a/src/fireedge/src/modules/constants/index.js +++ b/src/fireedge/src/modules/constants/index.js @@ -174,7 +174,6 @@ export const SOCKETS = { PROVISION: 'provision', GUACAMOLE: 'guacamole', EXTERNAL_GUACAMOLE: 'external-guacamole', - VMRC: 'vmrc', } /** @enum {string} Names of resource */ diff --git a/src/fireedge/src/modules/constants/translates.js b/src/fireedge/src/modules/constants/translates.js index 4065aade71..61ce869f5e 100644 --- a/src/fireedge/src/modules/constants/translates.js +++ b/src/fireedge/src/modules/constants/translates.js @@ -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', diff --git a/src/fireedge/src/modules/constants/vm.js b/src/fireedge/src/modules/constants/vm.js index f22b83d466..3f6aaa1d23 100644 --- a/src/fireedge/src/modules/constants/vm.js +++ b/src/fireedge/src/modules/constants/vm.js @@ -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, diff --git a/src/fireedge/src/server/utils/constants/defaults.js b/src/fireedge/src/server/utils/constants/defaults.js index 36cd6d2b46..07ba76cbcd 100644 --- a/src/fireedge/src/server/utils/constants/defaults.js +++ b/src/fireedge/src/server/utils/constants/defaults.js @@ -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', diff --git a/src/fireedge/src/server/utils/server.js b/src/fireedge/src/server/utils/server.js index 54b50f7ad1..e574f0b080 100644 --- a/src/fireedge/src/server/utils/server.js +++ b/src/fireedge/src/server/utils/server.js @@ -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}` }