Skip to content

Commit

Permalink
Show the Description section in Check Details screen even if the desc…
Browse files Browse the repository at this point in the history
…ription is missing. Fixes #246
  • Loading branch information
cuu508 committed May 2, 2019
1 parent fcff4b4 commit 9f69dcb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
4 changes: 4 additions & 0 deletions static/css/details.css
Expand Up @@ -6,6 +6,10 @@
margin-bottom: 24px;
}

#details-head h1 small {
font-size: 12px;
}

.details-block .status {
font-size: 32px;
width: 40px;
Expand Down
7 changes: 7 additions & 0 deletions static/js/details.js
Expand Up @@ -6,6 +6,13 @@ $(function () {
return false;
});

$("#edit-desc").click(function() {
$('#update-name-modal').modal("show");
$("#update-desc-input").focus();

return false;
});

$("#pause").click(function(e) {
$("#pause-form").submit();
return false;
Expand Down
14 changes: 10 additions & 4 deletions templates/front/details.html
Expand Up @@ -10,7 +10,7 @@
<div id="details-head" class="col-sm-12">
<h1>
{{ check.name_then_code }}
<button id="edit-name" class="btn btn-sm btn-default">Edit</button>
<small><a id="edit-name" href="#">(edit&hellip;)</a></small>
</h1>
<span class="label label-tag">{{ check.project }}</span>
{% for tag in check.tags_list %}
Expand All @@ -27,13 +27,19 @@ <h1>
{% endif %}

<div class="col-sm-5">
{% if check.desc %}
<div class="details-block">
<h2>Description</h2>
{% if check.desc %}
{{ check.desc|linebreaks|urlize }}
<div class="text-right">
<button id="edit-desc" class="btn btn-sm btn-default">
Edit Description&hellip;
</button>
</div>
{% else %}
<small><a id="edit-desc" href="#">Add description&hellip;</a></small>
{% endif %}
</div>
{% endif %}


<div class="details-block">
<h2>How To Ping</h2>
Expand Down
3 changes: 3 additions & 0 deletions templates/front/update_name_modal.html
Expand Up @@ -63,6 +63,9 @@ <h4 class="update-timeout-title">Name and Tags</h4>
id="update-desc-input"
class="form-control"
rows="5"
placeholder="What's being monitored?
What to do when this check goes down?
Where to find more information?"
name="desc">{{ check.desc }}</textarea>
</div>
</div>
Expand Down

0 comments on commit 9f69dcb

Please sign in to comment.