-
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.
- create export component
- Loading branch information
Showing
5 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
tenant-option-management/export-modal/export-modal.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,21 @@ | ||
<c8y-modal [customFooter]="true" #modal> | ||
<ng-container c8y-modal-title> | ||
<h1><i class="c8y-icon c8y-icon-device"></i></h1> | ||
<h3 id="modal-title"> | ||
{{ 'Export Tenant Option' | translate }} | ||
</h3> | ||
</ng-container> | ||
<div class="modal-body"> | ||
|
||
|
||
</div> | ||
<div class="modal-footer separator-top bg-level-0 sticky-bottom"> | ||
<button title="{{ 'Cancel' | translate }}" class="btn btn-default" type="button" (click)="close()"> | ||
{{ 'Cancel' | translate }} | ||
</button> | ||
<button title="{{ 'Export' | translate }}" class="btn btn-primary" type="button" (click)="export()" | ||
[ngClass]="{ 'btn-pending': isLoading }"> | ||
{{ 'Export' | translate }} | ||
</button> | ||
</div> | ||
</c8y-modal> |
35 changes: 35 additions & 0 deletions
35
tenant-option-management/export-modal/export-modal.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,35 @@ | ||
import { Component } from '@angular/core'; | ||
import { ITenantOption } from '@c8y/client'; | ||
import { AlertService } from '@c8y/ngx-components'; | ||
import { BsModalRef } from 'ngx-bootstrap/modal'; | ||
import { Subject } from 'rxjs'; | ||
import { TenantOptionManagementService } from '../tenant-option-management.service'; | ||
import { TenantOptionRow } from '../../tenant-option-management/tenant-option-management.component'; | ||
|
||
@Component({ | ||
templateUrl: './export-modal.component.html', | ||
}) | ||
export class ExportModalComponent { | ||
closeSubject: Subject<(ITenantOption & { encrypted: string }) | null> = new Subject(); | ||
|
||
rows: TenantOptionRow[]; | ||
|
||
isLoading = false; | ||
|
||
constructor( | ||
private tenantOptionMgmt: TenantOptionManagementService, | ||
private alert: AlertService, | ||
private modal: BsModalRef | ||
) { } | ||
|
||
export() { | ||
this.isLoading = true; | ||
console.log(this.rows) | ||
this.isLoading = false; | ||
} | ||
|
||
close() { | ||
this.closeSubject.next(null); | ||
this.modal.hide(); | ||
} | ||
} |
13 changes: 12 additions & 1 deletion
13
tenant-option-management/tenant-option-management.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
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