diff --git a/src/app/app.component.html b/src/app/app.component.html
index d0e51a3..45b8085 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -35,27 +35,27 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/src/app/component/infra/detail/host.component.ts b/src/app/component/infra/detail/host.component.ts
index 1abe82e..f59a1c9 100644
--- a/src/app/component/infra/detail/host.component.ts
+++ b/src/app/component/infra/detail/host.component.ts
@@ -91,7 +91,7 @@ export class HostComponent implements OnChanges {
map((pingResult: PingResult) => {
if (pingResult) {
this.pingResult = pingResult;
- this.pingResultRaw = pingResult.raw.join('\r\n');
+ this.pingResultRaw = pingResult.raw.join('\n');
}
this.pingWaiting = false;
}),
diff --git a/src/app/component/menu/export-jpeg.component.ts b/src/app/component/menu/export-jpeg.component.ts
index 19d633d..9b42c21 100644
--- a/src/app/component/menu/export-jpeg.component.ts
+++ b/src/app/component/menu/export-jpeg.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, AfterContentInit, OnDestroy, } from '@angular/core';
+import { Component, OnInit, AfterContentInit, OnDestroy, Output, EventEmitter, } from '@angular/core';
import { Store, select } from '@ngrx/store';
import { take } from 'rxjs/operators';
@@ -15,6 +15,7 @@ const { saveSvgAsPng, svgAsDataUri } = require('save-svg-as-png');
})
export class ExportJPEGComponent implements OnInit, AfterContentInit, OnDestroy {
msgs: Message[] = [];
+ @Output() close = new EventEmitter();
constructor(
private store: Store,
@@ -29,7 +30,7 @@ export class ExportJPEGComponent implements OnInit, AfterContentInit, OnDestroy
}
ngOnDestroy(): void {
-
+ this.msgs = [];
}
export() {
@@ -54,6 +55,7 @@ export class ExportJPEGComponent implements OnInit, AfterContentInit, OnDestroy
// console.log(`uri: ${uri}`);
// });
saveSvgAsPng(infraDisplayElementRef.nativeElement, 'diagram.jpeg', { backgroundColor: '#ffffff', encoderType: 'image/jpeg' });
+ this.close.emit();
}),
).subscribe();
}
diff --git a/src/app/component/menu/export-png.component.ts b/src/app/component/menu/export-png.component.ts
index 81cb3cc..3e5d615 100644
--- a/src/app/component/menu/export-png.component.ts
+++ b/src/app/component/menu/export-png.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, AfterContentInit, OnDestroy, } from '@angular/core';
+import { Component, OnInit, AfterContentInit, OnDestroy, Output, EventEmitter, } from '@angular/core';
import { Store, select } from '@ngrx/store';
import { take } from 'rxjs/operators';
@@ -15,6 +15,7 @@ const { saveSvgAsPng, svgAsDataUri } = require('save-svg-as-png');
})
export class ExportPNGComponent implements OnInit, AfterContentInit, OnDestroy {
msgs: Message[] = [];
+ @Output() close = new EventEmitter();
constructor(
private store: Store,
@@ -54,6 +55,7 @@ export class ExportPNGComponent implements OnInit, AfterContentInit, OnDestroy {
// console.log(`uri: ${uri}`);
// });
saveSvgAsPng(infraDisplayElementRef.nativeElement, 'diagram.png', { backgroundColor: '#ffffff' });
+ this.close.emit();
}),
).subscribe();
}
diff --git a/src/app/component/menu/export-svg.component.ts b/src/app/component/menu/export-svg.component.ts
index 90a6888..2912232 100644
--- a/src/app/component/menu/export-svg.component.ts
+++ b/src/app/component/menu/export-svg.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, AfterContentInit, OnDestroy, } from '@angular/core';
+import { Component, OnInit, AfterContentInit, OnDestroy, Output, EventEmitter, } from '@angular/core';
import { Store, select } from '@ngrx/store';
import { take } from 'rxjs/operators';
@@ -15,6 +15,7 @@ const { saveSvgAsPng, svgAsDataUri, download } = require('save-svg-as-png');
})
export class ExportSVGComponent implements OnInit, AfterContentInit, OnDestroy {
msgs: Message[] = [];
+ @Output() close = new EventEmitter();
constructor(
private store: Store,
@@ -53,6 +54,9 @@ export class ExportSVGComponent implements OnInit, AfterContentInit, OnDestroy {
svgAsDataUri(infraDisplayElementRef.nativeElement, { backgroundColor: '#ffffff' }, function (uri) {
download('diagram.svg', uri);
});
+
+ this.close.emit();
+
}),
).subscribe();
}