arkaan 0.10.19 → 0.10.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arkaan/monitoring.rb +3 -2
- data/lib/arkaan/monitoring/action.rb +22 -0
- data/lib/arkaan/monitoring/instance.rb +3 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 802dde822c6a67b3cc42513f6842d738fe927b4f
|
4
|
+
data.tar.gz: bcf79de27b982ecd9d3efd2a0930fa26ed3d637a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7898d11625e1e4e87ddbbb63e7f0ef47a0355709966550bf7803eb91c7131d064ec234b1ae8e9e79d41838e7f09ea38827bab1f98c67ed73ea0c014677d8932
|
7
|
+
data.tar.gz: c256372eb33847cc2d7ea3aee83e0e43556617d6016db7bb6a91b36e054cd84e296bdb362b47f2100524c9967474b45d521e3402d93921c930cf8684a257056e
|
data/lib/arkaan/monitoring.rb
CHANGED
@@ -2,10 +2,11 @@ module Arkaan
|
|
2
2
|
# The monitoring module holds all the logic about the services so they can be activated or deactivated.
|
3
3
|
# @author Vincent Courtois <courtois.vincent@outlook.com>
|
4
4
|
module Monitoring
|
5
|
-
autoload :
|
6
|
-
autoload :Instance , 'arkaan/monitoring/instance'
|
5
|
+
autoload :Action , 'arkaan/monitoring/action'
|
7
6
|
autoload :Gateway , 'arkaan/monitoring/gateway'
|
7
|
+
autoload :Instance , 'arkaan/monitoring/instance'
|
8
8
|
autoload :Route , 'arkaan/monitoring/route'
|
9
|
+
autoload :Service , 'arkaan/monitoring/service'
|
9
10
|
autoload :Websocket, 'arkaan/monitoring/websocket'
|
10
11
|
end
|
11
12
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Arkaan
|
2
|
+
module Monitoring
|
3
|
+
# An action is made by an authorized user on the instance of a server to perform a task.
|
4
|
+
# @author Vincent Courtois <courtois.vincent@outlook.com>
|
5
|
+
class Action
|
6
|
+
include Mongoid::Document
|
7
|
+
include Mongoid::Timestamps
|
8
|
+
include Arkaan::Concerns::Enumerable
|
9
|
+
|
10
|
+
# @!attribute [rw] type
|
11
|
+
# @return [Symbol] the type of action you're making on this instance
|
12
|
+
enum_field :type, [:restart]
|
13
|
+
|
14
|
+
# @!attribute [rw] user
|
15
|
+
# @return [Arkaan::Account] the user performing the action on the instance.
|
16
|
+
belongs_to :user, class_name: 'Arkaan::Account'
|
17
|
+
# @!attribute [rw] instance
|
18
|
+
# @return [Arkaan::Monitoring::Instance] the instance of a service on which the action is performed.
|
19
|
+
embedded_in :instance, class_name: 'Arkaan::Monitoring::Instance', inverse_of: :actions
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -26,6 +26,9 @@ module Arkaan
|
|
26
26
|
# @!attribute [r] service
|
27
27
|
# @return [Arkaan::Monitoring::Service] the service this instance is linked to.
|
28
28
|
embedded_in :service, class_name: 'Arkaan::Monitoring::Service', inverse_of: :instances
|
29
|
+
# @!attribute [rw] actions
|
30
|
+
# @return [Arkaan::Monitoring::Action] the actions that has been performed on the service.
|
31
|
+
embeds_many :actions, class_name: 'Arkaan::Monitoring::Action', inverse_of: :instance
|
29
32
|
|
30
33
|
validates :url,
|
31
34
|
presence: {message: 'required'},
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arkaan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Courtois
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -241,6 +241,7 @@ files:
|
|
241
241
|
- lib/arkaan/concerns/premiumable.rb
|
242
242
|
- lib/arkaan/concerns/sluggable.rb
|
243
243
|
- lib/arkaan/monitoring.rb
|
244
|
+
- lib/arkaan/monitoring/action.rb
|
244
245
|
- lib/arkaan/monitoring/gateway.rb
|
245
246
|
- lib/arkaan/monitoring/instance.rb
|
246
247
|
- lib/arkaan/monitoring/route.rb
|