Browse Source

Show the Description section in Check Details screen even if the description is missing. Fixes #246

pull/248/head
Pēteris Caune 6 years ago
parent
commit
9f69dcb158
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
4 changed files with 24 additions and 4 deletions
  1. +4
    -0
      static/css/details.css
  2. +7
    -0
      static/js/details.js
  3. +10
    -4
      templates/front/details.html
  4. +3
    -0
      templates/front/update_name_modal.html

+ 4
- 0
static/css/details.css View File

@ -6,6 +6,10 @@
margin-bottom: 24px;
}
#details-head h1 small {
font-size: 12px;
}
.details-block .status {
font-size: 32px;
width: 40px;


+ 7
- 0
static/js/details.js View File

@ -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;


+ 10
- 4
templates/front/details.html View File

@ -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 %}
@ -27,13 +27,19 @@
{% 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>


+ 3
- 0
templates/front/update_name_modal.html View File

@ -63,6 +63,9 @@
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>


Loading…
Cancel
Save