diff --git a/app/javascript/components/dashboard_toolbar.jsx b/app/javascript/components/dashboard_toolbar.jsx index 017c7ac80b1..6aa61497ff8 100644 --- a/app/javascript/components/dashboard_toolbar.jsx +++ b/app/javascript/components/dashboard_toolbar.jsx @@ -1,8 +1,6 @@ -import React, { useEffect, useReducer } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; -import { Dropdown, DropdownButton, MenuItem } from 'patternfly-react'; - -// app/views/dashboard/_widgets_menu.html.haml +import { Dropdown, MenuItem } from 'patternfly-react'; const resetButton = () => ( ); diff --git a/app/javascript/components/topology_toolbar.jsx b/app/javascript/components/topology_toolbar.jsx new file mode 100644 index 00000000000..ce70530fd59 --- /dev/null +++ b/app/javascript/components/topology_toolbar.jsx @@ -0,0 +1,66 @@ +import React from 'react'; + +const searchClick = () => { + console.log('searchClick'); + sendDataWithRx({ service: 'topologyService', name: 'searchNode' }); +}; + +const refreshClick = () => { + sendDataWithRx({ name: 'refreshTopology' }); +}; + +const resetSearchClick = () => { + console.log('resetSearchClick'); + sendDataWithRx({ service: 'topologyService', name: 'resetSearch' }); +}; +// # this hidden button is a workaround +// # pressing enter in ^input triggers a *click* event on the next button +// # without this, that button is resetSearch, which ..is undesirable :) + +// app/views/shared/_topology_header_toolbar.html.haml +const TopologyToolbar = () => ( +
+
+
+ +
+
+ +
+
+
+
+ + + +
+
+
+ +
+
+
+
+); + +TopologyToolbar.propTypes = { +}; + +export default TopologyToolbar;