puny-monitor 0.1.0 → 0.2.0

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.
@@ -1,4 +1,2 @@
1
- import Chartkick from "chartkick";
2
- import Chart from "chart.js";
3
-
4
- Chartkick.use(Chart);
1
+ import "chartkick";
2
+ import "Chart.bundle";
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puny-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hans Schnedlitz
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-10-29 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: chartkick
@@ -38,6 +37,20 @@ dependencies:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
39
  version: '6.4'
40
+ - !ruby/object:Gem::Dependency
41
+ name: puma
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '6.6'
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '6.6'
41
54
  - !ruby/object:Gem::Dependency
42
55
  name: rackup
43
56
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +149,6 @@ dependencies:
136
149
  - - "~>"
137
150
  - !ruby/object:Gem::Version
138
151
  version: '1.4'
139
- description:
140
152
  email:
141
153
  - hello@hansschnedlitz.com
142
154
  executables:
@@ -144,10 +156,10 @@ executables:
144
156
  extensions: []
145
157
  extra_rdoc_files: []
146
158
  files:
147
- - ".ruby-version"
159
+ - CHANGELOG.md
148
160
  - LICENSE
149
161
  - README.md
150
- - Rakefile
162
+ - app/authorization.rb
151
163
  - app/models/bandwidth.rb
152
164
  - app/models/cpu_load.rb
153
165
  - app/models/cpu_usage.rb
@@ -158,13 +170,9 @@ files:
158
170
  - app/scheduler.rb
159
171
  - app/views/index.erb
160
172
  - app/views/layout.erb
161
- - config.ru
162
173
  - config/database.yml
163
174
  - config/environment.rb
164
175
  - config/initializers/chartkick.rb
165
- - db/migrate/20231023000000_add_indices_to_created_at_columns.rb
166
- - db/schema.rb
167
- - db/seeds.rb
168
176
  - exe/puny-monitor
169
177
  - lib/puny_monitor.rb
170
178
  - lib/puny_monitor/version.rb
@@ -173,6 +181,8 @@ files:
173
181
  - public/fonts/Rubik.woff2
174
182
  - public/icon-512.png
175
183
  - public/icon.svg
184
+ - public/javascript/Chart.bundle.js
185
+ - public/javascript/chartkick.js
176
186
  - public/javascript/index.js
177
187
  - public/style.css
178
188
  homepage: https://github.com/hschne/puny-monitor
@@ -184,7 +194,6 @@ metadata:
184
194
  source_code_uri: https://github.com/hschne/puny-monitor
185
195
  changelog_uri: https://github.com/hschne/puny-monitor/CHANGELOG
186
196
  rubygems_mfa_required: 'true'
187
- post_install_message:
188
197
  rdoc_options: []
189
198
  require_paths:
190
199
  - lib
@@ -199,8 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
208
  - !ruby/object:Gem::Version
200
209
  version: '0'
201
210
  requirements: []
202
- rubygems_version: 3.5.21
203
- signing_key:
211
+ rubygems_version: 3.6.7
204
212
  specification_version: 4
205
213
  summary: A batteries-included monitoring tool for single hosts. Works great with Kamal.
206
214
  test_files: []
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.3.4
data/Rakefile DELETED
@@ -1,50 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
-
5
- require_relative "config/environment"
6
-
7
- require "sinatra/activerecord/rake"
8
-
9
- if PunyMonitor::App.development?
10
-
11
- require "minitest/test_task"
12
- Minitest::TestTask.create
13
-
14
- require "rubocop/rake_task"
15
- RuboCop::RakeTask.new
16
-
17
- namespace :docker do
18
- desc "Build Puny Monitor Docker image"
19
- task :build do
20
- sh "docker build -t hschne/puny-monitor:latest ."
21
- end
22
-
23
- desc "Push Puny Monitor Docker image"
24
- task :push do
25
- sh "docker push -a hschne/puny-monitor"
26
- end
27
-
28
- desc "Run Docker container"
29
- task :run do
30
- `docker run --rm \
31
- -v=/:/host:ro,rslave -v=puny-data:/puny-monitor/db \
32
- -e ROOT_PATH=/host \
33
- -p 80:4567 \
34
- hschne/puny-monitor:latest`
35
- end
36
-
37
- desc "Run Docker interactive shell"
38
- task :shell do
39
- `docker run --rm \
40
- -v=/:/host:ro,rslave -v=puny-data:/puny-monitor/db \
41
- -e ROOT_PATH=/host \
42
- -p 80:4567 \
43
- -it \
44
- hschne/puny-monitor:latest \
45
- /bin/bash`
46
- end
47
- end
48
-
49
- task default: %i[test rubocop]
50
- end
data/config.ru DELETED
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "config/environment"
4
- require_relative "app/puny_monitor"
5
- run PunyMonitor::App
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class AddIndicesToCreatedAtColumns < ActiveRecord::Migration[6.1]
4
- def change
5
- add_index :bandwidths, :created_at
6
- add_index :cpu_loads, :created_at
7
- add_index :cpu_usages, :created_at
8
- add_index :disk_ios, :created_at
9
- add_index :filesystem_usages, :created_at
10
- add_index :memory_usages, :created_at
11
- end
12
- end
data/db/schema.rb DELETED
@@ -1,61 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This file is auto-generated from the current state of the database. Instead
4
- # of editing this file, please use the migrations feature of Active Record to
5
- # incrementally modify your database, and then regenerate this schema definition.
6
- #
7
- # This file is the source Rails uses to define your schema when running `bin/rails
8
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
9
- # be faster and is potentially less error prone than running all of your
10
- # migrations from scratch. Old migrations may fail to apply correctly if those
11
- # migrations use external dependencies or application code.
12
- #
13
- # It's strongly recommended that you check this file into your version control system.
14
-
15
- ActiveRecord::Schema[7.2].define(version: 20_240_930_155_845) do
16
- create_table "bandwidths", force: :cascade do |t|
17
- t.float "incoming_mbps"
18
- t.float "outgoing_mbps"
19
- t.datetime "created_at", null: false
20
- t.datetime "updated_at", null: false
21
- t.index ["created_at"], name: "index_bandwidths_on_created_at"
22
- end
23
-
24
- create_table "cpu_loads", force: :cascade do |t|
25
- t.float "one_minute"
26
- t.float "five_minutes"
27
- t.float "fifteen_minutes"
28
- t.datetime "created_at", null: false
29
- t.datetime "updated_at", null: false
30
- t.index ["created_at"], name: "index_cpu_loads_on_created_at"
31
- end
32
-
33
- create_table "cpu_usages", force: :cascade do |t|
34
- t.float "used_percent"
35
- t.datetime "created_at", null: false
36
- t.datetime "updated_at", null: false
37
- t.index ["created_at"], name: "index_cpu_usages_on_created_at"
38
- end
39
-
40
- create_table "disk_ios", force: :cascade do |t|
41
- t.float "read_mb_per_sec"
42
- t.float "write_mb_per_sec"
43
- t.datetime "created_at", null: false
44
- t.datetime "updated_at", null: false
45
- t.index ["created_at"], name: "index_disk_ios_on_created_at"
46
- end
47
-
48
- create_table "filesystem_usages", force: :cascade do |t|
49
- t.float "used_percent"
50
- t.datetime "created_at", null: false
51
- t.datetime "updated_at", null: false
52
- t.index ["created_at"], name: "index_filesystem_usages_on_created_at"
53
- end
54
-
55
- create_table "memory_usages", force: :cascade do |t|
56
- t.float "used_percent"
57
- t.datetime "created_at", null: false
58
- t.datetime "updated_at", null: false
59
- t.index ["created_at"], name: "index_memory_usages_on_created_at"
60
- end
61
- end
data/db/seeds.rb DELETED
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Add seeds here