mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	* Reference database object by GFK when running scripts & reports via UI * Reference database object by GFK when running scripts & reports via API * Remove old enqueue_job() method * Enable filtering jobs by object * Introduce ObjectJobsView * Add tabbed views for report & script jobs * Add object_id to JobSerializer * Move generic relation to JobsMixin * Clean up old naming
This commit is contained in:
		@@ -2,24 +2,24 @@
 | 
			
		||||
{% load helpers %}
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
  {% if result.started %}
 | 
			
		||||
    Started: <strong>{{ result.started|annotated_date }}</strong>
 | 
			
		||||
  {% elif result.scheduled %}
 | 
			
		||||
    Scheduled for: <strong>{{ result.scheduled|annotated_date }}</strong> ({{ result.scheduled|naturaltime }})
 | 
			
		||||
  {% if job.started %}
 | 
			
		||||
    Started: <strong>{{ job.started|annotated_date }}</strong>
 | 
			
		||||
  {% elif job.scheduled %}
 | 
			
		||||
    Scheduled for: <strong>{{ job.scheduled|annotated_date }}</strong> ({{ job.scheduled|naturaltime }})
 | 
			
		||||
  {% else %}
 | 
			
		||||
    Created: <strong>{{ result.created|annotated_date }}</strong>
 | 
			
		||||
    Created: <strong>{{ job.created|annotated_date }}</strong>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if result.completed %}
 | 
			
		||||
    Duration: <strong>{{ result.duration }}</strong>
 | 
			
		||||
  {% if job.completed %}
 | 
			
		||||
    Duration: <strong>{{ job.duration }}</strong>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  <span id="pending-result-label">{% badge result.get_status_display result.get_status_color %}</span>
 | 
			
		||||
  <span id="pending-result-label">{% badge job.get_status_display job.get_status_color %}</span>
 | 
			
		||||
</p>
 | 
			
		||||
{% if result.completed %}
 | 
			
		||||
{% if job.completed %}
 | 
			
		||||
  <div class="card">
 | 
			
		||||
    <h5 class="card-header">Report Methods</h5>
 | 
			
		||||
    <div class="card-body">
 | 
			
		||||
      <table class="table table-hover">
 | 
			
		||||
        {% for method, data in result.data.items %}
 | 
			
		||||
        {% for method, data in job.data.items %}
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td class="font-monospace"><a href="#{{ method }}">{{ method }}</a></td>
 | 
			
		||||
            <td class="text-end report-stats">
 | 
			
		||||
@@ -46,7 +46,7 @@
 | 
			
		||||
          </tr>
 | 
			
		||||
        </thead>
 | 
			
		||||
        <tbody>
 | 
			
		||||
          {% for method, data in result.data.items %}
 | 
			
		||||
          {% for method, data in job.data.items %}
 | 
			
		||||
            <tr>
 | 
			
		||||
              <th colspan="4" style="font-family: monospace">
 | 
			
		||||
                <a name="{{ method }}"></a>{{ method }}
 | 
			
		||||
@@ -75,6 +75,6 @@
 | 
			
		||||
      </table>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
{% elif result.started %}
 | 
			
		||||
{% elif job.started %}
 | 
			
		||||
  {% include 'extras/inc/result_pending.html' %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user