File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed
src/dashboard/Data/Config Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import subscribeTo from 'lib/subscribeTo';
1919import TableHeader from 'components/Table/TableHeader.react' ;
2020import TableView from 'dashboard/TableView.react' ;
2121import Toolbar from 'components/Toolbar/Toolbar.react' ;
22+ import browserStyles from 'dashboard/Data/Browser/Browser.scss' ;
2223
2324@subscribeTo ( 'Config' , 'config' )
2425class Config extends TableView {
@@ -38,7 +39,7 @@ class Config extends TableView {
3839 }
3940
4041 componentWillMount ( ) {
41- this . props . config . dispatch ( ActionTypes . FETCH ) ;
42+ this . loadData ( ) ;
4243 }
4344
4445 componentWillReceiveProps ( nextProps , nextContext ) {
@@ -47,12 +48,29 @@ class Config extends TableView {
4748 }
4849 }
4950
51+ onRefresh ( ) {
52+ this . loadData ( ) ;
53+ }
54+
55+ loadData ( ) {
56+ this . props . config . dispatch ( ActionTypes . FETCH ) ;
57+ }
58+
5059 renderToolbar ( ) {
5160 return (
52- < Toolbar
53- section = 'Core'
54- subsection = 'Config' >
55- < Button color = 'white' value = 'Create a parameter' onClick = { this . createParameter . bind ( this ) } />
61+ < Toolbar section = "Core" subsection = "Config" >
62+ < a
63+ className = { browserStyles . toolbarButton }
64+ onClick = { this . onRefresh . bind ( this ) }
65+ >
66+ < Icon name = "refresh-solid" width = { 14 } height = { 14 } />
67+ < span > Refresh</ span >
68+ </ a >
69+ < Button
70+ color = "white"
71+ value = "Create a parameter"
72+ onClick = { this . createParameter . bind ( this ) }
73+ />
5674 </ Toolbar >
5775 ) ;
5876 }
You can’t perform that action at this time.
0 commit comments