@datalabz_/dashboard-kit 6.0.14 → 6.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/package.json +1 -1
- package/v4.js +1 -1
- package/v5.js +1 -1
- package/v6.js +17 -6
- package/wrapper.js +2 -1
package/README.md
CHANGED
|
@@ -104,6 +104,12 @@ The list follows the fill, so it holds only what a filter can actually be given:
|
|
|
104
104
|
|
|
105
105
|
The answer always goes to the dashboard's parent, whoever asked.
|
|
106
106
|
|
|
107
|
+
## Gateway endpoint
|
|
108
|
+
|
|
109
|
+
`v6` has no default gateway (`v4` and `v5` still fall back to the iGaming one). The host sends `endpoint`
|
|
110
|
+
(https, or http for localhost) in `CUSTOM_DASHBOARDS_PARAMS`, from the parent frame only; without it the
|
|
111
|
+
dashboard shows an error and does not boot. iGaming: `https://aidqgateway.draftplaza.com/aidq`, poker: `https://aidqgateway.pokerplaza.com/aidq`.
|
|
112
|
+
|
|
107
113
|
## Drillthrough
|
|
108
114
|
|
|
109
115
|
A click on a table column or a card opens another dashboard in a popup over this one, filtered to the
|
package/package.json
CHANGED
package/v4.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
let _activeTabId = '';
|
|
21
21
|
let _sections = []; // { id, label, load, loaded, errors }
|
|
22
22
|
let _title = '';
|
|
23
|
-
let _gitVer = '
|
|
23
|
+
let _gitVer = '795d35e'; // replaced at deploy: sed -i "s/795d35e/$(git rev-parse --short HEAD)/g" v4.js
|
|
24
24
|
let _calls = []; // System Info call log
|
|
25
25
|
let _sectionErrors = {}; // sectionId → error count
|
|
26
26
|
let _generation = 0;
|
package/v5.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
let _activeTabId = '';
|
|
21
21
|
let _sections = []; // { id, label, load, loaded, errors }
|
|
22
22
|
let _title = '';
|
|
23
|
-
let _gitVer = '
|
|
23
|
+
let _gitVer = '795d35e'; // replaced at deploy: sed -i "s/795d35e/$(git rev-parse --short HEAD)/g" v4.js
|
|
24
24
|
let _calls = []; // System Info call log
|
|
25
25
|
let _sectionErrors = {}; // sectionId → error count
|
|
26
26
|
let _generation = 0;
|
package/v6.js
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
(function (global) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
|
|
5
|
+
// No default gateway: each BackOffice has its own, and a default would send one platform's
|
|
6
|
+
// token to another's gateway. The parent names it via `endpoint` in CUSTOM_DASHBOARDS_PARAMS;
|
|
7
|
+
// without one the dashboard does not boot.
|
|
8
8
|
// Retry is off: 1 = a single attempt. Set to 2 to re-enable one retry for
|
|
9
9
|
// whatever _isRetryable allows (no response, 5xx, 200 without rows).
|
|
10
10
|
const MAX_ATTEMPTS = 1;
|
|
11
11
|
|
|
12
12
|
// ── State ────────────────────────────────────────────────────────────────────
|
|
13
13
|
let _authToken = '';
|
|
14
|
-
let _endpoint =
|
|
14
|
+
let _endpoint = '';
|
|
15
15
|
let _dateFromIso = '';
|
|
16
16
|
let _dateToIso = '';
|
|
17
17
|
let _timezone = '';
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
let _activeTabId = '';
|
|
21
21
|
let _sections = []; // { id, label, load, loaded, errors }
|
|
22
22
|
let _title = '';
|
|
23
|
-
let _gitVer = '
|
|
23
|
+
let _gitVer = '795d35e'; // replaced at deploy: sed -i "s/795d35e/$(git rev-parse --short HEAD)/g" v6.js
|
|
24
24
|
let _calls = []; // System Info call log
|
|
25
25
|
let _pageErrors = []; // System Info: errors no load() caught (a handler's, a timer's, the page script's)
|
|
26
26
|
let _sectionErrors = {}; // sectionId → error count
|
|
@@ -1391,7 +1391,18 @@ html[data-dk-setup="true"] .dk-resp-toggle {
|
|
|
1391
1391
|
// it closes. A theme or token change does not move what it shows.
|
|
1392
1392
|
if (_popup && JSON.stringify(_contextSnapshot()) !== contextBefore) _closePopup();
|
|
1393
1393
|
|
|
1394
|
-
if (!_hasBooted && _authToken && _dateFromIso && _dateToIso && _timezone) {
|
|
1394
|
+
if (!_hasBooted && _authToken && _dateFromIso && _dateToIso && _timezone && !_endpoint) {
|
|
1395
|
+
// Not permanent, unlike a filter refusal: the parent may send the endpoint in a later message.
|
|
1396
|
+
const msg = 'The host did not send a valid "endpoint" (the https gateway URL), so the dashboard cannot load data.';
|
|
1397
|
+
console.error('[DashboardKit] ' + msg);
|
|
1398
|
+
const wait = document.getElementById('dk-wait');
|
|
1399
|
+
if (wait) {
|
|
1400
|
+
wait.hidden = false;
|
|
1401
|
+
wait.textContent = msg;
|
|
1402
|
+
wait.style.color = 'var(--err)';
|
|
1403
|
+
wait.style.fontStyle = 'normal';
|
|
1404
|
+
}
|
|
1405
|
+
} else if (!_hasBooted && _authToken && _dateFromIso && _dateToIso && _timezone) {
|
|
1395
1406
|
// Before the fill writes anything and before a section runs. A fault in describing the filters
|
|
1396
1407
|
// must never keep the dashboard from booting, so it only costs the list.
|
|
1397
1408
|
try { _bootFilters = _dashboardFilters(); }
|
package/wrapper.js
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
label: "Poker",
|
|
24
24
|
apiBase: "https://pokerreporting.pokerplaza.com",
|
|
25
25
|
gatewayEndpoint: "https://aidqgateway.pokerplaza.com/aidq",
|
|
26
|
+
dashboardsApi: "https://pokerreporting.pokerplaza.com/dashboards",
|
|
26
27
|
storagePrefix: "iqg.harness.poker.",
|
|
27
28
|
},
|
|
28
29
|
};
|
|
@@ -224,7 +225,7 @@
|
|
|
224
225
|
const hid = State.filters.hierarchyId;
|
|
225
226
|
const msg = {
|
|
226
227
|
type: "CUSTOM_DASHBOARDS_PARAMS", token: State.token, theme: State.theme,
|
|
227
|
-
// The SQL gateway of this BackOffice; the kit
|
|
228
|
+
// The SQL gateway of this BackOffice; the kit has no default.
|
|
228
229
|
endpoint: CFG.gatewayEndpoint,
|
|
229
230
|
filters: {
|
|
230
231
|
dateFrom: r.dateFromIso, dateTo: r.dateToIso, timezone: tz,
|