diff --git a/stage_ui/console_core/backend/app.py b/stage_ui/console_core/backend/app.py index af3a4c0..4ffeabc 100644 --- a/stage_ui/console_core/backend/app.py +++ b/stage_ui/console_core/backend/app.py @@ -39,7 +39,7 @@ APP_DIR = "/opt/iomatex-console" PUBLIC_DIR = os.path.join(APP_DIR, "public") PROVIDERS_DIR = os.path.join(APP_DIR, "providers.d") CONFIG_PATH = "/etc/iomatex/console.json" -UI_VERSION = "V 2.2.6" +UI_VERSION = "V 2.2.7" DEFAULT_CONFIG = { "bind": "0.0.0.0", diff --git a/stage_ui/console_core/frontend/console.js b/stage_ui/console_core/frontend/console.js index 8a42884..00d7fa2 100644 --- a/stage_ui/console_core/frontend/console.js +++ b/stage_ui/console_core/frontend/console.js @@ -43,7 +43,7 @@ { mode: "test_by", label: "TEST BY", host: "rest.test.it-screen.by" }, { mode: "custom", label: "Custom", host: "" } ]; - const UI_VERSION = "V 2.2.6"; + const UI_VERSION = "V 2.2.7"; const ITSCREEN_LOG_INITIAL_LINES = 50; const ITSCREEN_LOG_BUFFER_LIMIT = 300; const ITSCREEN_LOG_BATCH_MS = 250; @@ -3662,10 +3662,15 @@ try { const payload = await requestItscreenRegistration(); const nextData = state.itscreen.data || {}; - state.itscreen.data = { ...nextData, registration: payload.ok === false ? (payload.data || nextData.registration || {}) : payload }; + const registrationPayload = (payload && payload.data && typeof payload.data === "object") + ? payload.data + : (payload.ok === false ? (nextData.registration || {}) : payload); + state.itscreen.data = { ...nextData, registration: registrationPayload }; const registration = state.itscreen.data.registration || {}; - state.itscreen.error = registration && registration.ok === false ? (registration.error || t("It-screen status is unavailable")) : ""; - state.itscreen.details = registration && registration.ok === false ? (registration.details || "") : ""; + state.itscreen.error = (payload && payload.ok === false) + ? (payload.error || t("It-screen status is unavailable")) + : ((payload && payload.warning) ? payload.warning : ""); + state.itscreen.details = (payload && payload.details) || ""; state.itscreen.registrationLoadedAt = Date.now(); syncItscreenFormFromBackend(); if (state.activeTab === "tscreen") renderActiveTab();