Sha256: ddd1c559780ac2280c68cfe0b90144b8e929f57d0ddf162f60bf9d04521b75e9

Contents?: true

Size: 822 Bytes

Versions: 52

Compression:

Stored size: 822 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
      ouiaId="web-console-dropdown-item"
      icon={<CodeIcon />}
      href={consoleUrl}
      target="_blank"
      rel="noreferrer"
    >
      {__('Web Console')}
    </DropdownItem>
  );
};

export default HostKebabItems;

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
foreman_remote_execution-14.1.4 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-14.1.3 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-14.1.2 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-14.1.1 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-14.1.0 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-14.0.2 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-14.0.1 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-13.2.6 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-14.0.0 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-13.2.5 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-13.2.4 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-13.2.3 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-13.2.2 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-12.0.7 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-13.2.1 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-13.2.0 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-10.1.3 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-13.0.0 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-12.0.5 webpack/react_app/components/HostKebab/KebabItems.js
foreman_remote_execution-12.0.4 webpack/react_app/components/HostKebab/KebabItems.js