<div id='am-edit-modal' class="modal fade" tabindex="-1" role="dialog">
	<form method="post" id='am-edit-form'>
		<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<h5 class="modal-title">{{ dialog.edit_record }}</h5>
					<div class="modal-close">
						<div class="confirm-closing" style="display: none;">
							<span class='mx-2' style="vertical-align: middle;">
								<b>{{ i18n("active_monitoring_stats.validation.abort_edit") }}</b>
							</span>
							<div class="btn-group btn-group-sm">
								<button class="btn btn-secondary cancel" type="button">{{ i18n("cancel") }}</button>
								<button data-dismiss="modal" class="btn btn-danger confirm" type="button">{{ i18n("abort") }}</button>
							</div>
						</div>
						<button type="button" class="close" data-dismiss="modal" aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
					</div>
				</div>
				<div class="modal-body container-fluid">
					<div class="form-group row">
						<label class="col-sm-3 col-form-label">{{ dialog.measurement }}</label>
						<div class="col-sm-5">
							{* dialog.edit_measurement_select *}
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-3 col-form-label">{{ dialog.am_host }}</label>
						<div class="col-sm-5">
							<input placeholder="yourhostname.org" required id="input-edit-host" type="text" name="host"
								class="form-control measurement-host" />
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-3 col-form-label">{{ dialog.periodicity }}</label>
						<div class="col-sm-5">
							{* dialog.edit_granularity_select *}
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-3 col-form-label">{{ dialog.threshold }}</label>
						<div class="col-sm-5">
							<div class="input-group">
								<div class="input-group-prepend">
									<span class="input-group-text measurement-operator"></span>
								</div>
								<input required id="input-edit-threshold" name="threshold" type="number"
									class="form-control rounded-right measurement-threshold" min="1" max="10000">
							</div>
						</div>
						<div class="col-sm-2 pl-0">
							<span class="my-auto ml-1 measurement-unit d-inline-block p-2"></span>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-3 col-form-label">
							{{ i18n("pools.pool_names_suffix.active_monitoring") }}
						</label>
						<div class="col-sm-5">
							<select class="form-control" name="pool" id="select-edit-pool">
								{% for _, pool in pairsByKeys(pools:get_all_pools(), asc) do %}
								<option value="{{ pool.pool_id }}">{{ pool.name }}</option>
								{% end %}
							</select>
                            <small class="d-block my-1 recipients-info"></small>
						</div>
						<div class="col-sm-4 pl-0">
							<a class="d-inline-block p-2 edit-pool"
								href="{{ntop.getHttpPrefix()}}/lua/admin/manage_pools.lua?page=active_monitoring&pool=0&referer=/plugins/active_monitoring_stats.lua">
								<i class="fas fa-edit"></i>
							</a>
						</div>
					</div>
					<div id='script-description' class='alert alert-light' role='alert'>
						<b>{{ dialog.notes }}</b>
						<ul>
							<li>{{ dialog.note_icmp }}</li>
							<li>{{ dialog.note_http }}</li>
							<li>{{ dialog.note_alert }}</li>
							<li>{{ dialog.note_periodicity_change }}</li>
						</ul>
					</div>
					<span class="invalid-feedback"></span>
				</div>
				<div class="modal-footer">
					<button id="btn-reset-defaults" type="button"
						class="btn btn-danger mr-auto">{{ dialog.reset }}</button>
					<button type="submit" class="btn btn-primary">{{ i18n("edit") }}</button>
				</div>
			</div>
		</div>
	</form>
</div>