You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/08/27 01:27:33 UTC

[GitHub] [apisix-dashboard] LiteSun opened a new pull request #415: Feat:added pluginChart

LiteSun opened a new pull request #415:
URL: https://github.com/apache/apisix-dashboard/pull/415


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [ ] Bug fix
   - [x] New feature provided
   - [ ] Improve performance
   
   - Related issues
   
   ___
   ### Bugfix
   - Description
   
   - How to fix?
   
   ___
   ### New feature or improvement
   - Describe the details and related test reports.
   added pluginChart


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan merged pull request #415: Feat:added pluginChart

Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #415:
URL: https://github.com/apache/apisix-dashboard/pull/415


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #415: Feat:added pluginChart

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #415:
URL: https://github.com/apache/apisix-dashboard/pull/415#issuecomment-681251995


   You should add some NOTICE like this one[1] for custom dependencies(plugin & ui & chart)
   
   [1] https://github.com/apache/apisix-dashboard/blob/master/LICENSE#L227
   [2] https://github.com/apache/apisix-dashboard/blob/master/licenses/LICENSE-dag-to-lua.txt


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #415: Feat:added pluginChart

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #415:
URL: https://github.com/apache/apisix-dashboard/pull/415#discussion_r477875175



##########
File path: src/pages/Route/components/Step3/index.tsx
##########
@@ -0,0 +1,54 @@
+import React, { useState } from 'react';
+import { Radio, Tooltip } from 'antd';
+import { QuestionCircleOutlined } from '@ant-design/icons';
+import { isChrome } from 'react-device-detect';
+import { PluginPage, PluginPageType } from '@api7-dashboard/plugin';
+import PluginChart from '@api7-dashboard/pluginchart';
+
+type Props = {
+  data: PluginPageType.PluginData;
+  onChange(data: PluginPageType.PluginData): void;
+};
+
+type Mode = 'NORMAL' | 'DRAW';
+
+const Page: React.FC<Props> = ({ data, onChange }) => {
+  const { plugins = {}, script = {} } = data;
+
+  // NOTE: Currently only compatible with chrome
+  const type = Object.keys(script).length === 0 || !isChrome ? 'NORMAL' : 'DRAW';
+  const [mode, setMode] = useState<Mode>(type);
+
+  return (
+    <>
+      <div style={{ display: 'flex', alignItems: 'center' }}>
+        <Radio.Group
+          value={mode}
+          onChange={(e) => {
+            setMode(e.target.value);
+          }}
+        >
+          <Radio.Button value="NORMAL">普通模式</Radio.Button>
+          <Radio.Button value="DRAW" disabled={!isChrome}>
+            插件编排
+          </Radio.Button>
+        </Radio.Group>
+        {Boolean(!isChrome) && (
+          <div style={{ marginLeft: '10px' }}>
+            <Tooltip placement="right" title="插件编排仅支持 Chorme 浏览器">

Review comment:
       NOTE: i18n would be added in the later PR @moonming 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org