-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Organize Service View Page with Tabs
- Loading branch information
Showing
7 changed files
with
116 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
promgen/templates/promgen/service_block_panel_notifiers.inc.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% load promgen %} | ||
|
||
{% if service.notifiers.count %} | ||
<div class="panel panel-default"> | ||
{% include "promgen/notifier_block.html" with object=service show_edit=1 %} | ||
</div> | ||
{% endif %} |
17 changes: 17 additions & 0 deletions
17
promgen/templates/promgen/service_block_panel_rules.inc.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% load i18n %} | ||
{% load promgen %} | ||
|
||
{% if service.rule_set.count or request.site.rule_set.count %} | ||
<div class="panel panel-default"> | ||
<table class="table table-bordered table-condensed"> | ||
{% include "promgen/rule_header.html" %} | ||
{% include "promgen/rule_block.html" with rule_list=service.rule_set.all toggle=1 delete=1 %} | ||
{% include "promgen/rule_block.html" with rule_list=request.site.rule_set.all collapse="service-site-rules-" overwrite_type='service' overwrite_id=service.id %} | ||
</table> | ||
<div class="panel-footer"> | ||
<a class="btn btn-default btn-xs" role="button" data-toggle="collapse" href=".service-site-rules-{{service.id}}" aria-expanded="false" aria-controls="collapseExample"> | ||
{% translate 'Show Site Rules' %} | ||
</a> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% load i18n %} | ||
|
||
{% regroup project_list|dictsort:"shard_id" by shard as project_shard_list %} | ||
|
||
<div class="text-right mb-4"> | ||
<a href="{% url 'project-new' service.id %}" class="btn btn-primary btn-sm">{% translate "Register Project" %}</a> | ||
</div> | ||
|
||
{% for shard, shard_projects in project_shard_list %} | ||
<div class="panel panel-default"> | ||
<div class="panel-heading" v-pre> | ||
Datasource | ||
<a href="{{shard.get_absolute_url}}">{{shard.name}}</a> | ||
( <a href="{{shard.url}}">{{shard.url}}</a> ) | ||
</div> | ||
|
||
{% include 'promgen/service_detail_projects_table.html' with shard_projects=shard_projects service=service %} | ||
|
||
</div> | ||
{% endfor %} |
27 changes: 27 additions & 0 deletions
27
promgen/templates/promgen/service_detail_projects_table.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% load i18n %} | ||
|
||
<table class="table table-bordered table-condensed"> | ||
<tr> | ||
<th class="col-md-2">Project</th> | ||
<th class="col-md-3">Exporters</th> | ||
<th class="col-md-3">Notifiers</th> | ||
<th class="col-md-1">Actions</th> | ||
</tr> | ||
{% for project in shard_projects %} | ||
|
||
{% if service.notifiers.count == 0 and project.notifiers.count == 0 %} | ||
<tr> | ||
<td colspan="4" class="warning"> | ||
<span class="glyphicon glyphicon-alert" aria-hidden="true"></span> | ||
{% translate "No notifications configured for this project. Please configure some" %} | ||
</td> | ||
</tr> | ||
{% endif %} | ||
|
||
{% include 'promgen/project_row.html' %} | ||
{% empty %} | ||
<tr> | ||
<td colspan="4">No Projects?</td> | ||
</tr> | ||
{% endfor %} | ||
</table> |