@hot-updater/console 1.0.0-rc.2 → 1.0.0-rc.20
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/.output/nitro.json +1 -1
- package/.output/public/assets/ConsoleFeatureUnavailable-B9VYGA3N.js +1 -0
- package/.output/public/assets/HashValueDisplay-D880zntR.js +1 -0
- package/.output/public/assets/InsightsInfo-By_sPjTE.js +1 -0
- package/.output/public/assets/InsightsPageHeader-9_kx_LL7.js +1 -0
- package/.output/public/assets/NotFoundPage-Dys8C0cW.js +1 -0
- package/.output/public/assets/api-CtarlV0l.js +1 -0
- package/.output/public/assets/api-keys-DFF_QqtN.js +1 -0
- package/.output/public/assets/api-keys-evfsQ4sN.js +1 -0
- package/.output/public/assets/arrow-left-BP9D-ta_.js +1 -0
- package/.output/public/assets/arrow-up-right-CDP9Tevw.js +1 -0
- package/.output/public/assets/card-DzCPSRsh.js +1 -0
- package/.output/public/assets/console-features-api-yv7rm3DX.js +1 -0
- package/.output/public/assets/dialog-BDvCy_QO.js +1 -0
- package/.output/public/assets/dist-Clb6cQ9l.js +1 -0
- package/.output/public/assets/empty-C5x9mn_s.js +1 -0
- package/.output/public/assets/field-Bou7shoO.js +1 -0
- package/.output/public/assets/index-0eg3l8aC.js +10 -0
- package/.output/public/assets/input-group-DVtWFUUF.js +1 -0
- package/.output/public/assets/insights-2MbdiSNv.js +1 -0
- package/.output/public/assets/insights-C6tmCZHk.js +2 -0
- package/.output/public/assets/insights-CadS_aIA.js +42 -0
- package/.output/public/assets/insights-recovery-rpc-wvdyM4LD.js +1 -0
- package/.output/public/assets/insights-search-KIF7mRtB.js +1 -0
- package/.output/public/assets/insights-usage-rpc-qUkNtrWr.js +1 -0
- package/.output/public/assets/insights_.distribution-BhBs6PNA.js +1 -0
- package/.output/public/assets/insights_.distribution-CItZw3-8.js +1 -0
- package/.output/public/assets/insights_.distribution-CJUH_wAS.js +2 -0
- package/.output/public/assets/installations-CH2H7JQt.js +2 -0
- package/.output/public/assets/installations-DMeMuwsW.js +1 -0
- package/.output/public/assets/installations-DnvxI9Dt.js +1 -0
- package/.output/public/assets/loader-circle-Ca7C9YY1.js +1 -0
- package/.output/public/assets/mutation-x9L28_CD.js +1 -0
- package/.output/public/assets/preload-helper-BN-UkjOE.js +1 -0
- package/.output/public/assets/refresh-cw-CVGqvy8Z.js +1 -0
- package/.output/public/assets/routes-BhK8DuZA.js +1 -0
- package/.output/public/assets/routes-veKtDW39.js +2 -0
- package/.output/public/assets/sidebar-B45aMqRm.js +3 -0
- package/.output/public/assets/styles-Dn0pK1EX.css +2 -0
- package/.output/public/assets/table-CwLnN6KX.js +1 -0
- package/.output/public/assets/useCompositeListItem-CF7vsfcA.js +1 -0
- package/.output/public/assets/useMutation-CN1ygYEr.js +1 -0
- package/.output/public/assets/useOpenInteractionType-AnAMWYIY.js +1 -0
- package/.output/public/assets/valueToPercent-C-t8FT0y.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-B7ioJhtE.mjs → __23tanstack-start-server-fn-resolver-CUQLz7hs.mjs} +52 -40
- package/.output/server/_libs/@base-ui/react+[...].mjs +7044 -3622
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +49 -3
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +4 -4
- package/.output/server/_libs/d3-array.mjs +231 -0
- package/.output/server/_libs/d3-color.mjs +330 -0
- package/.output/server/_libs/d3-format.mjs +252 -0
- package/.output/server/_libs/d3-interpolate.mjs +207 -0
- package/.output/server/_libs/d3-path.mjs +77 -0
- package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
- package/.output/server/_libs/d3-shape.mjs +818 -0
- package/.output/server/_libs/decimal.js-light.mjs +884 -0
- package/.output/server/_libs/es-toolkit.mjs +1159 -0
- package/.output/server/_libs/eventemitter3.mjs +236 -0
- package/.output/server/_libs/immer.mjs +532 -0
- package/.output/server/_libs/lucide-react.mjs +46 -32
- package/.output/server/_libs/next-themes.mjs +2 -2
- package/.output/server/_libs/react-redux+[...].mjs +205 -0
- package/.output/server/_libs/recharts+[...].mjs +14350 -0
- package/.output/server/_libs/sonner.mjs +2 -2
- package/.output/server/_libs/tanstack__react-query.mjs +8 -3
- package/.output/server/_libs/verkit.mjs +99 -1
- package/.output/server/_runtime.mjs +10 -1
- package/.output/server/_ssr/ConsoleFeatureUnavailable-DoxET2AT.mjs +58 -0
- package/.output/server/_ssr/{HashValueDisplay-DwpGLfrl.mjs → HashValueDisplay-BplboHEb.mjs} +3 -3
- package/.output/server/_ssr/InsightsInfo-o2YPd5Qc.mjs +37 -0
- package/.output/server/_ssr/InsightsPageHeader-NExCJL1I.mjs +154 -0
- package/.output/server/_ssr/NotFoundPage-Cd-A8ock.mjs +37 -0
- package/.output/server/_ssr/api-B1Ro0uys.mjs +202 -0
- package/.output/server/_ssr/api-C0G9MTMI.mjs +4205 -0
- package/.output/server/_ssr/{api-keys-CZeTPQys.mjs → api-keys-CT3HG7KT.mjs} +49 -9
- package/.output/server/_ssr/api-keys-Dvvy1sem.mjs +5 -0
- package/.output/server/_ssr/api-keys-rpc-b1qTTFfG.mjs +52 -0
- package/.output/server/_ssr/api-rpc-Cbns2MGx.mjs +338 -0
- package/.output/server/_ssr/{auth-rpc-DUaeOWKK.mjs → auth-rpc-DChS7m9y.mjs} +6 -6
- package/.output/server/_ssr/auth.server-Ccqz2iVv.mjs +37 -0
- package/.output/server/_ssr/bundleActivity-D17Pb_h5.mjs +19 -0
- package/.output/server/_ssr/card-DMbcvlPz.mjs +49 -0
- package/.output/server/_ssr/config-DMEJdhoW.mjs +13 -0
- package/.output/server/_ssr/config.server-DyypN6cQ.mjs +60 -0
- package/.output/server/_ssr/console-access-KpPv5lin.mjs +17 -0
- package/.output/server/_ssr/console-features-CsbyHYfK.mjs +55 -0
- package/.output/server/_ssr/console-features-api-B-KVuo4p.mjs +43 -0
- package/.output/server/_ssr/console-features-rpc-Djyo5740.mjs +19 -0
- package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-B_I3Ll4M.mjs} +28 -2
- package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-DuNm5mmo.mjs} +2 -2
- package/.output/server/_ssr/databaseRows-CXxf_VIB.mjs +132 -0
- package/.output/server/_ssr/{deleteBundle-BTGwBgzx.mjs → deleteBundle-Dcc21Lbd.mjs} +9 -19
- package/.output/server/_ssr/{dialog-DS-nw-pA.mjs → dialog-cOmLTUV2.mjs} +2 -2
- package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-B-r4u3Lg.mjs} +28 -5
- package/.output/server/_ssr/{downloadBundle-CNnYxYO2.mjs → downloadBundle-CexOFoZ4.mjs} +6 -7
- package/.output/server/_ssr/empty-BHoY_5jt.mjs +49 -0
- package/.output/server/_ssr/{table-CnZmon_Z.mjs → field-mjhcNEXD.mjs} +63 -51
- package/.output/server/_ssr/getBundleChildren-DbDXe9wB.mjs +22 -0
- package/.output/server/_ssr/{input-group-BpsnmvZw.mjs → input-group-96H30HWC.mjs} +2 -2
- package/.output/server/_ssr/insights-D25VDVaz.mjs +5 -0
- package/.output/server/_ssr/insights-D359GJFL.mjs +14 -0
- package/.output/server/_ssr/insights-DgFv1NsO.mjs +1238 -0
- package/.output/server/_ssr/insights-api-ChAKrbhG.mjs +105 -0
- package/.output/server/_ssr/insights-failures-WQ-ttjOx.mjs +44 -0
- package/.output/server/_ssr/insights-failures-rpc-BFsqlltN.mjs +21 -0
- package/.output/server/_ssr/insights-recovery-DkL6bxMW.mjs +28 -0
- package/.output/server/_ssr/insights-recovery-rpc-2P5m8F62.mjs +46 -0
- package/.output/server/_ssr/insights-recovery-rpc-Tj8vNC19.mjs +20 -0
- package/.output/server/_ssr/{insights-rpc-38DujK0G.mjs → insights-rpc-DrkVmV9o.mjs} +22 -14
- package/.output/server/_ssr/insights-search-BsalnNw-.mjs +25 -0
- package/.output/server/_ssr/insights-usage-1nVTQrLy.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-Ct_4xHhZ.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-DaYIRtFK.mjs +41 -0
- package/.output/server/_ssr/insightsRecovery-CpGucWN1.mjs +45 -0
- package/.output/server/_ssr/insightsUsage-JYpKZAF7.mjs +56 -0
- package/.output/server/_ssr/insights_.distribution-Bcu6uYs_.mjs +5 -0
- package/.output/server/_ssr/insights_.distribution-D3Csuyjw.mjs +14 -0
- package/.output/server/_ssr/insights_.distribution-jQZEF07J.mjs +335 -0
- package/.output/server/_ssr/installations-B8Vh54lH.mjs +69 -0
- package/.output/server/_ssr/installations-BI5kelHv.mjs +5 -0
- package/.output/server/_ssr/{installations-DiVKEF5T.mjs → installations-Cxikllmx.mjs} +517 -54
- package/.output/server/_ssr/listReleases-DqU9t1l3.mjs +79 -0
- package/.output/server/_ssr/releaseManagement-B3e7I8J9.mjs +11 -0
- package/.output/server/_ssr/{router-B9wG_9f8.mjs → router-CRkm-wHD.mjs} +117 -124
- package/.output/server/_ssr/routes-B3IJo_jL.mjs +292 -0
- package/.output/server/_ssr/{routes-D7Yh_jfj.mjs → routes-CNAi0Mmv.mjs} +176 -455
- package/.output/server/_ssr/runtime.server-NucbYjc7.mjs +1372 -0
- package/.output/server/_ssr/select-BkPAJFL7.mjs +107 -0
- package/.output/server/_ssr/{server-D_C2rMzf.mjs → server-DKJYsaCP.mjs} +6 -32
- package/.output/server/_ssr/{createSsrRpc-DjWNJ0uc.mjs → sidebar-Cw1VuC7d.mjs} +117 -63
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/table-q0P9wz7x.mjs +53 -0
- package/.output/server/_ssr/updateFailures-DMU9f0pK.mjs +24 -0
- package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-BzSO-fr-.mjs} +2 -2
- package/.output/server/_tanstack-start-manifest_v-Bb0gKDbb.mjs +124 -0
- package/.output/server/index.mjs +273 -168
- package/README.md +71 -65
- package/lib/index.d.mts +13 -11
- package/lib/vite-internal.mjs +6 -3
- package/package.json +8 -8
- package/src/components/AppSidebar.tsx +91 -71
- package/src/components/ConsoleAccessPage.tsx +5 -1
- package/src/components/ConsoleFeatureUnavailable.tsx +82 -0
- package/src/components/NotFoundPage.tsx +7 -7
- package/src/components/features/FeatureSlots.tsx +99 -0
- package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
- package/src/components/features/bundles/BundleMetadata.tsx +7 -4
- package/src/components/features/channels/ChannelManagementDialog.tsx +2 -5
- package/src/components/features/insights/AppUsage.tsx +370 -0
- package/src/components/features/insights/EstimatedCount.tsx +18 -0
- package/src/components/features/insights/EventDetails.tsx +117 -37
- package/src/components/features/insights/EventHistoryCard.tsx +112 -26
- package/src/components/features/insights/EventHistoryList.tsx +2 -2
- package/src/components/features/insights/InsightsControls.tsx +265 -102
- package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
- package/src/components/features/insights/InsightsInfo.tsx +48 -0
- package/src/components/features/insights/InsightsOverview.tsx +176 -173
- package/src/components/features/insights/InsightsPageHeader.tsx +35 -20
- package/src/components/features/insights/InsightsPeriodSelector.tsx +89 -0
- package/src/components/features/insights/InstallationHistoryCard.tsx +52 -10
- package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
- package/src/components/features/insights/ReleaseActivity.tsx +188 -0
- package/src/components/features/insights/ReportingDevicesSummary.tsx +65 -0
- package/src/components/features/insights/UpdateFailures.tsx +319 -0
- package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +24 -1
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/empty.tsx +101 -0
- package/src/components/ui/scroll-area.tsx +52 -0
- package/src/components/ui/sidebar.tsx +22 -29
- package/src/components/ui/tabs.tsx +81 -0
- package/src/index.ts +12 -17
- package/src/lib/api-keys-api.ts +0 -28
- package/src/lib/api-keys-rpc.ts +27 -38
- package/src/lib/api-rpc.ts +197 -221
- package/src/lib/api.ts +11 -13
- package/src/lib/bundle-activity.ts +31 -0
- package/src/lib/console-access.ts +20 -0
- package/src/lib/console-features-api.ts +68 -0
- package/src/lib/console-features-rpc.ts +13 -0
- package/src/lib/console-features.ts +91 -0
- package/src/lib/insights-api.ts +37 -1
- package/src/lib/insights-failures-rpc.ts +21 -0
- package/src/lib/insights-failures.ts +129 -0
- package/src/lib/insights-recovery-rpc.ts +51 -0
- package/src/lib/insights-recovery.ts +68 -0
- package/src/lib/insights-retention.ts +21 -0
- package/src/lib/insights-rpc.ts +30 -12
- package/src/lib/insights-search.ts +58 -0
- package/src/lib/insights-usage-rpc.ts +29 -0
- package/src/lib/insights-usage.ts +74 -0
- package/src/lib/insights-view.ts +38 -2
- package/src/lib/scroll-restoration.ts +21 -0
- package/src/lib/server/adminInsights.ts +124 -0
- package/src/lib/server/auth.server.ts +13 -5
- package/src/lib/server/bundleActivity.ts +37 -0
- package/src/lib/server/config.server.ts +16 -32
- package/src/lib/server/console-feature-apis.ts +59 -0
- package/src/lib/server/console-runtime.server.ts +6 -40
- package/src/lib/server/deleteBundle.ts +16 -25
- package/src/lib/server/downloadBundle.ts +7 -10
- package/src/lib/server/getBundleChildren.ts +31 -122
- package/src/lib/server/insightsRecovery.ts +55 -0
- package/src/lib/server/insightsUsage.ts +63 -0
- package/src/lib/server/listReleases.ts +109 -44
- package/src/lib/server/releaseReachability.ts +4 -3
- package/src/lib/server/runtime.server.ts +132 -31
- package/src/lib/server/updateFailures.ts +31 -0
- package/src/routeTree.gen.ts +21 -21
- package/src/router.tsx +3 -2
- package/src/routes/-installations-search.ts +32 -8
- package/src/routes/-releases-search.ts +76 -29
- package/src/routes/__root.tsx +10 -4
- package/src/routes/api/bundles/$bundleId/download.ts +2 -5
- package/src/routes/api-keys.tsx +5 -2
- package/src/routes/index.tsx +167 -104
- package/src/routes/insights.tsx +100 -59
- package/src/routes/insights_.distribution.tsx +398 -0
- package/src/routes/installations.tsx +98 -41
- package/src/vite-internal.ts +6 -3
- package/.output/public/assets/HashValueDisplay-CB0Eskit.js +0 -1
- package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +0 -1
- package/.output/public/assets/api-keys-BzKocqRy.js +0 -1
- package/.output/public/assets/api-keys-api-BHcODB7q.js +0 -1
- package/.output/public/assets/card-Dhr_eFYj.js +0 -1
- package/.output/public/assets/chart-no-axes-combined-Dy4WJv2U.js +0 -1
- package/.output/public/assets/composite-Bp98A0Ld.js +0 -1
- package/.output/public/assets/createServerFn-CA8fs7QD.js +0 -3
- package/.output/public/assets/dialog-CUTrcPlB.js +0 -1
- package/.output/public/assets/dist-C_NydL0e.js +0 -1
- package/.output/public/assets/index-DdAz-CXv.js +0 -10
- package/.output/public/assets/input-group-cSOG4wh_.js +0 -1
- package/.output/public/assets/insights-C0PBSZ-n.js +0 -1
- package/.output/public/assets/installations-CE33wgbY.js +0 -2
- package/.output/public/assets/installations-CStZja8x.js +0 -1
- package/.output/public/assets/lazyRouteComponent-Ccp3bwBY.js +0 -1
- package/.output/public/assets/link-CI8idAUi.js +0 -1
- package/.output/public/assets/loader-circle-BoxLrsOu.js +0 -1
- package/.output/public/assets/preload-helper-CQ36nxok.js +0 -1
- package/.output/public/assets/refresh-cw-Bqc72UZG.js +0 -1
- package/.output/public/assets/routes-DGVXdzpw.js +0 -2
- package/.output/public/assets/routes-DTlwOr8I.js +0 -1
- package/.output/public/assets/shield-check-uK3MHWJZ.js +0 -1
- package/.output/public/assets/signing-CMf4aqDO.js +0 -1
- package/.output/public/assets/styles-BCvbtKsm.css +0 -2
- package/.output/public/assets/table-2vcV89QB.js +0 -1
- package/.output/public/assets/useCompositeListItem-CHLITE_4.js +0 -1
- package/.output/public/assets/x-DCd0j8c6.js +0 -1
- package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +0 -484
- package/.output/server/_ssr/api-keys-api-BUPQVSpk.mjs +0 -60
- package/.output/server/_ssr/api-keys-rpc-Cs7tS5_j.mjs +0 -136
- package/.output/server/_ssr/api-rpc-tAupfGQm.mjs +0 -1399
- package/.output/server/_ssr/auth.server-DW71WzsD.mjs +0 -47
- package/.output/server/_ssr/bundle-signing-rpc-BhnBw0-d.mjs +0 -16
- package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +0 -12
- package/.output/server/_ssr/card-BRiPmi0C.mjs +0 -108
- package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
- package/.output/server/_ssr/config.server-afDuAwaG.mjs +0 -368
- package/.output/server/_ssr/databaseJsonValue-d6I3nAS4.mjs +0 -45
- package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
- package/.output/server/_ssr/getBundleChildren-C0vh4ZvE.mjs +0 -50
- package/.output/server/_ssr/insights-BdS364Xu.mjs +0 -460
- package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +0 -303
- package/.output/server/_ssr/installations-CtA59MQG.mjs +0 -29
- package/.output/server/_ssr/routes-CKrrS2q2.mjs +0 -37
- package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +0 -438
- package/.output/server/_ssr/signing-Dz1WkZOf.mjs +0 -133
- package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +0 -97
- package/src/components/features/insights/InsightsBundleReports.tsx +0 -51
- package/src/components/features/signing/BundleSigningPage.tsx +0 -139
- package/src/lib/bundle-signing-api.ts +0 -14
- package/src/lib/bundle-signing-rpc.ts +0 -16
- package/src/lib/server/bundle-signing.server.ts +0 -23
- package/src/routes/signing.tsx +0 -37
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { n as isDatabaseMetadataObject, t as DatabasePluginInputError } from "./databaseJsonValue-d6I3nAS4.mjs";
|
|
2
|
-
import { T as stripBundleArtifactMetadata, c as getAssetBaseStorageUri, d as getManifestStorageUri, l as getBundlePatches, u as getManifestFileHash } from "./dist-CyzPaI5v.mjs";
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/databaseRows-5bCRTxm-.js
|
|
4
|
-
var bundleMetadataToRow = (metadata) => {
|
|
5
|
-
const value = stripBundleArtifactMetadata(metadata);
|
|
6
|
-
if (value === void 0) return {};
|
|
7
|
-
if (!isDatabaseMetadataObject(value)) throw new DatabasePluginInputError("invalid-data");
|
|
8
|
-
return value;
|
|
9
|
-
};
|
|
10
|
-
var releaseRowToRelease = (row) => ({
|
|
11
|
-
id: row.id,
|
|
12
|
-
revision: row.revision,
|
|
13
|
-
channelId: row.channel_id,
|
|
14
|
-
platform: row.platform,
|
|
15
|
-
kind: row.kind,
|
|
16
|
-
bundleId: row.bundle_id,
|
|
17
|
-
strategy: row.strategy,
|
|
18
|
-
targetAppVersion: row.target_app_version,
|
|
19
|
-
fingerprintHash: row.fingerprint_hash,
|
|
20
|
-
enabled: row.enabled,
|
|
21
|
-
shouldForceUpdate: row.should_force_update,
|
|
22
|
-
message: row.message,
|
|
23
|
-
rolloutCohortCount: row.rollout_cohort_count,
|
|
24
|
-
targetCohorts: row.target_cohorts,
|
|
25
|
-
operation: row.operation,
|
|
26
|
-
sourceReleaseId: row.source_release_id,
|
|
27
|
-
createdAtMs: row.created_at_ms,
|
|
28
|
-
updatedAtMs: row.updated_at_ms
|
|
29
|
-
});
|
|
30
|
-
var BundleRowHydrationErrorReason = {
|
|
31
|
-
duplicatePatchId: "duplicate_patch_id",
|
|
32
|
-
orphanPatchOwner: "orphan_patch_owner",
|
|
33
|
-
orphanPatchBase: "orphan_patch_base"
|
|
34
|
-
};
|
|
35
|
-
var BundleRowHydrationError = class extends Error {
|
|
36
|
-
name = "BundleRowHydrationError";
|
|
37
|
-
reason;
|
|
38
|
-
patchId;
|
|
39
|
-
bundleId;
|
|
40
|
-
constructor({ reason, patchId, bundleId }) {
|
|
41
|
-
super(`Cannot hydrate bundle rows: ${reason} for patch "${patchId}" and bundle "${bundleId}".`);
|
|
42
|
-
this.reason = reason;
|
|
43
|
-
this.patchId = patchId;
|
|
44
|
-
this.bundleId = bundleId;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
var bundleToRow = (bundle) => {
|
|
48
|
-
const metadata = bundleMetadataToRow(bundle.metadata);
|
|
49
|
-
return {
|
|
50
|
-
id: bundle.id,
|
|
51
|
-
platform: bundle.platform,
|
|
52
|
-
file_hash: bundle.fileHash,
|
|
53
|
-
git_commit_hash: bundle.gitCommitHash,
|
|
54
|
-
storage_uri: bundle.storageUri,
|
|
55
|
-
archive_byte_size: bundle.archiveByteSize,
|
|
56
|
-
metadata,
|
|
57
|
-
manifest_storage_uri: getManifestStorageUri(bundle),
|
|
58
|
-
manifest_file_hash: getManifestFileHash(bundle),
|
|
59
|
-
asset_base_storage_uri: getAssetBaseStorageUri(bundle)
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
var bundleToPatchRows = (bundle) => getBundlePatches(bundle).map((patch, orderIndex) => ({
|
|
63
|
-
id: `${bundle.id}:${patch.baseBundleId}`,
|
|
64
|
-
bundle_id: bundle.id,
|
|
65
|
-
base_bundle_id: patch.baseBundleId,
|
|
66
|
-
base_file_hash: patch.baseFileHash,
|
|
67
|
-
patch_file_hash: patch.patchFileHash,
|
|
68
|
-
patch_storage_uri: patch.patchStorageUri,
|
|
69
|
-
byte_size: patch.byteSize,
|
|
70
|
-
order_index: orderIndex
|
|
71
|
-
}));
|
|
72
|
-
var comparePatchRows = (left, right) => left.order_index - right.order_index || left.id.localeCompare(right.id);
|
|
73
|
-
var patchRowToArtifact = (row) => ({
|
|
74
|
-
baseBundleId: row.base_bundle_id,
|
|
75
|
-
baseFileHash: row.base_file_hash,
|
|
76
|
-
byteSize: row.byte_size,
|
|
77
|
-
patchFileHash: row.patch_file_hash,
|
|
78
|
-
patchStorageUri: row.patch_storage_uri
|
|
79
|
-
});
|
|
80
|
-
var rowToBundle = (row, patchRows = []) => {
|
|
81
|
-
const patches = patchRows.slice().sort(comparePatchRows).map(patchRowToArtifact);
|
|
82
|
-
return {
|
|
83
|
-
id: row.id,
|
|
84
|
-
platform: row.platform,
|
|
85
|
-
fileHash: row.file_hash,
|
|
86
|
-
gitCommitHash: row.git_commit_hash,
|
|
87
|
-
storageUri: row.storage_uri,
|
|
88
|
-
archiveByteSize: row.archive_byte_size,
|
|
89
|
-
metadata: stripBundleArtifactMetadata(row.metadata),
|
|
90
|
-
manifestStorageUri: row.manifest_storage_uri,
|
|
91
|
-
manifestFileHash: row.manifest_file_hash,
|
|
92
|
-
assetBaseStorageUri: row.asset_base_storage_uri,
|
|
93
|
-
patches
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
var rowsToBundles = (bundleRows, patchRows, referencedBundleRows) => {
|
|
97
|
-
const ownerIds = new Set(bundleRows.map(({ id }) => id));
|
|
98
|
-
const baseIds = new Set(ownerIds);
|
|
99
|
-
for (const row of referencedBundleRows) baseIds.add(row.id);
|
|
100
|
-
const patchIds = /* @__PURE__ */ new Set();
|
|
101
|
-
const patchesByOwner = /* @__PURE__ */ new Map();
|
|
102
|
-
for (const patch of patchRows) {
|
|
103
|
-
if (patchIds.has(patch.id)) throw new BundleRowHydrationError({
|
|
104
|
-
reason: BundleRowHydrationErrorReason.duplicatePatchId,
|
|
105
|
-
patchId: patch.id,
|
|
106
|
-
bundleId: patch.bundle_id
|
|
107
|
-
});
|
|
108
|
-
patchIds.add(patch.id);
|
|
109
|
-
if (!ownerIds.has(patch.bundle_id)) throw new BundleRowHydrationError({
|
|
110
|
-
reason: BundleRowHydrationErrorReason.orphanPatchOwner,
|
|
111
|
-
patchId: patch.id,
|
|
112
|
-
bundleId: patch.bundle_id
|
|
113
|
-
});
|
|
114
|
-
if (!baseIds.has(patch.base_bundle_id)) throw new BundleRowHydrationError({
|
|
115
|
-
reason: BundleRowHydrationErrorReason.orphanPatchBase,
|
|
116
|
-
patchId: patch.id,
|
|
117
|
-
bundleId: patch.base_bundle_id
|
|
118
|
-
});
|
|
119
|
-
const ownerPatches = patchesByOwner.get(patch.bundle_id) ?? [];
|
|
120
|
-
ownerPatches.push(patch);
|
|
121
|
-
patchesByOwner.set(patch.bundle_id, ownerPatches);
|
|
122
|
-
}
|
|
123
|
-
return bundleRows.map((row) => rowToBundle(row, patchesByOwner.get(row.id) ?? []));
|
|
124
|
-
};
|
|
125
|
-
//#endregion
|
|
126
|
-
export { rowsToBundles as a, releaseRowToRelease as i, bundleToPatchRows as n, bundleToRow as r, bundleMetadataToRow as t };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { l as getBundlePatches } from "./dist-CyzPaI5v.mjs";
|
|
2
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/getBundleChildren-C0vh4ZvE.js
|
|
3
|
-
var CHILDREN_QUERY_LIMIT = 100;
|
|
4
|
-
async function collectBundleChildrenByBaseIds(baseBundleIds, deps) {
|
|
5
|
-
const uniqueBaseBundleIds = [...new Set(baseBundleIds.filter(Boolean))];
|
|
6
|
-
const bundlesByBaseId = Object.fromEntries(uniqueBaseBundleIds.map((bundleId) => [bundleId, []]));
|
|
7
|
-
const baseBundles = (await Promise.all(uniqueBaseBundleIds.map((bundleId) => deps.databaseClient.getBundleById(bundleId)))).filter((bundle) => Boolean(bundle));
|
|
8
|
-
const groupMap = /* @__PURE__ */ new Map();
|
|
9
|
-
for (const baseBundle of baseBundles) {
|
|
10
|
-
const existingGroup = groupMap.get(baseBundle.platform);
|
|
11
|
-
if (existingGroup) {
|
|
12
|
-
existingGroup.add(baseBundle.id);
|
|
13
|
-
continue;
|
|
14
|
-
}
|
|
15
|
-
groupMap.set(baseBundle.platform, new Set([baseBundle.id]));
|
|
16
|
-
}
|
|
17
|
-
for (const [platform, bundleIds] of groupMap) {
|
|
18
|
-
const seenBundleIds = /* @__PURE__ */ new Set();
|
|
19
|
-
const seenCursors = /* @__PURE__ */ new Set();
|
|
20
|
-
let after;
|
|
21
|
-
while (true) {
|
|
22
|
-
const page = await deps.databaseClient.getBundles({
|
|
23
|
-
where: { platform },
|
|
24
|
-
limit: CHILDREN_QUERY_LIMIT,
|
|
25
|
-
cursor: after ? { after } : void 0
|
|
26
|
-
});
|
|
27
|
-
for (const bundle of page.data) {
|
|
28
|
-
const matchedParentBundleIds = getBundlePatches(bundle).map((patch) => patch.baseBundleId).filter((bundleId) => bundleIds.has(bundleId));
|
|
29
|
-
if (matchedParentBundleIds.length === 0 || seenBundleIds.has(bundle.id)) continue;
|
|
30
|
-
seenBundleIds.add(bundle.id);
|
|
31
|
-
for (const parentBundleId of matchedParentBundleIds) bundlesByBaseId[parentBundleId]?.push(bundle);
|
|
32
|
-
}
|
|
33
|
-
const pagination = page.pagination;
|
|
34
|
-
const nextCursor = pagination.nextCursor ?? void 0;
|
|
35
|
-
if (!pagination.hasNextPage || !nextCursor || seenCursors.has(nextCursor)) break;
|
|
36
|
-
seenCursors.add(nextCursor);
|
|
37
|
-
after = nextCursor;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return bundlesByBaseId;
|
|
41
|
-
}
|
|
42
|
-
async function getBundleChildren({ baseBundleId }, deps) {
|
|
43
|
-
return (await collectBundleChildrenByBaseIds([baseBundleId], deps))[baseBundleId] ?? [];
|
|
44
|
-
}
|
|
45
|
-
async function getBundleChildCounts(baseBundleIds, deps) {
|
|
46
|
-
const childrenByBaseId = await collectBundleChildrenByBaseIds(baseBundleIds, deps);
|
|
47
|
-
return Object.fromEntries(Object.entries(childrenByBaseId).map(([bundleId, bundles]) => [bundleId, bundles.length]));
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
50
|
-
export { getBundleChildCounts, getBundleChildren };
|
|
@@ -1,460 +0,0 @@
|
|
|
1
|
-
import { r as __toESM } from "../_runtime.mjs";
|
|
2
|
-
import { C as Toggle, J as require_react, S as ToggleGroup, q as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
import { I as ArrowUpRight } from "../_libs/lucide-react.mjs";
|
|
4
|
-
import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
|
|
5
|
-
import { C as cn, S as buttonVariants, _ as Skeleton, n as Input, t as Button$1 } from "./createSsrRpc-DjWNJ0uc.mjs";
|
|
6
|
-
import { m as Link } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
7
|
-
import { c as CardDescription, d as CardTitle, l as CardFooter, o as Card, s as CardContent, u as CardHeader } from "./card-BRiPmi0C.mjs";
|
|
8
|
-
import { a as FieldLabel, i as FieldGroup, t as Field } from "./table-CnZmon_Z.mjs";
|
|
9
|
-
import { i as EventTimestamp, l as useInsightsEventsQuery, m as useReportingInstallationsQuery, n as EventHistoryCard, o as InsightsErrorAlert, p as useInsightsTimeFormat, s as InsightsPageHeader } from "./InsightsPageHeader-Df4Brj8u.mjs";
|
|
10
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/insights-BdS364Xu.js
|
|
11
|
-
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
12
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
13
|
-
var outcomeLabels = {
|
|
14
|
-
applied: "Applied reports",
|
|
15
|
-
recovered: "Recovered-from reports",
|
|
16
|
-
adopted: "Adopted reports"
|
|
17
|
-
};
|
|
18
|
-
function InsightsBundleReports({ selection }) {
|
|
19
|
-
const [cursors, setCursors] = (0, import_react.useState)([void 0]);
|
|
20
|
-
const events = useInsightsEventsQuery({
|
|
21
|
-
...selection,
|
|
22
|
-
cursor: cursors.at(-1),
|
|
23
|
-
limit: 50
|
|
24
|
-
}, true);
|
|
25
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventHistoryCard, {
|
|
26
|
-
title: outcomeLabels[selection.bundle.outcome],
|
|
27
|
-
error: events.error,
|
|
28
|
-
eventsLocation: { eventsBefore: selection.beforeReceivedAtMs },
|
|
29
|
-
history: events.data,
|
|
30
|
-
isFetching: events.isFetching,
|
|
31
|
-
isLoading: events.isLoading,
|
|
32
|
-
onNext: () => {
|
|
33
|
-
const cursor = events.data?.nextCursor;
|
|
34
|
-
if (cursor) setCursors((previous) => [...previous, cursor]);
|
|
35
|
-
},
|
|
36
|
-
onPrevious: () => setCursors((previous) => previous.slice(0, -1)),
|
|
37
|
-
onRefresh: () => {
|
|
38
|
-
events.refetch();
|
|
39
|
-
},
|
|
40
|
-
pageNumber: cursors.length,
|
|
41
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
42
|
-
className: "text-sm text-muted-foreground",
|
|
43
|
-
children: "Reports for the selected bundle and the measured period. New reports appear after refreshing the overview."
|
|
44
|
-
})
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
var toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
48
|
-
variants: {
|
|
49
|
-
variant: {
|
|
50
|
-
default: "bg-transparent",
|
|
51
|
-
outline: "border border-input bg-transparent hover:bg-muted"
|
|
52
|
-
},
|
|
53
|
-
size: {
|
|
54
|
-
default: "h-7 min-w-7 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
55
|
-
sm: "h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
56
|
-
lg: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
defaultVariants: {
|
|
60
|
-
variant: "default",
|
|
61
|
-
size: "default"
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
var ToggleGroupContext = import_react.createContext({
|
|
65
|
-
size: "default",
|
|
66
|
-
variant: "default",
|
|
67
|
-
spacing: 2,
|
|
68
|
-
orientation: "horizontal"
|
|
69
|
-
});
|
|
70
|
-
function ToggleGroup$1({ className, variant, size, spacing = 2, orientation = "horizontal", children, ...props }) {
|
|
71
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroup, {
|
|
72
|
-
"data-slot": "toggle-group",
|
|
73
|
-
"data-variant": variant,
|
|
74
|
-
"data-size": size,
|
|
75
|
-
"data-spacing": spacing,
|
|
76
|
-
"data-orientation": orientation,
|
|
77
|
-
style: { "--gap": spacing },
|
|
78
|
-
className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch", className),
|
|
79
|
-
...props,
|
|
80
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupContext.Provider, {
|
|
81
|
-
value: {
|
|
82
|
-
variant,
|
|
83
|
-
size,
|
|
84
|
-
spacing,
|
|
85
|
-
orientation
|
|
86
|
-
},
|
|
87
|
-
children
|
|
88
|
-
})
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function ToggleGroupItem({ className, children, variant = "default", size = "default", ...props }) {
|
|
92
|
-
const context = import_react.useContext(ToggleGroupContext);
|
|
93
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toggle, {
|
|
94
|
-
"data-slot": "toggle-group-item",
|
|
95
|
-
"data-variant": context.variant || variant,
|
|
96
|
-
"data-size": context.size || size,
|
|
97
|
-
"data-spacing": context.spacing,
|
|
98
|
-
className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
|
|
99
|
-
variant: context.variant || variant,
|
|
100
|
-
size: context.size || size
|
|
101
|
-
}), className),
|
|
102
|
-
...props,
|
|
103
|
-
children
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
var windows = [
|
|
107
|
-
{
|
|
108
|
-
value: "24h",
|
|
109
|
-
label: "24 hours",
|
|
110
|
-
shortLabel: "24h"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
value: "7d",
|
|
114
|
-
label: "7 days",
|
|
115
|
-
shortLabel: "7d"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
value: "30d",
|
|
119
|
-
label: "30 days",
|
|
120
|
-
shortLabel: "30d"
|
|
121
|
-
}
|
|
122
|
-
];
|
|
123
|
-
function InsightsControls({ onWindowChange, onScopeChange, scope, window }) {
|
|
124
|
-
const [platform, setPlatform] = (0, import_react.useState)(scope.platform);
|
|
125
|
-
const [channel, setChannel] = (0, import_react.useState)(scope.channel);
|
|
126
|
-
const [bundleId, setBundleId] = (0, import_react.useState)(scope.bundleId ?? "");
|
|
127
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
128
|
-
"aria-label": "Insights controls",
|
|
129
|
-
className: "flex flex-col gap-4",
|
|
130
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("form", {
|
|
131
|
-
onSubmit: (event) => {
|
|
132
|
-
event.preventDefault();
|
|
133
|
-
onScopeChange({
|
|
134
|
-
platform,
|
|
135
|
-
channel,
|
|
136
|
-
bundleId: bundleId || void 0
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FieldGroup, {
|
|
140
|
-
className: "items-end sm:flex-row",
|
|
141
|
-
children: [
|
|
142
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Field, {
|
|
143
|
-
className: "w-full sm:w-auto",
|
|
144
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldLabel, { children: "Platform" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ToggleGroup$1, {
|
|
145
|
-
"aria-label": "Platform",
|
|
146
|
-
value: [platform],
|
|
147
|
-
onValueChange: (value) => {
|
|
148
|
-
if (value[0] === "ios" || value[0] === "android") setPlatform(value[0]);
|
|
149
|
-
},
|
|
150
|
-
spacing: 0,
|
|
151
|
-
variant: "outline",
|
|
152
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupItem, {
|
|
153
|
-
className: "h-11 lg:h-8",
|
|
154
|
-
value: "ios",
|
|
155
|
-
children: "iOS"
|
|
156
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupItem, {
|
|
157
|
-
className: "h-11 lg:h-8",
|
|
158
|
-
value: "android",
|
|
159
|
-
children: "Android"
|
|
160
|
-
})]
|
|
161
|
-
})]
|
|
162
|
-
}),
|
|
163
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Field, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldLabel, {
|
|
164
|
-
htmlFor: "insights-channel",
|
|
165
|
-
children: "Channel"
|
|
166
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
|
|
167
|
-
className: "h-11 lg:h-8",
|
|
168
|
-
id: "insights-channel",
|
|
169
|
-
value: channel,
|
|
170
|
-
onChange: (event) => setChannel(event.target.value),
|
|
171
|
-
required: true,
|
|
172
|
-
maxLength: 1024
|
|
173
|
-
})] }),
|
|
174
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Field, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldLabel, {
|
|
175
|
-
htmlFor: "insights-bundle",
|
|
176
|
-
children: "Bundle ID (optional)"
|
|
177
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
|
|
178
|
-
className: "h-11 lg:h-8",
|
|
179
|
-
id: "insights-bundle",
|
|
180
|
-
placeholder: "Select a bundle by ID",
|
|
181
|
-
value: bundleId,
|
|
182
|
-
onChange: (event) => setBundleId(event.target.value),
|
|
183
|
-
maxLength: 1024
|
|
184
|
-
})] }),
|
|
185
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
186
|
-
className: "h-11 w-full sm:w-auto lg:h-8",
|
|
187
|
-
type: "submit",
|
|
188
|
-
variant: "outline",
|
|
189
|
-
children: "Apply filters"
|
|
190
|
-
})
|
|
191
|
-
]
|
|
192
|
-
})
|
|
193
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Field, {
|
|
194
|
-
orientation: "horizontal",
|
|
195
|
-
className: "w-full",
|
|
196
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldLabel, {
|
|
197
|
-
className: "sr-only",
|
|
198
|
-
children: "Reporting period"
|
|
199
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroup$1, {
|
|
200
|
-
"aria-label": "Reporting period",
|
|
201
|
-
className: "w-full sm:w-fit",
|
|
202
|
-
onValueChange: (value) => {
|
|
203
|
-
if (value[0]) onWindowChange(value[0]);
|
|
204
|
-
},
|
|
205
|
-
spacing: 0,
|
|
206
|
-
size: "lg",
|
|
207
|
-
value: [window],
|
|
208
|
-
variant: "outline",
|
|
209
|
-
children: windows.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupItem, {
|
|
210
|
-
"aria-label": item.label,
|
|
211
|
-
className: "h-11 flex-1 px-4 sm:flex-none lg:h-8 lg:px-2.5",
|
|
212
|
-
value: item.value,
|
|
213
|
-
children: item.shortLabel
|
|
214
|
-
}, item.value))
|
|
215
|
-
})]
|
|
216
|
-
})]
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
var windowCopy = {
|
|
220
|
-
"24h": "the last 24 hours",
|
|
221
|
-
"7d": "the last 7 days",
|
|
222
|
-
"30d": "the last 30 days"
|
|
223
|
-
};
|
|
224
|
-
function InsightsOverview(props) {
|
|
225
|
-
const dateTimeFormat = useInsightsTimeFormat();
|
|
226
|
-
if (props.status === "loading") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
|
|
227
|
-
"aria-label": "Loading reporting installations",
|
|
228
|
-
className: "shadow-sm",
|
|
229
|
-
children: [
|
|
230
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, {
|
|
231
|
-
className: "px-4 pt-4 pb-2 sm:px-6 sm:pt-6",
|
|
232
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-4 w-40" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-3 w-full max-w-md" })]
|
|
233
|
-
}),
|
|
234
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, {
|
|
235
|
-
className: "px-4 pb-6 sm:px-6",
|
|
236
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-12 w-28" })
|
|
237
|
-
}),
|
|
238
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardFooter, {
|
|
239
|
-
className: "border-t px-4 py-3 sm:px-6",
|
|
240
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-8 w-full max-w-sm" })
|
|
241
|
-
})
|
|
242
|
-
]
|
|
243
|
-
});
|
|
244
|
-
if (props.status === "error") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsErrorAlert, {
|
|
245
|
-
error: props.error,
|
|
246
|
-
fallbackTitle: "Reporting installations unavailable"
|
|
247
|
-
});
|
|
248
|
-
const { active } = props;
|
|
249
|
-
const bundle = active.bundle;
|
|
250
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
251
|
-
"aria-labelledby": "reporting-installations-heading",
|
|
252
|
-
className: "flex flex-col gap-4",
|
|
253
|
-
children: [
|
|
254
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
|
|
255
|
-
className: "min-w-0 overflow-hidden shadow-sm",
|
|
256
|
-
children: [
|
|
257
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, {
|
|
258
|
-
className: "gap-2 px-4 pt-4 pb-2 sm:px-6 sm:pt-6",
|
|
259
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, {
|
|
260
|
-
className: "text-sm font-medium",
|
|
261
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
|
|
262
|
-
id: "reporting-installations-heading",
|
|
263
|
-
children: "Reporting installations"
|
|
264
|
-
})
|
|
265
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardDescription, { children: [
|
|
266
|
-
active.platform === "ios" ? "iOS" : "Android",
|
|
267
|
-
" · ",
|
|
268
|
-
active.channel,
|
|
269
|
-
" ·",
|
|
270
|
-
" ",
|
|
271
|
-
windowCopy[active.window],
|
|
272
|
-
". Installations are counted by their last report received."
|
|
273
|
-
] })]
|
|
274
|
-
}),
|
|
275
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, {
|
|
276
|
-
className: "px-4 pt-2 pb-5 sm:px-6 sm:pb-6",
|
|
277
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
278
|
-
className: "text-4xl font-semibold tracking-tight tabular-nums sm:text-5xl",
|
|
279
|
-
children: active.reportingInstallations.count.toLocaleString()
|
|
280
|
-
})
|
|
281
|
-
}),
|
|
282
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardFooter, {
|
|
283
|
-
className: "flex flex-wrap items-center justify-between gap-3 border-t bg-muted/15 px-4 py-3 sm:px-6",
|
|
284
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
|
|
285
|
-
className: "min-w-0 text-xs",
|
|
286
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
|
|
287
|
-
className: "text-muted-foreground",
|
|
288
|
-
children: "Measured at"
|
|
289
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
|
|
290
|
-
className: "font-medium tabular-nums",
|
|
291
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventTimestamp, {
|
|
292
|
-
formatter: dateTimeFormat,
|
|
293
|
-
touch: true,
|
|
294
|
-
value: active.reportingInstallations.measuredAtMs
|
|
295
|
-
})
|
|
296
|
-
})]
|
|
297
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
|
|
298
|
-
className: buttonVariants({
|
|
299
|
-
className: "h-11 px-3 lg:h-8",
|
|
300
|
-
variant: "outline"
|
|
301
|
-
}),
|
|
302
|
-
to: "/installations",
|
|
303
|
-
children: ["View events", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowUpRight, {
|
|
304
|
-
"aria-hidden": "true",
|
|
305
|
-
"data-icon": "inline-end"
|
|
306
|
-
})]
|
|
307
|
-
})]
|
|
308
|
-
})
|
|
309
|
-
]
|
|
310
|
-
}),
|
|
311
|
-
bundle ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card, {
|
|
312
|
-
className: "min-w-0 overflow-hidden shadow-sm",
|
|
313
|
-
children: [
|
|
314
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardHeader, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardTitle, { children: "Selected bundle" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardDescription, {
|
|
315
|
-
className: "break-all",
|
|
316
|
-
children: bundle.bundleId
|
|
317
|
-
})] }),
|
|
318
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", {
|
|
319
|
-
className: "flex flex-col gap-5",
|
|
320
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
321
|
-
className: "flex flex-wrap items-center justify-between gap-3",
|
|
322
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
|
|
323
|
-
className: "text-sm",
|
|
324
|
-
children: "Selected bundle installations"
|
|
325
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
|
|
326
|
-
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
327
|
-
children: bundle.reportingInstallations.count.toLocaleString()
|
|
328
|
-
})] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
329
|
-
className: "text-xs text-muted-foreground",
|
|
330
|
-
children: [
|
|
331
|
-
"Measured at",
|
|
332
|
-
" ",
|
|
333
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventTimestamp, {
|
|
334
|
-
formatter: dateTimeFormat,
|
|
335
|
-
touch: true,
|
|
336
|
-
value: bundle.reportingInstallations.measuredAtMs
|
|
337
|
-
})
|
|
338
|
-
]
|
|
339
|
-
})]
|
|
340
|
-
}), [
|
|
341
|
-
["applied", bundle.appliedReports],
|
|
342
|
-
["recovered", bundle.recoveredReports],
|
|
343
|
-
["adopted", bundle.adoptedReports]
|
|
344
|
-
].map(([outcome, measurement]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
345
|
-
className: "flex flex-wrap items-center justify-between gap-3",
|
|
346
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
347
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
|
|
348
|
-
className: "text-sm",
|
|
349
|
-
children: outcomeLabels[outcome]
|
|
350
|
-
}),
|
|
351
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
|
|
352
|
-
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
353
|
-
children: measurement.count.toLocaleString()
|
|
354
|
-
}),
|
|
355
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
356
|
-
className: "mt-1 text-xs text-muted-foreground",
|
|
357
|
-
children: [
|
|
358
|
-
"Measured at",
|
|
359
|
-
" ",
|
|
360
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventTimestamp, {
|
|
361
|
-
formatter: dateTimeFormat,
|
|
362
|
-
touch: true,
|
|
363
|
-
value: measurement.measuredAtMs
|
|
364
|
-
})
|
|
365
|
-
]
|
|
366
|
-
})
|
|
367
|
-
] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
|
|
368
|
-
className: "h-11 lg:h-8",
|
|
369
|
-
variant: "outline",
|
|
370
|
-
onClick: () => props.onOutcomeSelect({
|
|
371
|
-
bundle: {
|
|
372
|
-
platform: active.platform,
|
|
373
|
-
channel: active.channel,
|
|
374
|
-
bundleId: bundle.bundleId,
|
|
375
|
-
outcome
|
|
376
|
-
},
|
|
377
|
-
sinceMs: active.sinceMs,
|
|
378
|
-
beforeReceivedAtMs: active.beforeReceivedAtMs
|
|
379
|
-
}),
|
|
380
|
-
children: [
|
|
381
|
-
"View ",
|
|
382
|
-
outcome,
|
|
383
|
-
" reports",
|
|
384
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowUpRight, {
|
|
385
|
-
"aria-hidden": "true",
|
|
386
|
-
"data-icon": "inline-end"
|
|
387
|
-
})
|
|
388
|
-
]
|
|
389
|
-
})]
|
|
390
|
-
}, outcome))]
|
|
391
|
-
}) }),
|
|
392
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
393
|
-
className: "text-xs text-muted-foreground",
|
|
394
|
-
children: "Installation counts are independent live measurements. Outcome counts are accepted reports, not unique devices or update attempts. Recovery reports identify the bundle recovered from."
|
|
395
|
-
}) })
|
|
396
|
-
]
|
|
397
|
-
}) : null,
|
|
398
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
399
|
-
className: "text-xs text-muted-foreground",
|
|
400
|
-
children: "Offline installations, opt-outs, and reports that did not reach the server are absent."
|
|
401
|
-
})
|
|
402
|
-
]
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
function InsightsPage() {
|
|
406
|
-
const [window, setWindow] = (0, import_react.useState)("30d");
|
|
407
|
-
const [scope, setScope] = (0, import_react.useState)({
|
|
408
|
-
platform: "ios",
|
|
409
|
-
channel: "production"
|
|
410
|
-
});
|
|
411
|
-
const [selection, setSelection] = (0, import_react.useState)(null);
|
|
412
|
-
const active = useReportingInstallationsQuery({
|
|
413
|
-
...scope,
|
|
414
|
-
window
|
|
415
|
-
});
|
|
416
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
417
|
-
className: "flex h-svh min-h-0 flex-col",
|
|
418
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsPageHeader, { view: "overview" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
419
|
-
className: "min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6",
|
|
420
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
421
|
-
className: "mx-auto flex w-full max-w-4xl flex-col gap-4 sm:gap-6",
|
|
422
|
-
children: [
|
|
423
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsControls, {
|
|
424
|
-
scope,
|
|
425
|
-
onScopeChange: (next) => {
|
|
426
|
-
setScope(next);
|
|
427
|
-
setSelection(null);
|
|
428
|
-
},
|
|
429
|
-
onWindowChange: (next) => {
|
|
430
|
-
setWindow(next);
|
|
431
|
-
setSelection(null);
|
|
432
|
-
},
|
|
433
|
-
window
|
|
434
|
-
}),
|
|
435
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
436
|
-
className: "h-11 self-end lg:h-8",
|
|
437
|
-
variant: "outline",
|
|
438
|
-
disabled: active.isFetching,
|
|
439
|
-
onClick: () => {
|
|
440
|
-
setSelection(null);
|
|
441
|
-
active.refetch();
|
|
442
|
-
},
|
|
443
|
-
children: "Refresh overview"
|
|
444
|
-
}),
|
|
445
|
-
active.isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsOverview, { status: "loading" }) : active.error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsOverview, {
|
|
446
|
-
status: "error",
|
|
447
|
-
error: active.error
|
|
448
|
-
}) : active.data ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsOverview, {
|
|
449
|
-
status: "success",
|
|
450
|
-
active: active.data,
|
|
451
|
-
onOutcomeSelect: setSelection
|
|
452
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsOverview, { status: "loading" }),
|
|
453
|
-
selection ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InsightsBundleReports, { selection }, JSON.stringify(selection)) : null
|
|
454
|
-
]
|
|
455
|
-
})
|
|
456
|
-
})]
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
//#endregion
|
|
460
|
-
export { InsightsPage as component };
|