Compare commits
No commits in common. "fc34e3b1d9cf28df40cc4c4bf44b4787d5861d04" and "f2b325c8a439943cb59782960926558772427bdc" have entirely different histories.
fc34e3b1d9
...
f2b325c8a4
4 changed files with 5 additions and 18 deletions
|
@ -29,10 +29,6 @@ export interface System {
|
|||
name: string;
|
||||
}
|
||||
|
||||
export interface Metadata {
|
||||
encrypted: boolean|null;
|
||||
}
|
||||
|
||||
export interface Talkgroup {
|
||||
id: number;
|
||||
system_id: number;
|
||||
|
@ -41,7 +37,7 @@ export interface Talkgroup {
|
|||
alpha_tag: string;
|
||||
tg_group: string;
|
||||
frequency: number;
|
||||
metadata: Metadata|null;
|
||||
metadata: Object;
|
||||
tags: string[];
|
||||
alert: boolean;
|
||||
alert_config: AlertRule[];
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
placeholder="Paste RadioReference page here"
|
||||
formControlName="contents"
|
||||
></textarea>
|
||||
<input type="number" class="input input-bordered" formControlName="systemID" id="systemID" />
|
||||
<input type="submit" class="btn btn-secondary" value="Save" />
|
||||
</form>
|
||||
</div>
|
||||
|
@ -17,11 +16,8 @@
|
|||
<tr>
|
||||
<th>Sys</th>
|
||||
<th>Sys ID</th>
|
||||
<th>Group</th>
|
||||
<th>Alpha</th>
|
||||
<th>Name</th>
|
||||
<th>TG ID</th>
|
||||
<th>Enc</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -30,11 +26,8 @@
|
|||
<tr>
|
||||
<td>{{ tg.system.name }}</td>
|
||||
<td>{{ tg.system.id }}</td>
|
||||
<td>{{ tg.tg_group }}</td>
|
||||
<td>{{ tg.alpha_tag }}</td>
|
||||
<td>{{ tg.name }}</td>
|
||||
<td>{{ tg.tgid }}</td>
|
||||
<td>{{ tg?.metadata?.encrypted ? 'E' : '' }}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
|
|
@ -26,13 +26,11 @@ export class ImportComponent {
|
|||
ngOnInit() {
|
||||
this.form = new FormGroup({
|
||||
contents: new FormControl(''),
|
||||
systemID: new FormControl(0),
|
||||
});
|
||||
}
|
||||
submit() {
|
||||
let content = this.form.controls['contents'].value;
|
||||
let sysID = Number(this.form.controls['systemID'].value);
|
||||
this.tgService.importRR(sysID, content)
|
||||
this.tgService.importRR(content)
|
||||
.pipe(
|
||||
catchError(() => {
|
||||
return of(null);
|
||||
|
|
|
@ -18,9 +18,9 @@ export class TalkgroupService {
|
|||
return this.http.get<Talkgroup>(`/api/talkgroup/${sys}/${tg}`);
|
||||
}
|
||||
|
||||
importRR(sysID: number, content: string): Observable<Talkgroup[]> {
|
||||
return this.http.post<Talkgroup[]>('/api/talkgroup/import',
|
||||
{systemID: sysID, type: 'radioreference', body: content});
|
||||
importRR(content: string): Observable<Talkgroup[]> {
|
||||
return this.http.put<Talkgroup[]>('/api/talkgroup/import',
|
||||
{type: 'radioreference', body: content});
|
||||
}
|
||||
|
||||
putTalkgroup(tu: TalkgroupUpdate): Observable<Talkgroup> {
|
||||
|
|
Loading…
Reference in a new issue