mirror of
https://github.com/bitwarden/browser
synced 2026-01-16 23:43:37 +00:00
exporting organization data
This commit is contained in:
43
src/app/organizations/tools/export.component.ts
Normal file
43
src/app/organizations/tools/export.component.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { ToasterService } from 'angular2-toaster';
|
||||
import { Angulartics2 } from 'angulartics2';
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { CryptoService } from 'jslib/abstractions/crypto.service';
|
||||
import { ExportService } from 'jslib/abstractions/export.service';
|
||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||
import { UserService } from 'jslib/abstractions/user.service';
|
||||
|
||||
import { ExportComponent as BaseExportComponent } from '../../tools/export.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-org-export',
|
||||
templateUrl: '../../tools/export.component.html',
|
||||
})
|
||||
export class ExportComponent extends BaseExportComponent {
|
||||
organizationId: string;
|
||||
|
||||
constructor(analytics: Angulartics2, toasterService: ToasterService,
|
||||
cryptoService: CryptoService, userService: UserService,
|
||||
i18nService: I18nService, platformUtilsService: PlatformUtilsService,
|
||||
exportService: ExportService, private route: ActivatedRoute, ) {
|
||||
super(analytics, toasterService, cryptoService, userService, i18nService, platformUtilsService,
|
||||
exportService);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.parent.parent.params.subscribe(async (params) => {
|
||||
this.organizationId = params.organizationId;
|
||||
});
|
||||
}
|
||||
|
||||
getExportData() {
|
||||
return this.exportService.getOrganizationExport(this.organizationId, 'csv');
|
||||
}
|
||||
|
||||
getFileName() {
|
||||
return super.getFileName('org');
|
||||
}
|
||||
}
|
||||
20
src/app/organizations/tools/tools.component.html
Normal file
20
src/app/organizations/tools/tools.component.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<div class="container page-content">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="card">
|
||||
<div class="card-header">{{'tools' | i18n}}</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a routerLink="import" class="list-group-item" routerLinkActive="active">
|
||||
{{'import' | i18n}}
|
||||
</a>
|
||||
<a routerLink="export" class="list-group-item" routerLinkActive="active">
|
||||
{{'exportVault' | i18n}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
9
src/app/organizations/tools/tools.component.ts
Normal file
9
src/app/organizations/tools/tools.component.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import {
|
||||
Component,
|
||||
} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-org-tools',
|
||||
templateUrl: 'tools.component.html',
|
||||
})
|
||||
export class ToolsComponent { }
|
||||
Reference in New Issue
Block a user