1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

M #~: fix error fireedge.log (#2134)

(cherry picked from commit 7684a5446748cfbd4a522b21765aac10620360e3)
This commit is contained in:
Jorge Miguel Lobo Escalona 2022-06-08 13:39:17 +02:00 committed by Tino Vazquez
parent e264f61a50
commit b70d58ccc4
No known key found for this signature in database
GPG Key ID: 14201E424D02047E
2 changed files with 5 additions and 22 deletions

View File

@ -51,11 +51,11 @@ import {
validateServerIsSecure,
} from './utils/server'
const appConfig = getFireedgeConfig()
// set paths
genPathResources()
const appConfig = getFireedgeConfig()
// set fireedge_key
genFireedgeKey()

View File

@ -14,14 +14,8 @@
* limitations under the License. *
* ------------------------------------------------------------------------- */
const { env } = require('process')
const { resolve } = require('path')
const { parse: yamlToJson } = require('yaml')
const {
defaultConfigFile,
defaultWebpackMode,
defaultSunstoneConfig,
defaultProvisionConfig,
protectedConfigData,
defaultAppName,
defaultApps,
@ -31,22 +25,11 @@ const { existsFile, defaultError } = require('server/utils/server')
const { messageTerminal } = require('server/utils/general')
const { global } = require('window-or-global')
const defaultPath =
env && env.NODE_ENV === defaultWebpackMode ? ['../', '../', '../'] : ['../']
const basePaths = [__dirname, ...defaultPath, 'etc']
const getConfigPathByApp = (app) =>
({
[defaultAppName]:
global?.paths?.FIREEDGE_CONFIG ||
resolve(...basePaths, defaultConfigFile),
[defaultApps.sunstone.name]:
global?.paths?.SUNSTONE_CONFIG ||
resolve(...basePaths, 'sunstone', defaultSunstoneConfig),
[defaultApps.provision.name]:
global?.paths?.PROVISION_CONFIG ||
resolve(...basePaths, 'provision', defaultProvisionConfig),
[defaultAppName]: global?.paths?.FIREEDGE_CONFIG,
[defaultApps.sunstone.name]: global?.paths?.SUNSTONE_CONFIG,
[defaultApps.provision.name]: global?.paths?.PROVISION_CONFIG,
}[app])
const getProtectedKeysByApp = (app) => protectedConfigData[app] || []