juzhiyuan commented on a change in pull request #949:
URL: https://github.com/apache/apisix-dashboard/pull/949#discussion_r534950777



##########
File path: web/src/pages/Info/List.tsx
##########
@@ -1,96 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import React from 'react';
+import { Select } from 'antd';
 import { PageContainer } from '@ant-design/pro-layout';
 import { useIntl } from 'umi';
 
 const Info: React.FC = () => {
   const { formatMessage } = useIntl();
+  const { Option } = Select;
+  const mydata = [
+    {
+      "category": "system",
+      "name": "version",
+      "value": "2.0",
+      "name2": "apisix_id",
+      "value2": "2.1",
+    },
+    {
+      "category": "categoryA",
+      "name": "keyA",
+      "value": "valueA",
+      "name2": "customKeyA",
+      "value2": "valueKeyA",
+    },
+    {
+      "category": "categoryB",
+      "name": "keyB",
+      "value": "valueB",
+      "name2": "customKeyB",
+      "value2": "valueKeyB",
+    },
+    {
+      "category": "categoryC",
+      "name": "keyC",
+      "value": "valueC",
+      "name2": "customKeyC",
+      "value2": "valueKeyC",
+    },
+  ];
 
   return (
     <PageContainer title={formatMessage({ id: 'page.info.pageContainer.title' 
})}>
-      <select className="selector" id="selector" style={{ backgroundColor: 
"#fff", width: "100%", height: "24px", textAlign: "right", padding: "16px 
24px", marginBottom: "15px" }}>
-        <option value="categoryA">CategoryA</option>
-        <option value="categoryB">CategoryB</option>
-        <option value="categoryC">CategoryC</option>
-      </select>
-      <div className="wrap" style={{ width: "100%", height: "740px", padding: 
"16px 24px", margin: "0 auto", backgroundColor: "#fff" }}>
-        <table style={{ color: "rgba(0, 0, 0, 0.45)", width: "100%", 
borderBottom: "1px solid grey", borderCollapse: "collapse", borderTop: "1px 
solid grey" }}>
-          <thead>
-            <tr>
-              <th style={{ padding: "12px 8px" }}>categoryA</th>
-              <th></th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr style={{ backgroundColor: "#f3f4f5" }}>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-            <tr>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-            <tr style={{ backgroundColor: "#f3f4f5" }}>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-            <tr>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-          </tbody>
-        </table>
-        <table style={{ color: "rgba(0, 0, 0, 0.45)", width: "100%", 
borderBottom: "1px solid grey", borderCollapse: "collapse", }}>
-          <thead>
-            <tr>
-              <th style={{ padding: "12px 8px" }}>categoryA</th>
-              <th></th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr style={{ backgroundColor: "#f3f4f5" }}>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-            <tr>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-            <tr style={{ backgroundColor: "#f3f4f5" }}>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-            <tr>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-          </tbody>
-        </table>
-        <table style={{ color: "rgba(0, 0, 0, 0.45)", width: "100%", 
borderBottom: "1px solid grey", borderCollapse: "collapse", }}>
-          <thead>
-            <tr>
-              <th style={{ padding: "12px 8px" }}>categoryA</th>
-              <th></th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr style={{ backgroundColor: "#f3f4f5" }}>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-            <tr>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-            <tr style={{ backgroundColor: "#f3f4f5" }}>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-            <tr>
-              <td style={{ padding: "12px 8px" }}>key</td>
-              <td style={{ textAlign: "right", padding: "12px 8px" 
}}>value</td>
-            </tr>
-          </tbody>
-        </table>
+      <Select
+        showSearch
+        style={{ backgroundColor: "#fff", width: "100%", textAlign: "right", 
padding: "16px 24px", marginBottom: "15px" }}

Review comment:
       Inline styles should be moved to a `.less`file

##########
File path: web/src/global.less
##########
@@ -45,6 +45,27 @@ ol {
   list-style: none;
 }
 
+.InfoWrap {

Review comment:
       No, this is a global file, not for Info page only.




----------------------------------------------------------------
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:
[email protected]


Reply via email to