Skip to content

Commit de981bf

Browse files
committed
WIP
1 parent 0053ffa commit de981bf

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

app/src/api/lit.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import * as ACCOUNT from 'types/generated/lit-accounts_pb';
22
import * as SESSION from 'types/generated/lit-sessions_pb';
3+
import * as STATUS from 'types/generated/lit-status_pb';
34
import { Accounts } from 'types/generated/lit-accounts_pb_service';
45
import { Sessions } from 'types/generated/lit-sessions_pb_service';
6+
import { Status } from 'types/generated/lit-status_pb_service';
57
import { b64 } from 'util/strings';
68
import { MAX_DATE } from 'util/constants';
79
import BaseApi from './base';
@@ -84,6 +86,16 @@ class LitApi extends BaseApi<LitEvents> {
8486
const res = await this._grpc.request(Sessions.RevokeSession, req, this._meta);
8587
return res.toObject();
8688
}
89+
90+
async listSubServerStatus(): Promise<STATUS.SubServerStatusResp.AsObject> {
91+
const req = new STATUS.SubServerStatusReq();
92+
const res = await this._grpc.request(Status.SubServerStatus, req, this._meta);
93+
94+
console.log('Got a req', req);
95+
console.log('Got a res', res);
96+
97+
return res.toObject();
98+
}
8799
}
88100

89101
export default LitApi;

app/src/store/views/appView.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ export default class AppView {
5050
this.goTo(`${PUBLIC_URL}/home`);
5151
this._store.settingsStore.autoCollapseSidebar();
5252
this._store.log.info('Go to the Home page');
53+
54+
this.getSubServerStatus();
55+
}
56+
57+
async getSubServerStatus() {
58+
const subServerStatus = await this._store.api.lit.listSubServerStatus();
59+
60+
console.warn('SubServer Status:');
61+
console.warn(subServerStatus);
5362
}
5463

5564
/** Change to the Loop page */

0 commit comments

Comments
 (0)