-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into new-services
- Loading branch information
Showing
28 changed files
with
1,094 additions
and
22 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
36 changes: 36 additions & 0 deletions
36
src/app/component/projects/harvest-complete/harvest-complete.component.html
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,36 @@ | ||
<h4>{{ project.name }}</h4> | ||
|
||
<ngx-datatable | ||
#table | ||
bawDatatableDefaults | ||
[columnMode]="ColumnMode.force" | ||
[columns]="columns" | ||
[rows]="rows" | ||
[count]="totalModels" | ||
[offset]="pageNumber" | ||
(page)="setPage($event)" | ||
(sort)="onSort($event)" | ||
> | ||
<ngx-datatable-column | ||
name="Id" | ||
width="80" | ||
maxWidth="80" | ||
></ngx-datatable-column> | ||
<ngx-datatable-column name="Name"></ngx-datatable-column> | ||
<ngx-datatable-column name="Actions" [sortable]="false"> | ||
<ng-template let-value="value" ngx-datatable-cell-template> | ||
<a | ||
class="btn btn-sm btn-primary mr-1" | ||
[routerLink]="[detailsPath(value)]" | ||
> | ||
Details | ||
</a> | ||
<a class="btn btn-sm btn-primary mr-1" [routerLink]="[playPath(value)]"> | ||
Play | ||
</a> | ||
<a class="btn btn-sm btn-primary" [routerLink]="[visualizePath(value)]"> | ||
Visualize | ||
</a> | ||
</ng-template> | ||
</ngx-datatable-column> | ||
</ngx-datatable> |
23 changes: 23 additions & 0 deletions
23
src/app/component/projects/harvest-complete/harvest-complete.component.spec.ts
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,23 @@ | ||
import { async, ComponentFixture, TestBed } from "@angular/core/testing"; | ||
import { HarvestCompleteComponent } from "./harvest-complete.component"; | ||
|
||
xdescribe("HarvestCompleteComponent", () => { | ||
let component: HarvestCompleteComponent; | ||
let fixture: ComponentFixture<HarvestCompleteComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [HarvestCompleteComponent], | ||
}).compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(HarvestCompleteComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
55 changes: 55 additions & 0 deletions
55
src/app/component/projects/harvest-complete/harvest-complete.component.ts
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,55 @@ | ||
import { Component, Input, OnInit } from "@angular/core"; | ||
import { PagedTableTemplate } from "src/app/helpers/tableTemplate/pagedTableTemplate"; | ||
import { Project } from "src/app/models/Project"; | ||
import { Site } from "src/app/models/Site"; | ||
import { ApiErrorDetails } from "src/app/services/baw-api/api.interceptor.service"; | ||
import { SitesService } from "src/app/services/baw-api/sites.service"; | ||
|
||
@Component({ | ||
selector: "app-project-harvest-complete", | ||
templateUrl: "./harvest-complete.component.html", | ||
}) | ||
export class HarvestCompleteComponent extends PagedTableTemplate<TableRow, Site> | ||
implements OnInit { | ||
@Input() project: Project; | ||
public sites: Site[]; | ||
public error: ApiErrorDetails; | ||
|
||
constructor(api: SitesService) { | ||
super(api, (sites) => | ||
sites.map((site) => ({ | ||
id: site.id, | ||
name: site.name, | ||
actions: site, | ||
})) | ||
); | ||
} | ||
|
||
ngOnInit(): void { | ||
this.columns = [{ name: "Id" }, { name: "Name" }, { name: "Actions" }]; | ||
this.sortKeys = { | ||
id: "id", | ||
name: "name", | ||
}; | ||
|
||
this.getPageData(this.project); | ||
} | ||
|
||
public detailsPath(site: Site) { | ||
return site.getViewUrl(this.project); | ||
} | ||
|
||
public playPath(site: Site) { | ||
return "/broken_link"; | ||
} | ||
|
||
public visualizePath(site: Site) { | ||
return "/broken_link"; | ||
} | ||
} | ||
|
||
interface TableRow { | ||
id: number; | ||
name: string; | ||
actions: Site; | ||
} |
47 changes: 47 additions & 0 deletions
47
src/app/component/projects/harvest-review/harvest-review.component.html
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,47 @@ | ||
<div class="pb-3"> | ||
<p-treeTable [value]="files"> | ||
<ng-template pTemplate="header"> | ||
<tr> | ||
<th>Name</th> | ||
<th>Project</th> | ||
<th>Site</th> | ||
<th>Point</th> | ||
<th class="status">Status</th> | ||
</tr> | ||
</ng-template> | ||
<ng-template pTemplate="body" let-rowNode let-rowData="rowData"> | ||
<tr> | ||
<td> | ||
<div class="clearfix"> | ||
<p-treeTableToggler | ||
*ngIf="rowNode.node.children" | ||
[rowNode]="rowNode" | ||
></p-treeTableToggler> | ||
{{ rowData.name }} | ||
</div> | ||
</td> | ||
<td> | ||
<app-pill-list | ||
[numPills]="3" | ||
[text]="getText(rowData.projects)" | ||
></app-pill-list> | ||
</td> | ||
<td> | ||
<app-pill-list | ||
[numPills]="3" | ||
[text]="getText(rowData.sites)" | ||
></app-pill-list> | ||
</td> | ||
<td> | ||
<app-pill-list | ||
[numPills]="3" | ||
[text]="getText(rowData.points)" | ||
></app-pill-list> | ||
</td> | ||
<td> | ||
<app-indicator [status]="rowData.status"></app-indicator> | ||
</td> | ||
</tr> | ||
</ng-template> | ||
</p-treeTable> | ||
</div> |
Oops, something went wrong.