-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
110 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { PostFlow } from './post-flow'; | ||
import { IRcloneServer } from '../extra'; | ||
import { CombErr, AjaxFlowInteralNode } from '../core'; | ||
|
||
export interface ListGroupFlowOutNode { | ||
groups: string[]; | ||
} | ||
|
||
export abstract class ListGroupFlow extends PostFlow<IRcloneServer, ListGroupFlowOutNode> { | ||
// public prerequest$: Observable<CombErr<IRcloneServer>>; | ||
protected cmd: string = 'core/group-list'; | ||
protected params = {}; | ||
protected cacheSupport: boolean = false; | ||
protected reconstructAjaxResult(x: AjaxFlowInteralNode): CombErr<ListGroupFlowOutNode> { | ||
if (x[1].length !== 0) return [{}, x[1]] as any; | ||
return [{ groups: x[0].ajaxRsp.response['groups'] }, []]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,86 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Columns } from 'ngx-easy-table'; | ||
|
||
@Component({ | ||
selector: 'app-jobs', | ||
template: ` | ||
<p> | ||
jobs works! | ||
</p> | ||
`, | ||
styles: [ | ||
] | ||
selector: 'app-jobs', | ||
template: ` | ||
<nb-layout> | ||
<nb-sidebar> | ||
<nb-card-header> Groups </nb-card-header> | ||
<nb-card-body> | ||
123 | ||
</nb-card-body> | ||
</nb-sidebar> | ||
<nb-layout-column style="padding: 0;"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-6"> | ||
<nb-card> | ||
<nb-card-header> Speed </nb-card-header> | ||
<nb-card-body> | ||
<canvas baseChart width="200" height="100"></canvas> | ||
</nb-card-body> | ||
</nb-card> | ||
</div> | ||
<div class="col-6"> | ||
<nb-card> | ||
<nb-card-header> Core Status </nb-card-header> | ||
<nb-card-body class="row"> | ||
<div class="col-4">123</div> | ||
<div class="col-8">234</div> | ||
</nb-card-body> | ||
</nb-card> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col"> | ||
<nb-card> | ||
<nb-card-header> Transfers Status </nb-card-header> | ||
<nb-card-body> | ||
<ngx-table [columns]="columns"> </ngx-table> | ||
</nb-card-body> | ||
</nb-card> | ||
</div> | ||
</div> | ||
</div> | ||
</nb-layout-column> | ||
</nb-layout> | ||
`, | ||
styles: [ | ||
` | ||
nb-sidebar { | ||
border-left: solid; | ||
border-color: #edf1f7; | ||
border-left-width: 0.0668rem; | ||
} | ||
:host ::ng-deep .scrollable { | ||
display: contents; | ||
} | ||
ul { | ||
list-style-type: none; | ||
} | ||
li { | ||
border-bottom: 1px solid #edf1f7; | ||
} | ||
div.row { | ||
padding-top: 1rem; | ||
} | ||
nb-card { | ||
height: 100%; | ||
} | ||
`, | ||
], | ||
}) | ||
export class JobsComponent implements OnInit { | ||
public columns: Columns[] = [ | ||
{ key: 'Name', title: 'Name' }, | ||
{ key: 'Size', title: 'Size' }, | ||
{ key: 'percentage', title: 'Percentage' }, | ||
{ key: 'speed', title: 'Speed' }, | ||
{ key: 'eta', title: 'eta' }, | ||
]; | ||
constructor() {} | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
ngOnInit(): void {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters