openstax_utilities 4.4.1 → 4.4.2

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: 1fc638888ec40480230d18462cdefff1a6e653ad8b38fb93cd563afc3f88c782
4
- data.tar.gz: dac0c0a677baa299992be68197a4db1653efb70283f9a4f2d969deb92aa3ac63
3
+ metadata.gz: ffe225aee8103709252d8a81e107610a4d922413a2ce2ff5fdbfb788a59be607
4
+ data.tar.gz: 4b25a20ce6bec07a846b63fd6c5001f406542db92cdb030e12157b0e52ec4b37
5
5
  SHA512:
6
- metadata.gz: '000787a51fa7167e3859f8da026e633bce6f1ff1bc3076ad13afbd9b0cb6b6e2ef41f320e0ef05ac0650305ff6db1aac4ef791316abe153f0dd50ab181bbdd7f'
7
- data.tar.gz: ef8c92ee27d11186bb3720e0964909dc9a65ae50cc961f7f99e0e9e519ef1f3024fc1210eb80b9511253e70ecdf5ab85b4588f1d8ebf3dd3c08f0e612e9d8c6c
6
+ metadata.gz: c7e1d24654420d52bf066d12570f76d2ccb41e245706c38664c048996e140af4f3d9b86fb473326c614124e6407437400e22dc12e97c2d796c8f0790fcd0ac6f
7
+ data.tar.gz: 82c5943038ded311f43b2157b5399ba8ca62757aacc36b3f3bf7f4cfc9cda4ebdbd6df2f893c82a53128f65e19a5214274b0bd432b2bb3d47b5ad0305c9abb26
@@ -27,17 +27,24 @@ class OpenStax::Utilities::StatusController < ActionController::Base
27
27
  ).chomp('-asg')
28
28
 
29
29
  status = if asg.desired_capacity == 0
30
- if asg.instances.size > 0
31
- :shutting_down
32
- elsif [ 'web', 'background', 'cron' ].include?(name)
30
+ if [ 'web', 'background', 'cron' ].include?(name)
33
31
  :configuration_error
32
+ elsif asg.instances.size > 0
33
+ :shutting_down
34
34
  else
35
35
  :sleeping
36
36
  end
37
37
  elsif asg.instances.all? do |instance|
38
38
  instance.health_status != 'Healthy' || instance.lifecycle_state != 'InService'
39
39
  end
40
- :down
40
+ case name
41
+ when 'web'
42
+ :down
43
+ when 'background', 'cron'
44
+ :impacted
45
+ else
46
+ :offline
47
+ end
41
48
  elsif name == 'migration'
42
49
  :migrating
43
50
  elsif asg.max_size > 1 && asg.desired_capacity == asg.max_size
@@ -1,13 +1,15 @@
1
1
  <%
2
2
  status_icons = {
3
- down: '💀',
4
- configuration_error: '⚠️',
5
- shutting_down: '😪',
3
+ configuration_error: '💀',
4
+ down: '💥',
5
+ impacted: '⚠️',
6
6
  at_capacity: '🥵',
7
+ migrating: '💾',
7
8
  scaling_down: '📉',
8
9
  scaling_up: '📈',
9
- migrating: '💾',
10
10
  ok: '✅',
11
+ shutting_down: '😪',
12
+ offline: '🔌',
11
13
  sleeping: '💤'
12
14
  }
13
15
 
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Utilities
3
- VERSION = '4.4.1'
3
+ VERSION = '4.4.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_utilities
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.1
4
+ version: 4.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Slavinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-07 00:00:00.000000000 Z
11
+ date: 2021-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails