Skip to content

Commit

Permalink
v0.2.2 (#182)
Browse files Browse the repository at this point in the history
v0.2.2

Co-authored-by: Ataraxia <zwjaaa@hotmail.com>
Co-authored-by: Kang Huquan <799385272@qq.com>
  • Loading branch information
3 people authored Aug 1, 2019
2 parents 76b67d3 + 3f0195b commit 5cdc21e
Show file tree
Hide file tree
Showing 69 changed files with 1,796 additions and 1,206 deletions.
6 changes: 4 additions & 2 deletions admin-frontend/src/app/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

<nz-card nzTitle="系统状态">
<!--<nz-card nzTitle="系统状态">
<div nz-row [nzGutter]="8">
<div nz-col [nzSpan]="8">
<nz-card *ngIf="userNum" nzType="inner" nzTitle="总用户数">
Expand All @@ -18,6 +17,9 @@
</div>
</div>
</nz-card>
-->


<nz-card *ngIf="hst" nzTitle="站点通知">
<nz-timeline [nzPending]="" nzMode="alternate">
<nz-timeline-item *ngFor="let item of hst" [nzColor]="getColor(item)">
Expand Down
14 changes: 8 additions & 6 deletions admin-frontend/src/app/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ export class DashboardComponent implements OnInit {

site : any;
hst: any[];
/*
userNum: number;
infoNum: number;
acInfoNum: number;
*/
ngOnInit() {
this.getHistory();
this.wbService.getSite().subscribe(s => this.site= s);
this.usService.getUsers().subscribe( e =>this.userNum = e.user.length);
this.ifService.getSellInfos().subscribe( e => {
this.infoNum = e.sellInfo.length;
this.acInfoNum = e.sellInfo.filter( e => e.status < 3).length;
}
);
//this.usService.getUsers().subscribe( e =>this.userNum = e.user.length);
//this.ifService.getSellInfos().subscribe( e => {
// this.infoNum = e.sellInfo.length;
//this.acInfoNum = e.sellInfo.filter( e => e.status < 3).length;
//}
// );
}
getHistory(){
this.wbService.getSiteHistory().subscribe( s =>this.hst =s.sort((a,b)=> a.time-b.time));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@
height: 39%;
background: #01193d;
}

#pause{
position: absolute;
right: 0%;
bottom: 0%;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
</div>


<div class='outer-div' id='lq'>
<div echarts theme="dark" class='btc' [loading]="true" [options]="lqoption"></div>
<div class='outer-div' id='lq'>
<div echarts theme="dark" class='btc' [loading]="true" [options]="lqoption">
</div>
<button id='pause' [nzSize]="'small'" nz-button nzType="default" (click) ="pauseLine()">
<i nz-icon *ngIf='!pl' nzType="pause"></i>
<i nz-icon *ngIf='pl' nzType="caret-right"></i>
</button>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ describe('InfoStatisticComponent', () => {
expect(component).toBeTruthy();
component.bi = [ new buyInfo()];
component.si = [ new sellInfo()];
component.good();
component.lq();
component.fdg();
component.ts();
expect(component.fmt(new Date(1563134054000))).toEqual('2019/7/15');
});
});
Loading

0 comments on commit 5cdc21e

Please sign in to comment.