Periodically refresh the match list for scouting
I've had a few instances where students thought that we didn't support
eliminations matches because they don't show up when first importing
the match list. The eliminations matches are only importable after the
alliance selections.
To work around this, the webserver now periodically imports the latest
match list. This means we don't need anyone to manually use the
"Import Match List" tab on the app anymore. I deleted that tab as
part of this patch.
The new `scouting/webserver/match_list/match_list.go` file is largely
just the code that I deleted from
`scouting/webserver/requests/requests.go`. I.e. it's really just
moving code around. The main difference now is that instead of
`requests.go` handling match list imports,
`scouting/webserver/main.go` now starts a background task to scrape
the match list every 10 minutes or so.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: Ic37df45261f03a323069c1b38c4fd9682a9c4a3e
diff --git a/scouting/www/app/app.module.ts b/scouting/www/app/app.module.ts
index ead8b37..7b200d0 100644
--- a/scouting/www/app/app.module.ts
+++ b/scouting/www/app/app.module.ts
@@ -4,7 +4,6 @@
import {App} from './app';
import {EntryModule} from '../entry';
-import {ImportMatchListModule} from '../import_match_list';
import {MatchListModule} from '../match_list';
import {NotesModule} from '../notes';
import {ShiftScheduleModule} from '../shift_schedule';
@@ -18,7 +17,6 @@
BrowserAnimationsModule,
EntryModule,
NotesModule,
- ImportMatchListModule,
MatchListModule,
ShiftScheduleModule,
DriverRankingModule,
diff --git a/scouting/www/app/app.ng.html b/scouting/www/app/app.ng.html
index d9dbead..526cd61 100644
--- a/scouting/www/app/app.ng.html
+++ b/scouting/www/app/app.ng.html
@@ -49,15 +49,6 @@
<li class="nav-item">
<a
class="nav-link"
- [class.active]="tabIs('ImportMatchList')"
- (click)="switchTabToGuarded('ImportMatchList')"
- >
- Import Match List
- </a>
- </li>
- <li class="nav-item">
- <a
- class="nav-link"
[class.active]="tabIs('ShiftSchedule')"
(click)="switchTabToGuarded('ShiftSchedule')"
>
@@ -90,9 +81,6 @@
></app-entry>
<frc971-notes *ngSwitchCase="'Notes'"></frc971-notes>
<app-driver-ranking *ngSwitchCase="'DriverRanking'"></app-driver-ranking>
- <app-import-match-list
- *ngSwitchCase="'ImportMatchList'"
- ></app-import-match-list>
<shift-schedule *ngSwitchCase="'ShiftSchedule'"></shift-schedule>
<app-view
(switchTabsEvent)="switchTabTo($event)"
diff --git a/scouting/www/app/app.ts b/scouting/www/app/app.ts
index 7e81d84..f7d2770 100644
--- a/scouting/www/app/app.ts
+++ b/scouting/www/app/app.ts
@@ -5,12 +5,11 @@
| 'Notes'
| 'Entry'
| 'DriverRanking'
- | 'ImportMatchList'
| 'ShiftSchedule'
| 'View';
// Ignore the guard for tabs that don't require the user to enter any data.
-const unguardedTabs: Tab[] = ['MatchList', 'ImportMatchList'];
+const unguardedTabs: Tab[] = ['MatchList'];
type TeamInMatch = {
teamNumber: number;