{% extends "pyfarm/user_interface/layout.html" %}
{% block title %}Queue {{ queue.path() }} {% endblock %}
{% block jobqueues_nb_class %}active{% endblock %}
{% block content %}
<form method="POST" action="{{ url_for('single_jobqueue_ui', queue_id=queue.id) }}" class="form-horizontal">
  <div class="form-group">
    <label for="name" class="col-sm-2 control-label">Name</label>
    <div class="col-sm-10">
      <input id="name" class="form-control" type="text" value="{{ queue.name }}" disabled/>
    </div>
  </div>
  <div class="form-group">
    <label for="parent" class="col-sm-2 control-label">Parent Queue</label>
    <div class="col-sm-10">
      <input id="parent" class="form-control" type="text" value="{{ queue.parent.path() if queue.parent else '' }}" disabled/>
    </div>
  </div>
  <div class="form-group">
    <label for="minimum_agents" class="col-sm-2 control-label">Minimum Agents</label>
    <div class="col-sm-10">
      <input id="minimum_agents" class="form-control" name="minimum_agents" type="text" value="{{ queue.minimum_agents or ''}}"/>
    </div>
  </div>
  <div class="form-group">
    <label for="maximum_agents" class="col-sm-2 control-label">Maximum Agents</label>
    <div class="col-sm-10">
      <input id="maximum_agents" class="form-control" name="maximum_agents" type="text" value="{{ queue.maximum_agents or ''}}"/>
    </div>
  </div>
  <div class="form-group">
    <label for="priority" class="col-sm-2 control-label">Priority</label>
    <div class="col-sm-10">
      <input id="priority" class="form-control" name="priority" type="text" value="{{ queue.priority }}"/>
    </div>
  </div>
  <div class="form-group">
    <label for="weight" class="col-sm-2 control-label">Weight</label>
    <div class="col-sm-10">
      <input id="weight" class="form-control" name="weight" type="text" value="{{ queue.weight }}"/>
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <input type="submit" class="btn btn-primary" value="Update"/>
      <form class="icon" method="POST" action="{{ url_for('delete_jobqueue_ui', queue_id=queue.id) }}">
        <button onclick="return confirm('Are you sure you want to delete this jobqueue?');" title="Delete Jobqueue" class="btn">
          <i class="glyphicon glyphicon-trash"></i> Delete
        </button>
      </form>
    </div>
  </div>
</form>
{% endblock %}
