import "choerodon-ui/pro/lib/icon/style";
import _Icon from "choerodon-ui/pro/lib/icon";

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

import React, { useMemo, useState } from 'react';
import "./index.less";

var JmeterGuide = function JmeterGuide() {
  var prefixCls = 'c7ncd-host-jmeter-guide';
  var text = useMemo(function () {
    return 'nohup ./jmeter-server \\\n' + '-Djava.rmi.server.hostname=${你的主机ip地址} \\\n' + '-Dserver.rmi.ssl.disable=true \\\n' + '-Dserver.rmi.port=1099 \\\n' + '-Dserver.rmi.localport=1099 \\\n' + '-Dserver_port=1099 &';
  }, []);

  var _useState = useState(false),
      _useState2 = _slicedToArray(_useState, 2),
      isExpand = _useState2[0],
      setExpand = _useState2[1];

  var handleExpand = function handleExpand() {
    setExpand(function (pre) {
      return !pre;
    });
  };

  return /*#__PURE__*/React.createElement("div", {
    className: "".concat(prefixCls)
  }, /*#__PURE__*/React.createElement("div", {
    className: "".concat(prefixCls, "-header")
  }, /*#__PURE__*/React.createElement("span", null, "\u6D4B\u8BD5\u4E3B\u673A-Jmeter\u914D\u7F6E\u6307\u5F15"), /*#__PURE__*/React.createElement(_Icon, {
    type: isExpand ? 'expand_less' : 'expand_more',
    className: "".concat(prefixCls, "-header-expand"),
    onClick: handleExpand
  })), /*#__PURE__*/React.createElement("div", {
    className: "".concat(prefixCls, "-content").concat(isExpand ? '' : '-close')
  }, /*#__PURE__*/React.createElement("span", {
    className: "".concat(prefixCls, "-content-item")
  }, "1. \u64CD\u4F5C\u4E3B\u673A, \u914D\u7F6Ejava8\u73AF\u5883;"), /*#__PURE__*/React.createElement("span", {
    className: "".concat(prefixCls, "-content-item")
  }, "2. \u5982\u679C\u662F\u4F7F\u7528\u5305\u7BA1\u7406\u5668\u5B89\u88C5\u7684 JDK\uFF0C\u8BF7\u76F4\u63A5\u5230\u7B2C3\u6B65\u9AA4\u3002\u5426\u5219\u6267\u884C ls /usr/bin/java \u6307\u4EE4, \u5982\u679C\u7ED3\u679C\u662F ls: cannot access '/usr/bin/java': No such file or directory\uFF0C \u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u8F6F\u94FE\u63A5 JDK \u5B89\u88C5\u76EE\u5F55\u4E0B\u7684 java \u547D\u4EE4\u5230 /usr/bin \u76EE\u5F55\u4E0B\uFF08\u6CE8\u610F\u53D8\u91CF\u66FF\u6362\uFF09 \uFF1Asudo ln -s JDK\u6240\u5728\u76EE\u5F55/bin/java /usr/bin/java\uFF0C\u914D\u7F6E\u5B8C\u6210\u540E, \u6267\u884C /usr/bin/java -version \u6307\u4EE4, \u80FD\u770B\u5230\u6B63\u5E38\u7684 Java \u7248\u672C\u4FE1\u606F\u5219\u8868\u793A\u914D\u7F6E\u6B63\u5E38\uFF1B"), /*#__PURE__*/React.createElement("span", {
    className: "".concat(prefixCls, "-content-item")
  }, "3. \u5B89\u88C5Jmeter\uFF1B\u8FDB\u5165\u5B98\u7F51\u9875\u9762https://jmeter.apache.org/download_jmeter.cgi, \u4E0B\u8F7D5.3\u7248\u672C\u7684jmeter\uFF1B"), /*#__PURE__*/React.createElement("span", {
    className: "".concat(prefixCls, "-content-item")
  }, "4. \u5C06jmeter\u7684\u538B\u7F29\u5305\u89E3\u538B\u5230\u5408\u9002\u7684\u76EE\u5F55, \u8FDB\u5165\u89E3\u538B\u540E\u7684\u76EE\u5F55, \u8FD9\u4E2A\u76EE\u5F55\u79F0\u4E3A:", /*#__PURE__*/React.createElement("span", {
    className: "c7ncd-host-jmeter-guide-content-tag"
  }, "JMETER_HOME")), /*#__PURE__*/React.createElement("span", {
    className: "".concat(prefixCls, "-content-item")
  }, "5. \u6267\u884C", /*#__PURE__*/React.createElement("span", {
    className: "c7ncd-host-jmeter-guide-content-tag"
  }, "mkdir /choerodon && chmod 777 -R /choerodon"), "\u6307\u4EE4\u5728\u6839\u76EE\u5F55\u521B\u5EFA", /*#__PURE__*/React.createElement("span", {
    className: "c7ncd-host-jmeter-guide-content-tag"
  }, "choerodon"), "\u76EE\u5F55, \u8FD9\u4E2A\u76EE\u5F55\u7528\u4E8E\u6267\u884C\u538B\u529B\u6D4B\u8BD5\u65F6\u653E\u7F6E\u76F8\u5173\u7684\u6587\u4EF6"), /*#__PURE__*/React.createElement("span", {
    className: "".concat(prefixCls, "-content-item")
  }, "6. \u8FDB\u5165", /*#__PURE__*/React.createElement("span", {
    className: "c7ncd-host-jmeter-guide-content-tag"
  }, "$JMETER_HOME/bin"), "\u76EE\u5F55"), /*#__PURE__*/React.createElement("span", {
    className: "".concat(prefixCls, "-content-item")
  }, "7. \u6267\u884C\u4EE5\u4E0B\u547D\u4EE4(\u6CE8\u610F\u53D8\u91CF\u66FF\u6362):", /*#__PURE__*/React.createElement("span", {
    className: "".concat(prefixCls, "-content-item-text")
  }, text)), /*#__PURE__*/React.createElement("span", {
    className: "".concat(prefixCls, "-content-failed")
  }, "\u6CE8\u610F\uFF1A", /*#__PURE__*/React.createElement("br", null), "1. \u6B64\u5904\u7684\u4E3B\u673Aip\u5730\u5740\u9700\u548CChoerodon\u732A\u9F7F\u9C7C\u754C\u9762\u4E2D\u7EF4\u62A4\u7684\u8282\u70B9IP\u4FDD\u6301\u4E00\u81F4\u3002", /*#__PURE__*/React.createElement("br", null), "2. \u51C6\u5907\u4F5C\u4E3A\u63A7\u5236\u673A\u5668\u7684\u4E3B\u673A, \u9700\u8981\u5C06\u9632\u706B\u5899\u5173\u95ED\u3002")));
};

export default JmeterGuide;