Skip to content

Commit

Permalink
feat(remote.detail): show available hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
ElonH committed Jun 8, 2020
1 parent 6850ccc commit 154f1aa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/pages/manager/homeMode/remote.detail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ import { ConnectionService } from '../../connection.service';
</nb-list>
</nb-accordion-item-body>
</nb-accordion-item>
<nb-accordion-item *ngIf="hashes.length">
<nb-accordion-item-header>Hash Support</nb-accordion-item-header>
<nb-accordion-item-body>
<nb-list [nbSpinner]="loadingFsinfo" nbSpinnerSize="giant" nbSpinnerStatus="primary">
<nb-list-item *ngFor="let item of hashes">
<div>{{ item }}</div>
</nb-list-item>
</nb-list>
</nb-accordion-item-body>
</nb-accordion-item>
</nb-accordion>
`,
styles: [
Expand Down Expand Up @@ -54,6 +64,7 @@ export class RemoteDetailComponent implements OnInit {
protected _remote = '';
protected loadingFsinfo = false;
protected feature: { k: string; v: boolean }[] = [];
protected hashes: string[] = [];
set remote(x: NavigationFlowOutNode) {
this._remote = x.remote || '';
this.loadingFsinfo = true;
Expand Down Expand Up @@ -84,6 +95,7 @@ export class RemoteDetailComponent implements OnInit {
if (x[1].length !== 0) return;
const fsinfo = x[0]['fs-info'];
this.feature = Object.keys(fsinfo.Features).map(k => ({ k, v: fsinfo.Features[k] }));
this.hashes = fsinfo.Hashes;
});
}
}

0 comments on commit 154f1aa

Please sign in to comment.