gazer 0.3.18 → 0.3.19
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +31 -29
- data/gzr.gemspec +1 -1
- data/lib/gzr/commands/dashboard/import.rb +46 -42
- data/lib/gzr/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b1588c27858d5bc6f0d1642bb584c49f840c69a0bef305d578681af6fa6620d3
|
|
4
|
+
data.tar.gz: 4708da68b151238a2ca206d089e3948d3ce547b0e1f1b80e0115a31d4e68c97e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8188396ff4bf9c246e53d268051e398e4a479e03512a9c3b7ecf2452fccfb9a4dc7c34649079c2489568c81c80c30595c6ad46306fb9ba2fd5a32262cb924281
|
|
7
|
+
data.tar.gz: f36d31956f63a9302e96fc34533969b0de2badf0b34da693d637ae0ac768665dd6ef8ddb4432482356bee71edcdd50fdaf2a635747e9927b6f720f4e431f7094
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.19](https://github.com/looker-open-source/gzr/compare/v0.3.18...v0.3.19) (2026-03-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* Refactored dashboard import to properly work with tabbed dashboards ([#274](https://github.com/looker-open-source/gzr/issues/274)) ([3a8edb3](https://github.com/looker-open-source/gzr/commit/3a8edb321a7cf8dd46859d55669236e76351f18d))
|
|
9
|
+
|
|
3
10
|
## [0.3.18](https://github.com/looker-open-source/gzr/compare/v0.3.17...v0.3.18) (2024-08-06)
|
|
4
11
|
|
|
5
12
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
gazer (0.3.
|
|
4
|
+
gazer (0.3.19)
|
|
5
5
|
faraday (~> 2.7.8)
|
|
6
6
|
faraday-multipart (~> 1.0)
|
|
7
|
-
looker-sdk (~> 0.1.
|
|
7
|
+
looker-sdk (~> 0.1.12)
|
|
8
8
|
net-http-persistent (~> 4.0, >= 4.0.1)
|
|
9
9
|
netrc (~> 0.11.0)
|
|
10
10
|
pastel (~> 0.8.0)
|
|
@@ -17,45 +17,47 @@ PATH
|
|
|
17
17
|
GEM
|
|
18
18
|
remote: https://rubygems.org/
|
|
19
19
|
specs:
|
|
20
|
-
addressable (2.8.
|
|
21
|
-
public_suffix (>= 2.0.2, <
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
addressable (2.8.9)
|
|
21
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
22
|
+
base64 (0.3.0)
|
|
23
|
+
connection_pool (2.5.5)
|
|
24
|
+
diff-lcs (1.6.2)
|
|
25
|
+
faraday (2.7.12)
|
|
26
|
+
base64
|
|
25
27
|
faraday-net_http (>= 2.0, < 3.1)
|
|
26
28
|
ruby2_keywords (>= 0.0.4)
|
|
27
|
-
faraday-multipart (1.0
|
|
28
|
-
multipart-post (~> 2)
|
|
29
|
+
faraday-multipart (1.2.0)
|
|
30
|
+
multipart-post (~> 2.0)
|
|
29
31
|
faraday-net_http (3.0.2)
|
|
30
|
-
looker-sdk (0.1.
|
|
32
|
+
looker-sdk (0.1.12)
|
|
31
33
|
faraday (>= 1.2, < 3.0)
|
|
32
34
|
sawyer (~> 0.8)
|
|
33
|
-
multipart-post (2.
|
|
34
|
-
net-http-persistent (4.0.
|
|
35
|
-
connection_pool (
|
|
35
|
+
multipart-post (2.4.1)
|
|
36
|
+
net-http-persistent (4.0.8)
|
|
37
|
+
connection_pool (>= 2.2.4, < 4)
|
|
36
38
|
netrc (0.11.0)
|
|
37
39
|
pastel (0.8.0)
|
|
38
40
|
tty-color (~> 0.5)
|
|
39
|
-
public_suffix (5.
|
|
41
|
+
public_suffix (5.1.1)
|
|
40
42
|
rake (12.3.3)
|
|
41
|
-
rspec (3.
|
|
42
|
-
rspec-core (~> 3.
|
|
43
|
-
rspec-expectations (~> 3.
|
|
44
|
-
rspec-mocks (~> 3.
|
|
45
|
-
rspec-core (3.
|
|
46
|
-
rspec-support (~> 3.
|
|
47
|
-
rspec-expectations (3.
|
|
43
|
+
rspec (3.13.2)
|
|
44
|
+
rspec-core (~> 3.13.0)
|
|
45
|
+
rspec-expectations (~> 3.13.0)
|
|
46
|
+
rspec-mocks (~> 3.13.0)
|
|
47
|
+
rspec-core (3.13.6)
|
|
48
|
+
rspec-support (~> 3.13.0)
|
|
49
|
+
rspec-expectations (3.13.5)
|
|
48
50
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
49
|
-
rspec-support (~> 3.
|
|
50
|
-
rspec-mocks (3.
|
|
51
|
+
rspec-support (~> 3.13.0)
|
|
52
|
+
rspec-mocks (3.13.8)
|
|
51
53
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
52
|
-
rspec-support (~> 3.
|
|
53
|
-
rspec-support (3.
|
|
54
|
+
rspec-support (~> 3.13.0)
|
|
55
|
+
rspec-support (3.13.7)
|
|
54
56
|
rspec_junit_formatter (0.6.0)
|
|
55
57
|
rspec-core (>= 2, < 4, != 2.12.0)
|
|
56
58
|
ruby2_keywords (0.0.5)
|
|
57
59
|
rubyzip (1.3.0)
|
|
58
|
-
sawyer (0.9.
|
|
60
|
+
sawyer (0.9.3)
|
|
59
61
|
addressable (>= 2.3.5)
|
|
60
62
|
faraday (>= 0.17.3, < 3)
|
|
61
63
|
strings (0.2.1)
|
|
@@ -63,20 +65,20 @@ GEM
|
|
|
63
65
|
unicode-display_width (>= 1.5, < 3.0)
|
|
64
66
|
unicode_utils (~> 1.4)
|
|
65
67
|
strings-ansi (0.2.0)
|
|
66
|
-
thor (1.
|
|
68
|
+
thor (1.5.0)
|
|
67
69
|
tty-color (0.6.0)
|
|
68
70
|
tty-cursor (0.7.1)
|
|
69
71
|
tty-reader (0.9.0)
|
|
70
72
|
tty-cursor (~> 0.7)
|
|
71
73
|
tty-screen (~> 0.8)
|
|
72
74
|
wisper (~> 2.0)
|
|
73
|
-
tty-screen (0.8.
|
|
75
|
+
tty-screen (0.8.2)
|
|
74
76
|
tty-table (0.12.0)
|
|
75
77
|
pastel (~> 0.8)
|
|
76
78
|
strings (~> 0.2.0)
|
|
77
79
|
tty-screen (~> 0.8)
|
|
78
80
|
tty-tree (0.4.0)
|
|
79
|
-
unicode-display_width (2.
|
|
81
|
+
unicode-display_width (2.6.0)
|
|
80
82
|
unicode_utils (1.4.0)
|
|
81
83
|
wisper (2.0.1)
|
|
82
84
|
|
data/gzr.gemspec
CHANGED
|
@@ -61,7 +61,7 @@ Gem::Specification.new do |spec|
|
|
|
61
61
|
spec.add_runtime_dependency 'rubyzip', '~> 1.3', '>= 1.3.0'
|
|
62
62
|
spec.add_dependency 'faraday', "~> 2.7.8"
|
|
63
63
|
spec.add_dependency 'faraday-multipart', '~> 1.0'
|
|
64
|
-
spec.add_dependency 'looker-sdk', "~> 0.1.
|
|
64
|
+
spec.add_dependency 'looker-sdk', "~> 0.1.12"
|
|
65
65
|
spec.add_runtime_dependency 'net-http-persistent', '~> 4.0', '>= 4.0.1'
|
|
66
66
|
|
|
67
67
|
spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.10'
|
|
@@ -77,38 +77,17 @@ module Gzr
|
|
|
77
77
|
dashboard[:dashboard_filters].push create_dashboard_filter(filter)
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
elem_table = data[:dashboard_elements].map do |new_element|
|
|
82
|
-
element = new_element.select do |k,v|
|
|
83
|
-
(keys_to_keep('create_dashboard_element') - [:dashboard_id, :look_id, :query_id, :merge_result_id, :result_maker_id, :query, :merge_result]).include? k
|
|
84
|
-
end
|
|
85
|
-
(element[:query_id],element[:look_id],element[:merge_result_id]) = process_dashboard_element(new_element)
|
|
86
|
-
say_warning "Creating dashboard element #{element.select {|k,v| !v.nil?}.inspect}" if @options[:debug]
|
|
87
|
-
element[:dashboard_id] = dashboard[:id]
|
|
88
|
-
result_maker = copy_result_maker_filterables(new_element)
|
|
89
|
-
element[:result_maker] = result_maker if result_maker
|
|
90
|
-
dashboard_element = create_dashboard_element(element)
|
|
91
|
-
say_warning "dashboard_element #{dashboard_element.inspect}" if @options[:debug]
|
|
92
|
-
if new_element[:alerts]
|
|
93
|
-
new_element[:alerts].each do |a|
|
|
94
|
-
a.select! do |k,v|
|
|
95
|
-
(keys_to_keep('create_alert') - [:owner_id, :dashboard_element_id]).include? k
|
|
96
|
-
end
|
|
97
|
-
a[:dashboard_element_id] = dashboard_element[:id]
|
|
98
|
-
a[:owner_id] = @me[:id]
|
|
99
|
-
new_alert = create_alert(a)
|
|
100
|
-
say_warning "alert #{JSON.pretty_generate(new_alert)}" if @options[:debug]
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
dashboard[:dashboard_elements].push dashboard_element
|
|
104
|
-
[new_element[:id], dashboard_element[:id]]
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
source_dashboard_layouts = data[:dashboard_layouts].map do |new_layout|
|
|
80
|
+
data[:dashboard_layouts].map do |new_layout|
|
|
108
81
|
layout_obj = nil
|
|
109
|
-
if
|
|
110
|
-
|
|
82
|
+
say_warning dashboard[:dashboard_layouts] if @options[:debug]
|
|
83
|
+
if dashboard[:dashboard_layouts].length > 0 && new_layout[:active]
|
|
84
|
+
layout_obj = get_dashboard_layout(dashboard[:dashboard_layouts].find { |l| l[:active] }[:id])
|
|
111
85
|
say_warning "Updating layout #{layout_obj[:id]}" if @options[:debug]
|
|
86
|
+
layout = new_layout.select do |k,v|
|
|
87
|
+
(keys_to_keep('update_dashboard_layout') - [:id,:dashboard_id]).include? k
|
|
88
|
+
end
|
|
89
|
+
layout_obj.merge!(layout)
|
|
90
|
+
update_dashboard_layout(layout_obj[:id],layout_obj)
|
|
112
91
|
else
|
|
113
92
|
layout = new_layout.select do |k,v|
|
|
114
93
|
(keys_to_keep('create_dashboard_layout') - [:dashboard_id]).include? k
|
|
@@ -118,22 +97,47 @@ module Gzr
|
|
|
118
97
|
layout_obj = create_dashboard_layout(layout)
|
|
119
98
|
say_warning "Created dashboard layout #{JSON.pretty_generate layout_obj.map(&:to_a).to_json}" if @options[:debug]
|
|
120
99
|
end
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
100
|
+
|
|
101
|
+
new_layout[:dashboard_layout_components].each do |new_component|
|
|
102
|
+
new_element_id = new_component[:dashboard_element_id]
|
|
103
|
+
new_element = data[:dashboard_elements].find { |e| e[:id] == new_element_id }
|
|
104
|
+
element = new_element.select do |k,v|
|
|
105
|
+
(keys_to_keep('create_dashboard_element') - [:dashboard_id, :look_id, :query_id, :merge_result_id, :result_maker_id, :query, :merge_result]).include? k
|
|
106
|
+
end
|
|
107
|
+
(element[:query_id],element[:look_id],element[:merge_result_id]) = process_dashboard_element(new_element)
|
|
108
|
+
say_warning "Creating dashboard element #{element.select {|k,v| !v.nil?}.inspect}" if @options[:debug]
|
|
109
|
+
element[:dashboard_id] = dashboard[:id]
|
|
110
|
+
result_maker = copy_result_maker_filterables(new_element)
|
|
111
|
+
element[:result_maker] = result_maker if result_maker
|
|
112
|
+
element[:dashboard_layout_id] = layout_obj[:id]
|
|
113
|
+
dashboard_element = create_dashboard_element(element)
|
|
114
|
+
say_warning "dashboard_element #{dashboard_element.inspect}" if @options[:debug]
|
|
115
|
+
if new_element[:alerts]
|
|
116
|
+
new_element[:alerts].each do |a|
|
|
117
|
+
a.select! do |k,v|
|
|
118
|
+
(keys_to_keep('create_alert') - [:owner_id, :dashboard_element_id]).include? k
|
|
119
|
+
end
|
|
120
|
+
a[:dashboard_element_id] = dashboard_element[:id]
|
|
121
|
+
a[:owner_id] = @me[:id]
|
|
122
|
+
new_alert = create_alert(a)
|
|
123
|
+
say_warning "alert #{JSON.pretty_generate(new_alert)}" if @options[:debug]
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
target_components = get_dashboard_layout(layout_obj[:id])[:dashboard_layout_components]
|
|
128
|
+
target_component = target_components.find do |c|
|
|
129
|
+
c[:dashboard_element_id] == dashboard_element[:id]
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
target_component.merge!(new_component.select do |k,v|
|
|
133
|
+
(keys_to_keep('update_dashboard_layout_component') - [:id,:dashboard_layout_id,:dashboard_element_id]).include? k
|
|
130
134
|
end)
|
|
131
135
|
|
|
132
|
-
component[:
|
|
133
|
-
|
|
134
|
-
update_dashboard_layout_component(target[:id],component)
|
|
136
|
+
say_warning "Updating dashboard layout component #{target_component[:id]}" if @options[:debug]
|
|
137
|
+
update_dashboard_layout_component(target_component[:id],target_component)
|
|
135
138
|
end
|
|
136
139
|
end
|
|
140
|
+
|
|
137
141
|
upsert_plans_for_dashboard(dashboard[:id],@me[:id],data[:scheduled_plans]) if data[:scheduled_plans]
|
|
138
142
|
output.puts "Imported dashboard #{dashboard[:id]}" unless @options[:plain]
|
|
139
143
|
output.puts dashboard[:id] if @options[:plain]
|
data/lib/gzr/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gazer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.19
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike DeAngelo
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-03-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tty-reader
|
|
@@ -154,14 +154,14 @@ dependencies:
|
|
|
154
154
|
requirements:
|
|
155
155
|
- - "~>"
|
|
156
156
|
- !ruby/object:Gem::Version
|
|
157
|
-
version: 0.1.
|
|
157
|
+
version: 0.1.12
|
|
158
158
|
type: :runtime
|
|
159
159
|
prerelease: false
|
|
160
160
|
version_requirements: !ruby/object:Gem::Requirement
|
|
161
161
|
requirements:
|
|
162
162
|
- - "~>"
|
|
163
163
|
- !ruby/object:Gem::Version
|
|
164
|
-
version: 0.1.
|
|
164
|
+
version: 0.1.12
|
|
165
165
|
- !ruby/object:Gem::Dependency
|
|
166
166
|
name: net-http-persistent
|
|
167
167
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -480,7 +480,7 @@ homepage: https://github.com/looker-open-source/gzr
|
|
|
480
480
|
licenses:
|
|
481
481
|
- MIT
|
|
482
482
|
metadata: {}
|
|
483
|
-
post_install_message:
|
|
483
|
+
post_install_message:
|
|
484
484
|
rdoc_options: []
|
|
485
485
|
require_paths:
|
|
486
486
|
- lib
|
|
@@ -496,7 +496,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
496
496
|
version: '0'
|
|
497
497
|
requirements: []
|
|
498
498
|
rubygems_version: 3.1.6
|
|
499
|
-
signing_key:
|
|
499
|
+
signing_key:
|
|
500
500
|
specification_version: 4
|
|
501
501
|
summary: Command line tool to manage the content of a Looker instance.
|
|
502
502
|
test_files: []
|