health-monitor-rails 11.1.0 → 11.3.0
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:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: ef2ab1a402fc161f4abe3c76733649ff053e3edeeb74143d97ff25e2431bda5e
         | 
| 4 | 
            +
              data.tar.gz: 4f49b79333e4e13e804e9219a2a9391833bc985b0ebed37d96887b527a3cb25e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: dd7b07152e96cf14cbf56ebaf66b9b4a0f018d2913f5f0ae72715b9b8758a4c674ab1c1eb5ffdd74128bf6d0323454dab39a63b16f2d6b089a80e872cbecd89c
         | 
| 7 | 
            +
              data.tar.gz: e5966d745ac421b1da9a3b65695bd668e34c391f26ad5d4e40a2a1e31372cb48667412d256f2bf4883ecafceec68653f44faa76d0ff93ef32b343a9a6213d597
         | 
| @@ -4,74 +4,196 @@ | |
| 4 4 | 
             
                <title>Status</title>
         | 
| 5 5 | 
             
                <meta charset="utf-8">
         | 
| 6 6 | 
             
                <meta name="viewport" content="width=device-width">
         | 
| 7 | 
            -
             | 
| 7 | 
            +
             | 
| 8 | 
            +
                <style>
         | 
| 9 | 
            +
                  /* Reset */
         | 
| 10 | 
            +
                  html {
         | 
| 11 | 
            +
                    box-sizing: border-box;
         | 
| 12 | 
            +
                    font-size: 16px;
         | 
| 13 | 
            +
                  }
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                  *, *:before, *:after {
         | 
| 16 | 
            +
                    box-sizing: inherit;
         | 
| 17 | 
            +
                  }
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                  body {
         | 
| 20 | 
            +
                    line-height: 1.5;
         | 
| 21 | 
            +
                    -webkit-font-smoothing: antialiased;
         | 
| 22 | 
            +
                  }
         | 
| 23 | 
            +
             | 
| 24 | 
            +
                  body, h1, h2, h3, h4, h5, h6, p, ol, ul {
         | 
| 25 | 
            +
                    margin: 0;
         | 
| 26 | 
            +
                    padding: 0;
         | 
| 27 | 
            +
                    font-weight: normal;
         | 
| 28 | 
            +
                    overflow-wrap: break-word;
         | 
| 29 | 
            +
                  }
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                  /* Custom CSS*/
         | 
| 32 | 
            +
                  body {
         | 
| 33 | 
            +
                    background-color: rgb(243 244 246);
         | 
| 34 | 
            +
                    color: rgb(17 24 39);
         | 
| 35 | 
            +
                    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
         | 
| 36 | 
            +
                                 Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
         | 
| 37 | 
            +
                                 "Noto Color Emoji";
         | 
| 38 | 
            +
                  }
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                  header {
         | 
| 41 | 
            +
                    background-color: white;
         | 
| 42 | 
            +
                    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
         | 
| 43 | 
            +
                    padding: 1.5rem 1rem;
         | 
| 44 | 
            +
                  }
         | 
| 45 | 
            +
             | 
| 46 | 
            +
                  main {
         | 
| 47 | 
            +
                    padding-top: 3rem;
         | 
| 48 | 
            +
                    padding-bottom: 3rem;
         | 
| 49 | 
            +
                    width: 100vw;
         | 
| 50 | 
            +
                  }
         | 
| 51 | 
            +
             | 
| 52 | 
            +
                  footer {
         | 
| 53 | 
            +
                    font-weight: 300;
         | 
| 54 | 
            +
                    color: rgb(100 116 139);
         | 
| 55 | 
            +
                    font-size: 0.75rem;
         | 
| 56 | 
            +
                    line-height: 1rem;
         | 
| 57 | 
            +
                    padding-left: 1.25rem;
         | 
| 58 | 
            +
                    padding-right: 1.25rem;
         | 
| 59 | 
            +
                  }
         | 
| 60 | 
            +
             | 
| 61 | 
            +
                  h1 {
         | 
| 62 | 
            +
                    font-weight: 700;
         | 
| 63 | 
            +
                    font-size: 1.875rem;
         | 
| 64 | 
            +
                    line-height: 2.25rem;
         | 
| 65 | 
            +
                  }
         | 
| 66 | 
            +
             | 
| 67 | 
            +
                  h2 {
         | 
| 68 | 
            +
                    font-weight: 500;
         | 
| 69 | 
            +
                    font-size: 1.125rem;
         | 
| 70 | 
            +
                    line-height: 1.5rem;
         | 
| 71 | 
            +
                    padding: 1.25rem 1rem;
         | 
| 72 | 
            +
                  }
         | 
| 73 | 
            +
             | 
| 74 | 
            +
                  .text-center {
         | 
| 75 | 
            +
                    text-align: center;
         | 
| 76 | 
            +
                  }
         | 
| 77 | 
            +
             | 
| 78 | 
            +
                  .services, .env-variables {
         | 
| 79 | 
            +
                    display: block;
         | 
| 80 | 
            +
                    background-color: white;
         | 
| 81 | 
            +
                    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
         | 
| 82 | 
            +
                    overflow: hidden;
         | 
| 83 | 
            +
                    border-radius: 0.5rem;
         | 
| 84 | 
            +
                    max-width: 56rem;
         | 
| 85 | 
            +
                    margin: 0 auto 1.5rem auto;
         | 
| 86 | 
            +
                  }
         | 
| 87 | 
            +
             | 
| 88 | 
            +
                  .border {
         | 
| 89 | 
            +
                    border-top-width: 1px;
         | 
| 90 | 
            +
                    border-color: rgb(229 231 235);
         | 
| 91 | 
            +
                  }
         | 
| 92 | 
            +
             | 
| 93 | 
            +
                  .red {
         | 
| 94 | 
            +
                    color: red;
         | 
| 95 | 
            +
                  }
         | 
| 96 | 
            +
             | 
| 97 | 
            +
                  .item {
         | 
| 98 | 
            +
                    display: grid;
         | 
| 99 | 
            +
                    grid-template-columns: max-content auto;
         | 
| 100 | 
            +
                    padding: 1.25rem 1rem;
         | 
| 101 | 
            +
                  }
         | 
| 102 | 
            +
             | 
| 103 | 
            +
                  .bg-gray {
         | 
| 104 | 
            +
                    background-color: rgb(249 250 251);
         | 
| 105 | 
            +
                  }
         | 
| 106 | 
            +
             | 
| 107 | 
            +
                  .bg-white {
         | 
| 108 | 
            +
                    background-color: white;
         | 
| 109 | 
            +
                  }
         | 
| 110 | 
            +
             | 
| 111 | 
            +
                  .state {
         | 
| 112 | 
            +
                    font-weight: 700;
         | 
| 113 | 
            +
                  }
         | 
| 114 | 
            +
             | 
| 115 | 
            +
                  .message {
         | 
| 116 | 
            +
                    color: rgb(71 85 105);
         | 
| 117 | 
            +
                  }
         | 
| 118 | 
            +
             | 
| 119 | 
            +
                  dt {
         | 
| 120 | 
            +
                    min-width: 10vw;
         | 
| 121 | 
            +
                    font-size: 0.875rem;
         | 
| 122 | 
            +
                    line-height: 1.25rem;
         | 
| 123 | 
            +
                    font-weight: 500;
         | 
| 124 | 
            +
                    color: rgb(107 114 128);
         | 
| 125 | 
            +
                    grid-column-start: 1;
         | 
| 126 | 
            +
                  }
         | 
| 127 | 
            +
             | 
| 128 | 
            +
                  dd {
         | 
| 129 | 
            +
                    font-size: 0.875rem;
         | 
| 130 | 
            +
                    line-height: 1.25rem;
         | 
| 131 | 
            +
                    grid-column-start: 2;
         | 
| 132 | 
            +
                  }
         | 
| 133 | 
            +
                </style>
         | 
| 8 134 | 
             
              </head>
         | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
                  </div>
         | 
| 135 | 
            +
             | 
| 136 | 
            +
              <body>
         | 
| 137 | 
            +
                <header>
         | 
| 138 | 
            +
                  <h1 class="text-center">
         | 
| 139 | 
            +
                    Status Page
         | 
| 140 | 
            +
                  </h1>
         | 
| 16 141 | 
             
                </header>
         | 
| 142 | 
            +
             | 
| 17 143 | 
             
                <main>
         | 
| 18 | 
            -
                  <div class=" | 
| 19 | 
            -
                    < | 
| 20 | 
            -
                       | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 27 | 
            -
             | 
| 28 | 
            -
                             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
                                 | 
| 33 | 
            -
                                <dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
         | 
| 34 | 
            -
                                  <div class="state <%= 'text-red-600' if status[:status].downcase == 'error' %> font-bold">
         | 
| 35 | 
            -
                                    <%= status[:status] %>
         | 
| 36 | 
            -
                                  </div>
         | 
| 37 | 
            -
                                  <% if !status[:message].empty? %>
         | 
| 38 | 
            -
                                    <div class="message text-slate-600"><%= status[:message] %></div>
         | 
| 39 | 
            -
                                  <% end %>
         | 
| 40 | 
            -
                                </dd>
         | 
| 144 | 
            +
                  <div class="services">
         | 
| 145 | 
            +
                    <h2>
         | 
| 146 | 
            +
                      Services
         | 
| 147 | 
            +
                    </h2>
         | 
| 148 | 
            +
                    <div class="border">
         | 
| 149 | 
            +
                      <dl>
         | 
| 150 | 
            +
                        <% @statuses[:results].each_with_index do |status, index| %>
         | 
| 151 | 
            +
                          <div class="<%= index.odd? ? 'bg-gray' : 'bg-white' %> item">
         | 
| 152 | 
            +
                            <dt class="name">
         | 
| 153 | 
            +
                              <%= status[:name] %>
         | 
| 154 | 
            +
                            </dt>
         | 
| 155 | 
            +
             | 
| 156 | 
            +
                            <dd>
         | 
| 157 | 
            +
                              <div class="state <%= 'red' if status[:status].downcase == 'error' %> font-bold">
         | 
| 158 | 
            +
                                <%= status[:status] %>
         | 
| 41 159 | 
             
                              </div>
         | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
                        </div>
         | 
| 45 | 
            -
                      </div>
         | 
| 46 | 
            -
                      <% if @statuses[:environment_variables].present? %>
         | 
| 47 | 
            -
                        <div class="env-variables bg-white shadow overflow-hidden sm:rounded-lg my-6">
         | 
| 48 | 
            -
                          <div class="px-4 py-5 sm:px-6">
         | 
| 49 | 
            -
                            <h3 class="text-lg leading-6 font-medium text-gray-900">
         | 
| 50 | 
            -
                              Environment Variables
         | 
| 51 | 
            -
                            </h3>
         | 
| 52 | 
            -
                          </div>
         | 
| 53 | 
            -
                          <div class="border-t border-gray-200">
         | 
| 54 | 
            -
                            <dl>
         | 
| 55 | 
            -
                              <% @statuses[:environment_variables].each_with_index do |env_var, index| %>
         | 
| 56 | 
            -
                                <div class="<%= index.odd? ? 'bg-gray-50' : 'bg-white' %> px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
         | 
| 57 | 
            -
                                  <dt class="text-sm font-medium text-gray-500">
         | 
| 58 | 
            -
                                    <%= env_var[0] %>
         | 
| 59 | 
            -
                                  </dt>
         | 
| 60 | 
            -
                                  <dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
         | 
| 61 | 
            -
                                    <%= env_var[1] %>
         | 
| 62 | 
            -
                                  </dd>
         | 
| 63 | 
            -
                                </div>
         | 
| 160 | 
            +
                              <% if !status[:message].empty? %>
         | 
| 161 | 
            +
                                <div class="message"><%= status[:message] %></div>
         | 
| 64 162 | 
             
                              <% end %>
         | 
| 65 | 
            -
                            </ | 
| 163 | 
            +
                            </dd>
         | 
| 66 164 | 
             
                          </div>
         | 
| 67 | 
            -
                         | 
| 68 | 
            -
                       | 
| 165 | 
            +
                        <% end %>
         | 
| 166 | 
            +
                      </dl>
         | 
| 69 167 | 
             
                    </div>
         | 
| 70 168 | 
             
                  </div>
         | 
| 169 | 
            +
             | 
| 170 | 
            +
                  <% if @statuses[:environment_variables].present? %>
         | 
| 171 | 
            +
                    <div class="env-variables">
         | 
| 172 | 
            +
                      <h2>
         | 
| 173 | 
            +
                        Environment Variables
         | 
| 174 | 
            +
                      </h2>
         | 
| 175 | 
            +
             | 
| 176 | 
            +
                      <div class="border">
         | 
| 177 | 
            +
                        <dl>
         | 
| 178 | 
            +
                          <% @statuses[:environment_variables].each_with_index do |env_var, index| %>
         | 
| 179 | 
            +
                            <div class="<%= index.odd? ? 'bg-gray' : 'bg-white' %> item">
         | 
| 180 | 
            +
                              <dt>
         | 
| 181 | 
            +
                                <%= env_var[0] %>
         | 
| 182 | 
            +
                              </dt>
         | 
| 183 | 
            +
                              <dd>
         | 
| 184 | 
            +
                                <%= env_var[1] %>
         | 
| 185 | 
            +
                              </dd>
         | 
| 186 | 
            +
                            </div>
         | 
| 187 | 
            +
                          <% end %>
         | 
| 188 | 
            +
                        </dl>
         | 
| 189 | 
            +
                      </div>
         | 
| 190 | 
            +
                    </div>
         | 
| 191 | 
            +
                  <% end %>
         | 
| 71 192 | 
             
                </main>
         | 
| 193 | 
            +
             | 
| 72 194 | 
             
                <% if !@hide_footer %>
         | 
| 73 195 | 
             
                  <footer>
         | 
| 74 | 
            -
                    <div class=" | 
| 196 | 
            +
                    <div class="text-center">
         | 
| 75 197 | 
             
                      Powered by <a href="https://github.com/lbeder/health-monitor-rails" target="_blank">health-monitor-rails</a>
         | 
| 76 198 | 
             
                    </div>
         | 
| 77 199 | 
             
                  </footer>
         | 
| @@ -10,7 +10,7 @@ module HealthMonitor | |
| 10 10 | 
             
                  def check!
         | 
| 11 11 | 
             
                    failed_databases = []
         | 
| 12 12 |  | 
| 13 | 
            -
                    ActiveRecord::Base.connection_handler. | 
| 13 | 
            +
                    ActiveRecord::Base.connection_handler.connection_pool_list(:all).each do |cp|
         | 
| 14 14 | 
             
                      cp.connection.check_version
         | 
| 15 15 | 
             
                    rescue Exception
         | 
| 16 16 | 
             
                      failed_databases << cp.db_config.name
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: health-monitor-rails
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 11. | 
| 4 | 
            +
              version: 11.3.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Leonid Beder
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2024-01-21 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: railties
         |