This commit is contained in:
insanity 2018-06-14 20:20:17 +09:00
parent bb38d922e4
commit 3864e3215f
9 changed files with 30 additions and 22 deletions

View File

@ -21,8 +21,8 @@
<div class="ui-g-12 ui-md-6 ui-key-value" *ngIf="infraHostOS.platformFamily">
<of-key-value [key]="'PlatformFamily'" [value]="infraHostOS.platformFamily"></of-key-value>
</div>
<div class="ui-g-12 ui-md-6 ui-key-value" *ngIf="infraHostOS.kervelVersion">
<of-key-value [key]="'Kernel'" [value]="infraHostOS.kervelVersion"></of-key-value>
<div class="ui-g-12 ui-md-6 ui-key-value" *ngIf="infraHostOS.kernelVersion">
<of-key-value [key]="'Kernel'" [value]="infraHostOS.kernelVersion"></of-key-value>
</div>
<div class="ui-g-12 ui-md-6 ui-key-value" *ngIf="infraHostOS.hostID">
<of-key-value [key]="'Host ID'" [value]="infraHostOS.hostID"></of-key-value>

View File

@ -51,7 +51,12 @@ export class NoAuthProbeDetailComponent implements OnInit {
}
accept() {
console.log(this.selectedNIC);
this.selectedNIC.address = '192.168.1.0/24';
let message = 'Start collecting data as a Probe.\n';
message += this.selectedNIC.iface + '\n';
message += this.selectedNIC.address;
this.confirmationService.confirm({
@ -64,7 +69,8 @@ export class NoAuthProbeDetailComponent implements OnInit {
tap(() => {
this.pending$ = of(true);
}),
map((noauthProbes: NoAuthProbe[]) => {
map((noauthProbes: NoAuthProbe) => {
console.log(noauthProbes);
this.back.emit();
}),
catchError(error => {
@ -94,7 +100,7 @@ export class NoAuthProbeDetailComponent implements OnInit {
tap(() => {
this.pending$ = of(true);
}),
map((noauthProbes: NoAuthProbe[]) => {
map((noauthProbes: NoAuthProbe) => {
this.back.emit();
}),
catchError(error => {

View File

@ -100,10 +100,9 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
return null;
}
let os = noauthProbe.infraHost.infraHostOS.os;
os += noauthProbe.infraHost.infraHostOS.platform ?
noauthProbe.infraHost.infraHostOS.platform : '';
os += noauthProbe.infraHost.infraHostOS.platformFamily ?
noauthProbe.infraHost.infraHostOS.platformFamily : '';
' (' + noauthProbe.infraHost.infraHostOS.platform + ') ' : '';
return os;
}

View File

@ -21,12 +21,12 @@ export class NoAuthProbeService {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.readAllByDomainID', domainID);
}
public acceptNoAuthProbe(id: number, zoneCIDR: string): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.acceptNoAuthProbe', id, zoneCIDR);
public acceptNoAuthProbe(id: number, zoneCIDR: string): Observable<NoAuthProbe> {
return this.rpcService.call<NoAuthProbe>('NoAuthProbeService.acceptNoAuthProbe', id, zoneCIDR);
}
public denyNoauthProbe(id: number): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.denyNoauthProbe', id);
public denyNoauthProbe(id: number): Observable<NoAuthProbe> {
return this.rpcService.call<NoAuthProbe>('NoAuthProbeService.denyNoauthProbe', id);
}
public read(id: number): Observable<NoAuthProbe> {

View File

@ -25,11 +25,12 @@
<div *ngIf="editMode" class="of-key-value-div">
<span>Name</span>
<span class="ng-star-inserted">
<input #displayName type="text" pInputText value="{{probe.displayName}}" (keyup)="onDisplayNameEditing(displayName.value)"/>
<input #displayName type="text" pInputText value="{{probe.displayName}}" (keyup)="onDisplayNameEditing(displayName.value)"
/>
<div *ngIf="displayNameErrMsg" class="ui-message ui-messages-error ui-corner-all">{{displayNameErrMsg}}</div>
</span>
</div>
<of-key-value *ngIf="!editMode" [key]="'Name'" [value]="probe.displayName"></of-key-value>
<of-key-value *ngIf="!editMode" [key]="'Name'" [value]="probe.name"></of-key-value>
</div>
<div class="ui-g-12 ui-md-6 ui-key-value">
@ -39,7 +40,8 @@
<div *ngIf="editMode" class="of-key-value-div">
<span>Description</span>
<span class="ng-star-inserted">
<input #description type="text" pInputText value="{{probe.description}}" (keyup)="onDescriptionEditing(description.value)"/>
<input #description type="text" pInputText value="{{probe.description}}" (keyup)="onDescriptionEditing(description.value)"
/>
<div *ngIf="descriptionErrMsg" class="ui-message ui-messages-error ui-corner-all">{{descriptionErrMsg}}</div>
</span>
</div>

View File

@ -18,10 +18,10 @@
</ng-template>
<ng-template pTemplate="body" let-probeHost>
<tr [pSelectableRow]="probeHost">
<td>{{probeHost.probe.displayName}}</td>
<td>{{probeHost.probe.name}}</td>
<td>{{getUptime(probeHost.probe)}}</td>
<td>{{probeHost.infraHost.ipv4}}</td>
<td>{{probeHost.infraHost.infraOS.metaInfraVendor.name}}</td>
<td></td>
<td></td>
<td>{{probeHost.probe.cidr}}</td>
<td>{{probeHost.probe.targetCount}}</td>
<td>{{probeHost.probe.authorizeDate | date: 'dd.MM.yyyy'}}</td>

View File

@ -43,6 +43,7 @@ export class ProbeListComponent implements OnInit, OnDestroy {
.pipe(
map((probeHosts: ProbeHost[]) => {
this.probeHosts = probeHosts;
console.log(this.probeHosts);
}),
catchError(error => {
this.error$ = of(error);

6
package-lock.json generated
View File

@ -453,9 +453,9 @@
}
},
"@overflow/commons-typescript": {
"version": "0.0.12",
"resolved": "https://nexus.loafle.net/repository/npm-all/@overflow/commons-typescript/-/commons-typescript-0.0.12.tgz",
"integrity": "sha512-XIQMPF0F5zJUY8NsFW0jhTMyUcVHjz0u3/p+iwK+ZxmBJAzcRFOwBKqxMhqTKSZXye1+ktsQ+oyPr+RV5HPy3g=="
"version": "0.0.13",
"resolved": "https://nexus.loafle.net/repository/npm-all/@overflow/commons-typescript/-/commons-typescript-0.0.13.tgz",
"integrity": "sha512-tJjVIglL3rwoX1S3IooMQGAubRGCTqETNHDwcPRNFvWF1FP8puf/rLBMFMMX8cNfBrYqdPjZdqrppLRYJnrP8Q=="
},
"@schematics/angular": {
"version": "0.6.5",

View File

@ -37,7 +37,7 @@
"@ngrx/router-store": "^5.2.0",
"@ngrx/store": "^5.2.0",
"@ngrx/store-devtools": "^5.2.0",
"@overflow/commons-typescript": "^0.0.12",
"@overflow/commons-typescript": "^0.0.13",
"angular-google-recaptcha": "^1.0.3",
"angular-l10n": "^5.0.0",
"angularx-qrcode": "^1.1.7",