mission_control-servers 0.0.4 → 0.1.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: cfabd9e0a8d4c6a61ea4c6a84be83343c0abef04db43474aa27605392df95358
4
- data.tar.gz: 3003330d54b96a02a36e0dac2b48b6825571fa8fc62eb269eadb111419fe1474
3
+ metadata.gz: 62b52f6f353c4df8112c4a98571d3d948d981bd02cde2fefd923b71843020eb5
4
+ data.tar.gz: 0d7fbd14a9d2dddfaf373a712fdd8c830c7e0745ebd8772f3e0b8ea384b1952e
5
5
  SHA512:
6
- metadata.gz: 0250f42b5b8974eafd9ce8af224d60550a1182d274a7238f36719f4be11c40b46c5a402079a13e6ff57871328fb5d9e1a50000312bdf3c2ee928314e48483be3
7
- data.tar.gz: 8f90b205642777bf86ac32c23780b17b435908e5c3e628ebce2b403661cf8979f8f1676b290e7aca5609779ba9fcc7577853f6efe83f6aece7f014cf97e51a4c
6
+ metadata.gz: 2b03c3e10110f81db19c3e753a0ee8a7bfd0949a06db41ae31b809502cbcbc4ba32160c24df3af010ef04bb2f4d9f2c2d069bceea617b2097028c77311e4b984
7
+ data.tar.gz: cae2925b7f4913e7bec9462a58eb1c83f2f32b5bfd5661384d0ce94ba8323bddba8636c7de86b891c66425ee592f5e6b95d59a71a3bd3d0cb25e0ea7c2325df0
data/README.md CHANGED
@@ -74,6 +74,10 @@ class AdminConstraint
74
74
  end
75
75
  ```
76
76
 
77
+ ## Demo
78
+
79
+ You can see a demo of the application at [https://dashboard.railsenv.com/](https://dashboard.railsenv.com/)
80
+
77
81
  ## Screenshots
78
82
 
79
83
  Simple Installation
@@ -22,15 +22,10 @@ module MissionControl::Servers
22
22
  #!/bin/bash
23
23
 
24
24
  endpoint="#{project_ingress_url(@project.token)}"
25
- cpu_usage=$(
26
- top -bn1 | \
27
- grep "Cpu(s)" | \
28
- sed "s/.*, *\\([0-9.]*\\)%* id.*/\\1/" | \
29
- awk '{print 100 - $1}'
30
- )
25
+ cpu_usage=$(vmstat 1 5 | awk 'NR==4 {print 100 - $15}')
31
26
  mem_used=$(free -m | awk '/^Mem:/ {print $3}')
32
27
  mem_free=$(free -m | awk '/^Mem:/ {print $7}')
33
- disk_free=$(df -h | awk '\$NF=="/"{print $4}')
28
+ disk_free=$(df -h | awk 'NF=="/"{print $4}')
34
29
  hostname=$(hostname)
35
30
 
36
31
  data="service[cpu]=$cpu_usage"
@@ -29,7 +29,7 @@
29
29
  <td class="hidden px-3 py-3.5 text-sm text-gray-500 lg:table-cell"><%= number_to_human_size(services.last.mem_free * 1.megabyte) %></td>
30
30
  <td class="hidden px-3 py-3.5 text-sm text-gray-500 lg:table-cell"><%= services.last.disk_free %></td>
31
31
  <td class="relative py-3.5 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
32
- <%= link_to "Dashboard", target: :_top, project_path(@project, hostname: hostname), class: "inline-flex items-center rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:bg-white" %>
32
+ <%= link_to "Dashboard", project_path(@project, hostname: hostname), target: :_top, class: "inline-flex items-center rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:bg-white" %>
33
33
  </td>
34
34
  </tr>
35
35
  <% end %>
@@ -1,5 +1,5 @@
1
1
  module MissionControl
2
2
  module Servers
3
- VERSION = "0.0.4"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mission_control-servers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Kimura