diff --git a/.gitignore b/.gitignore index c6e7cc2..919a70a 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ npm-debug.log #go debug.test - +intimate_server diff --git a/goserver/.gitignore b/goserver/.gitignore index aaa84c5..94111ba 100644 --- a/goserver/.gitignore +++ b/goserver/.gitignore @@ -1,3 +1,4 @@ -initmate_server +intimate_server log *.html +screenlog.* \ No newline at end of file diff --git a/goserver/go.mod b/goserver/go.mod index 3106f70..f110dd3 100644 --- a/goserver/go.mod +++ b/goserver/go.mod @@ -1,12 +1,12 @@ -module initmate_server +module intimate_server go 1.15 require ( github.com/474420502/focus v0.12.0 - github.com/Pallinder/go-randomdata v1.1.0 + github.com/Pallinder/go-randomdata v1.2.0 github.com/gin-gonic/gin v1.6.3 github.com/go-sql-driver/mysql v1.5.0 github.com/jinzhu/gorm v1.9.16 // indirect - gopkg.in/yaml.v2 v2.2.8 + gopkg.in/yaml.v2 v2.3.0 ) diff --git a/goserver/go.sum b/goserver/go.sum index e38733f..8124eac 100644 --- a/goserver/go.sum +++ b/goserver/go.sum @@ -2,6 +2,8 @@ github.com/474420502/focus v0.12.0 h1:+icbmj7IEOefvTegHt5EpcHt6WFbe2miIrceUJx2Ev github.com/474420502/focus v0.12.0/go.mod h1:d0PMjtMxFz1a9HIhwyFPkWa+JF+0LgOrEUfd8iZka6s= github.com/Pallinder/go-randomdata v1.1.0 h1:gUubB1IEUliFmzjqjhf+bgkg1o6uoFIkRsP3VrhEcx8= github.com/Pallinder/go-randomdata v1.1.0/go.mod h1:yHmJgulpD2Nfrm0cR9tI/+oAgRqCQQixsA8HyRZfV9Y= +github.com/Pallinder/go-randomdata v1.2.0 h1:DZ41wBchNRb/0GfsePLiSwb0PHZmT67XY00lCDlaYPg= +github.com/Pallinder/go-randomdata v1.2.0/go.mod h1:yHmJgulpD2Nfrm0cR9tI/+oAgRqCQQixsA8HyRZfV9Y= github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -70,3 +72,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/goserver/screenlog.0 b/goserver/screenlog.0 deleted file mode 100644 index 6a964a2..0000000 --- a/goserver/screenlog.0 +++ /dev/null @@ -1,77 +0,0 @@ -2020/08/24 16:31:09 find config: ./config.yaml -[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. - - using env: export GIN_MODE=release - - using code: gin.SetMode(gin.ReleaseMode) - -[GIN-debug] GET /twitcasting/query --> main.TwitcastingQuery (3 handlers) -[GIN-debug] GET /openrec/query --> main.OpenrecQuery (3 handlers) -[GIN-debug] GET /twitch/query --> main.TwitchQuery (3 handlers) -[GIN-debug] GET /tag/count --> main.CountTag (3 handlers) -[GIN-debug] GET /tag/allcount --> main.CountTag (3 handlers) -[GIN-debug] Listening and serving HTTP on :5500 -16:33:16 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: followers descend -[GIN] 2020/08/24 - 16:33:17 |[97;42m 200 [0m| 397.857448ms | 192.168.16.130 |[97;44m GET [0m "/twitcasting/query?page=1&psize=20&orderfield=followers&ordertype=descend" -[GIN] 2020/08/24 - 16:33:17 |[97;42m 200 [0m| 630.949609ms | 192.168.16.130 |[97;44m GET [0m "/tag/count?platform=twitcasting" -16:33:18 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: followers descend -[GIN] 2020/08/24 - 16:33:18 |[97;42m 200 [0m| 251.472068ms | 192.168.16.130 |[97;44m GET [0m "/twitcasting/query?page=1&psize=20&orderfield=followers&ordertype=descend" -16:36:32 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 16:36:32 |[97;42m 200 [0m| 65.723084ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -16:36:32 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 16:36:32 |[97;42m 200 [0m| 67.82141ms | 192.168.16.103 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -16:36:33 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 16:36:33 |[97;42m 200 [0m| 62.965398ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -16:36:37 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 16:36:38 |[97;42m 200 [0m| 231.238484ms | 192.168.16.130 |[97;44m GET [0m "/twitch/query?page=1&psize=20" -16:37:23 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 16:37:23 |[97;42m 200 [0m| 77.816922ms | 192.168.16.103 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -16:37:23 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 16:37:23 |[97;42m 200 [0m| 60.302602ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -16:37:24 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 16:37:24 |[97;42m 200 [0m| 55.982297ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -16:37:28 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: views descend -[GIN] 2020/08/24 - 16:37:28 |[97;42m 200 [0m| 72.116427ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20&orderfield=views&ordertype=descend" -16:37:32 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: views ascend -[GIN] 2020/08/24 - 16:37:32 |[97;42m 200 [0m| 60.815908ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20&orderfield=views&ordertype=ascend" -16:37:33 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: undefined -[GIN] 2020/08/24 - 16:37:33 |[97;42m 200 [0m| 49.692998ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20&orderfield=&ordertype=undefined" -16:37:35 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: undefined -[GIN] 2020/08/24 - 16:37:36 |[97;42m 200 [0m| 138.6536ms | 192.168.16.130 |[97;44m GET [0m "/twitcasting/query?page=1&psize=20&orderfield=&ordertype=undefined" -16:37:42 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: views descend -[GIN] 2020/08/24 - 16:37:43 |[97;42m 200 [0m| 275.719131ms | 192.168.16.130 |[97;44m GET [0m "/twitcasting/query?page=1&psize=20&orderfield=views&ordertype=descend" -16:37:44 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: views ascend -[GIN] 2020/08/24 - 16:37:44 |[97;42m 200 [0m| 300.06176ms | 192.168.16.130 |[97;44m GET [0m "/twitcasting/query?page=1&psize=20&orderfield=views&ordertype=ascend" -16:37:45 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: undefined -[GIN] 2020/08/24 - 16:37:45 |[97;42m 200 [0m| 226.08364ms | 192.168.16.130 |[97;44m GET [0m "/twitcasting/query?page=1&psize=20&orderfield=&ordertype=undefined" -16:37:46 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: views descend -[GIN] 2020/08/24 - 16:37:46 |[97;42m 200 [0m| 250.248182ms | 192.168.16.130 |[97;44m GET [0m "/twitcasting/query?page=1&psize=20&orderfield=views&ordertype=descend" -16:37:54 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 16:37:54 |[97;42m 200 [0m| 54.738324ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -16:37:54 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 16:37:54 |[97;42m 200 [0m| 52.897355ms | 192.168.16.103 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -16:37:54 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 16:37:54 |[97;42m 200 [0m| 36.935769ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -16:37:56 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: views descend -[GIN] 2020/08/24 - 16:37:56 |[97;42m 200 [0m| 57.870346ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20&orderfield=views&ordertype=descend" -16:37:58 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: views descend -[GIN] 2020/08/24 - 16:37:59 |[97;42m 200 [0m| 315.446812ms | 192.168.16.130 |[97;44m GET [0m "/twitch/query?page=1&psize=20&orderfield=views&ordertype=descend" -16:38:00 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: views ascend -[GIN] 2020/08/24 - 16:38:00 |[97;42m 200 [0m| 233.687395ms | 192.168.16.130 |[97;44m GET [0m "/twitch/query?page=1&psize=20&orderfield=views&ordertype=ascend" -16:38:01 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: undefined -[GIN] 2020/08/24 - 16:38:01 |[97;42m 200 [0m| 226.263587ms | 192.168.16.130 |[97;44m GET [0m "/twitch/query?page=1&psize=20&orderfield=&ordertype=undefined" -16:38:02 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: views descend -[GIN] 2020/08/24 - 16:38:02 |[97;42m 200 [0m| 219.708245ms | 192.168.16.130 |[97;44m GET [0m "/twitch/query?page=1&psize=20&orderfield=views&ordertype=descend" -16:38:09 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: views descend -[GIN] 2020/08/24 - 16:38:09 |[97;42m 200 [0m| 311.05848ms | 192.168.16.130 |[97;44m GET [0m "/twitcasting/query?page=1&psize=20&orderfield=views&ordertype=descend" -[GIN] 2020/08/24 - 16:40:23 |[97;42m 200 [0m| 114.314µs | 192.168.16.130 |[97;44m GET [0m "/tag/count?platform=twitcasting" -17:50:21 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 17:50:21 |[97;42m 200 [0m| 48.105852ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -17:50:21 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 17:50:21 |[97;42m 200 [0m| 29.279913ms | 192.168.16.103 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -17:50:36 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 17:50:36 |[97;42m 200 [0m| 28.115392ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -17:50:37 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 17:50:37 |[97;42m 200 [0m| 40.507783ms | 192.168.16.103 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -17:53:07 /home/eson/test/create-react-app-antd/goserver/query_data.go:35: -[GIN] 2020/08/24 - 17:53:07 |[97;42m 200 [0m| 22.445236ms | 192.168.16.130 |[97;44m GET [0m "/openrec/query?page=1&psize=20" -[GIN] 2020/08/24 - 17:53:08 |[97;42m 200 [0m| 42.924993ms | 192.168.16.130 |[97;44m GET [0m "/tag/count?platform=openrec&countkey=count" -^[[A^[[A^[[A^[[B^[[B^[[B^C \ No newline at end of file diff --git a/src/ChartsCount.js b/src/ChartsCount.js index 76856b1..def9a1b 100644 --- a/src/ChartsCount.js +++ b/src/ChartsCount.js @@ -121,21 +121,17 @@ class ChartsCount extends React.Component { } countMethod(countkey, title) { - this.setState({countkey: countkey, title: title}, ()=>{this.updateData()}); + this.setState({ countkey: countkey, title: title }, () => { this.updateData() }); } render() { return (