mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
25e3529f53
commit
b448fa89a8
@ -23,6 +23,7 @@ import {
|
||||
PERIOD_TYPES,
|
||||
REPEAT_VALUES,
|
||||
SCHEDULE_TYPE,
|
||||
SERVER_CONFIG,
|
||||
T,
|
||||
TEMPLATE_SCHEDULE_TYPE_STRING,
|
||||
VM_ACTIONS_IN_CHARTER,
|
||||
@ -67,13 +68,13 @@ const DAYS_OF_WEEK = [
|
||||
T.Saturday,
|
||||
]
|
||||
|
||||
const getNow = () => DateTime.now()
|
||||
const getNow = () =>
|
||||
SERVER_CONFIG?.currentTimeZone
|
||||
? DateTime.now().setZone(SERVER_CONFIG.currentTimeZone)
|
||||
: DateTime.now()
|
||||
|
||||
const getTomorrow = () => getNow().plus({ days: 1 })
|
||||
|
||||
const getTomorrowAtMidnight = () =>
|
||||
getTomorrow().set({ hour: 12, minute: 0, second: 0 })
|
||||
|
||||
const getNextWeek = () => getNow().plus({ weeks: 1 })
|
||||
|
||||
const parseDateString = (_, originalValue) => {
|
||||
@ -239,7 +240,7 @@ const TIME_FIELD = {
|
||||
typeAction !== SCHEDULE_TYPE.RELATIVE ? schema.required() : schema
|
||||
),
|
||||
fieldProps: {
|
||||
defaultValue: getTomorrowAtMidnight(),
|
||||
defaultValue: getTomorrow(),
|
||||
minDateTime: getNow(),
|
||||
},
|
||||
}
|
||||
|
@ -49,13 +49,21 @@ const ensuredScriptValue = (value) =>
|
||||
|
||||
const router = Router()
|
||||
|
||||
const defaultConfig = {
|
||||
currentTimeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
}
|
||||
|
||||
router.get('*', async (req, res) => {
|
||||
const remoteJWT = {}
|
||||
|
||||
const APP_CONFIG = {
|
||||
[defaultApps.provision.name]: getProvisionConfig() || {},
|
||||
[defaultApps.provision.name]:
|
||||
{ ...defaultConfig, ...getProvisionConfig() } || defaultConfig,
|
||||
[defaultApps.sunstone.name]:
|
||||
getSunstoneConfig({ includeProtectedConfig: false }) || {},
|
||||
{
|
||||
...defaultConfig,
|
||||
...getSunstoneConfig({ includeProtectedConfig: false }),
|
||||
} || defaultConfig,
|
||||
}
|
||||
|
||||
const appConfig = getFireedgeConfig()
|
||||
|
Loading…
x
Reference in New Issue
Block a user