mission_control-servers 0.3.1 → 0.3.3

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: 941a632d99adb689cbe8e4777271bb42fc599fcdc6876a71a3d4328f04e2c8d0
4
- data.tar.gz: 5ebb6a9de68a83f6695da86f84276bbf631cc2c8f6f5c4a0a7a2325cfdfa04fb
3
+ metadata.gz: 7e818923257e97f3be2604c3839df971c49a1caf057c3b2d79d22dca1a2bace1
4
+ data.tar.gz: 46f351f700e72f8de130abe4ce0c925933fe13e20f49b1b28b2421d01a92294f
5
5
  SHA512:
6
- metadata.gz: fab1a5e82917ba6fe389095356463e9517febded8ce13de4b72ccf2c0bd63095ad0ff9181308c8fd8b317cc0606e30d1bd23312ed520b4aba0d9c04ad61d4cf8
7
- data.tar.gz: 8da7fc10e526d7aa2a4dd06f019cace9f256cb038e08f93e6ad76ddc697d79de94c6f81210a65f8c2b71654cda1f2562d995f78cb1ddaa5b112a0a10d524498d
6
+ metadata.gz: d7cbda6f93978e41ff0607a343a822000d1320eaab37cc5804a32a837fff4660ee9db85bbf9e1fba6e286562be71fc962a6c5688017a16ecc5521ecf6d6f2b67
7
+ data.tar.gz: 1d4f1d75ec5f7c13e81f526441919cd476097d558821df48e3d5193e62a00331b4142bffd481098578bcaf2662de0d5f2a6bcfb087ebb867fe15292a3f0fec3c
data/README.md CHANGED
@@ -52,6 +52,11 @@ If you would like to put the dashboard on something like a Raspberry Pi, you can
52
52
  change the dashboard to a dark mode automatically. This will hopefully help provide a "hands off" approach to
53
53
  setting up the kiosk mode.
54
54
 
55
+ You can also create public links with read only permissions.
56
+
57
+ ![image](https://github.com/kobaltz/mission_control-servers/assets/635114/f867bb8a-e372-4e24-9823-7294a6bb4810)
58
+
59
+
55
60
  ## URL Configuration
56
61
 
57
62
  ### Dark Mode
@@ -98,13 +103,25 @@ order to install the script on the servers, you also have to expose the endpoint
98
103
 
99
104
  ```ruby
100
105
  Rails.application.routes.draw do
101
- get '/mission_control-servers/projects/:project_id/script', to: 'mission_control/servers/scripts#show'
102
- post '/mission_control-servers/projects/:project_id/ingress', to: 'mission_control/servers/ingresses#create'
103
-
106
+ MissionControl::Servers::RoutingHelpers.add_public_routes_helper(self)
107
+
104
108
  constraints AdminConstraint do
105
109
  mount MissionControl::Servers::Engine => "/mission_control-servers"
106
110
  end
107
-
111
+
112
+ end
113
+ ```
114
+ If you want to change the endpoint, you can do so by changing the mount path.
115
+
116
+ ```ruby
117
+ Rails.application.routes.draw do
118
+ engine_mount_path = "/dashymcdashface"
119
+ MissionControl::Servers::RoutingHelpers.add_public_routes_helper(self, engine_mount_path)
120
+
121
+ constraints AdminConstraint do
122
+ mount MissionControl::Servers::Engine => engine_mount_path
123
+ end
124
+
108
125
  end
109
126
  ```
110
127
 
@@ -1,19 +1,20 @@
1
1
  module MissionControl
2
2
  module Servers
3
3
  module RoutingHelpers
4
- def self.add_public_routes_helper(drawer, engine_mount_path="mission_control-servers")
4
+ def self.add_public_routes_helper(drawer, engine_mount_path="/mission_control-servers")
5
5
  drawer.instance_eval do
6
- get "/#{engine_mount_path}/projects/:project_id/dashboards/project_table", to: "mission_control/servers/dashboards/project_tables#show"
7
- get "/#{engine_mount_path}/projects/:project_id/dashboards/cpu_usage", to: "mission_control/servers/dashboards/cpu_usages#show"
8
- get "/#{engine_mount_path}/projects/:project_id/dashboards/memory_usage", to: "mission_control/servers/dashboards/memory_usages#show"
9
- get "/#{engine_mount_path}/projects/:project_id/dashboards/disk_free", to: "mission_control/servers/dashboards/disk_frees#show"
10
- get "/#{engine_mount_path}/projects/:project_id/dashboards/last_seen", to: "mission_control/servers/dashboards/last_seens#show"
11
- get "/#{engine_mount_path}/projects/:project_id/dashboards/cpu_history", to: "mission_control/servers/dashboards/cpu_histories#show"
12
- get "/#{engine_mount_path}/projects/:project_id/dashboards/memory_history", to: "mission_control/servers/dashboards/memory_histories#show"
13
- get "/#{engine_mount_path}/projects/:project_id/dashboards/combo_history", to: "mission_control/servers/dashboards/combo_histories#show"
14
- get "/#{engine_mount_path}/projects/:project_id/public_projects/:id", to: "mission_control/servers/public_projects#show"
15
- get "/#{engine_mount_path}/projects/:project_id/script", to: "mission_control/servers/scripts#show"
16
- post "/#{engine_mount_path}/projects/:project_id/ingress", to: "mission_control/servers/ingresses#create"
6
+ get "#{engine_mount_path}/projects/:project_id/dashboards/project_table", to: "mission_control/servers/dashboards/project_tables#show"
7
+ get "#{engine_mount_path}/projects/:project_id/dashboards/cpu_usage", to: "mission_control/servers/dashboards/cpu_usages#show"
8
+ get "#{engine_mount_path}/projects/:project_id/dashboards/memory_usage", to: "mission_control/servers/dashboards/memory_usages#show"
9
+ get "#{engine_mount_path}/projects/:project_id/dashboards/disk_free", to: "mission_control/servers/dashboards/disk_frees#show"
10
+ get "#{engine_mount_path}/projects/:project_id/dashboards/last_seen", to: "mission_control/servers/dashboards/last_seens#show"
11
+ get "#{engine_mount_path}/projects/:project_id/dashboards/cpu_history", to: "mission_control/servers/dashboards/cpu_histories#show"
12
+ get "#{engine_mount_path}/projects/:project_id/dashboards/memory_history", to: "mission_control/servers/dashboards/memory_histories#show"
13
+ get "#{engine_mount_path}/projects/:project_id/dashboards/combo_history", to: "mission_control/servers/dashboards/combo_histories#show"
14
+ get "#{engine_mount_path}/projects/:project_id/public_projects/new", to: "mission_control/servers/public_projects#new", as: :new_project_public_project
15
+ get "#{engine_mount_path}/projects/:project_id/public_projects/:id", to: "mission_control/servers/public_projects#show"
16
+ get "#{engine_mount_path}/projects/:project_id/script", to: "mission_control/servers/scripts#show"
17
+ post "#{engine_mount_path}/projects/:project_id/ingress", to: "mission_control/servers/ingresses#create"
17
18
  end
18
19
  end
19
20
  end
@@ -1,5 +1,5 @@
1
1
  module MissionControl
2
2
  module Servers
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.3"
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.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Kimura