From: Hongyuan Ma Date: Sat, 23 Jun 2018 18:20:12 +0000 (+0800) Subject: add result table X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=fed44e8828b5e0fa1cefc2e58ce57a8a0a6286aa;p=pgperffarm.git add result table --- diff --git a/front-end/src/component/test-result-card/index.jsx b/front-end/src/component/test-result-card/index.jsx index 2f51865..9001448 100644 --- a/front-end/src/component/test-result-card/index.jsx +++ b/front-end/src/component/test-result-card/index.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import {Card, Icon} from 'semantic-ui-react' +import {Card, Icon,Table} from 'semantic-ui-react' import './index.css'; class TestResultCard extends React.Component { @@ -34,6 +34,7 @@ class TestResultCard extends React.Component { 4 Friends + diff --git a/front-end/src/page/detailInfo/index.css b/front-end/src/page/detailInfo/index.css index 62c24cb..aabe1ba 100644 --- a/front-end/src/page/detailInfo/index.css +++ b/front-end/src/page/detailInfo/index.css @@ -9,3 +9,24 @@ margin-left: 0%; margin-top: 15px; } +.row { + /*margin-left:120px;*/ +} + +.detail-container{ + padding-top: 80px; + margin-right: auto; + margin-left: auto; +} + +@media (min-width: 1200px) { + .detail-container { + width: 1170px; + } +} + +/*@media (min-width: 1400px) {*/ + /*.detail-container {*/ + /*width: 1370px;*/ + /*}*/ +/*}*/ \ No newline at end of file diff --git a/front-end/src/page/detailInfo/index.jsx b/front-end/src/page/detailInfo/index.jsx index e71d8cc..7668449 100644 --- a/front-end/src/page/detailInfo/index.jsx +++ b/front-end/src/page/detailInfo/index.jsx @@ -1,10 +1,10 @@ import React from 'react'; import './index.css'; -import {Grid, Divider, Segment, Image as ImageComponent, Item} from 'semantic-ui-react' +import {Table, Divider, Segment, Image, Label, Card, Button} from 'semantic-ui-react' import TestResultCard from 'component/test-result-card/index.jsx'; import PGUtil from 'util/util.jsx' import Record from 'service/record-service.jsx' -const _util = new PGUtil(); +const _util = new PGUtil(); const _record = new Record(); class DetailInfo extends React.Component { constructor(props) { @@ -19,11 +19,12 @@ class DetailInfo extends React.Component { // this.handleIsLoading = this.handleIsLoading.bind(this); } - componentDidMount(){ + componentDidMount() { this.loadDetailInfo(); } + // load record detail - loadDetailInfo(){ + loadDetailInfo() { let listParam = {}; listParam.recordNo = this.state.recordNo; @@ -31,7 +32,7 @@ class DetailInfo extends React.Component { this.setState(res); }, errMsg => { this.setState({ - list : [] + list: [] }); _util.errorTips(errMsg); }); @@ -39,83 +40,130 @@ class DetailInfo extends React.Component { render() { return ( -
-
-
-
- -
+
+
+ Farmer Info + + + + Steve Sanders + Friends of Elliot + + Steve wants to add you to the group best friends + + + +
+ + +
+
+
+
-
- {/*
*/} -
-
- -
+
+ {/*
*/} +
+
+ RO + + + + Clients:4 scale:10 >>prev +
-
- -
-
+ mertic:200 Improved (+12.4%) + +
+
+ + Start + Tps + mode + latency + +
-
- {/**/} - - Horizontal - {/**/} - -
-

Linux Info

-
-
-
Description lists
-
A description list is perfect for defining terms.
-
Euismod
-
-
-
-
Malesuada porta
-
Etiam porta sem malesuada magna mollis euismod.
-
-
-
+ + + 2018-09-11 15:32 + 200.221 + simple + -1 + + + 2018-09-11 15:32 + 200.221 + simple + -1 + + +
+
-
+
+ + RW + + + + Clients:4 + + + Food + Calories + Protein + + + + + + Apples + 200 + 0g + + + Orange + 310 + 0g + + +
-
- {/*
*/} - {/*
*/} - {/*
Project Timeline
*/} - {/*
*/} - {/*
*/} - {/*

活动

*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
Elliot Fu added Jenny Hess to the project
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/**/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
Helen Troy added two pictures
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/**/} - {/*
*/} - {/*
*/} +
+ {/**/} + + Horizontal + {/**/} + +
+

Linux Info

+
+
+
Description lists
+
A description list is perfect for defining terms.
+
Euismod
+
+
+
+
Malesuada porta
+
Etiam porta sem malesuada magna mollis euismod.
+
+
+
+ +
+
+ ) } } diff --git a/web/apps/test_records/filters.py b/web/apps/test_records/filters.py index 998f3d7..f2e293e 100644 --- a/web/apps/test_records/filters.py +++ b/web/apps/test_records/filters.py @@ -10,7 +10,7 @@ class TestRecordListFilter(django_filters.rest_framework.FilterSet): """ TestRecordListFilter """ - date = django_filters.DateTimeFilter(name='add_time',lookup_expr='gte') + date = django_filters.DateTimeFilter(name='add_time',lookup_expr='gt') class Meta: model = TestRecord diff --git a/web/pgperffarm/settings.py b/web/pgperffarm/settings.py index a02e3cf..15e89de 100644 --- a/web/pgperffarm/settings.py +++ b/web/pgperffarm/settings.py @@ -135,7 +135,7 @@ REST_FRAMEWORK = { # 'rest_framework.authentication.BasicAuthentication', # 'rest_framework.authentication.SessionAuthentication', # ), - 'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend',), + # 'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend',), 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', 'PAGE_SIZE': 20 }