mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-10 13:44:30 +00:00
some bug fixes, some optimizations
This commit is contained in:
@@ -4,35 +4,31 @@
|
||||
<mat-card-subtitle>{{"project.create_subtitle" | translate}}</mat-card-subtitle>
|
||||
|
||||
<mat-card-content>
|
||||
<form (ngSubmit)="onSubmit()">
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>{{"project.name" | translate}}</mat-label>
|
||||
<input type="text" matInput [(ngModel)]="project.name" name="name" [placeholder]="'project.name' | translate">
|
||||
<input type="text" matInput [(ngModel)]="project.name" [placeholder]="'project.name' | translate">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>{{ "project.clone_url" | translate}}</mat-label>
|
||||
<input type="text" matInput [(ngModel)]="project.clone_url" name="clone_url"
|
||||
[placeholder]="'project.clone_url_placeholder' | translate">
|
||||
<input type="text" matInput [(ngModel)]="project.clone_url"
|
||||
[placeholder]="'project.clone_url_placeholder' | translate">
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>{{ "project.git_repo" | translate }}</mat-label>
|
||||
<input type="text" matInput [(ngModel)]="project.git_repo" name="git_repo"
|
||||
[placeholder]="'project.git_repo_placeholder' | translate">
|
||||
<input type="text" matInput [(ngModel)]="project.git_repo"
|
||||
[placeholder]="'project.git_repo_placeholder' | translate">
|
||||
<mat-hint align="start">
|
||||
{{"project.git_repo_hint" | translate}}
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox matInput [(ngModel)]="project.public" name="public" style="padding-top: 1em">
|
||||
<mat-checkbox matInput [(ngModel)]="project.public" style="padding-top: 1em">
|
||||
{{"project.public" | translate}}</mat-checkbox>
|
||||
|
||||
<input type="hidden" name="version" value="{{project.version}}">
|
||||
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" type="submit">{{'project.create' | translate}}</button>
|
||||
<button mat-raised-button color="primary" (click)="onSubmit()">{{'project.create' | translate}}</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
@@ -71,7 +71,7 @@ export class ProjectDashboardComponent implements OnInit {
|
||||
}
|
||||
this.noTasks = false;
|
||||
|
||||
this.timeline.data.labels = this.snapshots.map(s => s.time_stamp as any);
|
||||
this.timeline.data.labels = this.snapshots.map(s => s.time_stamp * 1000 as any);
|
||||
this.timeline.data.datasets = this.makeTimelineDataset(this.snapshots);
|
||||
this.timeline.update();
|
||||
this.statusPie.data.datasets = [
|
||||
@@ -164,7 +164,7 @@ export class ProjectDashboardComponent implements OnInit {
|
||||
this.timeline = new Chart(ctx, {
|
||||
type: "bar",
|
||||
data: {
|
||||
labels: this.snapshots.map(s => s.time_stamp as any),
|
||||
labels: this.snapshots.map(s => s.time_stamp * 1000 as any),
|
||||
datasets: this.makeTimelineDataset(this.snapshots),
|
||||
},
|
||||
options: {
|
||||
@@ -198,11 +198,16 @@ export class ProjectDashboardComponent implements OnInit {
|
||||
|
||||
private setupStatusPie() {
|
||||
|
||||
if (this.lastSnapshot == null || (this.lastSnapshot.awaiting_verification_count == 0 &&
|
||||
if (this.lastSnapshot == undefined || (this.lastSnapshot.awaiting_verification_count == 0 &&
|
||||
this.lastSnapshot.closed_task_count == 0 &&
|
||||
this.lastSnapshot.new_task_count == 0 &&
|
||||
this.lastSnapshot.failed_task_count == 0)) {
|
||||
this.noTasks = true;
|
||||
|
||||
this.lastSnapshot = {
|
||||
closed_task_count: 0, time_stamp: 0, failed_task_count: 0,
|
||||
new_task_count: 0, awaiting_verification_count: 0
|
||||
}
|
||||
}
|
||||
|
||||
let elem = document.getElementById("status-pie") as any;
|
||||
|
||||
Reference in New Issue
Block a user