frontend/src/app/pages/engines/engines.component.html
<nb-layout>
<nb-layout-header>
<nb-sidebar-toggle style="width:100vw"></nb-sidebar-toggle>
</nb-layout-header>
<nb-sidebar left tag="left" state="expanded" responsive>
<nb-menu-services></nb-menu-services>
</nb-sidebar>
<nb-layout-column>
<nb-card [nbSpinner]="loading" nbSpinnerStatus="primary">
<nb-card-body class="example-items-col">
<h2>Engines management</h2>
<br>
<button type="button" (click)="addEngineModal(dialogAddEngine)" nbButton status="success"><nb-icon icon="plus-square-outline" ></nb-icon></button>
<br>
<table >
<tr>
<th>Name</th>
<th>Instance type</th>
<th>Provider</th>
<th>Scan type</th>
<th>Notifications</th>
<th>Active recon</th>
<th>Intel recon</th>
<th>Check leaks</th>
<th>Nuclei</th>
<th>All templates</th>
<th>Permutation</th>
<th>Gau</th>
<th>Custom templates</th>
<th>Action</th>
</tr>
<tr *ngFor="let item of this.enginesList">
<td>{{ item.name }}</td>
<td>{{ item.infos.instance_type }}</td>
<td>{{ item.infos.provider }}</td>
<td>{{ item.infos.type_scan }}</td>
<td><nb-icon icon="{{ item.infos.notifs ? 'checkmark-circle-outline' : 'close-circle-outline'}}" status="{{ item.infos.notifs ? 'success' : ''}}"></nb-icon></td>
<td><nb-icon icon="{{ item.infos.active_recon ? 'checkmark-circle-outline' : 'close-circle-outline'}}" status="{{ item.infos.active_recon ? 'success' : ''}}"></nb-icon></td>
<td><nb-icon icon="{{ item.infos.intel ? 'checkmark-circle-outline' : 'close-circle-outline'}}" status="{{ item.infos.intel ? 'success' : ''}}"></nb-icon></td>
<td><nb-icon icon="{{ item.infos.leak ? 'checkmark-circle-outline' : 'close-circle-outline'}}" status="{{ item.infos.leak ? 'success' : ''}}"></nb-icon></td>
<td><nb-icon icon="{{ item.infos.nuclei ? 'checkmark-circle-outline' : 'close-circle-outline'}}" status="{{ item.infos.nuclei ? 'success' : ''}}"></nb-icon></td>
<td><nb-icon icon="{{ item.infos.all_templates ? 'checkmark-circle-outline' : 'close-circle-outline'}}" status="{{ item.infos.all_templates ? 'success' : ''}}"></nb-icon></td>
<td><nb-icon icon="{{ item.infos.permutation ? 'checkmark-circle-outline' : 'close-circle-outline'}}" status="{{ item.infos.permutation ? 'success' : ''}}"></nb-icon></td>
<td><nb-icon icon="{{ item.infos.gau ? 'checkmark-circle-outline' : 'close-circle-outline'}}" status="{{ item.infos.gau ? 'success' : ''}}"></nb-icon></td>
<td>{{item.infos.custom_templates.join(',')}}</td>
<td>
<div class="row actionGrp" >
<div class="col">
<button type="button" (click)="deleteEngine(item.id)" nbButton status="danger"><nb-icon icon="trash-outline" ></nb-icon></button>
<button type="button" (click)="openUpdateTemplate(item.id,dialogAddEngine)" nbButton status="success"><nb-icon icon="edit-outline" ></nb-icon></button>
</div>
</div>
</td>
</tr>
</table>
</nb-card-body>
</nb-card>
<ng-template #dialogAddEngine let-data let-ref="dialogAddEngine" >
<nb-card [nbSpinner]="loadingModal" nbSpinnerStatus="primary" class="dialogAddEngine">
<nb-card-header>Create Engine</nb-card-header>
<nb-card-body>
<form >
<div class=" modaleBth">
<div class="form-group">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Engine name</label>
<div class="col-sm-8">
<input class="col" [value]="modelEngine.name" nbInput type="text"(selectedChange)="toggle($event,'name')" #name>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Scan type</label>
<div class="col-sm-8">
<nb-select placeholder="Select type of scan" [selected]="modelEngine.infos.type_scan ? modelEngine.infos.type_scan : '' " (selectedChange)="toggle($event,'type_scan')">
<nb-option value="recon">Recon</nb-option>
<nb-option value="nuclei">Nuclei</nb-option>
</nb-select>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Provider</label>
<div class="col-sm-8">
<nb-select placeholder="Select provider" [selected]="modelEngine.infos.provider" (selectedChange)="toggle($event,'provider')">
<nb-option value="scaleway">Scaleway</nb-option>
<nb-option value="aws">Aws</nb-option>
</nb-select>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Instance type</label>
<div class="col-sm-8">
<nb-select placeholder="Select server type" [selected]="modelEngine.infos.instance_type" (selectedChange)="toggle($event,'instance_type')" >
<nb-option *ngFor="let intance of this.currentInstance | keyvalue" value="{{intance.key}}">{{intance.value}}</nb-option>
</nb-select>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Personnal Nuclei template</label>
<div class="col-sm-8">
<nb-select multiple placeholder="Select custom template" [selected]="modelEngine.infos.custom_templates" (selectedChange)="toggle($event,'custom_templates')">
<nb-option *ngFor="let template of this.templatList" value="{{template}}">{{template}}</nb-option>
</nb-select>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Select Nuclei criticity</label>
<div class="col-sm-8">
<nb-select multiple placeholder="Select Nuclei criticity" [selected]="modelEngine.infos.nuclei_severity" (selectedChange)="toggle($event,'nuclei_severity')">
<nb-option value="info">info</nb-option>
<nb-option value="low">low</nb-option>
<nb-option value="medium">medium</nb-option>
<nb-option value="high">high</nb-option>
<nb-option value="critical">critical</nb-option>
<nb-option value="unknown">unknown</nb-option>
</nb-select>
</div>
</div>
<!---->
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Notifications</label>
<div class="col-sm-2">
<nb-checkbox [checked]="modelEngine.infos.notifs" (checkedChange)="toggle($event,'notifs')" ></nb-checkbox>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Active recon</label>
<div class="col-sm-2">
<nb-checkbox [checked]="modelEngine.infos.active_recon" (checkedChange)="toggle($event,'active_recon')" ></nb-checkbox>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Use custom interactSh</label>
<div class="col-sm-2">
<nb-checkbox [checked]="modelEngine.infos.custom_interactsh" (checkedChange)="toggle($event,'custom_interactsh')" ></nb-checkbox>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Meshs check before scan</label>
<div class="col-sm-2">
<nb-checkbox [checked]="modelEngine.infos.meshs" (checkedChange)="toggle($event,'meshs')" ></nb-checkbox>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Intel recon</label>
<div class="col-sm-2">
<nb-checkbox [checked]="modelEngine.infos.intel" (checkedChange)="toggle($event,'intel')" ></nb-checkbox>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Leak check</label>
<div class="col-sm-2">
<nb-checkbox [checked]="modelEngine.infos.leak" (checkedChange)="toggle($event,'leak')" ></nb-checkbox>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Nuclei</label>
<div class="col-sm-2">
<nb-checkbox [checked]="modelEngine.infos.nuclei" (checkedChange)="toggle($event,'nuclei')"></nb-checkbox>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">All Nuclei templates</label>
<div class="col-sm-2">
<nb-checkbox [checked]="modelEngine.infos.all_templates" (checkedChange)="toggle($event,'all_templates')" ></nb-checkbox>
</div>
</div>
<div class="form-group">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Domain permutation</label>
<div class="col-sm-2">
<nb-checkbox [checked]="modelEngine.infos.permutation" (checkedChange)="toggle($event,'permutation')" ></nb-checkbox>
</div>
</div>
<div class="form-group ">
<label for="inputEmail1" class="label col-sm-4 col-form-label">Get all URL (like Wayback)</label>
<div class="col-sm-2">
<nb-checkbox [checked]="modelEngine.infos.gau" (checkedChange)="toggle($event,'gau')" ></nb-checkbox>
</div>
</div>
<div class=" modaleBth row">
<div class="col">
<button nbButton (click)="closeAddEngineModal()">Cancel</button>
</div>
<div class="col">
<button type="button" nbButton (click)="data==-1 ?addEngine($event,name.value) : updateEngine($event,name.value,data)" status="success">{{data==-1 ?"Create": "Update"}}</button>
</div>
</div>
</div>
</form>
</nb-card-body>
</nb-card>
</ng-template>
</nb-layout-column>
</nb-layout>