litestream_rails 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85ce722db144991b0abff9e4d561b97edf7d79511e58d9f7b5efe94745f5da64
4
- data.tar.gz: 377aee1ce72a27d28de8f1e5997a3220a4d5df001c584c7f6999d21fa996c491
3
+ metadata.gz: 2e9c8bcec979cf18668f44388864b49c3111ed8be9025cc16e8dde054ef2281a
4
+ data.tar.gz: b747117ff97159c50a17b87b1ad7bfdcbb2f1c0503195ff63e7c1c85ea66f9f0
5
5
  SHA512:
6
- metadata.gz: cfb29875dfa4b5874b16f7fcb4dcb24eff02a9c1139db7c5ca69ffe1b3ce30755a6667ee06ed175695b045266c2bb21336f68a89c658bf09d4dcab9acfff2522
7
- data.tar.gz: b7876c11f1e3828322f33b6da2f4ba8ce9c6f444b6419e28621a07f2432f64b8141f04158216bac5d28a31e1badfe9e0d510facd8e350c07d98cc234e726012b
6
+ metadata.gz: ded52a5d85703cb8a3f573ccfdb98a267e2db042f82a66db25afcfe703d7dca08e1feb161bb6e1a08fbab2de6134a08f44964ff69f01e400f289a31c87714230
7
+ data.tar.gz: 3a6e1933b8ce9cf878dc73564c923fe36ec5bb69ee17685f13700b7561532134efce2809b604027f22c3f945f611aea1cabbfb5e0c07b07104fe3ec68dcb12d1
@@ -631,6 +631,14 @@
631
631
  --tw-bg-opacity: 1;
632
632
  background-color: rgb(220 252 231 / var(--tw-bg-opacity));
633
633
  }
634
+ .bg-red-100 {
635
+ --tw-bg-opacity: 1;
636
+ background-color: rgb(254 226 226 / var(--tw-bg-opacity));
637
+ }
638
+ .bg-yellow-100 {
639
+ --tw-bg-opacity: 1;
640
+ background-color: rgb(254 249 195 / var(--tw-bg-opacity));
641
+ }
634
642
  .bg-slate-800 {
635
643
  --tw-bg-opacity: 1;
636
644
  background-color: rgb(30 41 59 / var(--tw-bg-opacity));
@@ -712,6 +720,14 @@
712
720
  --tw-text-opacity: 1;
713
721
  color: rgb(22 101 52 / var(--tw-text-opacity));
714
722
  }
723
+ .text-red-800 {
724
+ --tw-text-opacity: 1;
725
+ color: rgb(153 27 27 / var(--tw-text-opacity));
726
+ }
727
+ .text-yellow-800 {
728
+ --tw-text-opacity: 1;
729
+ color: rgb(133 77 14 / var(--tw-text-opacity));
730
+ }
715
731
  .text-white {
716
732
  --tw-text-opacity: 1;
717
733
  color: rgb(255 255 255 / var(--tw-text-opacity));
@@ -2,24 +2,39 @@
2
2
  <div class="flex items-center justify-between">
3
3
  <h1 class="flex items-baseline gap-2 text-2xl font-bold">
4
4
  Litestream
5
- <small class="inline-flex rounded-full bg-green-100 px-2 text-sm font-semibold text-green-800">
6
- <%= @process[:status] %>
7
- </small>
5
+
6
+ <% if @process[:status] == "sleeping" %>
7
+ <small class="inline-flex rounded-full px-2 text-sm font-semibold bg-yellow-100 text-yellow-800">
8
+ <%= @process[:status] %>
9
+ </small>
10
+ <% elsif @process[:status] %>
11
+ <small class="inline-flex rounded-full px-2 text-sm font-semibold bg-green-100 text-green-800">
12
+ <%= @process[:status] %>
13
+ </small>
14
+ <% else %>
15
+ <small class="inline-flex rounded-full px-2 text-sm font-semibold bg-red-100 text-red-800">
16
+ not running
17
+ </small>
18
+ <% end %>
8
19
  </h1>
9
20
 
10
- <small class="text-base">
11
- #<code><%= @process[:pid] %></code>
12
- </small>
21
+ <% if @process[:status] %>
22
+ <small class="text-base">
23
+ #<code><%= @process[:pid] %></code>
24
+ </small>
25
+ <% end %>
13
26
  </div>
14
27
 
15
- <dl class="grid grid-cols-[fit-content(100%)_1fr] gap-x-4">
16
- <dt class="font-bold">Started at</dt>
17
- <dd class="">
18
- <abbr title="<%= @process[:started] %>" class="underline decoration-dashed decoration-gray-500 cursor-help">
19
- <time datetime="<%= @process[:started] %>"><%= @process[:started].to_formatted_s(:db) %></time>
20
- </abbr>
21
- </dd>
22
- </dl>
28
+ <% if @process[:status] %>
29
+ <dl class="grid grid-cols-[fit-content(100%)_1fr] gap-x-4">
30
+ <dt class="font-bold">Started at</dt>
31
+ <dd class="">
32
+ <abbr title="<%= @process[:started] %>" class="underline decoration-dashed decoration-gray-500 cursor-help">
33
+ <time datetime="<%= @process[:started] %>"><%= @process[:started].to_formatted_s(:db) %></time>
34
+ </abbr>
35
+ </dd>
36
+ </dl>
37
+ <% end %>
23
38
  </section>
24
39
  <br>
25
40
  <br>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LitestreamRails
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: litestream_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim