-
Notifications
You must be signed in to change notification settings - Fork 24
/
index-app0.js
110 lines (98 loc) · 3.13 KB
/
index-app0.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import React from "react";
import ReactDOM from "react-dom";
import {Grid, Row, Col} from "patternfly-react";
import PluginContainer from "ui/PageTitle";
import registerServiceWorker from "registerServiceWorker";
import {setCurrentLocale} from "@entando/utils";
// state manager (Redux)
import {Provider} from "react-redux";
import store from "state/store";
// IntlProvider
import {IntlProvider} from "react-intl";
// use en locale by default
import enLocale from "locales/en";
import plugin from "./index";
import "./sass/index.css";
import "patternfly/dist/css/patternfly.min.css";
import "patternfly/dist/css/patternfly-additions.min.css";
import "react-bootstrap-typeahead/css/Typeahead.css";
import DashboardConfigAddPage from "ui/dashboard-config/add/components/DashboardConfigAddPage";
import DashboardConfigPageContainer from "ui/dashboard-config/list/containers/DashboardConfigPageContainer";
import DashboardTable from "ui/widgets/dashboard-table/components/DashboardTable";
import DashboardLineChart from "ui/widgets/charts/line-chart/components/DashboardLineChart";
import DashboardBarChart from "ui/widgets/charts/bar-chart/components/DashboardBarChart";
import DashboardDonutChart from "ui/widgets/charts/donut-chart/components/DashboardDonutChart";
import DashboardGaugeChart from "ui/widgets/charts/gauge-chart/components/DashboardGaugeChart";
import DashboardPieChart from "ui/widgets/charts/pie-chart/components/DashboardPieChart";
import DashboardMap from "ui/widgets/geolocalization/components/DashboardMap";
const mappedMessages = Object.keys(enLocale.messages).reduce((acc, key) => {
acc[`plugin.${plugin.id}.${key}`] = enLocale.messages[key];
return acc;
}, {});
setCurrentLocale(enLocale);
// exporting for tests
export default ReactDOM.render(
<Provider store={store}>
<IntlProvider locale={enLocale.locale} messages={mappedMessages}>
<Grid fluid>
<Row>
<Col xs={12}>
<DashboardMap />
</Col>
</Row>
<Row>
<Col xs={12}>
<DashboardPieChart />
</Col>
</Row>
<Row>
<Col xs={12}>
<DashboardGaugeChart />
</Col>
</Row>
<Row>
<Col xs={12}>
<DashboardDonutChart />
</Col>
</Row>
<Row>
<Col xs={12}>
<DashboardBarChart />
</Col>
</Row>
<Row>
<Col xs={12}>
<DashboardLineChart />
</Col>
</Row>
<Row>
<Col xs={12}>
<PluginContainer titleId="plugin.title" helpId="ConfigPage.help" />
</Col>
</Row>
<Row>
<Col xs={12}>
<DashboardConfigPageContainer />
</Col>
</Row>
<Row>
<Col xs={12}>
<DashboardConfigAddPage />
</Col>
</Row>
<Row>
<Col xs={12}>
<hr />
</Col>
</Row>
<Row>
<Col xs={12}>
<DashboardTable />
</Col>
</Row>
</Grid>
</IntlProvider>
</Provider>,
document.getElementById("root")
);
registerServiceWorker();