File tree 5 files changed +13
-24
lines changed
microfrontends/fn_dashboard
5 files changed +13
-24
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ executors:
10
10
docker :
11
11
- image : cimg/node:22.7.0
12
12
working_directory : ~/frontend
13
+ resource_class : large
13
14
14
15
jobs :
15
16
go-mod-install :
Original file line number Diff line number Diff line change @@ -41,16 +41,6 @@ export const fnStateProps: FnStateProp[] = [
41
41
'version' ,
42
42
] ;
43
43
44
- export const fnPropsMappedFromState : readonly FnPropMappedFromState [ ] = [
45
- 'FNDashboard' ,
46
- 'hiddenVariables' ,
47
- 'mode' ,
48
- 'uid' ,
49
- 'queryParams' ,
50
- 'slug' ,
51
- 'version' ,
52
- ] as const ;
53
-
54
44
const INITIAL_MODE = GrafanaThemeType . Light ;
55
45
56
46
export const FN_STATE_KEY = 'fnGlobalState' ;
Original file line number Diff line number Diff line change 1
- import { pick } from 'lodash' ;
2
1
import { FC , useMemo } from 'react' ;
3
2
4
- import { FnPropMappedFromState , fnPropsMappedFromState } from 'app/core/reducers/fn-slice' ;
5
- import { StoreState , useSelector } from 'app/types' ;
3
+ import { FnGlobalState , FnPropMappedFromState } from 'app/core/reducers/fn-slice' ;
4
+ import { useSelector } from 'app/types' ;
6
5
7
6
import { FnAppProvider } from '../fn-app-provider' ;
8
7
import { FNDashboardProps } from '../types' ;
@@ -20,12 +19,8 @@ export const FNDashboard: FC<FNDashboardComponentProps> = (props) => {
20
19
) ;
21
20
} ;
22
21
23
- function mapStateToProps ( ) {
24
- return ( { fnGlobalState } : StoreState ) => pick ( fnGlobalState , ...fnPropsMappedFromState ) ;
25
- }
26
-
27
22
export const DashboardPortal : FC < FNDashboardComponentProps > = ( p ) => {
28
- const globalFnProps = useSelector ( mapStateToProps ( ) ) ;
23
+ const globalFnProps = useSelector < FnGlobalState > ( ( { fnGlobalState } ) => fnGlobalState ) ;
29
24
30
25
const props = useMemo (
31
26
( ) => ( {
Original file line number Diff line number Diff line change 17
17
</ script >
18
18
19
19
20
- < script nonce ="" src ="../../../public/build/runtime~fn_dashboard.27b2008e9aab8f8985b3 .js " type ="text/javascript "> </ script >
20
+ < script nonce ="" src ="../../../public/build/runtime~fn_dashboard.fc198176f5de1db6b062 .js " type ="text/javascript "> </ script >
21
21
22
- < script nonce ="" src ="../../../public/build/fn_dashboard.1f9b5b453196a7012a75 .js " type ="text/javascript "> </ script >
22
+ < script nonce ="" src ="../../../public/build/fn_dashboard.e177740ae17aef5ea15a .js " type ="text/javascript "> </ script >
23
23
24
24
</ body >
25
25
</ html >
Original file line number Diff line number Diff line change @@ -26,10 +26,9 @@ const esbuildOptions = {
26
26
} ;
27
27
28
28
const envConfig = getEnvConfig ( ) ;
29
-
30
29
module . exports = ( env = { } ) => {
31
30
return merge ( common , {
32
- devtool : 'eval-source-map' ,
31
+ devtool : false ,
33
32
mode : 'development' ,
34
33
35
34
entry : {
@@ -76,7 +75,6 @@ module.exports = (env = {}) => {
76
75
// removeEmptyChunks: false,
77
76
// splitChunks: false,
78
77
// },
79
-
80
78
optimization : {
81
79
moduleIds : 'named' ,
82
80
runtimeChunk : true ,
@@ -96,6 +94,11 @@ module.exports = (env = {}) => {
96
94
} ,
97
95
} ,
98
96
97
+ performance : {
98
+ hints : false ,
99
+ } ,
100
+ parallelism : 2 ,
101
+
99
102
plugins : [
100
103
parseInt ( env . noTsCheck , 10 )
101
104
? new DefinePlugin ( { } ) // bogus plugin to satisfy webpack API
@@ -139,7 +142,7 @@ module.exports = (env = {}) => {
139
142
new DefinePlugin ( {
140
143
'process.env' : {
141
144
NODE_ENV : JSON . stringify ( 'development' ) ,
142
- SHOULD_LOG : JSON . stringify ( 'true' ) ,
145
+ SHOULD_LOG : JSON . stringify ( process . env . SHOULD_LOG ) ,
143
146
} ,
144
147
} ) ,
145
148
] ,
You can’t perform that action at this time.
0 commit comments