cronwatch 0.12.1 → 0.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd5447da7111f0b03c3d70d1b9c3b8b30066397a08c5abf4b45f0bdfc182aae3
4
- data.tar.gz: d2320677847438a5ec9e1b60d6fcf9998e7b46192715a072680d7b3c3dea1451
3
+ metadata.gz: 84f51466c9594feef2330522c2c1900eac76ab5aa514c71b1a6d9cffcc736934
4
+ data.tar.gz: 9b4f1050cde98ab6540275c875fb0c925bacd642abf769768e14677104c319b7
5
5
  SHA512:
6
- metadata.gz: 4d3ecd47a9b0ac97c435057ee98717eccea00239642ba3ff9e829f43af60666f380f06876d354c420c0133be9a4809e13f3d4b8789dca56571568a3029d44a0b
7
- data.tar.gz: 3e4e1592e12a5d501080850a8b9fcc526846660d4faec1b047226f3d8598b8d21fbf53e8c0b381a4a6d3889ad0fa7991530247bcf2b9fb59fda49ac1b0cb8f9c
6
+ metadata.gz: 381fc38e630bd7a9709bd4a2a3f8fbe8c1ba232325341f79ed6409de2abc53417555f82fbf72c919a384c4d9123ce5ade57e4f2c2e6b5230035c85dd52226ddb
7
+ data.tar.gz: 2ab108a43ad393ce4980c6fa3dd9879bb9011bfd6f7c54cf28293b79b6b8651d9b2422c16354c5f598070910016f2d0e92d4ea14b81a85e92565129c2f08ace8
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Cronwatch
4
4
  # Kept in step with @cronwatch/sdk.
5
- VERSION = "0.12.1"
5
+ VERSION = "0.12.3"
6
6
  end
@@ -41,14 +41,14 @@ module Cronwatch
41
41
  .brand .crumb{font:500 15px/1.2 var(--mono);color:var(--body);overflow-wrap:anywhere}.brand .slash{color:var(--rule-2);font-weight:400}
42
42
  .actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
43
43
  .meta{font:400 12px/1.4 var(--mono);color:var(--muted)}
44
- button,select,details.confirm>summary{font:500 12.5px/1 var(--mono);color:var(--ink);background:var(--sheet);border:1px solid var(--rule-2);border-radius:3px;padding:8px 11px;cursor:pointer}
45
- select{padding:7px 8px}
46
- button:hover,select:hover,details.confirm>summary:hover{border-color:var(--muted)}
47
- button.primary{background:var(--ink);border-color:var(--ink);color:var(--sheet)}button.primary:hover{opacity:.86}
44
+ button,a.button,details.confirm>summary{font:500 12.5px/1 var(--mono);color:var(--ink);background:var(--sheet);border:1px solid var(--rule-2);border-radius:3px;height:32px;padding:0 11px;cursor:pointer}
45
+ a.button{display:inline-flex;align-items:center;text-decoration:none}
46
+ button:hover,a.button:hover,details.confirm>summary:hover{border-color:var(--muted)}
47
+ button.primary{background:var(--ink);border-color:var(--ink);color:var(--sheet)}button.primary:hover{opacity:.86}button.danger{color:var(--bad)}button.danger:hover{border-color:var(--bad)}
48
48
  form.inline{display:inline-flex;align-items:center;gap:6px;margin:0}
49
- details.confirm{display:inline-flex;align-items:center;gap:8px;margin:0}details.confirm>summary{list-style:none;display:inline-block}
49
+ details.confirm{display:inline-flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0}details.confirm>summary{list-style:none;display:inline-flex;align-items:center}
50
50
  details.confirm>summary::-webkit-details-marker{display:none}details.confirm[open]>summary{border-color:var(--muted)}
51
- details.confirm form{margin-left:8px;font-size:14px;color:var(--muted)}
51
+ details.confirm form{flex-wrap:wrap;font-size:14px;color:var(--muted)}.delete details{margin-top:16px}
52
52
  .sec{display:grid;grid-template-columns:150px minmax(0,1fr);gap:10px 40px;padding:30px 0;border-top:1px solid var(--rule)}
53
53
  .top+main>.sec:first-child{border-top:0}
54
54
  .sec>h2{margin:0;font:500 11px/1.5 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);padding-top:5px}
@@ -97,8 +97,8 @@ module Cronwatch
97
97
  .message p{margin:14px auto 0;max-width:52ch;color:var(--muted);text-wrap:pretty}
98
98
  .signin{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:28px auto 0;max-width:420px}
99
99
  .signin label{font:500 11px/1.4 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
100
- .signin input{flex:1 1 180px;min-width:0;font:400 16px/1.2 var(--mono);color:var(--ink);background:var(--sheet);border:1px solid var(--rule-2);border-radius:3px;padding:8px 10px}
101
- footer{display:flex;flex-wrap:wrap;gap:6px 18px;padding:20px 0 40px;border-top:1px solid var(--rule);font:400 12px/1.5 var(--mono);color:var(--muted)}
100
+ .signin input{flex:1 1 180px;min-width:0;font:400 16px/1.2 var(--mono);color:var(--ink);background:var(--sheet);border:1px solid var(--rule-2);border-radius:3px;height:32px;padding:0 10px}
101
+ footer{display:flex;flex-wrap:wrap;gap:6px 18px;padding:20px 0 40px;border-top:1px solid var(--rule);font:400 12px/1.5 var(--mono);color:var(--muted)}footer .version{margin-left:auto}
102
102
  .timeline{margin:18px 0 0}
103
103
  .timeline .axis,.timeline .under,.timeline .over,.timeline .lane{display:grid;grid-template-columns:var(--who) minmax(0,1fr)}
104
104
  .timeline .hours{position:relative;height:22px;font:400 11px/1 var(--mono);color:var(--muted);letter-spacing:.04em}
@@ -416,7 +416,7 @@ module Cronwatch
416
416
  </section>
417
417
  <section class="sec" aria-label="Jobs">
418
418
  <h2>Jobs</h2>
419
- <p class="lede">Every job in the store. Open one for its week, its runs and their output.</p>
419
+ <p class="lede">Every job in the store. Open one for its week, its runs, and their output.</p>
420
420
  <div class="wide"><table class="board">
421
421
  <thead><tr><th>Job</th><th>Health</th><th class="hide-sm">Schedule</th><th>Last run</th><th class="hide-sm">Next due</th><th class="hide-sm">Recent runs</th></tr></thead>
422
422
  <tbody>#{rows}</tbody></table></div>
@@ -442,7 +442,7 @@ module Cronwatch
442
442
  </section>
443
443
  #{sections}
444
444
  </main>
445
- <footer><span>Refreshes every minute. Times are UTC.</span><a href="#{h(base)}/api/jobs">JSON</a></footer>
445
+ <footer><span>Refreshes every minute. Times are UTC.</span><a href="#{h(base)}/api/jobs">JSON</a><a class="version" href="https://github.com/phillips-jon/cronwatch/blob/main/CHANGELOG.md">cronwatch #{Cronwatch::VERSION}</a></footer>
446
446
  BODY
447
447
  layout("CronWatch", body, base, refresh: 60)
448
448
  end
@@ -483,7 +483,7 @@ module Cronwatch
483
483
  if silenced
484
484
  %(<form class="inline" method="post" action="#{path}/unsilence"><button type="submit">Unsilence (until #{h(Duration.relative(job.silenced_until, now))})</button></form>)
485
485
  else
486
- %(<form class="inline" method="post" action="#{path}/silence"><select name="for" aria-label="Silence for"><option value="1h">1 hour</option><option value="4h">4 hours</option><option value="1d">1 day</option><option value="7d">1 week</option></select><button type="submit">Silence</button></form>)
486
+ %(<details class="confirm"><summary>Silence</summary><form class="inline" method="post" action="#{path}/silence"><span>for</span> <button type="submit" name="for" value="1h">1 hour</button><button type="submit" name="for" value="4h">4 hours</button><button type="submit" name="for" value="1d">1 day</button><button type="submit" name="for" value="7d">1 week</button></form></details>)
487
487
  end
488
488
  stats = job.stats
489
489
  p50 = stats.p50_ms.nil? ? "?" : h(Duration.format(stats.p50_ms))
@@ -528,7 +528,6 @@ module Cronwatch
528
528
  <p class="stateline">#{health_state(job)}#{why ? %(<span class="why">#{h(why)}</span>) : ""}</p>
529
529
  <div class="actions">
530
530
  #{silence_form}
531
- <details class="confirm"><summary>Forget</summary><form class="inline" method="post" action="#{path}/forget"><span>Remove this job and its runs from the store?</span> <button type="submit">Forget</button></form></details>
532
531
  </div>
533
532
  <dl class="figures">
534
533
  <div><dt>Last run</dt><dd>#{job.last_run ? h(Duration.relative(job.last_run.started_at, now)) : "never"}</dd></div>
@@ -563,8 +562,15 @@ module Cronwatch
563
562
  #{job.consecutive_failures.positive? ? %(<dt>Failures in a row</dt><dd>#{h(job.consecutive_failures)}</dd>) : ""}
564
563
  </dl>
565
564
  </section>
565
+ <section class="sec delete" aria-label="Delete">
566
+ <h2>Delete</h2>
567
+ <div>
568
+ <p class="lede">Removes this job and all its runs from the store, which cannot be undone. A job still in your code comes back on its next run, with no history.</p>
569
+ <details class="confirm"><summary>Delete history</summary><form class="inline" method="post" action="#{path}/forget"><span>Delete this job and all its runs?</span> <button class="danger" type="submit">Delete</button><a class="button" href="#{path}">Cancel</a></form></details>
570
+ </div>
571
+ </section>
566
572
  </main>
567
- <footer><span>Refreshes every minute. Times are UTC.</span><a href="#{h(base)}/api/jobs/#{encode_uri_component(job.name)}">JSON</a></footer>
573
+ <footer><span>Refreshes every minute. Times are UTC.</span><a href="#{h(base)}/api/jobs/#{encode_uri_component(job.name)}">JSON</a><a class="version" href="https://github.com/phillips-jon/cronwatch/blob/main/CHANGELOG.md">cronwatch #{Cronwatch::VERSION}</a></footer>
568
574
  BODY
569
575
  layout("#{job.name}: CronWatch", body, base, refresh: 60)
570
576
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cronwatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon C. Phillips