kanaui 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b97ea14f934efc662bd48c78371bb3bbaf57a347
4
- data.tar.gz: e3b86efa67ff817e61cd181654d92fa1ba1fad3d
3
+ metadata.gz: 2a1230913e39ee95c1e85f1bb4b02edc7f1d3d51
4
+ data.tar.gz: f681425ad927cf4ea3034ecf7c598767584f824c
5
5
  SHA512:
6
- metadata.gz: 9bf5d0c1847d69ca090ea670cd9731ecaeac658bac5b5a2fd2cf7dea1a463a9fa138a5c32ffd8db01f5a69a3d50efedf1a492b4c9705cfe6bf13ab1e2831654f
7
- data.tar.gz: 62cd8b7055b53dce95b8abfe0f309a7d4cd84cb9ed18da9bb700341c38191b743b80ae852feb2821954e2aae26675fbefec4192a72d41371de01e90e4f982774
6
+ metadata.gz: aba7d349a5e3172f03f15e7a83be184133138cdbba99a654b07e833a358095099c81d981e21fe08078b05538a3491abe6a46f660fb4cc316fa7154ba575c68eb
7
+ data.tar.gz: 1b3bdc469ef238cba84f120dfa093aadb6236acb23079e54882dd6138f5d8bdae4a17bae033e3f8bc48223811d991d39d261d1bb470031911883763d4ee18b46
@@ -115,7 +115,7 @@ module Kanaui
115
115
  end
116
116
 
117
117
  def build_slice_and_dice_query
118
- query = ''
118
+ query = +''
119
119
 
120
120
  filters = {}
121
121
  groups = {}
@@ -142,6 +142,15 @@ module Kanaui
142
142
  query << "^dimension:#{k}(#{v.join('|')}|-)"
143
143
  end
144
144
 
145
+ # Template variables
146
+ params.each do |k, v|
147
+ next unless k.starts_with?('variable_')
148
+ next if v.blank?
149
+
150
+ variable_name = k.split('_')[1..-1].join('_')
151
+ query << "^variable:#{variable_name}=#{v}"
152
+ end
153
+
145
154
  query
146
155
  end
147
156
  end
@@ -28,6 +28,20 @@
28
28
  To:<input class="form-control" name="end_date" type="text" data-provide="datepicker-BROKEN" data-date-format="yyyy-mm-dd" data-date-today-highlight="true" value="<%= @end_date %>">
29
29
  </div>
30
30
  </div>
31
+ <% ((@report['variables'] || {})['fields']).each do |definition| %>
32
+ <div class="form-group">
33
+ <div class="col-md-7">
34
+ <%= definition['name'].titleize %>:
35
+ <% # TODO Not fully implemented server side %>
36
+ <% if definition['dataType'] == 'date' %>
37
+ <% # TODO datepicker breaks :hover %>
38
+ <input class="form-control" name="variable_<%= definition['name'] %>" type="text" data-provide="datepicker-BROKEN" data-date-format="yyyy-mm-dd" data-date-today-highlight="true" value=""/>
39
+ <% else %>
40
+ <input class="form-control" name="variable_<%= definition['name'] %>" type="text" value=""/>
41
+ <% end %>
42
+ </div>
43
+ </div>
44
+ <% end %>
31
45
  <div class="form-group">
32
46
  <div class="col-sm-12">
33
47
  <%= submit_tag 'Refresh', :class => 'btn btn-default' %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kanaui
4
- VERSION = '2.1.1'
4
+ VERSION = '2.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanaui
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-22 00:00:00.000000000 Z
11
+ date: 2021-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: d3_rails
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '3.2'
125
+ - !ruby/object:Gem::Dependency
126
+ name: sass-rails
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '5.0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '5.0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: spinjs-rails
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -362,47 +376,47 @@ signing_key:
362
376
  specification_version: 4
363
377
  summary: Kill Bill Analytics UI mountable engine
364
378
  test_files:
365
- - test/unit/helpers/kanaui/tests_helper_test.rb
366
- - test/functional/kanaui/tests_controller_test.rb
367
- - test/kanaui_test.rb
368
- - test/dummy/bin/setup
369
- - test/dummy/bin/rails
370
- - test/dummy/bin/yarn
371
- - test/dummy/bin/update
372
- - test/dummy/bin/bundle
373
- - test/dummy/bin/rake
374
- - test/dummy/README.rdoc
375
- - test/dummy/config/routes.rb
376
- - test/dummy/config/environment.rb
377
- - test/dummy/config/locales/en.yml
379
+ - test/test_helper.rb
380
+ - test/fixtures/kanaui/dashboards.yml
381
+ - test/dummy/public/favicon.ico
382
+ - test/dummy/public/500.html
383
+ - test/dummy/public/404.html
384
+ - test/dummy/public/422.html
385
+ - test/dummy/Rakefile
378
386
  - test/dummy/config/application.rb
379
- - test/dummy/config/secrets.yml
380
- - test/dummy/config/initializers/secret_token.rb
381
- - test/dummy/config/initializers/wrap_parameters.rb
382
- - test/dummy/config/initializers/filter_parameter_logging.rb
387
+ - test/dummy/config/environment.rb
388
+ - test/dummy/config/routes.rb
389
+ - test/dummy/config/boot.rb
383
390
  - test/dummy/config/initializers/mime_types.rb
384
- - test/dummy/config/initializers/inflections.rb
391
+ - test/dummy/config/initializers/cookies_serializer.rb
385
392
  - test/dummy/config/initializers/session_store.rb
393
+ - test/dummy/config/initializers/filter_parameter_logging.rb
394
+ - test/dummy/config/initializers/inflections.rb
386
395
  - test/dummy/config/initializers/new_framework_defaults_5_1.rb
387
- - test/dummy/config/initializers/assets.rb
396
+ - test/dummy/config/initializers/application_controller_renderer.rb
388
397
  - test/dummy/config/initializers/backtrace_silencers.rb
398
+ - test/dummy/config/initializers/assets.rb
399
+ - test/dummy/config/initializers/wrap_parameters.rb
389
400
  - test/dummy/config/initializers/killbill_client.rb
390
- - test/dummy/config/initializers/cookies_serializer.rb
391
- - test/dummy/config/initializers/application_controller_renderer.rb
401
+ - test/dummy/config/initializers/secret_token.rb
392
402
  - test/dummy/config/environments/development.rb
393
- - test/dummy/config/environments/production.rb
394
403
  - test/dummy/config/environments/test.rb
395
- - test/dummy/config/boot.rb
396
- - test/dummy/app/controllers/application_controller.rb
397
- - test/dummy/app/assets/config/manifest.js
404
+ - test/dummy/config/environments/production.rb
405
+ - test/dummy/config/secrets.yml
406
+ - test/dummy/config/locales/en.yml
407
+ - test/dummy/bin/rails
408
+ - test/dummy/bin/yarn
409
+ - test/dummy/bin/rake
410
+ - test/dummy/bin/setup
411
+ - test/dummy/bin/update
412
+ - test/dummy/bin/bundle
398
413
  - test/dummy/app/helpers/application_helper.rb
414
+ - test/dummy/app/assets/config/manifest.js
415
+ - test/dummy/app/controllers/application_controller.rb
399
416
  - test/dummy/script/rails
400
417
  - test/dummy/config.ru
401
- - test/dummy/public/favicon.ico
402
- - test/dummy/public/500.html
403
- - test/dummy/public/422.html
404
- - test/dummy/public/404.html
405
- - test/dummy/Rakefile
418
+ - test/dummy/README.rdoc
406
419
  - test/integration/navigation_test.rb
407
- - test/test_helper.rb
408
- - test/fixtures/kanaui/dashboards.yml
420
+ - test/kanaui_test.rb
421
+ - test/unit/helpers/kanaui/tests_helper_test.rb
422
+ - test/functional/kanaui/tests_controller_test.rb