File tree 1 file changed +23
-5
lines changed
src/dashboard/Data/Config
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';
19
19
import TableHeader from 'components/Table/TableHeader.react' ;
20
20
import TableView from 'dashboard/TableView.react' ;
21
21
import Toolbar from 'components/Toolbar/Toolbar.react' ;
22
+ import browserStyles from 'dashboard/Data/Browser/Browser.scss' ;
22
23
23
24
@subscribeTo ( 'Config' , 'config' )
24
25
class Config extends TableView {
@@ -38,7 +39,7 @@ class Config extends TableView {
38
39
}
39
40
40
41
componentWillMount ( ) {
41
- this . props . config . dispatch ( ActionTypes . FETCH ) ;
42
+ this . loadData ( ) ;
42
43
}
43
44
44
45
componentWillReceiveProps ( nextProps , nextContext ) {
@@ -47,12 +48,29 @@ class Config extends TableView {
47
48
}
48
49
}
49
50
51
+ onRefresh ( ) {
52
+ this . loadData ( ) ;
53
+ }
54
+
55
+ loadData ( ) {
56
+ this . props . config . dispatch ( ActionTypes . FETCH ) ;
57
+ }
58
+
50
59
renderToolbar ( ) {
51
60
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
+ />
56
74
</ Toolbar >
57
75
) ;
58
76
}
You can’t perform that action at this time.
0 commit comments