From ab93794724b97d4ca7787b1fae371901479ea36c Mon Sep 17 00:00:00 2001 From: JUDIT GRESKOVITS Date: Tue, 23 May 2017 15:41:12 +0100 Subject: [PATCH] Fix svg imports again --- frontend/src/components/services/index.js | 1 + frontend/src/components/services/tooltip.js | 41 ++++++++++++++++++++ frontend/src/containers/services/topology.js | 1 + 3 files changed, 43 insertions(+) create mode 100644 frontend/src/components/services/tooltip.js diff --git a/frontend/src/components/services/index.js b/frontend/src/components/services/index.js index ec05ff7a..b68cb6a3 100644 --- a/frontend/src/components/services/index.js +++ b/frontend/src/components/services/index.js @@ -1,2 +1,3 @@ export { default as EmptyServices } from './empty'; export { default as ServiceListItem } from './list-item'; +export { default as ServicesTooltip } from './tooltip'; diff --git a/frontend/src/components/services/tooltip.js b/frontend/src/components/services/tooltip.js new file mode 100644 index 00000000..aa8b1f8e --- /dev/null +++ b/frontend/src/components/services/tooltip.js @@ -0,0 +1,41 @@ +import React from 'react'; +import Tooltip, { TooltipButton, TooltipDivider } from '@ui/components/tooltip'; + +const ServicesTooltip = ({ + show, + position, + data, + ...rest +}) => { + if(!show) { + return null; + } + return ( + +
  • + Scale +
  • +
  • + Start +
  • +
  • + Restart +
  • + +
  • + Stop +
  • +
  • + Delete +
  • +
    + ); +}; + +ServicesTooltip.propTypes = { + data: React.PropTypes.object, + position: React.PropTypes.object, + show: React.PropTypes.bool +}; + +export default ServicesTooltip; diff --git a/frontend/src/containers/services/topology.js b/frontend/src/containers/services/topology.js index ec69408d..3dcf9250 100644 --- a/frontend/src/containers/services/topology.js +++ b/frontend/src/containers/services/topology.js @@ -9,6 +9,7 @@ import { processServices } from '@root/state/selectors'; import { LayoutContainer } from '@components/layout'; import { Loader, ErrorMessage } from '@components/messaging'; +import { ServicesTooltip } from '@components/services'; import { colors } from '@ui/shared/constants'; import { unitcalc } from '@ui/shared/functions';