mihari 7.5.0 → 7.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +11 -7
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/endpoints/alerts.rb +2 -4
- data/lib/mihari/web/endpoints/artifacts.rb +2 -2
- data/lib/mihari/web/endpoints/configs.rb +1 -6
- data/lib/mihari/web/endpoints/rules.rb +2 -2
- data/lib/mihari/web/endpoints/tags.rb +2 -2
- data/lib/mihari/web/public/assets/index-CNoViC5p.css +1 -0
- data/lib/mihari/web/public/assets/index-ruBsf_QV.js +1783 -0
- data/lib/mihari/web/public/index.html +2 -2
- data/lib/mihari/web/public/redoc-static.html +26 -22
- data/mihari.gemspec +6 -6
- data/requirements.txt +1 -1
- metadata +16 -16
- data/lib/mihari/web/public/assets/index-80oZkhZG.css +0 -1
- data/lib/mihari/web/public/assets/index-BNLbw8nG.js +0 -1783
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa05d5cca592eb276667bc95e7c7a88c12be39bb547ffb4f3bac810f9e5a72a6
|
4
|
+
data.tar.gz: 81a9a73171dbb4c5171893cb23cc47963fcfef38d441cfebd37005e6e6dc6202
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6623c5441e14cf967987c2341349e9973922fdb18dc5d9c3473bcc8fbc7aaf813f9a48c8384331e49a4ada370ebd270d3cd68cbc7dcc6481f1bb886b0923109
|
7
|
+
data.tar.gz: 0d112b4740054b7afe79effff48016b8549bf6ef45b337ba43b44fba13f162f7cc8b5f2bfe653bfacf4bb356c2f1b32c7a5964be174d028b877372d642aedfea
|
data/Rakefile
CHANGED
@@ -55,17 +55,21 @@ namespace :build do
|
|
55
55
|
|
56
56
|
puts "Swagger doc is built in #{elapsed}s"
|
57
57
|
end
|
58
|
+
|
59
|
+
desc "Build frontend assets"
|
60
|
+
task :frontend do
|
61
|
+
# Build frontend assets
|
62
|
+
sh "cd frontend && npm install && npm run docs && npm run build-only"
|
63
|
+
# Copy built assets into ./lib/web/public/
|
64
|
+
sh "rm -rf ./lib/mihari/web/public/"
|
65
|
+
sh "mkdir -p ./lib/mihari/web/public/"
|
66
|
+
sh "cp -r frontend/dist/* ./lib/mihari/web/public"
|
67
|
+
end
|
58
68
|
end
|
59
69
|
|
60
70
|
task :build do
|
61
71
|
Rake::Task["build:swagger"].invoke
|
62
|
-
|
63
|
-
# Build ReDocs docs & frontend assets
|
64
|
-
sh "cd frontend && npm install && npm run docs && npm run build-only"
|
65
|
-
# Copy built assets into ./lib/web/public/
|
66
|
-
sh "rm -rf ./lib/mihari/web/public/"
|
67
|
-
sh "mkdir -p ./lib/mihari/web/public/"
|
68
|
-
sh "cp -r frontend/dist/* ./lib/mihari/web/public"
|
72
|
+
Rake::Task["build:frontend"].invoke
|
69
73
|
end
|
70
74
|
|
71
75
|
# require it later enables doing pre-build step (= build the frontend app)
|
data/lib/mihari/version.rb
CHANGED
@@ -52,7 +52,7 @@ module Mihari
|
|
52
52
|
end
|
53
53
|
|
54
54
|
desc "Delete an alert", {
|
55
|
-
success: {code: 204
|
55
|
+
success: {code: 204},
|
56
56
|
failure: [{code: 404, model: Entities::ErrorMessage}],
|
57
57
|
summary: "Delete an alert"
|
58
58
|
}
|
@@ -60,11 +60,9 @@ module Mihari
|
|
60
60
|
requires :id, type: Integer
|
61
61
|
end
|
62
62
|
delete "/:id" do
|
63
|
-
status 204
|
64
|
-
|
65
63
|
id = params["id"].to_i
|
66
64
|
result = Services::AlertDestroyer.result(id)
|
67
|
-
return
|
65
|
+
return if result.success?
|
68
66
|
|
69
67
|
case result.failure
|
70
68
|
when ActiveRecord::RecordNotFound
|
@@ -87,7 +87,7 @@ module Mihari
|
|
87
87
|
end
|
88
88
|
|
89
89
|
desc "Delete an artifact", {
|
90
|
-
success: {code: 204
|
90
|
+
success: {code: 204},
|
91
91
|
failure: [{code: 404, model: Entities::ErrorMessage}],
|
92
92
|
summary: "Delete an artifact"
|
93
93
|
}
|
@@ -99,7 +99,7 @@ module Mihari
|
|
99
99
|
|
100
100
|
id = params["id"].to_i
|
101
101
|
result = Services::ArtifactDestroyer.result(id)
|
102
|
-
return
|
102
|
+
return if result.success?
|
103
103
|
|
104
104
|
case result.failure
|
105
105
|
when ActiveRecord::RecordNotFound
|
@@ -167,7 +167,7 @@ module Mihari
|
|
167
167
|
end
|
168
168
|
|
169
169
|
desc "Delete a rule", {
|
170
|
-
success: {code: 204
|
170
|
+
success: {code: 204},
|
171
171
|
failure: [{code: 404, model: Entities::ErrorMessage}],
|
172
172
|
summary: "Delete a rule"
|
173
173
|
}
|
@@ -179,7 +179,7 @@ module Mihari
|
|
179
179
|
|
180
180
|
id = params[:id].to_s
|
181
181
|
result = Services::RuleDestroyer.result(id)
|
182
|
-
return
|
182
|
+
return if result.success?
|
183
183
|
|
184
184
|
case result.failure
|
185
185
|
when ActiveRecord::RecordNotFound
|
@@ -32,7 +32,7 @@ module Mihari
|
|
32
32
|
end
|
33
33
|
|
34
34
|
desc "Delete a tag", {
|
35
|
-
success: {code: 204
|
35
|
+
success: {code: 204},
|
36
36
|
failure: [{code: 404, model: Entities::ErrorMessage}],
|
37
37
|
summary: "Delete a tag"
|
38
38
|
}
|
@@ -44,7 +44,7 @@ module Mihari
|
|
44
44
|
|
45
45
|
id = params[:id].to_i
|
46
46
|
result = Services::TagDestroyer.result(id)
|
47
|
-
return
|
47
|
+
return if result.success?
|
48
48
|
|
49
49
|
case result.failure
|
50
50
|
when ActiveRecord::RecordNotFound
|