member_webapp/@overflow/discovery/component/search-config.component.html

106 lines
4.4 KiB
HTML
Raw Permalink Normal View History

2018-05-30 09:39:26 +00:00
<div class="ui-g" *ngIf="probeHost">
<div>
<label>IP Version</label>
</div>
<div class="ui-g-12 ui-bottom-space-20">
<div class="ui-g-6 ui-g-nopad">
2018-06-15 11:03:25 +00:00
<p-radioButton name="group1" value="V4" label="IPv4" [(ngModel)]="ipType"></p-radioButton>
2018-05-30 09:39:26 +00:00
</div>
<div class="ui-g-6 ui-g-nopad">
2018-06-15 11:03:25 +00:00
<p-radioButton [disabled]="!SUPPORT_V6" name="group1" value="V6" label="IPv6" [(ngModel)]="ipVer"></p-radioButton>
2018-05-30 09:39:26 +00:00
</div>
</div>
<div *ngIf="ipVer === 'v4' else V6" class="ui-g-12">
<div>
<div>
<p-checkbox value="host" label="Host" [(ngModel)]="hostChecked" binary="true" [disabled]="true"></p-checkbox>
</div>
<label>Range</label>
</div>
<div class="ui-g-12">
<of-ip-input [hostIp]="startIP" (inputIp)="onInputIP($event, 0)" [title]="'From'" [fixed]="fixedIPrange"></of-ip-input>
</div>
<div class="ui-g-12">
<of-ip-input [hostIp]="endIP" (inputIp)="onInputIP($event, 1)" [title]="'To'" [fixed]="fixedIPrange"></of-ip-input>
</div>
2018-05-30 14:05:58 +00:00
<div class="ui-g-12">
2018-05-31 07:03:59 +00:00
<p-multiSelect (onFocus)="onIPExcludeFocus()" [options]="ipArray" optionLabel="ip" [(ngModel)]="excludeIPs" [panelStyle]="{minWidth:'12em'}"
selectedItemsLabel="{0} hosts are excluded." maxSelectedLabels="2" defaultLabel="Add exclude IP"></p-multiSelect>
2018-05-30 14:05:58 +00:00
</div>
2018-05-30 09:39:26 +00:00
<div *ngIf="ipErrMsg" class="ui-message ui-messages-error ui-corner-all">
{{ipErrMsg}}
</div>
</div>
<ng-template #V6>
<!-- TODO -->
</ng-template>
<div class="ui-g-12">
<div>
<p-checkbox #portCheckbox value="port" label="Port" [(ngModel)]="portChecked" binary="true" (onChange)="onPortCheckChange(serviceCheckbox, $event)"></p-checkbox>
</div>
</div>
<div class="ui-g-12 ui-bottom-space-20">
<div class="ui-g-6 ui-g-nopad">
TCP &nbsp;
<p-inputSwitch [(ngModel)]="tcpChecked" [disabled]="!portChecked" binary="true" (onChange)="onPortTypeCheck(portCheckbox, serviceCheckbox)"></p-inputSwitch>
</div>
<div class="ui-g-6 ui-g-nopad">
UDP &nbsp;
<p-inputSwitch [(ngModel)]="udpChecked" [disabled]="!portChecked" binary="true" (onChange)="onPortTypeCheck(portCheckbox, serviceCheckbox)"></p-inputSwitch>
</div>
</div>
<div class="ui-g-12">
<label>Range</label>
</div>
<div class="ui-g-12 ui-g-nopad ui-bottom-space-20">
2018-06-09 07:47:07 +00:00
<div class="ui-g-6">
2018-05-30 09:39:26 +00:00
<input #startPort id="float-input" type="number" maxlength="5" min="1" max="65535" pInputText [disabled]="!portChecked" value="1"
(keyup)="onInputPort(startPort.value, 0)">
</div>
2018-06-09 07:47:07 +00:00
<div class="ui-g-6">
2018-05-30 09:39:26 +00:00
<input #endPort id="float-input" type="number" maxlength="5" min="1" max="65535" pInputText [disabled]="!portChecked" value="1024"
(keyup)="onInputPort(endPort.value, 1)">
</div>
2018-06-09 07:47:07 +00:00
<div class="ui-g-12 ui-g-nopad" style="margin-left: 0.5em">
2018-06-15 11:03:25 +00:00
<a style="cursor: pointer" (click)="portExcludeDisplay = true">
<span *ngIf="excludePorts.length === 0">Add Exclude Ports</span>
<span *ngIf="excludePorts.length > 0">{{excludePorts.length}} ports are excluded.</span>
</a>
</div>
2018-05-30 09:39:26 +00:00
</div>
2018-06-09 07:47:07 +00:00
2018-05-30 09:39:26 +00:00
<div *ngIf="portErrMsg" class="ui-message ui-messages-error ui-corner-all">
{{portErrMsg}}
</div>
<div class="ui-g-12">
<div>
<p-checkbox #serviceCheckbox value="service" label="Service" [(ngModel)]="serviceChecked" (onChange)="onServiceCheckChange(portCheckbox, $event)"
binary="true"></p-checkbox>
</div>
</div>
<div class="ui-g-12 ui-g-nopad">
2018-05-31 13:26:14 +00:00
<of-service-selector [disabled]="!serviceChecked" (change)="includeServices = $event"></of-service-selector>
2018-06-15 12:31:44 +00:00
<!-- <of-meta-service-type-selector [disabled]="!serviceChecked" (change)="includeServices = $event"></of-meta-service-type-selector> -->
2018-05-30 09:39:26 +00:00
</div>
<div class="ui-g-12" dir="rtl">
<button type="submit" [disabled]="!validation" label="Discovery Start" pButton class="ui-button-width-fit" (click)="onRequestDiscovery()"></button>
</div>
</div>
2018-05-31 07:03:59 +00:00
<p-dialog [(visible)]="portExcludeDisplay" [modal]="true" [responsive]="true" [width]="400">
<p-header>
Add Ports to exclude.
</p-header>
<p-chips [(ngModel)]="portChips" [addOnTab]="true" [allowDuplicate]="false" (onAdd)="onAddExcludePort($event)" (onRemove)="onRemoveExcludePort($event)"
[max]="20" placeholder="e.g. 1025~65535"></p-chips>
<p-footer>
<button type="button" pButton icon="fa-check" (click)="portExcludeDisplay=false" label="Done"></button>
</p-footer>
</p-dialog>