Sha256: 6817b4627b50bc3648adfd187c54aa8bc99bd78bf18c8b32dd41f2c47c444c50

Contents?: true

Size: 719 Bytes

Versions: 4

Compression:

Stored size: 719 Bytes

Contents

import React from 'react';
import { useSelector } from 'react-redux';
import { DropdownItem } from '@patternfly/react-core';
import { CodeIcon } from '@patternfly/react-icons';
import { selectAPIResponse } from 'foremanReact/redux/API/APISelectors';
import { translate as __ } from 'foremanReact/common/I18n';
import { HOST_DETAILS_KEY } from 'foremanReact/components/HostDetails/consts';

const HostKebabItems = () => {
  const { cockpit_url: consoleUrl } = useSelector(state =>
    selectAPIResponse(state, HOST_DETAILS_KEY)
  );

  if (!consoleUrl) return null;
  return (
    <DropdownItem icon={<CodeIcon />} href={consoleUrl}>
      {__('Web Console')}
    </DropdownItem>
  );
};

export default HostKebabItems;

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_remote_execution-5.0.6 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-6.2.0 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-5.0.5 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-6.1.0 webpack/react_app/components/HostKebab/KebabItems.js