fix
This commit is contained in:
parent
4e9084a632
commit
d7265def88
@ -106,7 +106,10 @@
|
||||
<th>
|
||||
Обновлено:
|
||||
</th>
|
||||
<th>
|
||||
<th *ngIf="terminal?.socket_data?.last_ping === null">
|
||||
Нет Данных
|
||||
</th>
|
||||
<th *ngIf="!(terminal?.socket_data?.last_ping === null)">
|
||||
{{terminal?.socket_data?.last_ping | date:'dd.MM.yy, HH:mm:ss'}}
|
||||
</th>
|
||||
</tr>
|
||||
@ -114,7 +117,10 @@
|
||||
<th>
|
||||
Закрыто:
|
||||
</th>
|
||||
<th>
|
||||
<th *ngIf="terminal?.socket_data?.closed === null">
|
||||
Нет Данных
|
||||
</th>
|
||||
<th *ngIf="!(terminal?.socket_data?.closed === null)">
|
||||
{{terminal?.socket_data?.closed ? 'Да' : 'Нет'}}
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
@ -100,7 +100,7 @@ export class TerminalsComponent implements OnInit {
|
||||
await this.jsonRpcService.rpc({
|
||||
method: 'getTerminal',
|
||||
params: [this.choose, id]
|
||||
}, RpcService.authService, false)
|
||||
}, RpcService.authService, true)
|
||||
.subscribe({
|
||||
next: (result) => {
|
||||
let data = result.result;
|
||||
|
||||
@ -40,11 +40,12 @@ export class JsonrpcService {
|
||||
private cookiesService: CookiesService
|
||||
) { }
|
||||
|
||||
rpc(data: {method: string, params: any},service: RpcService, auth = false): Observable<any> {
|
||||
rpc(data: {method: string, params: any}, service: RpcService, auth?: boolean): Observable<any> {
|
||||
let headers = new HttpHeaders();
|
||||
const token = decodeURI(this.cookiesService.getItem('token') ?? '');
|
||||
console.log(token);
|
||||
headers = headers.set('Content-Type', 'application/json');
|
||||
auth ? headers.set('Authorization', token) : null;
|
||||
auth ? headers = headers.append('Authorization', token) : null;
|
||||
const options = {
|
||||
headers: headers,
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user