foreman_statistics 0.1.3 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/foreman_statistics/trends_helper.rb +30 -20
  3. data/app/jobs/foreman_statistics/trend_counter_job.rb +23 -0
  4. data/app/models/concerns/foreman_statistics/has_many_trends.rb +9 -0
  5. data/app/models/foreman_statistics/trend.rb +3 -1
  6. data/app/views/foreman_statistics/layouts/application_react.html.erb +1 -2
  7. data/app/views/foreman_statistics/trends/_empty_data.html.erb +0 -1
  8. data/app/views/foreman_statistics/trends/_hosts.html.erb +1 -1
  9. data/app/views/foreman_statistics/trends/index.html.erb +3 -13
  10. data/app/views/foreman_statistics/trends/show.html.erb +6 -6
  11. data/app/views/foreman_statistics/trends/welcome.html.erb +1 -1
  12. data/config/jest.config.js +21 -0
  13. data/db/migrate/20210523143005_migrate_environments.rb +13 -0
  14. data/lib/foreman_statistics/engine.rb +12 -5
  15. data/lib/foreman_statistics/version.rb +1 -1
  16. data/lib/tasks/foreman_statistics_tasks.rake +3 -2
  17. data/locale/action_names.rb +5 -0
  18. data/locale/ca/LC_MESSAGES/foreman_statistics.mo +0 -0
  19. data/locale/ca/foreman_statistics.edit.po +263 -0
  20. data/locale/ca/foreman_statistics.po +202 -0
  21. data/locale/ca/foreman_statistics.po.time_stamp +0 -0
  22. data/locale/cs_CZ/LC_MESSAGES/foreman_statistics.mo +0 -0
  23. data/locale/cs_CZ/foreman_statistics.edit.po +267 -0
  24. data/locale/cs_CZ/foreman_statistics.po +206 -0
  25. data/locale/cs_CZ/foreman_statistics.po.time_stamp +0 -0
  26. data/locale/de/LC_MESSAGES/foreman_statistics.mo +0 -0
  27. data/locale/de/foreman_statistics.edit.po +271 -0
  28. data/locale/de/foreman_statistics.po +210 -0
  29. data/locale/de/foreman_statistics.po.time_stamp +0 -0
  30. data/locale/en/LC_MESSAGES/foreman_statistics.mo +0 -0
  31. data/locale/en/foreman_statistics.edit.po +258 -0
  32. data/locale/en/foreman_statistics.po +182 -3
  33. data/locale/en/foreman_statistics.po.time_stamp +0 -0
  34. data/locale/en_GB/LC_MESSAGES/foreman_statistics.mo +0 -0
  35. data/locale/en_GB/foreman_statistics.edit.po +265 -0
  36. data/locale/en_GB/foreman_statistics.po +204 -0
  37. data/locale/en_GB/foreman_statistics.po.time_stamp +0 -0
  38. data/locale/es/LC_MESSAGES/foreman_statistics.mo +0 -0
  39. data/locale/es/foreman_statistics.edit.po +269 -0
  40. data/locale/es/foreman_statistics.po +208 -0
  41. data/locale/es/foreman_statistics.po.time_stamp +0 -0
  42. data/locale/foreman_statistics.pot +265 -8
  43. data/locale/fr/LC_MESSAGES/foreman_statistics.mo +0 -0
  44. data/locale/fr/foreman_statistics.edit.po +269 -0
  45. data/locale/fr/foreman_statistics.po +208 -0
  46. data/locale/fr/foreman_statistics.po.time_stamp +0 -0
  47. data/locale/gemspec.rb +1 -1
  48. data/locale/gl/LC_MESSAGES/foreman_statistics.mo +0 -0
  49. data/locale/gl/foreman_statistics.edit.po +263 -0
  50. data/locale/gl/foreman_statistics.po +202 -0
  51. data/locale/gl/foreman_statistics.po.time_stamp +0 -0
  52. data/locale/it/LC_MESSAGES/foreman_statistics.mo +0 -0
  53. data/locale/it/foreman_statistics.edit.po +265 -0
  54. data/locale/it/foreman_statistics.po +204 -0
  55. data/locale/it/foreman_statistics.po.time_stamp +0 -0
  56. data/locale/ja/LC_MESSAGES/foreman_statistics.mo +0 -0
  57. data/locale/ja/foreman_statistics.edit.po +266 -0
  58. data/locale/ja/foreman_statistics.po +205 -0
  59. data/locale/ja/foreman_statistics.po.time_stamp +0 -0
  60. data/locale/ko/LC_MESSAGES/foreman_statistics.mo +0 -0
  61. data/locale/ko/foreman_statistics.edit.po +264 -0
  62. data/locale/ko/foreman_statistics.po +203 -0
  63. data/locale/ko/foreman_statistics.po.time_stamp +0 -0
  64. data/locale/nl_NL/LC_MESSAGES/foreman_statistics.mo +0 -0
  65. data/locale/nl_NL/foreman_statistics.edit.po +267 -0
  66. data/locale/nl_NL/foreman_statistics.po +206 -0
  67. data/locale/nl_NL/foreman_statistics.po.time_stamp +0 -0
  68. data/locale/pl/LC_MESSAGES/foreman_statistics.mo +0 -0
  69. data/locale/pl/foreman_statistics.edit.po +266 -0
  70. data/locale/pl/foreman_statistics.po +205 -0
  71. data/locale/pl/foreman_statistics.po.time_stamp +0 -0
  72. data/locale/pt_BR/LC_MESSAGES/foreman_statistics.mo +0 -0
  73. data/locale/pt_BR/foreman_statistics.edit.po +269 -0
  74. data/locale/pt_BR/foreman_statistics.po +208 -0
  75. data/locale/pt_BR/foreman_statistics.po.time_stamp +0 -0
  76. data/locale/ru/LC_MESSAGES/foreman_statistics.mo +0 -0
  77. data/locale/ru/foreman_statistics.edit.po +270 -0
  78. data/locale/ru/foreman_statistics.po +209 -0
  79. data/locale/ru/foreman_statistics.po.time_stamp +0 -0
  80. data/locale/sv_SE/LC_MESSAGES/foreman_statistics.mo +0 -0
  81. data/locale/sv_SE/foreman_statistics.edit.po +265 -0
  82. data/locale/sv_SE/foreman_statistics.po +204 -0
  83. data/locale/sv_SE/foreman_statistics.po.time_stamp +0 -0
  84. data/locale/zh_CN/LC_MESSAGES/foreman_statistics.mo +0 -0
  85. data/locale/zh_CN/foreman_statistics.edit.po +267 -0
  86. data/locale/zh_CN/foreman_statistics.po +206 -0
  87. data/locale/zh_CN/foreman_statistics.po.time_stamp +0 -0
  88. data/locale/zh_TW/LC_MESSAGES/foreman_statistics.mo +0 -0
  89. data/locale/zh_TW/foreman_statistics.edit.po +266 -0
  90. data/locale/zh_TW/foreman_statistics.po +205 -0
  91. data/locale/zh_TW/foreman_statistics.po.time_stamp +0 -0
  92. data/package.json +25 -24
  93. data/test/functional/foreman_statistics/api/v2/statistics_controller_test.rb +1 -1
  94. data/test/functional/foreman_statistics/api/v2/trends_controller_test.rb +2 -2
  95. data/test/functional/foreman_statistics/statistics_controller_test.rb +5 -7
  96. data/test/functional/foreman_statistics/trends_controller_test.rb +2 -8
  97. data/test/models/foreman_statistics/trend_counter_test.rb +1 -1
  98. data/test/models/foreman_statistics/trend_test.rb +1 -1
  99. data/test/{test_plugin_helper.rb → test_statistics_helper.rb} +0 -0
  100. data/test/unit/foreman_statistics/access_permissions_test.rb +1 -1
  101. data/test/unit/foreman_statistics/statistics_test.rb +1 -1
  102. data/test/unit/foreman_statistics_test.rb +1 -1
  103. data/test/unit/tasks/foreman_statistics_tasks_test.rb +1 -1
  104. data/webpack/src/Components/StatisticsChartsList/__snapshots__/StatisticsChartsList.test.js.snap +6 -0
  105. data/webpack/src/Router/StatisticsPage/StatisticsPageSelectors.js +2 -1
  106. data/webpack/src/Router/StatisticsPage/__tests__/StatisticsPageSelectors.test.js +4 -2
  107. data/webpack/src/Router/StatisticsPage/__tests__/__snapshots__/StatisticsPage.test.js.snap +10 -0
  108. data/webpack/src/reducers.js +4 -2
  109. metadata +81 -89
  110. data/app/models/concerns/foreman_statistics/compute_resource_decorations.rb +0 -9
  111. data/app/models/concerns/foreman_statistics/environment_decorations.rb +0 -9
  112. data/app/models/concerns/foreman_statistics/hostgroup_decorations.rb +0 -9
  113. data/app/models/concerns/foreman_statistics/model_decorations.rb +0 -9
  114. data/app/models/concerns/foreman_statistics/operatingsystem_decorations.rb +0 -9
  115. data/webpack/__mocks__/foremanReact/API.js +0 -7
  116. data/webpack/__mocks__/foremanReact/common/HOC.js +0 -24
  117. data/webpack/__mocks__/foremanReact/common/I18n.js +0 -3
  118. data/webpack/__mocks__/foremanReact/common/helpers.js +0 -1
  119. data/webpack/__mocks__/foremanReact/common/urlHelpers.js +0 -1
  120. data/webpack/__mocks__/foremanReact/components/ChartBox/index.js +0 -2
  121. data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +0 -2
  122. data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalHooks.js +0 -10
  123. data/webpack/__mocks__/foremanReact/components/ForemanModal/index.js +0 -4
  124. data/webpack/__mocks__/foremanReact/components/Layout/LayoutActions.js +0 -2
  125. data/webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js +0 -2
  126. data/webpack/__mocks__/foremanReact/components/common/EmptyState.js +0 -5
  127. data/webpack/__mocks__/foremanReact/components/common/MessageBox.js +0 -4
  128. data/webpack/__mocks__/foremanReact/components/common/dates/LongDateTime.js +0 -5
  129. data/webpack/__mocks__/foremanReact/components/common/dates/RelativeDateTime.js +0 -3
  130. data/webpack/__mocks__/foremanReact/components/common/table.js +0 -5
  131. data/webpack/__mocks__/foremanReact/components/common/table/actionsHelpers/actionTypeCreator.js +0 -7
  132. data/webpack/__mocks__/foremanReact/constants.js +0 -24
  133. data/webpack/__mocks__/foremanReact/readme.md +0 -11
  134. data/webpack/__mocks__/foremanReact/redux/actions/toasts.js +0 -8
  135. data/webpack/__mocks__/foremanReact/routes/common/PageLayout/PageLayout.js +0 -10
  136. data/webpack/__mocks__/foremanReact/routes/common/PageLayout/components/ExportButton/ExportButton.js +0 -5
  137. data/webpack/__mocks__/foremanReact/routes/common/reducerHOC/withDataReducer.js +0 -35
File without changes
data/package.json CHANGED
@@ -3,40 +3,41 @@
3
3
  "version": "1.0.0",
4
4
  "description": "DESCRIPTION",
5
5
  "main": "index.js",
6
- "scripts": {
7
- "lint": "tfm-lint --plugin -d /webpack",
8
- "test": "tfm-test --plugin",
9
- "test:watch": "tfm-test --plugin --watchAll",
10
- "test:current": "tfm-test --plugin --watch",
11
- "publish-coverage": "tfm-publish-coverage",
12
- "stories": "tfm-stories --plugin",
13
- "stories:build": "tfm-build-stories --plugin",
14
- "create-react-component": "yo react-domain"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/theforeman/foreman_statistics.git"
19
- },
20
6
  "bugs": {
21
7
  "url": "http://projects.theforeman.org/projects/foreman_statistics/issues"
22
8
  },
23
9
  "peerDependencies": {
24
- "@theforeman/vendor": ">= 4.0.2"
25
- },
26
- "dependencies": {
27
- "react-intl": "^2.8.0"
10
+ "@theforeman/vendor": ">= 6.0.0"
28
11
  },
29
12
  "devDependencies": {
30
13
  "@babel/core": "^7.7.0",
31
- "@theforeman/builder": "^4.0.2",
32
- "@theforeman/eslint-plugin-foreman": "4.0.5",
33
- "@theforeman/stories": "^4.0.2",
34
- "@theforeman/test": "^4.0.2",
35
- "@theforeman/vendor-dev": "^4.0.2",
14
+ "@theforeman/builder": "^8.4.1",
15
+ "@theforeman/eslint-plugin-foreman": "^8.4.1",
16
+ "@theforeman/find-foreman": "^8.4.1",
17
+ "@theforeman/stories": "^8.4.1",
18
+ "@theforeman/test": "^8.4.1",
19
+ "@theforeman/vendor-dev": "^8.4.1",
36
20
  "babel-eslint": "^10.0.3",
37
21
  "eslint": "^6.7.2",
38
- "prettier": "^1.13.5",
22
+ "prettier": "^1.19.1",
39
23
  "stylelint-config-standard": "^18.0.0",
40
24
  "stylelint": "^9.3.0"
25
+ },
26
+ "dependencies": {
27
+ "react-intl": "^2.8.0"
28
+ },
29
+ "scripts": {
30
+ "lint": "tfm-lint --plugin -d /webpack",
31
+ "test": "tfm-test --plugin --config config/jest.config.js",
32
+ "test:watch": "tfm-test --plugin --config config/jest.config.js --watchAll",
33
+ "test:current": "tfm-test --plugin --config config/jest.config.js --watch",
34
+ "publish-coverage": "tfm-publish-coverage",
35
+ "stories": "tfm-stories --plugin",
36
+ "stories:build": "tfm-build-stories --plugin",
37
+ "create-react-component": "yo react-domain"
38
+ },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/theforeman/foreman_statistics.git"
41
42
  }
42
43
  }
@@ -1,4 +1,4 @@
1
- require_relative '../../../../test_plugin_helper'
1
+ require 'test_statistics_helper'
2
2
 
3
3
  class ForemanStatistics::Api::V2::StatisticsControllerTest < ActionController::TestCase
4
4
  setup do
@@ -1,4 +1,4 @@
1
- require_relative '../../../../test_plugin_helper'
1
+ require 'test_statistics_helper'
2
2
 
3
3
  class ForemanStatistics::Api::V2::TrendsControllerTest < ActionController::TestCase
4
4
  setup do
@@ -9,7 +9,7 @@ class ForemanStatistics::Api::V2::TrendsControllerTest < ActionController::TestC
9
9
  end
10
10
 
11
11
  let(:host) { FactoryBot.create(:host) }
12
- let(:foreman_trend) { FactoryBot.create(:foreman_statistics_foreman_trend, :trendable_type => 'Environment', :fact_name => 'fact') }
12
+ let(:foreman_trend) { FactoryBot.create(:foreman_statistics_foreman_trend, :trendable_type => 'Operatingsystem', :fact_name => 'fact') }
13
13
  let(:fact_trend) { FactoryBot.create(:foreman_statistics_fact_trend, :trendable_type => 'FactName') }
14
14
  let(:os_fact) do
15
15
  FactoryBot.create(:fact_value, :value => 'fedora', :host => host,
@@ -1,4 +1,4 @@
1
- require_relative '../../test_plugin_helper'
1
+ require 'test_statistics_helper'
2
2
 
3
3
  module ForemanStatistics
4
4
  class StatisticsControllerTest < ActionController::TestCase
@@ -7,16 +7,14 @@ module ForemanStatistics
7
7
  end
8
8
 
9
9
  test 'user with viewer rights should succeed in viewing statistics' do
10
- @request.session[:user] = users(:one).id
11
- users(:one).roles = [Role.default, Role.find_by(name: 'Viewer')]
12
- get :index, session: set_session_user
10
+ setup_user('view', 'statistics')
11
+ get :index, session: set_session_user(:one)
13
12
  assert_response :success
14
13
  end
15
14
 
16
15
  test 'user with viewer rights should succeed in requesting statistics data via ajax' do
17
- @request.session[:user] = users(:one).id
18
- users(:one).roles = [Role.default, Role.find_by(name: 'Viewer')]
19
- get :show, params: { :id => 'operatingsystem', :format => 'json' }, session: set_session_user
16
+ setup_user('view', 'statistics')
17
+ get :show, params: { :id => 'operatingsystem', :format => 'json' }, session: set_session_user(:one)
20
18
  assert_response :success
21
19
  end
22
20
  end
@@ -1,4 +1,4 @@
1
- require_relative '../../test_plugin_helper'
1
+ require 'test_statistics_helper'
2
2
 
3
3
  module ForemanStatistics
4
4
  class TrendsControllerTest < ActionController::TestCase
@@ -46,16 +46,10 @@ module ForemanStatistics
46
46
  test 'should render correct per_page value' do
47
47
  get :index, params: { per_page: entries_per_page + 1 }, session: set_session_user
48
48
  assert_response :success
49
- per_page_results = response.body.scan(/perPage":\d+/).first.gsub(/[^\d]/, '').to_i
49
+ per_page_results = response.body.scan(/perPage&quot;:(\d+)/).first.first.to_i
50
50
  assert_equal entries_per_page, per_page_results
51
51
  end
52
52
 
53
- test 'should render per page dropdown with correct values' do
54
- get :index, params: { per_page: entries_per_page + 1 }, session: set_session_user
55
- assert_response :success
56
- assert_not_nil response.body['perPageOptions":[5,6,10,15,25,50]']
57
- end
58
-
59
53
  test 'sort links should include per page param' do
60
54
  get :index, params: { per_page: entries_per_page + 1 }, session: set_session_user
61
55
  assert_response :success
@@ -1,4 +1,4 @@
1
- require 'test_helper'
1
+ require 'test_statistics_helper'
2
2
 
3
3
  module ForemanStatistics
4
4
  class TrendCounterTest < ActiveSupport::TestCase
@@ -1,4 +1,4 @@
1
- require_relative '../../test_plugin_helper'
1
+ require 'test_statistics_helper'
2
2
 
3
3
  module ForemanStatistics
4
4
  class TrendTest < ActiveSupport::TestCase
@@ -1,4 +1,4 @@
1
- require 'test_plugin_helper'
1
+ require 'test_statistics_helper'
2
2
  require 'unit/shared/access_permissions_test_base'
3
3
 
4
4
  # Permissions are added in AccessPermissions with lists of controllers and
@@ -1,4 +1,4 @@
1
- require_relative '../../test_plugin_helper'
1
+ require 'test_statistics_helper'
2
2
 
3
3
  module ForemanStatistics
4
4
  class StatisticsTest < ActiveSupport::TestCase
@@ -1,4 +1,4 @@
1
- require 'test_plugin_helper'
1
+ require 'test_statistics_helper'
2
2
 
3
3
  class ForemanStatisticsTest < ActiveSupport::TestCase
4
4
  setup do
@@ -1,4 +1,4 @@
1
- require 'test_helper'
1
+ require 'test_statistics_helper'
2
2
  require 'rake'
3
3
 
4
4
  class ForemanStatisticsTasksTest < ActiveSupport::TestCase
@@ -19,6 +19,9 @@ exports[`StatisticsChartsList rendering should render two panels for fixtures da
19
19
  "url": "statistics/operatingsystem",
20
20
  }
21
21
  }
22
+ className=""
23
+ config="regular"
24
+ errorText=""
22
25
  key="operatingsystem"
23
26
  noDataMsg="No data available"
24
27
  tip="Expand the chart"
@@ -33,6 +36,9 @@ exports[`StatisticsChartsList rendering should render two panels for fixtures da
33
36
  "url": "statistics/architecture",
34
37
  }
35
38
  }
39
+ className=""
40
+ config="regular"
41
+ errorText=""
36
42
  key="architecture"
37
43
  noDataMsg="No data available"
38
44
  tip="Expand the chart"
@@ -1,4 +1,5 @@
1
- export const selectStatisticsPage = state => state.statisticsPage;
1
+ export const selectStatisticsPage = state =>
2
+ state.foremanStatistics.statisticsPage;
2
3
 
3
4
  export const selectStatisticsMetadata = state =>
4
5
  selectStatisticsPage(state).metadata;
@@ -10,8 +10,10 @@ import {
10
10
  import { statisticsProps } from '../StatisticsPage.fixtures';
11
11
 
12
12
  const state = {
13
- statisticsPage: {
14
- ...statisticsProps,
13
+ foremanStatistics: {
14
+ statisticsPage: {
15
+ ...statisticsProps,
16
+ },
15
17
  },
16
18
  };
17
19
 
@@ -2,8 +2,18 @@
2
2
 
3
3
  exports[`StatisticsPage rendering render with props 1`] = `
4
4
  <PageLayout
5
+ beforeToolbarComponent={null}
6
+ breadcrumbOptions={null}
7
+ customBreadcrumbs={null}
5
8
  header="Statistics"
9
+ isLoading={false}
10
+ onBookmarkClick={[Function]}
11
+ onSearch={[Function]}
12
+ searchProps={Object {}}
13
+ searchQuery=""
6
14
  searchable={false}
15
+ toastNotifications={Array []}
16
+ toolbarButtons={null}
7
17
  >
8
18
  <Component
9
19
  getStatisticsMeta={[Function]}
@@ -1,7 +1,9 @@
1
- // import { combineReducers } from 'redux';
1
+ import { combineReducers } from 'redux';
2
+
3
+ import { reducers as statisticsPageReducers } from './Router/StatisticsPage';
2
4
 
3
5
  const reducers = {
4
- // foremanStatistics: combineReducers({}),
6
+ foremanStatistics: combineReducers(statisticsPageReducers),
5
7
  };
6
8
 
7
9
  export default reducers;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondrej Ezr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-22 00:00:00.000000000 Z
11
+ date: 2021-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -24,62 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rubocop
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '0.83'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0.83'
41
- - !ruby/object:Gem::Dependency
42
- name: rubocop-minitest
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 0.9.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 0.9.0
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop-performance
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 1.5.2
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 1.5.2
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop-rails
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 2.5.2
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 2.5.2
83
27
  description: Statistics and Trends for Foreman gives users overview of their infrastructure.
84
28
  email:
85
29
  - oezr@redhat.com
@@ -97,12 +41,9 @@ files:
97
41
  - app/controllers/foreman_statistics/statistics_controller.rb
98
42
  - app/controllers/foreman_statistics/trends_controller.rb
99
43
  - app/helpers/foreman_statistics/trends_helper.rb
100
- - app/models/concerns/foreman_statistics/compute_resource_decorations.rb
101
- - app/models/concerns/foreman_statistics/environment_decorations.rb
44
+ - app/jobs/foreman_statistics/trend_counter_job.rb
102
45
  - app/models/concerns/foreman_statistics/general_setting_decorations.rb
103
- - app/models/concerns/foreman_statistics/hostgroup_decorations.rb
104
- - app/models/concerns/foreman_statistics/model_decorations.rb
105
- - app/models/concerns/foreman_statistics/operatingsystem_decorations.rb
46
+ - app/models/concerns/foreman_statistics/has_many_trends.rb
106
47
  - app/models/concerns/foreman_statistics/setting_decorations.rb
107
48
  - app/models/foreman_statistics/fact_trend.rb
108
49
  - app/models/foreman_statistics/foreman_trend.rb
@@ -131,8 +72,10 @@ files:
131
72
  - app/views/foreman_statistics/trends/new.html.erb
132
73
  - app/views/foreman_statistics/trends/show.html.erb
133
74
  - app/views/foreman_statistics/trends/welcome.html.erb
75
+ - config/jest.config.js
134
76
  - config/routes.rb
135
77
  - db/migrate/20200605153005_migrate_core_types.rb
78
+ - db/migrate/20210523143005_migrate_environments.rb
136
79
  - db/migrate_foreman/20121012170851_create_trends.rb
137
80
  - db/migrate_foreman/20121012170936_create_trend_counters.rb
138
81
  - db/migrate_foreman/20150202094307_add_range_to_trend_counters.rb
@@ -142,9 +85,81 @@ files:
142
85
  - lib/foreman_statistics/version.rb
143
86
  - lib/tasks/foreman_statistics_tasks.rake
144
87
  - locale/Makefile
88
+ - locale/action_names.rb
89
+ - locale/ca/LC_MESSAGES/foreman_statistics.mo
90
+ - locale/ca/foreman_statistics.edit.po
91
+ - locale/ca/foreman_statistics.po
92
+ - locale/ca/foreman_statistics.po.time_stamp
93
+ - locale/cs_CZ/LC_MESSAGES/foreman_statistics.mo
94
+ - locale/cs_CZ/foreman_statistics.edit.po
95
+ - locale/cs_CZ/foreman_statistics.po
96
+ - locale/cs_CZ/foreman_statistics.po.time_stamp
97
+ - locale/de/LC_MESSAGES/foreman_statistics.mo
98
+ - locale/de/foreman_statistics.edit.po
99
+ - locale/de/foreman_statistics.po
100
+ - locale/de/foreman_statistics.po.time_stamp
101
+ - locale/en/LC_MESSAGES/foreman_statistics.mo
102
+ - locale/en/foreman_statistics.edit.po
145
103
  - locale/en/foreman_statistics.po
104
+ - locale/en/foreman_statistics.po.time_stamp
105
+ - locale/en_GB/LC_MESSAGES/foreman_statistics.mo
106
+ - locale/en_GB/foreman_statistics.edit.po
107
+ - locale/en_GB/foreman_statistics.po
108
+ - locale/en_GB/foreman_statistics.po.time_stamp
109
+ - locale/es/LC_MESSAGES/foreman_statistics.mo
110
+ - locale/es/foreman_statistics.edit.po
111
+ - locale/es/foreman_statistics.po
112
+ - locale/es/foreman_statistics.po.time_stamp
146
113
  - locale/foreman_statistics.pot
114
+ - locale/fr/LC_MESSAGES/foreman_statistics.mo
115
+ - locale/fr/foreman_statistics.edit.po
116
+ - locale/fr/foreman_statistics.po
117
+ - locale/fr/foreman_statistics.po.time_stamp
147
118
  - locale/gemspec.rb
119
+ - locale/gl/LC_MESSAGES/foreman_statistics.mo
120
+ - locale/gl/foreman_statistics.edit.po
121
+ - locale/gl/foreman_statistics.po
122
+ - locale/gl/foreman_statistics.po.time_stamp
123
+ - locale/it/LC_MESSAGES/foreman_statistics.mo
124
+ - locale/it/foreman_statistics.edit.po
125
+ - locale/it/foreman_statistics.po
126
+ - locale/it/foreman_statistics.po.time_stamp
127
+ - locale/ja/LC_MESSAGES/foreman_statistics.mo
128
+ - locale/ja/foreman_statistics.edit.po
129
+ - locale/ja/foreman_statistics.po
130
+ - locale/ja/foreman_statistics.po.time_stamp
131
+ - locale/ko/LC_MESSAGES/foreman_statistics.mo
132
+ - locale/ko/foreman_statistics.edit.po
133
+ - locale/ko/foreman_statistics.po
134
+ - locale/ko/foreman_statistics.po.time_stamp
135
+ - locale/nl_NL/LC_MESSAGES/foreman_statistics.mo
136
+ - locale/nl_NL/foreman_statistics.edit.po
137
+ - locale/nl_NL/foreman_statistics.po
138
+ - locale/nl_NL/foreman_statistics.po.time_stamp
139
+ - locale/pl/LC_MESSAGES/foreman_statistics.mo
140
+ - locale/pl/foreman_statistics.edit.po
141
+ - locale/pl/foreman_statistics.po
142
+ - locale/pl/foreman_statistics.po.time_stamp
143
+ - locale/pt_BR/LC_MESSAGES/foreman_statistics.mo
144
+ - locale/pt_BR/foreman_statistics.edit.po
145
+ - locale/pt_BR/foreman_statistics.po
146
+ - locale/pt_BR/foreman_statistics.po.time_stamp
147
+ - locale/ru/LC_MESSAGES/foreman_statistics.mo
148
+ - locale/ru/foreman_statistics.edit.po
149
+ - locale/ru/foreman_statistics.po
150
+ - locale/ru/foreman_statistics.po.time_stamp
151
+ - locale/sv_SE/LC_MESSAGES/foreman_statistics.mo
152
+ - locale/sv_SE/foreman_statistics.edit.po
153
+ - locale/sv_SE/foreman_statistics.po
154
+ - locale/sv_SE/foreman_statistics.po.time_stamp
155
+ - locale/zh_CN/LC_MESSAGES/foreman_statistics.mo
156
+ - locale/zh_CN/foreman_statistics.edit.po
157
+ - locale/zh_CN/foreman_statistics.po
158
+ - locale/zh_CN/foreman_statistics.po.time_stamp
159
+ - locale/zh_TW/LC_MESSAGES/foreman_statistics.mo
160
+ - locale/zh_TW/foreman_statistics.edit.po
161
+ - locale/zh_TW/foreman_statistics.po
162
+ - locale/zh_TW/foreman_statistics.po.time_stamp
148
163
  - package.json
149
164
  - test/factories/foreman_statistics_factories.rb
150
165
  - test/fixtures/permissions.yml
@@ -155,34 +170,11 @@ files:
155
170
  - test/functional/foreman_statistics/trends_controller_test.rb
156
171
  - test/models/foreman_statistics/trend_counter_test.rb
157
172
  - test/models/foreman_statistics/trend_test.rb
158
- - test/test_plugin_helper.rb
173
+ - test/test_statistics_helper.rb
159
174
  - test/unit/foreman_statistics/access_permissions_test.rb
160
175
  - test/unit/foreman_statistics/statistics_test.rb
161
176
  - test/unit/foreman_statistics_test.rb
162
177
  - test/unit/tasks/foreman_statistics_tasks_test.rb
163
- - webpack/__mocks__/foremanReact/API.js
164
- - webpack/__mocks__/foremanReact/common/HOC.js
165
- - webpack/__mocks__/foremanReact/common/I18n.js
166
- - webpack/__mocks__/foremanReact/common/helpers.js
167
- - webpack/__mocks__/foremanReact/common/urlHelpers.js
168
- - webpack/__mocks__/foremanReact/components/ChartBox/index.js
169
- - webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js
170
- - webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalHooks.js
171
- - webpack/__mocks__/foremanReact/components/ForemanModal/index.js
172
- - webpack/__mocks__/foremanReact/components/Layout/LayoutActions.js
173
- - webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js
174
- - webpack/__mocks__/foremanReact/components/common/EmptyState.js
175
- - webpack/__mocks__/foremanReact/components/common/MessageBox.js
176
- - webpack/__mocks__/foremanReact/components/common/dates/LongDateTime.js
177
- - webpack/__mocks__/foremanReact/components/common/dates/RelativeDateTime.js
178
- - webpack/__mocks__/foremanReact/components/common/table.js
179
- - webpack/__mocks__/foremanReact/components/common/table/actionsHelpers/actionTypeCreator.js
180
- - webpack/__mocks__/foremanReact/constants.js
181
- - webpack/__mocks__/foremanReact/readme.md
182
- - webpack/__mocks__/foremanReact/redux/actions/toasts.js
183
- - webpack/__mocks__/foremanReact/routes/common/PageLayout/PageLayout.js
184
- - webpack/__mocks__/foremanReact/routes/common/PageLayout/components/ExportButton/ExportButton.js
185
- - webpack/__mocks__/foremanReact/routes/common/reducerHOC/withDataReducer.js
186
178
  - webpack/fills_index.js
187
179
  - webpack/index.js
188
180
  - webpack/src/Components/StatisticsChartsList/StatisticsChartsList.fixtures.js
@@ -231,11 +223,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
223
  - !ruby/object:Gem::Version
232
224
  version: '0'
233
225
  requirements: []
234
- rubygems_version: 3.0.3
226
+ rubygems_version: 3.1.6
235
227
  signing_key:
236
228
  specification_version: 4
237
229
  summary: Add Statistics and Trends.
238
230
  test_files:
231
+ - test/test_statistics_helper.rb
239
232
  - test/functional/foreman_statistics/trends_controller_test.rb
240
233
  - test/functional/foreman_statistics/statistics_controller_test.rb
241
234
  - test/functional/foreman_statistics/api/v2/trends_controller_test.rb
@@ -249,4 +242,3 @@ test_files:
249
242
  - test/factories/foreman_statistics_factories.rb
250
243
  - test/fixtures/settings.yml
251
244
  - test/fixtures/permissions.yml
252
- - test/test_plugin_helper.rb