{% include 'a_header.twig' %}


          <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12">
              <div class="x_panel">
                <div class="x_title">
                  <h2>Opciones de alertas y logs. <small><i>0 deshabilita la alerta</i></small> </h2>
                  <div class="clearfix"></div>
                </div>
                <div class="x_content">

                  <form method="POST" data-parsley-validate class="form-horizontal form-label-left">
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="alerthdd">Porcentaje mínimo de espacio libre en HDD <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input type="number" id="alerthdd" name="alerthdd" required="required" min="0" max="99" class="form-control col-md-7 col-xs-12" value="{{sys.HDDALERT}}">
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="alertram">Porcentaje libre mínimo de RAM <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input type="number" id="alertram" name="alertram" required="required" min="0" max="99" class="form-control col-md-7 col-xs-12" value="{{sys.RAMALERT}}">
                        </div>
                      </div>

                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="autodelete">Limpieza de datos automática que tengan más de <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input type="number" id="autodelete" name="autodelete" required="required" min="1" max="180" class="form-control col-md-7 col-xs-12" value="{{sys.AUTODELETE}}"> días
                        </div>
                      </div>
                    </div>
                      <button type="submit" class="btn btn-primary">Enviar</button>
                    </div>
                  </form>
                </div>
              </div>
            </div>
            
          </div>

          <script>
          function dellogs(){
            conexion = new XMLHttpRequest();
            // Preparar la funcion de respuesta
            conexion.onreadystatechange = function() {  /* Mostrar */
            if(conexion.readyState == 4 && conexion.status == 200) {
                  console.log("Eliminados");
                  alert("Eliminados");
                }
            }
            // Realizar peticion HTTP
            conexion.open('POST', 'ajaxfunc.php');
            conexion.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            conexion.send("do=dellogs");
          }
          </script>


          <!-- Modal nuevo usuario -->
          <div class="modal fade bs-modal-createuser" tabindex="-1" role="dialog" aria-hidden="true" style="display: none;">
            <div class="modal-dialog modal-lg">
              <form method="POST" data-parsley-validate class="form-horizontal form-label-left">
                <div class="modal-content">

                  <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel">Crear usuario <small>Se crearán con permisos básicos que luego se pueden editar</small></h4>
                  </div>
                  <div class="modal-body">      

                    <div class="form-group">
                      <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Nombre del usuario <span class="required">*</span>
                      </label>
                      <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="text" id="name" name="name" required="required" class="form-control col-md-7 col-xs-12">{{POST.name}}
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="control-label col-md-3 col-sm-3 col-xs-12" for="password">Contraseña <span class="required">*</span>
                      </label>
                      <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="password" id="password" name="password" required="required" class="form-control col-md-7 col-xs-12">{{POST.IP}}
                      </div>
                    </div>
                  </div>
                  <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <button type="submit" class="btn btn-primary">Crear</button>
                  </div>
                </div>
              </form>
            </div>
          </div>


        </div>
        <!-- /page content -->


{% include 'a_footer.twig' %}