Commit d6b84134 authored by Floyd Hightower's avatar Floyd Hightower

Improving UI and sorting based on name and then date

parent b8940504
......@@ -2,9 +2,9 @@
<li *ngFor="let result of datastore.results">{{ result.name }}: {{ result.message }}</li>
</ul>
<button class="button" (click)="clearResults()">Clear results</button>
<button class="button secondary" (click)="clearResults()">Clear results</button>
<br><br>
Refreshing results in {{ seconds }} seconds.
<br>
<br><br>
Impatient? <a (click)="seconds = 0; countDown();">Refresh now</a>.
......@@ -48,12 +48,20 @@ export class DatastoreService {
date: string;
}
) {
if (a.date === b.date) {
return 0;
} else if (a.date > b.date) {
return 1;
if (a.name === b.name) {
if (a.date === b.date) {
return 0;
} else if (a.date > b.date) {
return 1;
} else {
return -1;
}
} else {
return -1;
if (a.name > b.name) {
return 1;
} else {
return -1;
}
}
});
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment