% --[[ ]]-- local PM = require("provisioningmanager") local m_integrationsTemplate = PM.GetSupportedIntegrationsTemplate() local m_templateByIntegration = {} for _, template in pairs(m_integrationsTemplate) do if template.Name then local integrationType = template.Name:lower() m_templateByIntegration[integrationType] = template end end --[[ Esta función es utilizada para obtener el ejemplo a configurar en algunos campos de las diferentes integraciones. Ej: el campo a ingresar en la URL de notificaciones de HelpDesk. Acá se visualiza algo así: https://168.62.161.232:2443/ichelpdeskdesarrollo El mismo se obtiene de la configuración del template de la rocka "provisioningmanager" al invocar la función "GetSupportedIntegrationsTemplate" ]]-- local function GetIntegrationSample (integrationType, entityId, fieldName) integrationType = (integrationType or ""):lower() entityId = (entityId or ""):lower() fieldName = (fieldName or ""):lower() local integrationTemplate = m_templateByIntegration[integrationType] if not integrationTemplate then LogWarning("[PROVISIONING.FRM_VCCS] GetIntegrationSample - IntegrationType '%s' does not exist..", integrationType) return "" end if not integrationTemplate.Config then LogWarning("[PROVISIONING.FRM_VCCS] GetIntegrationSample - IntegrationType '%s' with error. Invalid config.", integrationType) return "" end local sample = "" for _, config in pairs(integrationTemplate.Config) do if (config.Id or ""):lower() == entityId then if config.Items then for _, item in ipairs(config.Items) do if (item.Field or ""):lower() == fieldName then sample = item.Sample or item.Default break end end end break end end --LogDebug("[PROVISIONING.FRM_VCCS] GetIntegrationSample ---> integrationType: '%s', entityId: '%s', fieldName: '%s', samlpe: '%s'.", integrationType, entityId, fieldName, sample) return sample end --[[ ]]-- local m_defaultSessionTimeouts = PM.LoadDefaultSessionTimeouts() --LogDebug("[PROVISIONING.FRM_VCCS] m_defaultSessionTimeouts ---> '%s'.", json.encode(m_defaultSessionTimeouts)) local function GetSessionTimeout (sessionType, formatted) sessionType = (sessionType or ""):upper() local sessionTimeout = m_defaultSessionTimeouts and m_defaultSessionTimeouts[sessionType] or "" --LogDebug("[PROVISIONING.FRM_VCCS] Session timeout for --> sessionType '%s' = '%s'.", sessionType, sessionTimeout) if sessionType == "" then return end if not formatted then return sessionTimeout end return string.format("%s %s", sessionTimeout, _T("Seconds")) end --[[ ]]-- local m_licencesDefaultValues = PM.LoadDefaultLicensesValues() --LogDebug("[PROVISIONING.FRM_VCCS] m_licencesDefaultValues ---> '%s'.", json.encode(m_licencesDefaultValues)) local function GetDefaultLicense (licenseType) licenseType = (licenseType or ""):upper() local licenseValue = m_licencesDefaultValues and m_licencesDefaultValues[licenseType] or "" --LogDebug("[PROVISIONING.FRM_VCCS] Default Licencse for --> licenseType '%s' = '%s'.", licenseType, licenseValue) return licenseValue end --[[ ]]-- local m_screenRecordingDefaultValues = PM.LoadDefaultScreenRecordingValues() --LogDebug("[PROVISIONING.FRM_VCCS] m_screenRecordingDefaultValues ---> '%s'.", json.encode(m_screenRecordingDefaultValues)) local function GetDefaultScreenRecording (paramType) paramType = (paramType or ""):upper() local paramValue = m_screenRecordingDefaultValues and m_screenRecordingDefaultValues[paramType] or "" --LogDebug("[PROVISIONING.FRM_VCCS] Default Param for --> paramType '%s' = '%s'.", paramType, paramValue) return paramValue end --[[ ]]-- local m_storageLifecycleDefaultValues = PM.LoadDefaultStorageLifecycleValues() local function GetDefaultStorageLifecycle (paramType) paramType = (paramType or ""):upper() return m_storageLifecycleDefaultValues and m_storageLifecycleDefaultValues[paramType] or "" end local m_vccValidations = require("apps.provisioning.controllers.validations.vccs") local m_vccIdFieldDef local function VccIdMaxLength () if not m_vccIdFieldDef then m_vccIdFieldDef = m_vccValidations.FindFiledValidation("basic", "Id") end return m_vccIdFieldDef.validations.maxLength.max end %>