diff --git a/wg_dashboard_frontend/package.json b/wg_dashboard_frontend/package.json index 03dfce1..543befb 100644 --- a/wg_dashboard_frontend/package.json +++ b/wg_dashboard_frontend/package.json @@ -46,10 +46,16 @@ "angularx-qrcode": "^2.1.0", "classlist.js": "1.1.20150312", "core-js": "3.6.4", + "file-saver": "^2.0.2", "hammerjs": "^2.0.8", + "install": "^0.13.0", "ip-cidr": "^2.0.10", + "js-file-download": "^0.4.11", + "jszip": "^3.3.0", "material-icons": "^0.3.1", "ngx-cookie-service": "^3.0.4", + "npm": "^6.14.4", + "remove": "^0.1.5", "rxjs": "6.5.5", "tslib": "^1.10.0", "web-animations-js": "^2.3.2", diff --git a/wg_dashboard_frontend/src/app/app-routing.module.ts b/wg_dashboard_frontend/src/app/app-routing.module.ts index 455eaf3..fce4b83 100644 --- a/wg_dashboard_frontend/src/app/app-routing.module.ts +++ b/wg_dashboard_frontend/src/app/app-routing.module.ts @@ -8,7 +8,7 @@ import { ErrorComponent } from './page/error'; imports: [ RouterModule.forRoot( [ - { path: '', redirectTo: 'app/dashboard', pathMatch: 'full' }, + { path: '', redirectTo: 'page/dashboard', pathMatch: 'full' }, { path: 'page', loadChildren: () => import('./page/page.module').then(m => m.PageModule) }, /*{ path: 'app', component: LayoutComponent, children: diff --git a/wg_dashboard_frontend/src/app/page/dashboard/server/server.component.html b/wg_dashboard_frontend/src/app/page/dashboard/server/server.component.html index a1e3033..01b933e 100644 --- a/wg_dashboard_frontend/src/app/page/dashboard/server/server.component.html +++ b/wg_dashboard_frontend/src/app/page/dashboard/server/server.component.html @@ -14,6 +14,14 @@ + + + {{peer._stats?.handshake || 'N/A'}} + + + + + { + zip.file(`clients/${peer.name}_${peer.address}.conf`, peer.configuration) + }) + + zip.generateAsync({type:"blob"}).then((content) => { + saveAs(content, `${this.server.interface}_${this.server.address}.zip`); + }); + } }