Can list HW, build for it and upload

This commit is contained in:
Christian Weichel
2019-05-07 12:43:07 +02:00
parent 95ed43c9c4
commit b2d16ff9a4
7 changed files with 119 additions and 38 deletions

View File

@@ -10,7 +10,9 @@ export class BoardsServiceImpl implements BoardsService {
@inject(CoreClientProvider)
protected readonly coreClientProvider: CoreClientProvider;
public async attachedBoards(): Promise<{ boards: AttachedBoard[] }> {
protected selectedBoard: AttachedBoard | undefined;
public async getAttachedBoards(): Promise<{ boards: AttachedBoard[] }> {
const { client, instance } = await this.coreClientProvider.getClient();
const req = new BoardListReq();
@@ -36,6 +38,14 @@ export class BoardsServiceImpl implements BoardsService {
return { boards: serialBoards.concat(networkBoards) };
}
async selectBoard(board: AttachedBoard): Promise<void> {
this.selectedBoard = board;
}
async getSelectBoard(): Promise<AttachedBoard | undefined> {
return this.selectedBoard;
}
async search(options: { query?: string }): Promise<{ items: Board[] }> {
const { client, instance } = await this.coreClientProvider.getClient();