@allurereport/web-dashboard 3.0.0 → 3.1.0
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/dist/multi/app-7b5d6350b95318ff266b.js +2 -0
- package/dist/multi/{app-f127796d4bf148c47fcc.js.LICENSE.txt → app-7b5d6350b95318ff266b.js.LICENSE.txt} +7 -0
- package/dist/multi/manifest.json +21 -21
- package/dist/multi/styles-aac7a63204080ccd695a.css +8 -0
- package/dist/single/app-97adb87875ceffb31341.js +2 -0
- package/dist/single/{app-1766f8faf3972520c61c.js.LICENSE.txt → app-97adb87875ceffb31341.js.LICENSE.txt} +7 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +7 -7
- package/src/assets/scss/palette.scss +391 -391
- package/src/components/Dashboard/index.tsx +5 -3
- package/src/components/Header/index.tsx +5 -2
- package/src/index.html +12 -12
- package/src/index.tsx +0 -2
- package/src/locales/ua.json +0 -1
- package/dist/multi/app-f127796d4bf148c47fcc.js +0 -2
- package/dist/multi/styles-dce86bbf4d1dcaa5b42b.css +0 -8
- package/dist/single/app-1766f8faf3972520c61c.js +0 -2
- package/src/stores/theme.ts +0 -32
- /package/dist/multi/{173.app-f127796d4bf148c47fcc.js → 173.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{174.app-f127796d4bf148c47fcc.js → 174.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{252.app-f127796d4bf148c47fcc.js → 252.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{282.app-f127796d4bf148c47fcc.js → 282.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{29.app-f127796d4bf148c47fcc.js → 29.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{416.app-f127796d4bf148c47fcc.js → 416.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{527.app-f127796d4bf148c47fcc.js → 527.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{600.app-f127796d4bf148c47fcc.js → 600.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{605.app-f127796d4bf148c47fcc.js → 605.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{638.app-f127796d4bf148c47fcc.js → 638.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{672.app-f127796d4bf148c47fcc.js → 672.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{686.app-f127796d4bf148c47fcc.js → 686.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{725.app-f127796d4bf148c47fcc.js → 725.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{741.app-f127796d4bf148c47fcc.js → 741.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{755.app-f127796d4bf148c47fcc.js → 755.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{894.app-f127796d4bf148c47fcc.js → 894.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{91.app-f127796d4bf148c47fcc.js → 91.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{943.app-f127796d4bf148c47fcc.js → 943.app-7b5d6350b95318ff266b.js} +0 -0
- /package/dist/multi/{980.app-f127796d4bf148c47fcc.js → 980.app-7b5d6350b95318ff266b.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
2
2
|
import { ChartType } from "@allurereport/charts-api";
|
|
3
|
-
import { type UIChartData } from "@allurereport/web-commons";
|
|
3
|
+
import { type UIChartData, themeStore } from "@allurereport/web-commons";
|
|
4
4
|
import {
|
|
5
5
|
CurrentStatusChartWidget,
|
|
6
6
|
DurationDynamicsChartWidget,
|
|
@@ -20,13 +20,15 @@ import {
|
|
|
20
20
|
TrSeveritiesChartWidget,
|
|
21
21
|
TreeMapChartWidget,
|
|
22
22
|
} from "@allurereport/web-components";
|
|
23
|
+
import { computed } from "@preact/signals";
|
|
23
24
|
import { useEffect } from "preact/hooks";
|
|
24
25
|
import { dashboardStore, fetchDashboardData } from "@/stores/dashboard";
|
|
25
26
|
import { currentEnvironment, fetchEnvironments } from "@/stores/env";
|
|
26
27
|
import { useI18n } from "@/stores/locale";
|
|
27
|
-
import { themeStore } from "@/stores/theme";
|
|
28
28
|
import * as styles from "./styles.scss";
|
|
29
29
|
|
|
30
|
+
const currentTheme = computed(() => themeStore.value.current);
|
|
31
|
+
|
|
30
32
|
const getChartWidgetByType = (
|
|
31
33
|
chartData: UIChartData,
|
|
32
34
|
{ t, empty }: Record<string, (key: string, options?: any) => string>,
|
|
@@ -211,7 +213,7 @@ export const Dashboard = () => {
|
|
|
211
213
|
}, []);
|
|
212
214
|
|
|
213
215
|
return (
|
|
214
|
-
<ThemeProvider theme={
|
|
216
|
+
<ThemeProvider theme={currentTheme.value}>
|
|
215
217
|
<Loadable
|
|
216
218
|
source={dashboardStore}
|
|
217
219
|
renderLoader={() => <PageLoader />}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { themeStore, toggleUserTheme } from "@allurereport/web-commons";
|
|
1
2
|
import { LanguagePicker, ThemeButton } from "@allurereport/web-components";
|
|
3
|
+
import { computed } from "@preact/signals";
|
|
2
4
|
import type { ClassValue } from "clsx";
|
|
3
5
|
import clsx from "clsx";
|
|
4
6
|
import { currentLocale, setLocale } from "@/stores/locale";
|
|
5
|
-
import { getTheme, themeStore, toggleTheme } from "@/stores/theme";
|
|
6
7
|
import { EnvironmentPicker } from "../EnvironmentPicker";
|
|
7
8
|
import * as styles from "./styles.scss";
|
|
8
9
|
|
|
@@ -10,13 +11,15 @@ interface HeaderProps {
|
|
|
10
11
|
className?: ClassValue;
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
const selectedTheme = computed(() => themeStore.value.selected);
|
|
15
|
+
|
|
13
16
|
export const Header = ({ className }: HeaderProps) => {
|
|
14
17
|
return (
|
|
15
18
|
<div className={clsx(styles.above, className)}>
|
|
16
19
|
<div className={styles.right}>
|
|
17
20
|
<EnvironmentPicker />
|
|
18
21
|
<LanguagePicker locale={currentLocale.value} setLocale={setLocale} />
|
|
19
|
-
<ThemeButton theme={
|
|
22
|
+
<ThemeButton theme={selectedTheme.value} toggleTheme={toggleUserTheme} />
|
|
20
23
|
</div>
|
|
21
24
|
</div>
|
|
22
25
|
);
|
package/src/index.html
CHANGED
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
<title>Allure Dashboard</title>
|
|
5
5
|
<link rel="icon" href="data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M22.232 4.662a3.6 3.6 0 0 1 5.09.035c2.855 2.894 4.662 6.885 4.662 11.295a3.6 3.6 0 0 1-7.2 0c0-2.406-.981-4.61-2.587-6.24a3.6 3.6 0 0 1 .035-5.09Z' fill='url(%23a)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.392 3.6a3.6 3.6 0 0 1 3.6-3.6c4.41 0 8.401 1.807 11.296 4.662a3.6 3.6 0 1 1-5.056 5.126C20.602 8.18 18.398 7.2 15.992 7.2a3.6 3.6 0 0 1-3.6-3.6Z' fill='url(%23b)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 15.992C0 7.157 7.157 0 15.992 0a3.6 3.6 0 0 1 0 7.2A8.789 8.789 0 0 0 7.2 15.992c0 2.406.981 4.61 2.588 6.24a3.6 3.6 0 0 1-5.126 5.056C1.807 24.393 0 20.402 0 15.992Z' fill='url(%23c)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.661 22.232a3.6 3.6 0 0 1 5.091-.035c1.63 1.606 3.834 2.587 6.24 2.587a3.6 3.6 0 0 1 0 7.2c-4.41 0-8.401-1.807-11.295-4.661a3.6 3.6 0 0 1-.036-5.091Z' fill='url(%23d)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M28.384 12.392a3.6 3.6 0 0 1 3.6 3.6c0 8.835-7.157 15.992-15.992 15.992a3.6 3.6 0 0 1 0-7.2 8.789 8.789 0 0 0 8.792-8.792 3.6 3.6 0 0 1 3.6-3.6Z' fill='url(%23e)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M28.385 12.392a3.6 3.6 0 0 1 3.6 3.6v12.392a3.6 3.6 0 0 1-7.2 0V15.992a3.6 3.6 0 0 1 3.6-3.6Z' fill='url(%23f)'/%3E%3Cg clip-path='url(%23g)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M22.232 4.662a3.6 3.6 0 0 1 5.091.035c2.855 2.894 4.662 6.885 4.662 11.295a3.6 3.6 0 0 1-7.2 0c0-2.406-.982-4.61-2.588-6.24a3.6 3.6 0 0 1 .035-5.09Z' fill='url(%23h)'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='a' x1='26.4' y1='9.6' x2='28.8' y2='15' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%237E22CE'/%3E%3Cstop offset='1' stop-color='%238B5CF6'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='26.8' y1='9.4' x2='17.8' y2='3.6' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23EF4444'/%3E%3Cstop offset='1' stop-color='%23DC2626'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' x1='3.6' y1='14' x2='5.4' y2='24.8' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%2322C55E'/%3E%3Cstop offset='1' stop-color='%2315803D'/%3E%3C/linearGradient%3E%3ClinearGradient id='d' x1='4.8' y1='22.2' x2='14.4' y2='29.2' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%2394A3B8'/%3E%3Cstop offset='.958' stop-color='%2364748B'/%3E%3Cstop offset='1' stop-color='%2364748B'/%3E%3C/linearGradient%3E%3ClinearGradient id='e' x1='28.4' y1='22.173' x2='22.188' y2='28.384' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D97706'/%3E%3Cstop offset='1' stop-color='%23FBBF24'/%3E%3C/linearGradient%3E%3ClinearGradient id='f' x1='29.2' y1='54.4' x2='30.626' y2='54.256' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23FBBF24'/%3E%3Cstop offset='1' stop-color='%23FBBF24'/%3E%3C/linearGradient%3E%3ClinearGradient id='h' x1='26.4' y1='9.6' x2='28.8' y2='15' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%237E22CE'/%3E%3Cstop offset='1' stop-color='%238B5CF6'/%3E%3C/linearGradient%3E%3CclipPath id='g'%3E%3Cpath fill='%23fff' transform='translate(24.8 12)' d='M0 0h7.2v8H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E" />
|
|
6
6
|
<base href="http://localhost:8080" />
|
|
7
|
+
<script>
|
|
8
|
+
window.allureReportOptions = {
|
|
9
|
+
"reportName": "Allure Report",
|
|
10
|
+
"logo": "",
|
|
11
|
+
"theme": "light",
|
|
12
|
+
"reportLanguage": "en",
|
|
13
|
+
"createdAt": 1739819870336,
|
|
14
|
+
"reportUuid": "51b36daf-614b-409c-b6a2-e8e401b2c145",
|
|
15
|
+
"layout": [],
|
|
16
|
+
"allureVersion": "3.0.0-beta.8"
|
|
17
|
+
};
|
|
18
|
+
</script>
|
|
7
19
|
</head>
|
|
8
20
|
<body>
|
|
9
21
|
<div id="app"></div>
|
|
@@ -20,18 +32,6 @@
|
|
|
20
32
|
|
|
21
33
|
window.document.head.appendChild(baseEl);
|
|
22
34
|
</script>
|
|
23
|
-
<script>
|
|
24
|
-
window.allureReportOptions = {
|
|
25
|
-
"reportName": "Allure Report",
|
|
26
|
-
"logo": "",
|
|
27
|
-
"theme": "light",
|
|
28
|
-
"reportLanguage": "en",
|
|
29
|
-
"createdAt": 1739819870336,
|
|
30
|
-
"reportUuid": "51b36daf-614b-409c-b6a2-e8e401b2c145",
|
|
31
|
-
"layout": [],
|
|
32
|
-
"allureVersion": "3.0.0-beta.8"
|
|
33
|
-
};
|
|
34
|
-
</script>
|
|
35
35
|
<script async>
|
|
36
36
|
window.allureReportDataReady = true;
|
|
37
37
|
</script>
|
package/src/index.tsx
CHANGED
|
@@ -4,7 +4,6 @@ import { render } from "preact";
|
|
|
4
4
|
import "@/assets/scss/index.scss";
|
|
5
5
|
import { BaseLayout } from "@/components/BaseLayout";
|
|
6
6
|
import { getLocale, waitForI18next } from "@/stores/locale";
|
|
7
|
-
import { getTheme } from "@/stores/theme";
|
|
8
7
|
import { isMac } from "@/utils/isMac";
|
|
9
8
|
import * as styles from "./styles.scss";
|
|
10
9
|
|
|
@@ -26,7 +25,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
26
25
|
await waitForI18next;
|
|
27
26
|
if (globalThis) {
|
|
28
27
|
await getLocale();
|
|
29
|
-
getTheme();
|
|
30
28
|
}
|
|
31
29
|
await ensureReportDataReady();
|
|
32
30
|
|
package/src/locales/ua.json
CHANGED