|
| 1 | +{% extends "base.html" %} |
| 2 | +{% load navigation_tags %} |
| 3 | +{% load authorization_tags %} |
| 4 | +{% block content %} |
| 5 | + {{ block.super }} |
| 6 | + <div class="row"> |
| 7 | + <div class="col-md-12"> |
| 8 | + <div class="panel panel-default"> |
| 9 | + <div class="panel-heading tight"> |
| 10 | + <h3 class="has-filters"> |
| 11 | + CI/CD Infrastructure |
| 12 | + <div class="dropdown pull-right"> |
| 13 | + {% if "dojo.add_cicdinfrastructure"|has_configuration_permission:request %} |
| 14 | + <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1" |
| 15 | + data-toggle="dropdown" aria-expanded="true" aria-label="CI/CD infrastructure options"> |
| 16 | + <span class="fa-solid fa-server"></span> |
| 17 | + <span class="caret"></span> |
| 18 | + </button> |
| 19 | + <ul class="dropdown-menu dropdown-menu-right" role="menu" |
| 20 | + aria-labelledby="dropdownMenu1"> |
| 21 | + <li role="presentation"> |
| 22 | + <a href="{% url 'add_cicd_infrastructure' %}"> |
| 23 | + <i class="fa-solid fa-plus"></i> Add CI/CD Infrastructure |
| 24 | + </a> |
| 25 | + </li> |
| 26 | + </ul> |
| 27 | + {% endif %} |
| 28 | + </div> |
| 29 | + </h3> |
| 30 | + </div> |
| 31 | + </div> |
| 32 | + {% if confs %} |
| 33 | + <div class="panel panel-default table-responsive"> |
| 34 | + <table id="cicd_infrastructure" |
| 35 | + class="tablesorter-bootstrap table table-condensed table-striped"> |
| 36 | + <thead> |
| 37 | + <tr> |
| 38 | + <th>Name</th> |
| 39 | + <th>Description</th> |
| 40 | + <th>URL</th> |
| 41 | + <th>Type</th> |
| 42 | + <th>Actions</th> |
| 43 | + </tr> |
| 44 | + </thead> |
| 45 | + <tbody> |
| 46 | + {% for conf in confs %} |
| 47 | + <tr> |
| 48 | + <td> |
| 49 | + {% if "dojo.change_cicdinfrastructure"|has_configuration_permission:request %} |
| 50 | + <a href="{% url 'edit_cicd_infrastructure' conf.id %}"><b>{{ conf.name }}</b></a> |
| 51 | + {% else %} |
| 52 | + {{ conf.name }} |
| 53 | + {% endif %} |
| 54 | + </td> |
| 55 | + <td> |
| 56 | + {% if conf.description %}{{ conf.description }}{% endif %} |
| 57 | + </td> |
| 58 | + <td> |
| 59 | + {% if conf.url %}{{ conf.url }}{% endif %} |
| 60 | + </td> |
| 61 | + <td> |
| 62 | + {{ conf.get_infrastructure_type_display }} |
| 63 | + </td> |
| 64 | + <td> |
| 65 | + {% if "dojo.delete_cicdinfrastructure"|has_configuration_permission:request %} |
| 66 | + <a href="{% url 'delete_cicd_infrastructure' conf.id %}" class="btn btn-xs" title="Delete"> |
| 67 | + <i class="fa-solid fa-trash"></i> |
| 68 | + </a> |
| 69 | + {% endif %} |
| 70 | + </td> |
| 71 | + </tr> |
| 72 | + {% endfor %} |
| 73 | + </tbody> |
| 74 | + </table> |
| 75 | + </div> |
| 76 | + {% else %} |
| 77 | + <p class="text-center">No CI/CD infrastructure found.</p> |
| 78 | + {% endif %} |
| 79 | + </div> |
| 80 | + </div> |
| 81 | +{% endblock %} |
0 commit comments