puny-monitor 0.1.0 → 0.3.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";
data/public/style.css CHANGED
@@ -116,6 +116,20 @@ footer {
116
116
  gap: var(--space-md);
117
117
  margin-bottom: var(--space-sm);
118
118
 
119
+ form {
120
+ display: flex;
121
+ justify-content: center;
122
+ align-items: center;
123
+ gap: var(--space-md);
124
+ }
125
+
126
+ label {
127
+ display: flex;
128
+ justify-content: center;
129
+ align-items: center;
130
+ gap: var(--space-xs);
131
+ }
132
+
119
133
  select {
120
134
  font-size: var(--font-size-md);
121
135
  padding: var(--space-xxs) var(--space-xs);
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.3.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
@@ -25,19 +24,19 @@ dependencies:
25
24
  - !ruby/object:Gem::Version
26
25
  version: '5.1'
27
26
  - !ruby/object:Gem::Dependency
28
- name: groupdate
27
+ name: puma
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '6.4'
32
+ version: '6.6'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '6.4'
39
+ version: '6.6'
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: rackup
43
42
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +135,6 @@ dependencies:
136
135
  - - "~>"
137
136
  - !ruby/object:Gem::Version
138
137
  version: '1.4'
139
- description:
140
138
  email:
141
139
  - hello@hansschnedlitz.com
142
140
  executables:
@@ -144,10 +142,11 @@ executables:
144
142
  extensions: []
145
143
  extra_rdoc_files: []
146
144
  files:
147
- - ".ruby-version"
145
+ - CHANGELOG.md
148
146
  - LICENSE
149
147
  - README.md
150
- - Rakefile
148
+ - app/authorization.rb
149
+ - app/models/application_model.rb
151
150
  - app/models/bandwidth.rb
152
151
  - app/models/cpu_load.rb
153
152
  - app/models/cpu_usage.rb
@@ -158,13 +157,9 @@ files:
158
157
  - app/scheduler.rb
159
158
  - app/views/index.erb
160
159
  - app/views/layout.erb
161
- - config.ru
162
160
  - config/database.yml
163
161
  - config/environment.rb
164
162
  - config/initializers/chartkick.rb
165
- - db/migrate/20231023000000_add_indices_to_created_at_columns.rb
166
- - db/schema.rb
167
- - db/seeds.rb
168
163
  - exe/puny-monitor
169
164
  - lib/puny_monitor.rb
170
165
  - lib/puny_monitor/version.rb
@@ -173,6 +168,8 @@ files:
173
168
  - public/fonts/Rubik.woff2
174
169
  - public/icon-512.png
175
170
  - public/icon.svg
171
+ - public/javascript/Chart.bundle.js
172
+ - public/javascript/chartkick.js
176
173
  - public/javascript/index.js
177
174
  - public/style.css
178
175
  homepage: https://github.com/hschne/puny-monitor
@@ -184,7 +181,6 @@ metadata:
184
181
  source_code_uri: https://github.com/hschne/puny-monitor
185
182
  changelog_uri: https://github.com/hschne/puny-monitor/CHANGELOG
186
183
  rubygems_mfa_required: 'true'
187
- post_install_message:
188
184
  rdoc_options: []
189
185
  require_paths:
190
186
  - lib
@@ -199,8 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
195
  - !ruby/object:Gem::Version
200
196
  version: '0'
201
197
  requirements: []
202
- rubygems_version: 3.5.21
203
- signing_key:
198
+ rubygems_version: 3.6.7
204
199
  specification_version: 4
205
200
  summary: A batteries-included monitoring tool for single hosts. Works great with Kamal.
206
201
  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