grafana 0.10.1 → 0.10.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b47ee6b9be4c494c406764a66b0f3602540cf4446eaf419344be757e3826bca
4
- data.tar.gz: 61fdaf83235d528c4656babdea4db9edcac02e1367e2f2d66ef5eee8846e554a
3
+ metadata.gz: d62ca27f8f2d01a27309e9b947fa2f633caf75d2bcc94443a9208c36416ff5e3
4
+ data.tar.gz: 30f9a883ac3b492ea294a090960f733c7a163d59c39975c3efb12391410387af
5
5
  SHA512:
6
- metadata.gz: d8f6e67f79b099fdcb2965c0d4b1fdd8536b41f9499209acc75e6e0060b3cc363b8db871193c07e0e428aff7468972c342e52f481493c8623f6486d92f3a3fd1
7
- data.tar.gz: 05a45c0280160567cff18a6b12ec6cadab9524df5531930266a5f59d4d47e23dd8d5876dfe114eed5ebb29e90a72f78f50086a2a363d055aa516a62089029f57
6
+ metadata.gz: 81a9b8b26d5de44f741045268ce8fc4eb0581414cecba178abea7e8c614be0c2586256ace00669719b87eee37c47c90e1fb9a0c5d23171a236ff49938caf3934
7
+ data.tar.gz: f680c1a86f1aa778eb00e440fc00d290683bafc0eb245c67215c071079ad8ca43b6499e54ee9aeee2bd6dd15f7c89eff9a86b6ebfd70604a831f1717169b528c
@@ -80,7 +80,7 @@ module Grafana
80
80
  v, mv = version.values
81
81
  return { 'status' => 404, 'message' => format( 'only Grafana 5 has uid support. you use version %s', v) } if(mv != 5)
82
82
 
83
- return { 'status' => 404, 'message' => format( 'The uid can have a maximum length of 40 characters. \'%s\' given', uid.length) } if( uid.length > 40 )
83
+ return { 'status' => 404, 'message' => format( 'The uid can have a maximum length of 40 characters, but it is %s characters long', uid.length) } if( uid.length > 40 )
84
84
 
85
85
  endpoint = format( '/api/dashboards/uid/%s', uid )
86
86
  @logger.debug( "Attempting to get dashboard (GET #{endpoint})" ) if @debug
@@ -88,7 +88,6 @@ module Grafana
88
88
  get( endpoint )
89
89
  end
90
90
 
91
-
92
91
  # Create / Update dashboard
93
92
  #
94
93
  # Creates a new dashboard or updates an existing dashboard.
@@ -147,6 +146,9 @@ module Grafana
147
146
 
148
147
  db = JSON.parse( dashboard ) if( dashboard.is_a?(String) )
149
148
  title = db.dig('dashboard','title')
149
+ uid = db.dig('dashboard','uid')
150
+
151
+ return { 'status' => 404, 'message' => format( 'the template \'%s\' can\'t be create. The uid can have a maximum length of 40 characters, but it is %s characters long', title, uid.length) } if( ! uid.nil? && uid.length > 40 )
150
152
 
151
153
  endpoint = '/api/dashboards/db'
152
154
 
@@ -8,7 +8,7 @@ module Grafana
8
8
  # minor part of version
9
9
  MINOR = 10
10
10
  # tiny part of version
11
- TINY = 1
11
+ TINY = 2
12
12
  end
13
13
 
14
14
  # Current version of gem.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grafana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bodo Schulz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-09 00:00:00.000000000 Z
11
+ date: 2018-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client