keyvalue component
This commit is contained in:
parent
df5c1958cc
commit
7b703dfa0d
|
@ -3,46 +3,33 @@
|
||||||
<of-discovery-setting (close)="onDiscoverycloseDialog()"></of-discovery-setting>
|
<of-discovery-setting (close)="onDiscoverycloseDialog()"></of-discovery-setting>
|
||||||
</p-dialog>
|
</p-dialog>
|
||||||
<div *ngIf="probe">
|
<div *ngIf="probe">
|
||||||
|
|
||||||
<div class="ui-g form-group">
|
<div class="ui-g form-group">
|
||||||
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
||||||
<span class="md-inputfield">
|
<of-key-value [key]="'Alias'" [value]="probe.displayName"></of-key-value>
|
||||||
<input type="text" pInputText readonly value="{{probe.displayName}}">
|
|
||||||
<label>Alias</label>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
||||||
<span class="md-inputfield">
|
<of-key-value [key]="'CIDR'" [value]="probe.cidr"></of-key-value>
|
||||||
<input type="text" pInputText readonly value="{{probe.cidr}}">
|
|
||||||
<label>CIDR</label>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
||||||
<span class="md-inputfield">
|
<of-key-value [key]="'Description'" [value]="probe.description"></of-key-value>
|
||||||
<input type="text" pInputText readonly value="{{probe.description}}">
|
|
||||||
<label>Description</label>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
||||||
<span class="md-inputfield">
|
<of-key-value [key]="'Key'" [value]="probe.probeKey"></of-key-value>
|
||||||
<input type="text" pInputText readonly value="{{probe.probeKey}}">
|
|
||||||
<label>Key</label>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
||||||
<span class="md-inputfield">
|
<of-key-value [key]="'Authrozied at'" [value]="probe.authorizeDate | date: 'dd/MM/yyyy'"></of-key-value>
|
||||||
<input type="text" pInputText readonly value="{{probe.authorizeDate | date: 'dd/MM/yyyy'}}">
|
|
||||||
<label>Authrozied at</label>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
||||||
<span class="md-inputfield">
|
<of-key-value [key]="'Authrozied by'" [value]="probe.authorizeMember.name"></of-key-value>
|
||||||
<input type="text" pInputText readonly value="{{probe.authorizeMember.name}}">
|
</div>
|
||||||
<label>Authrozied by</label>
|
<div class="ui-g-12 ui-md-6 ui-lg-4">
|
||||||
</span>
|
<of-key-value [key]="'IP Range'" [value]="IPRange"></of-key-value>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-bottom-space-10" dir="rtl">
|
<div class="ui-bottom-space-10" dir="rtl">
|
||||||
<button class="ui-button-danger ui-button-width-fit" type="button" label="Remove this Probe" icon="ui-icon-close" pButton (click)="onRemoveClick()"></button>
|
<button class="ui-button-danger ui-button-width-fit" type="button" label="Remove this Probe" icon="ui-icon-close" pButton
|
||||||
|
(click)="onRemoveClick()"></button>
|
||||||
<button class="ui-button-width-fit" type="button" label="Discovery" icon="ui-icon-search" pButton (click)="onDiscoveryClick()"></button>
|
<button class="ui-button-width-fit" type="button" label="Discovery" icon="ui-icon-search" pButton (click)="onDiscoveryClick()"></button>
|
||||||
</div>
|
</div>
|
||||||
<p-confirmDialog header="Confirmation" icon="fa ui-icon-warning" width="425"></p-confirmDialog>
|
<p-confirmDialog header="Confirmation" icon="fa ui-icon-warning" width="425"></p-confirmDialog>
|
|
@ -19,8 +19,7 @@ export class DetailComponent implements OnInit, AfterContentInit {
|
||||||
|
|
||||||
probe$ = this.detailStore.pipe(select(DetailSelector.select('probe')));
|
probe$ = this.detailStore.pipe(select(DetailSelector.select('probe')));
|
||||||
probe: Probe = null;
|
probe: Probe = null;
|
||||||
startIP: string;
|
IPRange: string;
|
||||||
endIP: string;
|
|
||||||
display = false;
|
display = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -56,13 +55,12 @@ export class DetailComponent implements OnInit, AfterContentInit {
|
||||||
arrangeInfo() {
|
arrangeInfo() {
|
||||||
const cidr = new CIDR(this.probe.cidr);
|
const cidr = new CIDR(this.probe.cidr);
|
||||||
if (!cidr.isValid()) {
|
if (!cidr.isValid()) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
this.startIP = cidr.addressStart.address;
|
this.IPRange = cidr.addressStart.address + ' ~ ' + cidr.addressEnd.address;
|
||||||
this.endIP = cidr.addressEnd.address;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onDiscoveryClick() {
|
onDiscoveryClick() {
|
||||||
// alert('Discovery를 열거라 대훈');
|
|
||||||
this.display = true;
|
this.display = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,8 @@ import { ProbeStoreModule } from './probe-store.module';
|
||||||
import { SERVICES } from './service';
|
import { SERVICES } from './service';
|
||||||
import { PrimeNGModules } from '../commons/prime-ng/prime-ng.module';
|
import { PrimeNGModules } from '../commons/prime-ng/prime-ng.module';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
// import { SettingComponent as DiscoverySettingComponent } from 'packages/discovery/component/setting/setting.component';
|
|
||||||
// import { DiscoveryModule } from '../discovery/discovery.module';
|
|
||||||
import { DiscoveryModule } from 'packages/discovery/discovery.module';
|
import { DiscoveryModule } from 'packages/discovery/discovery.module';
|
||||||
|
import { KeyValueModule } from 'app/commons/component/key-value/key-value.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -16,7 +15,8 @@ import { DiscoveryModule } from 'packages/discovery/discovery.module';
|
||||||
PrimeNGModules,
|
PrimeNGModules,
|
||||||
ProbeStoreModule,
|
ProbeStoreModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
DiscoveryModule
|
DiscoveryModule,
|
||||||
|
KeyValueModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
COMPONENTS,
|
COMPONENTS,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user