Skip to content

Commit

Permalink
makes terminology consistent across application, fixes #39
Browse files Browse the repository at this point in the history
  • Loading branch information
helrond committed Sep 15, 2019
1 parent 6e9c51a commit c469a04
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 28 deletions.
53 changes: 35 additions & 18 deletions zodiac/gateway/templates/gateway/applications_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,46 @@
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header with-border">
<h2 class="box-title">Application Details</h2>
</div>
<div class="box-body">
<label>App host</label>
<p>{{object.app_host}}</p>
<div class="row">
<div class="col-md-6">
<label>Host</label>
<p>http://{{object.app_host}}</p>
</div>
<div class="col-md-6">
{% if object.app_port %}
<label>Port</label>
<p>{{object.app_port}}</p>
{% endif %}
</div>
</div>

</div>
</div>

{% if object.app_port %}
<label>App port</label>
<p>{{object.app_port}}</p>
{% endif %}
{% if object.serviceregistry_set.all %}
<div class="box box-primary">
<div class="box-header with-border">
<h2 class="box-title">Application Services</h2>
</div>
<div class="box-body">

{% if object.serviceregistry_set.all %}
<label>Services</label>
<ul class="list-unstyled">
{% for service in object.serviceregistry_set.all %}
<li><a href="{{service.get_absolute_url}}">{{service}}</a></li>
{% endfor %}
</ul>
{% endif %}
<ul class="list-unstyled">
{% for service in object.serviceregistry_set.all %}
<li><a href="{{service.get_absolute_url}}">{{service}}</a></li>
{% endfor %}
</ul>

</div>
<div class="box-footer">
<a href="{{ object.get_update_url }}" class="btn btn-primary">Edit Application</a>
<a href="{% url 'applications-delete' pk=object.pk %}" class="btn btn-danger pull-right">Delete Application</a>
</div>
</div>
<div class="box-footer">
<a href="{{ object.get_update_url }}" class="btn btn-primary">Edit Application</a>
<a href="{% url 'applications-delete' pk=object.pk %}" class="btn btn-danger">Delete Application</a>
</div>
{% endif %}
</div>
</div>
{% endblock %}
18 changes: 9 additions & 9 deletions zodiac/gateway/templates/gateway/splash.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<h2 class="box-title">Systems</h2>
<h2 class="box-title">Applications</h2>
</div>
<div class="box-body">
{% if systems %}
{% for system in systems %}
<div class="system">
<a href="{% url 'applications-detail' pk=system.id %}">
{% if applications %}
{% for app in applications %}
<div class="application">
<a href="{% url 'applications-detail' pk=app.id %}">
<div class="col-md-12">
<div class="col-md-4">
<p class="box-title">{{ system.name }}</p>
<p class="box-title">{{ app.name }}</p>
</div>
<div class="col-md-6">
<p>{{system.serviceregistry_set.all|length}} services</p>
<p>{{app.serviceregistry_set.all|length}} services</p>
</div>
<div class="col-md-2">
{% include 'gateway/active_label.html' with status=system.is_active %}
{% include 'gateway/active_label.html' with status=app.is_active %}
</div>
</div>
</a>
</div>
{% endfor %}
{% else %}
<p>No systems are configured.</p>
<p>No applications are configured.</p>
{% endif %}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion zodiac/gateway/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class SplashView(TemplateView):

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['systems'] = Application.objects.all().order_by('name')
context['applications'] = Application.objects.all().order_by('name')
context['services'] = ServiceRegistry.objects.exclude(application__name='Pisces')
context['recent_errors'] = RequestLog.objects.exclude(task_result__status='SUCCESS').order_by('-task_result__date_done')[:5]
return context
Expand Down

0 comments on commit c469a04

Please sign in to comment.