File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
vis_type_custom_form_filter_accounts/public Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ $ git checkout v7.8.0
8888
8989``` shell
9090$ cd kibana
91- $ nvm use
91+ $ nvm use 10.21.0 [or expected version]
9292$ yarn kbn bootstrap
9393$ yarn start --oss
9494```
@@ -171,7 +171,7 @@ vis_type_custom_form_filter_accounts_7.8.0_1.0.0.zip
171171
172172## Installing the plugin
173173
174- The plugin can then be installed like this for an apt-get installed Kibana.
174+ The plugin can then be installed like this for an apt installed Kibana.
175175
176176``` shell
177177$ cd /usr/share/kibana
193193## Project TODO List
194194
195195- [ ] Create form content (i.e. dropdown, slider) with actual data
196- - [ ] Sample code to modify time filter
196+ - [X ] Sample code to modify time filter
197197- [ ] Create a script to replace 'accounts' in filenames and file content
198198- [ ] Add internationalization example
199199- [ ] Create test script
Original file line number Diff line number Diff line change @@ -126,6 +126,12 @@ class CustomFormFilterAccountsVisComponent extends React.Component<CustomFormFil
126126 this . forceUpdate ( ) ;
127127 } ;
128128
129+ onClickButtonToday = ( ) => {
130+ this . props . timefilter . setTime (
131+ { from : 'now/d' , to : 'now/d' }
132+ ) ;
133+ } ;
134+
129135 onFormChange = ( event ) => {
130136 const target = event . target ;
131137 const valueStr = target . value ;
@@ -153,7 +159,8 @@ class CustomFormFilterAccountsVisComponent extends React.Component<CustomFormFil
153159 < EuiSpacer />
154160 < EuiButton onClick = { this . onClickButtonApplyFilter } fill > Apply filter</ EuiButton >
155161 < EuiButton onClick = { this . onClickButtonDeleteFilter } > Delete filter</ EuiButton >
156- < EuiButton onClick = { this . onClickButtonClearForm } > Clear form</ EuiButton >
162+ < EuiButton onClick = { this . onClickButtonClearForm } > Clear form</ EuiButton >
163+ < EuiButton onClick = { this . onClickButtonToday } color = "secondary" > Time: today</ EuiButton >
157164 </ EuiForm >
158165 </ div >
159166 ) ;
You can’t perform that action at this time.
0 commit comments