Readded Test Inclusion

This commit is contained in:
Nile Walker 2021-02-01 08:36:38 -05:00
parent 70e73a4925
commit d4d8039297
5 changed files with 17 additions and 11 deletions

View File

@ -4,6 +4,7 @@ import {NgModule} from '@angular/core';
import {FlexLayoutModule} from '@angular/flex-layout';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {MatButtonModule} from '@angular/material/button';
import {MatCheckboxModule} from '@angular/material/checkbox';
import {MatCardModule} from '@angular/material/card';
import {MatOptionModule} from '@angular/material/core';
import {MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormFieldModule} from '@angular/material/form-field';
@ -98,6 +99,7 @@ export function getBaseHref(platformLocation: PlatformLocation): string {
MatGridListModule,
MatTableModule,
MatNativeDateModule,
MatCheckboxModule,
BrowserModule,
ChartsModule,
BrowserAnimationsModule,

View File

@ -4,13 +4,16 @@
align-items: center;
}
.flex-grid .col {
flex: 1;
}
.flex-grid-thirds {
display: flex;
justify-content: space-between;
}
.flex-grid-thirds .col {
width: 32%;
}
@ -26,10 +29,10 @@
}
}
* {
box-sizing: border-box;
}
mat-form-field {
margin: 20px;
}
@ -38,7 +41,6 @@ mat-card {
margin: 20px;
}
body {
padding: 20px;
}
@ -46,7 +48,6 @@ body {
margin: 0 20px 20px 0;
}
.col {
/* background: salmon; */
padding: 20px;
}

View File

@ -43,6 +43,9 @@
<div class="flex-grid">
<div class="col">
<h1>Search</h1>
<br>
<mat-checkbox [(ngModel)]="form.include_tests">Include Tests</mat-checkbox>
</div>
<div class="col">
<button mat-raised-button class="btn-lg" color="primary" (click)="searchToday()">Today</button>
@ -74,18 +77,17 @@
<div class="col">
<mat-form-field>
<mat-label>Student ID(s)</mat-label>
<textarea matInput [(ngModel)]="form.student_id" placeholder="Ex. It makes me feel..."></textarea>
<textarea matInput [(ngModel)]="form.student_id" placeholder="Ex. 00224483"></textarea>
</mat-form-field>
</div>
<div class="col">
<mat-form-field>
<mat-label>Compute ID(s)</mat-label>
<textarea matInput [(ngModel)]="form.compute_id" placeholder="Ex. It makes me feel..."></textarea>
<textarea matInput [(ngModel)]="form.compute_id" placeholder="Ex. ECC8Z"></textarea>
</mat-form-field>
</div>
</div>
</mat-card>
<div class="flex-grid">
@ -95,9 +97,10 @@
</mat-card-header>
<div style="display: block">
<canvas baseChart [datasets]="dailyChartsData" [labels]="dailyChartLabels" [options]="barChartOptions"
[legend]="true" chartType="bar" (chartClick)="chartClicked($event)">
</canvas></div>
<canvas baseChart [datasets]="dailyChartsData" [labels]="dailyChartLabels" [options]="barChartOptions"
[legend]="true" chartType="bar" (chartClick)="chartClicked($event)">
</canvas>
</div>
</mat-card>
<mat-card class="col">
@ -122,9 +125,7 @@
[legend]=false chartType="horizontalBar">
</canvas>
</div>
</mat-card>
</div>
<mat-card>

View File

@ -118,6 +118,7 @@ export class GraphsComponent implements OnInit {
this.end_date = new Date();
this.updateGraphData();
}
searchAll(): void {
this.start_date = new Date(2020,9,5);
this.end_date = new Date();

View File

@ -69,6 +69,7 @@ export class GraphService {
.set("student_id", form.student_id)
.set("compute_id", form.compute_id)
.set("location", form.location)
.set("include_tests", String(form.include_tests))
return params;
}