You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/01/09 14:48:31 UTC

[GitHub] wu-sheng closed pull request #219: Update: fix issue #1968 pageSize maximum

wu-sheng closed pull request #219: Update: fix issue #1968 pageSize maximum
URL: https://github.com/apache/incubator-skywalking-ui/pull/219
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/routes/Trace/TraceSearch.js b/src/routes/Trace/TraceSearch.js
index 59bbae7..5b40633 100644
--- a/src/routes/Trace/TraceSearch.js
+++ b/src/routes/Trace/TraceSearch.js
@@ -16,7 +16,7 @@
  */
 
 import React, { PureComponent } from 'react';
-import { Form, Input, Select, Button, Card, InputNumber, Row, Col, Pagination, DatePicker } from 'antd';
+import { Form, Input, Select, Button, Card, InputNumber, Row, Col, Pagination, DatePicker,notification } from 'antd';
 import { Chart, Geom, Axis, Tooltip, Legend } from 'bizcharts';
 import { DataSet } from '@antv/data-set';
 import moment from 'moment';
@@ -53,6 +53,7 @@ const initPaging = {
 })
 export default class Trace extends PureComponent {
   componentDidMount() {
+    this.timer = false;
     const {...propsData} = this.props;
     const { trace: { variables: { values } } } = this.props;
     const { duration } = values;
@@ -66,6 +67,18 @@ export default class Trace extends PureComponent {
     this.fetchData(condition, initPaging);
   }
 
+  componentDidUpdate(prevProps){
+    clearTimeout(this.timer);
+    this.timer = setTimeout(() => {
+      if (prevProps.trace.data.queryBasicTraces.total>10000) {
+        notification.open({
+          message: "Query Warning",
+          description: "Don't allow to query rows after 10000, please change your query conditions.",
+        });
+      }
+    }, 100);
+  }
+
   getDefaultDuration = () => {
     return generateDuration({
       from() {
@@ -314,7 +327,7 @@ export default class Trace extends PureComponent {
             size="small"
             current={currentPageNum}
             pageSize={currentPageSize}
-            total={total}
+            total={total> 10000 ? 10000 : total}
             defaultPageSize={20}
             showSizeChanger
             pageSizeOptions={['20', '50', '100', '200']}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services