blazer 2.6.5 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +13 -28
  5. data/app/assets/javascripts/blazer/ace/ace.js +7235 -8906
  6. data/app/assets/javascripts/blazer/ace/ext-language_tools.js +762 -774
  7. data/app/assets/javascripts/blazer/ace/mode-sql.js +177 -72
  8. data/app/assets/javascripts/blazer/ace/snippets/sql.js +5 -29
  9. data/app/assets/javascripts/blazer/ace/snippets/text.js +1 -6
  10. data/app/assets/javascripts/blazer/ace/theme-twilight.js +8 -106
  11. data/app/assets/javascripts/blazer/application.js +9 -6
  12. data/app/assets/javascripts/blazer/chart.umd.js +13 -0
  13. data/app/assets/javascripts/blazer/chartjs-adapter-date-fns.bundle.js +6322 -0
  14. data/app/assets/javascripts/blazer/chartkick.js +1020 -914
  15. data/app/assets/javascripts/blazer/highlight.min.js +466 -3
  16. data/app/assets/javascripts/blazer/mapkick.bundle.js +1029 -0
  17. data/app/assets/javascripts/blazer/moment-timezone-with-data.js +39 -38
  18. data/app/assets/javascripts/blazer/moment.js +105 -88
  19. data/app/assets/javascripts/blazer/queries.js +10 -1
  20. data/app/assets/javascripts/blazer/rails-ujs.js +746 -0
  21. data/app/assets/javascripts/blazer/vue.global.prod.js +1 -0
  22. data/app/assets/stylesheets/blazer/bootstrap.css +1 -1
  23. data/app/assets/stylesheets/blazer/selectize.css +1 -1
  24. data/app/controllers/blazer/base_controller.rb +85 -84
  25. data/app/controllers/blazer/checks_controller.rb +6 -6
  26. data/app/controllers/blazer/dashboards_controller.rb +24 -24
  27. data/app/controllers/blazer/queries_controller.rb +208 -186
  28. data/app/controllers/blazer/uploads_controller.rb +49 -49
  29. data/app/helpers/blazer/base_helper.rb +0 -4
  30. data/app/models/blazer/query.rb +1 -12
  31. data/app/views/blazer/checks/index.html.erb +1 -1
  32. data/app/views/blazer/dashboards/_form.html.erb +11 -5
  33. data/app/views/blazer/queries/_form.html.erb +19 -14
  34. data/app/views/blazer/queries/docs.html.erb +11 -1
  35. data/app/views/blazer/queries/home.html.erb +9 -6
  36. data/app/views/blazer/queries/run.html.erb +17 -32
  37. data/app/views/blazer/queries/show.html.erb +12 -20
  38. data/app/views/layouts/blazer/application.html.erb +1 -5
  39. data/lib/blazer/adapters/sql_adapter.rb +1 -1
  40. data/lib/blazer/adapters.rb +17 -0
  41. data/lib/blazer/anomaly_detectors.rb +22 -0
  42. data/lib/blazer/data_source.rb +29 -40
  43. data/lib/blazer/engine.rb +11 -9
  44. data/lib/blazer/forecasters.rb +7 -0
  45. data/lib/blazer/result.rb +13 -71
  46. data/lib/blazer/result_cache.rb +71 -0
  47. data/lib/blazer/run_statement.rb +3 -2
  48. data/lib/blazer/run_statement_job.rb +2 -2
  49. data/lib/blazer/statement.rb +3 -1
  50. data/lib/blazer/version.rb +1 -1
  51. data/lib/blazer.rb +51 -53
  52. data/licenses/LICENSE-chart.js.txt +1 -1
  53. data/licenses/LICENSE-chartjs-adapter-date-fns.txt +9 -0
  54. data/licenses/LICENSE-chartkick.js.txt +1 -1
  55. data/licenses/LICENSE-date-fns.txt +21 -0
  56. data/licenses/LICENSE-kurkle-color.txt +9 -0
  57. data/licenses/LICENSE-mapkick-bundle.txt +1029 -0
  58. data/licenses/{LICENSE-jquery-ujs.txt → LICENSE-rails-ujs.txt} +1 -1
  59. data/licenses/LICENSE-vue.txt +1 -1
  60. metadata +26 -18
  61. data/app/assets/javascripts/blazer/Chart.js +0 -16172
  62. data/app/assets/javascripts/blazer/jquery-ujs.js +0 -555
  63. data/app/assets/javascripts/blazer/vue.js +0 -12014
  64. data/lib/blazer/adapters/mongodb_adapter.rb +0 -43
  65. data/lib/blazer/detect_anomalies.R +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7070457b0a2fa4af3ee1ae5306320cd9a9c77808b493ad67f99058494d93a21
4
- data.tar.gz: 47d7262771999768ec83ed42a610339e8086269f9ab30fa7fb60993f19fc3554
3
+ metadata.gz: 6deb8aff915dbda37c6d49f0469e9d0244faf48ee24bff2e486ac467ab13e90e
4
+ data.tar.gz: 8b93cfc07025251e4a216f0cb42e5d91baa739d0107c874bbc41d7cd28653823
5
5
  SHA512:
6
- metadata.gz: bea82ccf67a483173c07e6e90fda48e8ed80a85607078a348e4b87cb7da12cce61067c768d9523e77aabd0af2ff9e4262455a8b16000b50d0237a55031e2abc5
7
- data.tar.gz: 7b9fd7b18b5960e7669a0ace42a182bf20bcf4024fbab26b2c96f26713f36ef426a262b33b327215689de1823647398170d3ff290f6bf4fb8c8c8ee033735c9a
6
+ metadata.gz: 17e7e661e5a0339baf19bd7278e1661645890bc59d3db06db00ceacdc7671471f41c66f5e8dadaf8ba1746bc072d374b97328d9178dc099a25943ede2f33d29a
7
+ data.tar.gz: f4cf77965a7f906f790da30205e28f43ec1c22fbda3dfa3d0e4091be95fd007435a5a079caac616f6096fd2927c064f1d216976924b67080bc9b33534f780666
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## 3.0.1 (2023-10-08)
2
+
3
+ - Fixed error with Rails 7.1 when no user model
4
+
5
+ ## 3.0.0 (2023-09-20)
6
+
7
+ - Switched from Mapbox.js to Mapbox GL JS v1 for maps (this affects Mapbox billing)
8
+ - Support for AnomalyDetection.rb is no longer experimental
9
+ - Added support for maps from GeoJSON
10
+ - Added support for Trilogy
11
+ - Fixed `async` option
12
+ - Fixed run now button for cached queries
13
+ - Dropped support for Ruby < 3 and Rails < 6.1
14
+ - Dropped support for MongoDB (required < 4.2)
15
+ - Dropped support for R anomaly detection
16
+
1
17
  ## 2.6.5 (2022-08-31)
2
18
 
3
19
  - Use monotonic time
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2022 Andrew Kane
1
+ Copyright (c) 2014-2023 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -168,16 +168,6 @@ GRANT SELECT, SHOW VIEW ON dbname.* TO 'blazer'@'127.0.0.1';
168
168
  FLUSH PRIVILEGES;
169
169
  ```
170
170
 
171
- ### MongoDB
172
-
173
- Create a user with read-only permissions:
174
-
175
- ```javascript
176
- db.createUser({user: "blazer", pwd: "secret", roles: ["read"]})
177
- ```
178
-
179
- Also, make sure authorization is enabled when you start the server.
180
-
181
171
  ## Sensitive Data
182
172
 
183
173
  If your database contains sensitive or personal data, check out [Hypershield](https://github.com/ankane/hypershield) to shield it.
@@ -360,6 +350,12 @@ Columns named `latitude` and `longitude` or `lat` and `lon` or `lat` and `lng` -
360
350
  SELECT name, latitude, longitude FROM cities
361
351
  ```
362
352
 
353
+ or a column named `geojson`
354
+
355
+ ```sql
356
+ SELECT name, geojson FROM counties
357
+ ```
358
+
363
359
  To enable, get an access token from [Mapbox](https://www.mapbox.com/) and set `ENV["MAPBOX_ACCESS_TOKEN"]`.
364
360
 
365
361
  ### Targets
@@ -455,7 +451,7 @@ For the [self-hosted API](https://github.com/ankane/trend-api), create an initia
455
451
  Trend.url = "http://localhost:8000"
456
452
  ```
457
453
 
458
- ### AnomalyDetection.rb (experimental)
454
+ ### AnomalyDetection.rb
459
455
 
460
456
  Add [anomaly_detection](https://github.com/ankane/AnomalyDetection.rb) to your Gemfile:
461
457
 
@@ -513,7 +509,7 @@ Trend.url = "http://localhost:8000"
513
509
 
514
510
  ## Uploads
515
511
 
516
- Creating database tables from CSV files. [Example](https://blazer.dokkuapp.com/uploads)
512
+ Create database tables from CSV files. [Example](https://blazer.dokkuapp.com/uploads)
517
513
 
518
514
  Run:
519
515
 
@@ -570,7 +566,6 @@ data_sources:
570
566
  - [Google BigQuery](#google-bigquery)
571
567
  - [IBM DB2 and Informix](#ibm-db2-and-informix)
572
568
  - [InfluxDB](#influxdb)
573
- - [MongoDB](#mongodb-1)
574
569
  - [MySQL](#mysql-1)
575
570
  - [Neo4j](#neo4j)
576
571
  - [OpenSearch](#opensearch)
@@ -784,20 +779,6 @@ data_sources:
784
779
 
785
780
  Use a [read-only user](https://docs.influxdata.com/influxdb/v1.8/administration/authentication_and_authorization/). Supports [InfluxQL](https://docs.influxdata.com/influxdb/v1.8/query_language/explore-data/).
786
781
 
787
- ### MongoDB
788
-
789
- *Requires MongoDB < 4.2 at the moment*
790
-
791
- Add [mongo](https://github.com/mongodb/mongo-ruby-driver) to your Gemfile and set:
792
-
793
- ```yml
794
- data_sources:
795
- my_source:
796
- url: mongodb://user:password@hostname:27017/database
797
- ```
798
-
799
- Use a [read-only user](#mongodb).
800
-
801
782
  ### MySQL
802
783
 
803
784
  Add [mysql2](https://github.com/brianmario/mysql2) to your Gemfile (if it’s not there) and set:
@@ -1017,7 +998,7 @@ By default, queries take up a request while they are running. To run queries asy
1017
998
  async: true
1018
999
  ```
1019
1000
 
1020
- **Note:** Requires Rails 5+ and caching to be enabled. If you have multiple web processes, your app must use a centralized cache store like Memcached or Redis.
1001
+ **Note:** Requires caching to be enabled. If you have multiple web processes, your app must use a centralized cache store like Memcached or Redis.
1021
1002
 
1022
1003
  ```ruby
1023
1004
  config.cache_store = :mem_cache_store
@@ -1041,6 +1022,10 @@ override_csp: true
1041
1022
 
1042
1023
  ## Upgrading
1043
1024
 
1025
+ ### 3.0
1026
+
1027
+ Maps now use Mapbox GL JS v1 instead of Mapbox.js, which affects Mapbox billing.
1028
+
1044
1029
  ### 2.6
1045
1030
 
1046
1031
  Custom adapters now need to specify how to quote variables in queries (there is no longer a default)