mission_control-servers 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +34 -0
- data/Rakefile +8 -0
- data/app/assets/config/mission_control_servers_manifest.js +3 -0
- data/app/assets/stylesheets/mission_control/servers/application.css +15 -0
- data/app/controllers/mission_control/servers/application_controller.rb +6 -0
- data/app/controllers/mission_control/servers/ingresses_controller.rb +26 -0
- data/app/controllers/mission_control/servers/projects_controller.rb +60 -0
- data/app/helpers/mission_control/servers/application_helper.rb +6 -0
- data/app/helpers/mission_control/servers/projects_helper.rb +4 -0
- data/app/javascript/mission_control/servers/application.js +3 -0
- data/app/javascript/mission_control/servers/controllers/application.js +9 -0
- data/app/javascript/mission_control/servers/controllers/index.js +11 -0
- data/app/jobs/mission_control/servers/application_job.rb +6 -0
- data/app/mailers/mission_control/servers/application_mailer.rb +8 -0
- data/app/models/mission_control/servers/application_record.rb +7 -0
- data/app/models/mission_control/servers/project.rb +6 -0
- data/app/models/mission_control/servers/service.rb +5 -0
- data/app/views/layouts/mission_control/servers/application.html.erb +19 -0
- data/app/views/mission_control/servers/projects/_form.html.erb +27 -0
- data/app/views/mission_control/servers/projects/_project.html.erb +12 -0
- data/app/views/mission_control/servers/projects/edit.html.erb +10 -0
- data/app/views/mission_control/servers/projects/index.html.erb +14 -0
- data/app/views/mission_control/servers/projects/new.html.erb +9 -0
- data/app/views/mission_control/servers/projects/show.html.erb +128 -0
- data/config/importmap.rb +5 -0
- data/config/routes.rb +6 -0
- data/db/migrate/20240205020304_create_mission_control_servers_projects.rb +10 -0
- data/db/migrate/20240205031009_create_mission_control_servers_services.rb +14 -0
- data/lib/mission_control/servers/engine.rb +21 -0
- data/lib/mission_control/servers/version.rb +5 -0
- data/lib/mission_control/servers.rb +15 -0
- data/lib/tasks/mission_control/servers_tasks.rake +4 -0
- metadata +135 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cfb3369ca36a1c1d3eff6ce91d7564b158e2c29bfecd78e04db95ad14fa5fb33
|
4
|
+
data.tar.gz: ecf03b0b116e3c94181d0b0bd54b98365f5769d0eda3b92303d9945bb5f47edd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5b9c7ffe3741a4d38940e389b89dab8f63bd362a7b460ef23cd21f656454b2e0ebceb3af648e3c91ee8bef295fb2fd2a6c803789afc09afde7e09d7a1465aac1
|
7
|
+
data.tar.gz: b0d4c0d6affacf42d11c9c23047a90af99d189b6579945e165dd6fa3bc98a810da13b44a626704ed17251626c05c3a0132ac20d743475db8018934fd59b1440c
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright Dave Kimura
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# MissionControl::Servers
|
2
|
+
Don't use this yet. It will be a gem to monitor servers and send the data to Mission Control.
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
Add this line to your application's Gemfile:
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
bundle add "mission_control-servers"
|
9
|
+
bin/rails mission_control_servers:install:migrations
|
10
|
+
```
|
11
|
+
|
12
|
+
|
13
|
+
# Usage
|
14
|
+
|
15
|
+
Use within your own Rails application or have a separate application to monitor your servers.
|
16
|
+
|
17
|
+
You'll make a POST request to the endpoint with the following parameters:
|
18
|
+
|
19
|
+
```
|
20
|
+
endpoint="https://YOUR_APPLICATION/mission_control-servers/projects/YOUR_TOKEN/ingress"; cpu_usage=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1""}'); mem_free=$(free -m | awk '/^Mem:/ {print $2}'); mem_used=$(free -m | awk '/^Mem:/ {print $7}'); disk_free=$(df -h | awk '$NF=="/"{print $4}'); curl -X POST $endpoint -d "service[cpu]=$cpu_usage&service[mem_used]=$mem_free&service[mem_free]=$mem_used&service[disk_free]=$disk_free&service[hostname]=${hostname}"
|
21
|
+
```
|
22
|
+
|
23
|
+
This script should be added to a cron job to run every minute (or however often you want to monitor your servers).
|
24
|
+
|
25
|
+
Change `YOUR_APPLICATION` to your application's endpoint and `YOUR_TOKEN` to your project's token.
|
26
|
+
|
27
|
+
# Screenshots
|
28
|
+
|
29
|
+
These are going to change rapidly as the project is in development.
|
30
|
+
|
31
|
+
![image](https://github.com/kobaltz/mission_control-servers/assets/635114/65a87ccf-8ce8-4164-b315-a08d065d8f8f)
|
32
|
+
|
33
|
+
## License
|
34
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module MissionControl::Servers
|
2
|
+
class IngressesController < ApplicationController
|
3
|
+
skip_before_action :verify_authenticity_token
|
4
|
+
before_action :set_project
|
5
|
+
|
6
|
+
def create
|
7
|
+
@ingress = @project.services.new(ingress_params)
|
8
|
+
|
9
|
+
if @ingress.save!
|
10
|
+
head :ok
|
11
|
+
else
|
12
|
+
head :unprocessable_entity
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
# Use callbacks to share common setup or constraints between actions.
|
18
|
+
def set_project
|
19
|
+
@project = Project.find_by(token: params[:project_id])
|
20
|
+
end
|
21
|
+
|
22
|
+
def ingress_params
|
23
|
+
params.require(:service).permit(:hostname, :cpu, :mem_used, :mem_free, :disk_free)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module MissionControl::Servers
|
2
|
+
class ProjectsController < ApplicationController
|
3
|
+
before_action :set_project, only: %i[ show edit update destroy ]
|
4
|
+
|
5
|
+
# GET /projects
|
6
|
+
def index
|
7
|
+
@projects = Project.all
|
8
|
+
end
|
9
|
+
|
10
|
+
# GET /projects/1
|
11
|
+
def show
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /projects/new
|
15
|
+
def new
|
16
|
+
@project = Project.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# GET /projects/1/edit
|
20
|
+
def edit
|
21
|
+
end
|
22
|
+
|
23
|
+
# POST /projects
|
24
|
+
def create
|
25
|
+
@project = Project.new(project_params)
|
26
|
+
|
27
|
+
if @project.save
|
28
|
+
redirect_to @project, notice: "Project was successfully created."
|
29
|
+
else
|
30
|
+
render :new, status: :unprocessable_entity
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# PATCH/PUT /projects/1
|
35
|
+
def update
|
36
|
+
if @project.update(project_params)
|
37
|
+
redirect_to @project, notice: "Project was successfully updated.", status: :see_other
|
38
|
+
else
|
39
|
+
render :edit, status: :unprocessable_entity
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# DELETE /projects/1
|
44
|
+
def destroy
|
45
|
+
@project.destroy!
|
46
|
+
redirect_to projects_url, notice: "Project was successfully destroyed.", status: :see_other
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
# Use callbacks to share common setup or constraints between actions.
|
51
|
+
def set_project
|
52
|
+
@project = Project.find(params[:id])
|
53
|
+
end
|
54
|
+
|
55
|
+
# Only allow a list of trusted parameters through.
|
56
|
+
def project_params
|
57
|
+
params.require(:project).permit(:title, :token)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// Import and register all your controllers from the importmap under controllers/*
|
2
|
+
|
3
|
+
import { application } from "controllers/application"
|
4
|
+
|
5
|
+
// Eager load all controllers defined in the import map under controllers/**/*_controller
|
6
|
+
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
|
7
|
+
eagerLoadControllersFrom("controllers", application)
|
8
|
+
|
9
|
+
// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
|
10
|
+
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
|
11
|
+
// lazyLoadControllersFrom("controllers", application)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html class="h-full">
|
3
|
+
<head>
|
4
|
+
<title>Mission control servers</title>
|
5
|
+
<%= csrf_meta_tags %>
|
6
|
+
<%= csp_meta_tag %>
|
7
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
8
|
+
<script src="https://cdn.tailwindcss.com?plugins=forms,typography"></script>
|
9
|
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
10
|
+
|
11
|
+
<%= stylesheet_link_tag "mission_control/servers/application", media: "all" %>
|
12
|
+
<%= javascript_importmap_tags "application-mcs" %>
|
13
|
+
</head>
|
14
|
+
<body class="h-full">
|
15
|
+
<div class="m-4">
|
16
|
+
<%= yield %>
|
17
|
+
</div>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%= form_with(model: project) do |form| %>
|
2
|
+
<% if project.errors.any? %>
|
3
|
+
<div style="color: red">
|
4
|
+
<h2><%= pluralize(project.errors.count, "error") %> prohibited this project from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% project.errors.each do |error| %>
|
8
|
+
<li><%= error.full_message %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div>
|
15
|
+
<%= form.label :title, style: "display: block" %>
|
16
|
+
<%= form.text_field :title %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div>
|
20
|
+
<%= form.label :token, style: "display: block" %>
|
21
|
+
<%= form.text_field :token %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div>
|
25
|
+
<%= form.submit %>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<p style="color: green"><%= notice %></p>
|
2
|
+
|
3
|
+
<h1>Projects</h1>
|
4
|
+
|
5
|
+
<div id="projects">
|
6
|
+
<% @projects.each do |project| %>
|
7
|
+
<%= render project %>
|
8
|
+
<p>
|
9
|
+
<%= link_to "Show this project", project %>
|
10
|
+
</p>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<%= link_to "New project", new_project_path %>
|
@@ -0,0 +1,128 @@
|
|
1
|
+
<div class="lg:flex lg:items-center lg:justify-between">
|
2
|
+
<div class="min-w-0 flex-1">
|
3
|
+
<h2 class="text-2xl font-bold leading-7 text-gray-900 sm:truncate sm:text-3xl sm:tracking-tight"><%= @project.title %></h2>
|
4
|
+
<div class="mt-1 flex flex-col sm:mt-0 sm:flex-row sm:flex-wrap sm:space-x-6">
|
5
|
+
<div class="mt-2 flex items-center text-sm text-gray-500">
|
6
|
+
<svg class="mr-1.5 h-5 w-5 flex-shrink-0 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
7
|
+
<path fill-rule="evenodd" d="M9.69 18.933l.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 00.281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 103 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 002.273 1.765 11.842 11.842 0 00.976.544l.062.029.018.008.006.003zM10 11.25a2.25 2.25 0 100-4.5 2.25 2.25 0 000 4.5z" clip-rule="evenodd" />
|
8
|
+
</svg>
|
9
|
+
<%= link_to project_ingress_url(@project), project_ingress_url(@project) %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="mt-5 flex lg:ml-4 lg:mt-0">
|
15
|
+
<span class="hidden sm:block">
|
16
|
+
<%= link_to edit_project_path(@project), class: "inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50" do %>
|
17
|
+
<svg class="-ml-0.5 mr-1.5 h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
18
|
+
<path d="M2.695 14.763l-1.262 3.154a.5.5 0 00.65.65l3.155-1.262a4 4 0 001.343-.885L17.5 5.5a2.121 2.121 0 00-3-3L3.58 13.42a4 4 0 00-.885 1.343z" />
|
19
|
+
</svg>
|
20
|
+
Edit
|
21
|
+
<% end %>
|
22
|
+
</span>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
|
27
|
+
<div class="bg-white py-24 sm:py-32">
|
28
|
+
<div class="mx-auto max-w-7xl px-6 lg:px-8">
|
29
|
+
<div class="mx-auto max-w-2xl lg:max-w-none">
|
30
|
+
<div class="text-center">
|
31
|
+
<h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">web server 1</h2>
|
32
|
+
</div>
|
33
|
+
<dl class="mt-8 grid grid-cols-1 gap-0.5 overflow-hidden rounded-2xl text-center sm:grid-cols-2 lg:grid-cols-3">
|
34
|
+
<div class="flex flex-col bg-gray-400/5 p-8">
|
35
|
+
<dt class="text-sm font-semibold leading-6 text-gray-600">
|
36
|
+
<canvas id="cpuUsage"></canvas>
|
37
|
+
</dt>
|
38
|
+
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">CPU Usage</dd>
|
39
|
+
</div>
|
40
|
+
<div class="flex flex-col bg-gray-400/5 p-8">
|
41
|
+
<dt class="text-sm font-semibold leading-6 text-gray-600">
|
42
|
+
<canvas id="freeMemory"></canvas>
|
43
|
+
</dt>
|
44
|
+
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">Memory Usage</dd>
|
45
|
+
</div>
|
46
|
+
<div class="flex flex-col bg-gray-400/5 p-8">
|
47
|
+
<dt class="text-6xl font-semibold leading-6 mt-5 text-gray-600">
|
48
|
+
918Gi
|
49
|
+
</dt>
|
50
|
+
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">Disk Free</dd>
|
51
|
+
</div>
|
52
|
+
</dl>
|
53
|
+
<dl class="mt-8 grid grid-cols-1 gap-0.5 overflow-hidden rounded-2xl text-center sm:grid-cols-1 lg:grid-cols-1">
|
54
|
+
<div class="flex flex-col bg-gray-400/5 p-8">
|
55
|
+
<dt class="text-sm font-semibold leading-6 text-gray-600">
|
56
|
+
<canvas id="cpuHistory"></canvas>
|
57
|
+
</dt>
|
58
|
+
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">CPU History</dd>
|
59
|
+
</div>
|
60
|
+
</dl>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
|
66
|
+
<script>
|
67
|
+
var ctx = document.getElementById('cpuHistory');
|
68
|
+
|
69
|
+
new Chart(ctx, {
|
70
|
+
type: 'line',
|
71
|
+
data: {
|
72
|
+
labels: ['9:01pm', '9:02pm', '9:03pm', '9:04pm', '9:05pm', '9:06pm', '9:07pm'],
|
73
|
+
datasets: [{
|
74
|
+
label: 'CPU Usage',
|
75
|
+
data: [65, 59, 80, 81, 56, 55, 40],
|
76
|
+
fill: true,
|
77
|
+
borderColor: 'rgb(75, 192, 192)',
|
78
|
+
tension: 0.1
|
79
|
+
}]
|
80
|
+
}
|
81
|
+
});
|
82
|
+
</script>
|
83
|
+
|
84
|
+
<script>
|
85
|
+
var ctx = document.getElementById('freeMemory');
|
86
|
+
|
87
|
+
new Chart(ctx, {
|
88
|
+
type: 'doughnut',
|
89
|
+
data: {
|
90
|
+
labels: [
|
91
|
+
'Used',
|
92
|
+
'Free'
|
93
|
+
],
|
94
|
+
datasets: [{
|
95
|
+
label: 'Memory',
|
96
|
+
data: [300, 100],
|
97
|
+
backgroundColor: [
|
98
|
+
'rgb(255, 99, 132)',
|
99
|
+
'rgb(54, 162, 235)'
|
100
|
+
],
|
101
|
+
hoverOffset: 4
|
102
|
+
}]
|
103
|
+
}
|
104
|
+
});
|
105
|
+
</script>
|
106
|
+
|
107
|
+
<script>
|
108
|
+
var ctx = document.getElementById('cpuUsage');
|
109
|
+
|
110
|
+
new Chart(ctx, {
|
111
|
+
type: 'doughnut',
|
112
|
+
data: {
|
113
|
+
labels: [
|
114
|
+
'Active',
|
115
|
+
'Idle'
|
116
|
+
],
|
117
|
+
datasets: [{
|
118
|
+
label: 'CPU Usage',
|
119
|
+
data: [300, 100],
|
120
|
+
backgroundColor: [
|
121
|
+
'rgb(54, 162, 235)',
|
122
|
+
'rgb(235, 235, 235)'
|
123
|
+
],
|
124
|
+
hoverOffset: 4
|
125
|
+
}]
|
126
|
+
}
|
127
|
+
});
|
128
|
+
</script>
|
data/config/importmap.rb
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
pin "application-mcs", to: "mission_control/servers/application.js", preload: true
|
2
|
+
pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
|
3
|
+
pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
|
4
|
+
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
|
5
|
+
pin_all_from MissionControl::Servers::Engine.root.join("app/javascript/mission_control/servers/controllers"), under: "controllers", to: "mission_control/servers/controllers"
|
data/config/routes.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateMissionControlServersServices < ActiveRecord::Migration[7.1]
|
2
|
+
def change
|
3
|
+
create_table :mission_control_servers_services do |t|
|
4
|
+
t.belongs_to :project, null: false, foreign_key: { to_table: :mission_control_servers_projects }
|
5
|
+
t.string :hostname
|
6
|
+
t.decimal :cpu, precision: 8, scale: 2
|
7
|
+
t.decimal :mem_used, precision: 8, scale: 2
|
8
|
+
t.decimal :mem_free, precision: 8, scale: 2
|
9
|
+
t.decimal :disk_free, precision: 8, scale: 2
|
10
|
+
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "importmap-rails"
|
2
|
+
require "turbo-rails"
|
3
|
+
require "stimulus-rails"
|
4
|
+
|
5
|
+
module MissionControl
|
6
|
+
module Servers
|
7
|
+
class Engine < ::Rails::Engine
|
8
|
+
isolate_namespace MissionControl::Servers
|
9
|
+
|
10
|
+
initializer "mission_control-servers.assets" do |app|
|
11
|
+
app.config.assets.paths << root.join("app/javascript")
|
12
|
+
app.config.assets.precompile += %w[ mission_control_servers_manifest ]
|
13
|
+
end
|
14
|
+
|
15
|
+
initializer "mission_control-servers.importmap", before: "importmap" do |app|
|
16
|
+
app.config.importmap.paths << root.join("config/importmap.rb")
|
17
|
+
app.config.importmap.cache_sweepers << root.join("app/javascript")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "mission_control/servers/version"
|
2
|
+
require "mission_control/servers/engine"
|
3
|
+
|
4
|
+
require "zeitwerk"
|
5
|
+
|
6
|
+
loader = Zeitwerk::Loader.new
|
7
|
+
loader.inflector = Zeitwerk::GemInflector.new(__FILE__)
|
8
|
+
loader.push_dir(File.expand_path("..", __dir__))
|
9
|
+
loader.setup
|
10
|
+
|
11
|
+
module MissionControl
|
12
|
+
module Servers
|
13
|
+
# Your code goes here...
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mission_control-servers
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dave Kimura
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-02-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 7.1.3
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 7.1.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: importmap-rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: turbo-rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: stimulus-rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Dashboard for managing servers.
|
70
|
+
email:
|
71
|
+
- dave@k-innovations.net
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- MIT-LICENSE
|
77
|
+
- README.md
|
78
|
+
- Rakefile
|
79
|
+
- app/assets/config/mission_control_servers_manifest.js
|
80
|
+
- app/assets/stylesheets/mission_control/servers/application.css
|
81
|
+
- app/controllers/mission_control/servers/application_controller.rb
|
82
|
+
- app/controllers/mission_control/servers/ingresses_controller.rb
|
83
|
+
- app/controllers/mission_control/servers/projects_controller.rb
|
84
|
+
- app/helpers/mission_control/servers/application_helper.rb
|
85
|
+
- app/helpers/mission_control/servers/projects_helper.rb
|
86
|
+
- app/javascript/mission_control/servers/application.js
|
87
|
+
- app/javascript/mission_control/servers/controllers/application.js
|
88
|
+
- app/javascript/mission_control/servers/controllers/index.js
|
89
|
+
- app/jobs/mission_control/servers/application_job.rb
|
90
|
+
- app/mailers/mission_control/servers/application_mailer.rb
|
91
|
+
- app/models/mission_control/servers/application_record.rb
|
92
|
+
- app/models/mission_control/servers/project.rb
|
93
|
+
- app/models/mission_control/servers/service.rb
|
94
|
+
- app/views/layouts/mission_control/servers/application.html.erb
|
95
|
+
- app/views/mission_control/servers/projects/_form.html.erb
|
96
|
+
- app/views/mission_control/servers/projects/_project.html.erb
|
97
|
+
- app/views/mission_control/servers/projects/edit.html.erb
|
98
|
+
- app/views/mission_control/servers/projects/index.html.erb
|
99
|
+
- app/views/mission_control/servers/projects/new.html.erb
|
100
|
+
- app/views/mission_control/servers/projects/show.html.erb
|
101
|
+
- config/importmap.rb
|
102
|
+
- config/routes.rb
|
103
|
+
- db/migrate/20240205020304_create_mission_control_servers_projects.rb
|
104
|
+
- db/migrate/20240205031009_create_mission_control_servers_services.rb
|
105
|
+
- lib/mission_control/servers.rb
|
106
|
+
- lib/mission_control/servers/engine.rb
|
107
|
+
- lib/mission_control/servers/version.rb
|
108
|
+
- lib/tasks/mission_control/servers_tasks.rake
|
109
|
+
homepage: https://github.com/kobaltz/misson_control-servers
|
110
|
+
licenses:
|
111
|
+
- MIT
|
112
|
+
metadata:
|
113
|
+
homepage_uri: https://github.com/kobaltz/misson_control-servers
|
114
|
+
source_code_uri: https://github.com/kobaltz/mission_control-servers
|
115
|
+
changelog_uri: https://github.com/kobaltz/mission_control-servers
|
116
|
+
post_install_message:
|
117
|
+
rdoc_options: []
|
118
|
+
require_paths:
|
119
|
+
- lib
|
120
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
requirements: []
|
131
|
+
rubygems_version: 3.5.5
|
132
|
+
signing_key:
|
133
|
+
specification_version: 4
|
134
|
+
summary: Dashboard for managing servers.
|
135
|
+
test_files: []
|