Sha256: 281c009d26a61c9015ec3d22ac5b2c1f01b59593f7ffb47c72cc49f6be2b64d9

Contents?: true

Size: 1.23 KB

Versions: 2

Compression:

Stored size: 1.23 KB

Contents

- connected = database.connection
- if connected
  .ui.horizontal.segments{id: id, style: 'background-color: white !important;'}
    .ui.segment
      - summary = database.summary
      %div
        %i.users.icon
        - number = summary.select { |row| row['list'] == 'users' }.first['items']
        = pluralize(number, 'user')
      %div
        %i.database.icon
        - number = summary.select { |row| row['list'] == 'databases' }.first['items'].to_i - 1 # Removed pgbouncer
        = pluralize(number, 'database')
      %div
        %i.plug.icon
        - number = summary.select { |row| row['list'] == 'pools' }.first['items'].to_i - 1 # Removed pgbouncer
        = pluralize(number, 'pool')
    .ui.segment
      %ul{style: 'margin: 0; padding-left: 5px;'}
        - summary.select{ |row| row.key?(:databases_details) }.first[:databases_details].each do |db|
          %li{style: 'margin: 0; list-style-type: none;'}
            %span
              %i.database.icon
              %strong=db['name']
              .ui.progress.small.success{data:{value: db['current_connections'], total: db['max_connections']}, style: 'float:right; width: 150px; margin-top:4px;'}
                .bar
                  .progress
                .label Connections

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pgbouncerhero-1.0.1 app/views/pg_bouncer_hero/home/_card_content.html.haml
pgbouncerhero-1.0.0 app/views/pg_bouncer_hero/home/_card_content.html.haml