File tree Expand file tree Collapse file tree 4 files changed +9
-24
lines changed
microfrontends/fn_dashboard Expand file tree Collapse file tree 4 files changed +9
-24
lines changed 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 19
19
20
20
< script nonce ="" src ="../../../public/build/runtime~fn_dashboard.27b2008e9aab8f8985b3.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.3df600ee86003d356e2c .js " type ="text/javascript "> </ script >
23
23
24
24
</ body >
25
25
</ html >
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const path = require('path');
12
12
const { DefinePlugin, EnvironmentPlugin } = require ( 'webpack' ) ;
13
13
const WebpackAssetsManifest = require ( 'webpack-assets-manifest' ) ;
14
14
const { merge } = require ( 'webpack-merge' ) ;
15
- const WebpackBar = require ( 'webpackbar' ) ;
15
+ // const WebpackBar = require('webpackbar');
16
16
17
17
const getEnvConfig = require ( './env-util.js' ) ;
18
18
const HTMLWebpackCSSChunks = require ( './plugins/HTMLWebpackCSSChunks' ) ;
@@ -131,10 +131,10 @@ module.exports = (env = {}) => {
131
131
integrity : true ,
132
132
publicPath : true ,
133
133
} ) ,
134
- new WebpackBar ( {
135
- color : '#eb7b18' ,
136
- name : 'Grafana' ,
137
- } ) ,
134
+ // new WebpackBar({
135
+ // color: '#eb7b18',
136
+ // name: 'Grafana',
137
+ // }),
138
138
new EnvironmentPlugin ( envConfig ) ,
139
139
new DefinePlugin ( {
140
140
'process.env' : {
You can’t perform that action at this time.
0 commit comments