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"> <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> <of-key-value [key]="'PlatformFamily'" [value]="infraHostOS.platformFamily"></of-key-value>
</div> </div>
<div class="ui-g-12 ui-md-6 ui-key-value" *ngIf="infraHostOS.kervelVersion"> <div class="ui-g-12 ui-md-6 ui-key-value" *ngIf="infraHostOS.kernelVersion">
<of-key-value [key]="'Kernel'" [value]="infraHostOS.kervelVersion"></of-key-value> <of-key-value [key]="'Kernel'" [value]="infraHostOS.kernelVersion"></of-key-value>
</div> </div>
<div class="ui-g-12 ui-md-6 ui-key-value" *ngIf="infraHostOS.hostID"> <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> <of-key-value [key]="'Host ID'" [value]="infraHostOS.hostID"></of-key-value>

View File

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

View File

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

View File

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

View File

@ -25,11 +25,12 @@
<div *ngIf="editMode" class="of-key-value-div"> <div *ngIf="editMode" class="of-key-value-div">
<span>Name</span> <span>Name</span>
<span class="ng-star-inserted"> <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> <div *ngIf="displayNameErrMsg" class="ui-message ui-messages-error ui-corner-all">{{displayNameErrMsg}}</div>
</span> </span>
</div> </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>
<div class="ui-g-12 ui-md-6 ui-key-value"> <div class="ui-g-12 ui-md-6 ui-key-value">
@ -39,7 +40,8 @@
<div *ngIf="editMode" class="of-key-value-div"> <div *ngIf="editMode" class="of-key-value-div">
<span>Description</span> <span>Description</span>
<span class="ng-star-inserted"> <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> <div *ngIf="descriptionErrMsg" class="ui-message ui-messages-error ui-corner-all">{{descriptionErrMsg}}</div>
</span> </span>
</div> </div>

View File

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

View File

@ -39,10 +39,11 @@ export class ProbeListComponent implements OnInit, OnDestroy {
}), }),
select(AuthSelector.selectDomainMember), select(AuthSelector.selectDomainMember),
exhaustMap((domainMember: DomainMember) => exhaustMap((domainMember: DomainMember) =>
this.probeHostService.readAllByDomainID(domainMember.domain.id) this.probeHostService.readAllByDomainID(domainMember.domain.id)
.pipe( .pipe(
map((probeHosts: ProbeHost[]) => { map((probeHosts: ProbeHost[]) => {
this.probeHosts = probeHosts; this.probeHosts = probeHosts;
console.log(this.probeHosts);
}), }),
catchError(error => { catchError(error => {
this.error$ = of(error); this.error$ = of(error);

6
package-lock.json generated
View File

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

View File

@ -37,7 +37,7 @@
"@ngrx/router-store": "^5.2.0", "@ngrx/router-store": "^5.2.0",
"@ngrx/store": "^5.2.0", "@ngrx/store": "^5.2.0",
"@ngrx/store-devtools": "^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-google-recaptcha": "^1.0.3",
"angular-l10n": "^5.0.0", "angular-l10n": "^5.0.0",
"angularx-qrcode": "^1.1.7", "angularx-qrcode": "^1.1.7",