1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- {% extends 'base.html' %}
- {% load bootstrap4 humanize %}
- {% block usertab %}{% if service.adhesion == request.user.adhesion %} class="active"{% endif %}{% endblock %}
- {% block corptab %}{% if service.adhesion != request.user.adhesion %} active{% endif %}{% endblock %}
- {% block content %}
- <div class="panel panel-{{ service.is_active|yesno:"success,danger"}}">
- <div class="panel-heading">
- <h3>{{ service.service_type }}</h3>
- {% if service.label %}
- <h4>{{ service.label }}</h4>
- {% endif %}
- </div>
- <div class="panel-body">
- <p>Identifiant du service : #{{ service.id }}</p>
- <p>Responsable : {{ service.adhesion }} {{ service.adhesion.adherent }}</p>
- {% if service.contribution.get_current_payment %}
- <p>Contribution : {{ service.contribution.get_current_payment }}</p>
- {% else %}
- <p>Contribution : pas de contribution</p>
- {% endif %}
- <p>
- IP allouée{{ service.active_allocations.count|pluralize }} :
- {% for allocation in service.active_allocations.all %}
- {% if forloop.first %}<ul>{% endif %}
- <li>
- {{ allocation.resource }}
- {% if allocation.resource.last_state.get_state_display == 'UP' %}
- (UP)
- {% elif allocation.resource.last_time_up %}
- (dernière réponse au ping : {{ allocation.resource.last_time_up|naturaltime }})
- {% endif %}
- </li>
- {% if forloop.last %}</ul>{% endif %}
- {% empty %}
- aucune IP allouée
- {% endfor %}
- </p>
- {% if service.ports.exists %}
- <p>
- Port{{ service.ports.count|pluralize }} :
- {% for port in service.ports.all %}
- {% if forloop.first %}<ul>{% endif %}
- <li>Switch {{ port.switch }} port {{ port.port }}{% if port.up is not None %} ({{ port.up|yesno:"UP,DOWN" }}){% endif %}
- {% if forloop.last %}</ul>{% endif %}
- {% endfor %}
- </p>
- {% endif %}
- {% if service.service_type.contact %}
- <p>En cas de problème, contactez {{ service.service_type.contact }}.</p>
- {% endif %}
- </div>
- </div>
- {% endblock %}
|