CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 06:14:23 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=835d6141ea9edc63a4282d0f8e418b0f48a427261d95207ac3a7db225869f459a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%220UUGM8y4prcpvQG0AazrcVXv8ft4ZpxF%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cc378b8f20b22e-BLR
Config parser - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // TODO keep this comment until the subsystem dashboard migration is complete
- createSelector(getSystemDetailDashboardState, getRawConfig); // export const getSystemDetailDashboardConfigurationParsedFromV1 =
- export const getSystemDetailDashboardConfigurationParsedFromV1 = // createSelector(getSystemDetailDashboardRawConfig, (rawConfig, hasLayout) => {
- createSelector(getSystemDetailDashboardRawConfig, getSystemEntityHasSystemLayout, (rawConfig, hasLayout) => {
- // const createDashboardRow = (type: 'chart' | 'kpiRow' | 'systemLayout', configuration): IConfigurationRow =>
- const createDashboardRow = (type: 'chart' | 'kpiRow' | 'systemLayout', configuration): IConfigurationRow => // ({ type, configuration, uid: Math.random().toString() });
- ({ type, configuration, uid: Math.random().toString() });
- // // Creates row that serves as placeholder for the systemLayout row
- // Creates row that serves as placeholder for the systemLayout row // const systemLayout = hasLayout ? [createDashboardRow('systemLayout', { minimized: false })] : [];
- const systemLayout = hasLayout ? [createDashboardRow('systemLayout', { minimized: false })] : [];
- // // Parse old eCharts config to the new format and creates a row config for each one
- // Parse old eCharts config to the new format and creates a row config for each one // const parsedCharts = (rawConfig.charts || []).map(rawChart => createDashboardRow('chart', setUpConfig(rawChart)));
- const parsedCharts = (rawConfig.charts || []).map(rawChart => createDashboardRow('chart', setUpConfig(rawChart)));
- // // Parse old kpi box configs to the new format and creates a single row config that contains all exiting kpi-s
- // Parse old kpi box configs to the new format and creates a single row config that contains all exiting kpi-s // const parsedKpi = (rawConfig.kpi_boxes && rawConfig.kpi_boxes.length !== 0)
- const parsedKpi = (rawConfig.kpi_boxes && rawConfig.kpi_boxes.length !== 0) // ? [createDashboardRow('kpiRow', {
- ? [createDashboardRow('kpiRow', { // kpiConfigs: rawConfig.kpi_boxes.map(x => {
- kpiConfigs: rawConfig.kpi_boxes.map(x => { // if (x.type === KPIBoxType.VALUE) {
- if (x.type === KPIBoxType.VALUE) { // return ({
- return ({ // uid: Math.random().toString(),
- uid: Math.random().toString(), // ...x,
- ...x, // title: x.abbreviation,
- title: x.abbreviation, // tooltip: x.alias,
- tooltip: x.alias, // precision: x.decimals || 0,
- precision: x.decimals || 0, // multiplier: 1,
- multiplier: 1, // showLabel: !!x.value_mapping,
- showLabel: !!x.value_mapping, // value_mapping: (x.value_mapping || []).map(y => ({ ...y, uid: Math.random() }))
- value_mapping: (x.value_mapping || []).map(y => ({ ...y, uid: Math.random() })) // });
- }); // }
- } // if (x.type === KPIBoxType.CALCULATED) {
- if (x.type === KPIBoxType.CALCULATED) { // return ({
- return ({ // uid: Math.random().toString(),
- uid: Math.random().toString(), // ...x,
- ...x, // title: x.abbreviation,
- title: x.abbreviation, // tooltip: x.alias,
- tooltip: x.alias, // precision: x.decimals || 0,
- precision: x.decimals || 0, // multiplier: 1
- multiplier: 1 // });
- }); // }
- }
- // if (x.type === KPIBoxType.STATUS) {
- if (x.type === KPIBoxType.STATUS) { // const baseStatusKPI: any = {
- const baseStatusKPI: any = { // uid: Math.random().toString(),
- uid: Math.random().toString(), // title: x.abbreviation,
- title: x.abbreviation, // tooltip: x.alias,
- tooltip: x.alias, // type: x.type
- type: x.type // };
- }; // baseStatusKPI.sourceType = KPIBoxSourceType.SYSTEM;
- baseStatusKPI.sourceType = KPIBoxSourceType.SYSTEM;
- // if (x.subsystemId) {
- if (x.subsystemId) { // baseStatusKPI.subsystemId = x.subsystemId;
- baseStatusKPI.subsystemId = x.subsystemId; // baseStatusKPI.sourceType = KPIBoxSourceType.SUBSYSTEM;
- baseStatusKPI.sourceType = KPIBoxSourceType.SUBSYSTEM; // }
- }
- // if (x.controllerId) {
- if (x.controllerId) { // // We are using idx of controller instead of the id so it doesn't make sense to store the id
- // We are using idx of controller instead of the id so it doesn't make sense to store the id // baseStatusKPI.controller_idx = 0;
- baseStatusKPI.controller_idx = 0; // baseStatusKPI.sourceType = KPIBoxSourceType.CONTROLLER;
- baseStatusKPI.sourceType = KPIBoxSourceType.CONTROLLER; // }
- }
- // if (x.abbreviation) {
- if (x.abbreviation) { // baseStatusKPI.title = x.abbreviation;
- baseStatusKPI.title = x.abbreviation; // baseStatusKPI.tooltip = x.alias;
- baseStatusKPI.tooltip = x.alias; // }
- } // return baseStatusKPI;
- return baseStatusKPI; // }
- }
- // if (x.type === KPIBoxType.MAP) {
- if (x.type === KPIBoxType.MAP) { // const baseStatusKPI: any = {
- const baseStatusKPI: any = { // uid: Math.random().toString(),
- uid: Math.random().toString(), // title: x.abbreviation,
- title: x.abbreviation, // tooltip: x.alias,
- tooltip: x.alias, // type: x.type
- type: x.type // };
- };
- // if (!x.source) {
- if (!x.source) { // baseStatusKPI.sourceType = KPIBoxSourceType.SYSTEM;
- baseStatusKPI.sourceType = KPIBoxSourceType.SYSTEM; // return baseStatusKPI;
- return baseStatusKPI; // }
- }
- // baseStatusKPI.sourceType = KPIBoxSourceType.CONTROLLER;
- baseStatusKPI.sourceType = KPIBoxSourceType.CONTROLLER; // baseStatusKPI.device_id = x.source.device_id;
- baseStatusKPI.device_id = x.source.device_id; // baseStatusKPI.controller_instance_idx = x.source.controller_instance_idx;
- baseStatusKPI.controller_instance_idx = x.source.controller_instance_idx;
- // return baseStatusKPI;
- return baseStatusKPI; // }
- } // return {
- return { // uid: Math.random().toString(),
- uid: Math.random().toString(), // ...x,
- ...x, // title: x.alias
- title: x.alias // };
- }; // }),
- }), // // TODO: add generic placeholder name
- // TODO: add generic placeholder name // title: 'General System Details',
- title: 'General System Details', // minimized: false
- minimized: false // })]
- })] // : [];
- : []; // return [...systemLayout, ...parsedKpi, ...parsedCharts];
- return [...systemLayout, ...parsedKpi, ...parsedCharts]; // });
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 2 sec ago | 0.24 KB
-
✅⭐ Make $2500 in 15 minutes ✅ NEVER SEEN BEFO...
JavaScript | 11 sec ago | 0.24 KB
-
⭐ Instant BTC Profit Method ✅ NEVER SEEN BEFO...
JavaScript | 24 sec ago | 0.24 KB
-
⭐ Instant BTC Profit Method ✅ NEVER SEEN BEFO...
JavaScript | 31 sec ago | 0.24 KB
-
⭐✅ MAKE $2000 INSTANTLY ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 40 sec ago | 0.24 KB
-
⭐ Free Crypto Method ✅ NEVER SEEN BEFORE ⭐⭐⭐
JavaScript | 49 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ✅ NEVER SEEN...
JavaScript | 59 sec ago | 0.24 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 1 min ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand