foreman_discovery 16.2.0 → 16.3.1

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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/api/v2/discovered_hosts_controller.rb +24 -11
  3. data/app/models/host/discovered.rb +1 -1
  4. data/app/services/foreman_discovery/import_hooks/subnet_and_taxonomy.rb +2 -0
  5. data/app/views/api/v2/discovery_rules/create.json.rabl +3 -0
  6. data/app/views/discovered_hosts/welcome.html.erb +15 -9
  7. data/app/views/discovery_rules/index.html.erb +1 -1
  8. data/extra/discover-host +3 -3
  9. data/lib/foreman_discovery/engine.rb +2 -1
  10. data/lib/foreman_discovery/version.rb +1 -1
  11. data/locale/ca/LC_MESSAGES/foreman_discovery.mo +0 -0
  12. data/locale/ca/foreman_discovery.edit.po +62 -39
  13. data/locale/ca/foreman_discovery.po +25 -10
  14. data/locale/de/LC_MESSAGES/foreman_discovery.mo +0 -0
  15. data/locale/de/foreman_discovery.edit.po +64 -39
  16. data/locale/de/foreman_discovery.po +25 -10
  17. data/locale/en/LC_MESSAGES/foreman_discovery.mo +0 -0
  18. data/locale/en/foreman_discovery.edit.po +59 -39
  19. data/locale/en/foreman_discovery.po +25 -10
  20. data/locale/en_GB/LC_MESSAGES/foreman_discovery.mo +0 -0
  21. data/locale/en_GB/foreman_discovery.edit.po +70 -39
  22. data/locale/en_GB/foreman_discovery.po +25 -10
  23. data/locale/es/LC_MESSAGES/foreman_discovery.mo +0 -0
  24. data/locale/es/foreman_discovery.edit.po +70 -39
  25. data/locale/es/foreman_discovery.po +25 -10
  26. data/locale/foreman_discovery.pot +68 -45
  27. data/locale/fr/LC_MESSAGES/foreman_discovery.mo +0 -0
  28. data/locale/fr/foreman_discovery.edit.po +68 -39
  29. data/locale/fr/foreman_discovery.po +25 -10
  30. data/locale/gl/LC_MESSAGES/foreman_discovery.mo +0 -0
  31. data/locale/gl/foreman_discovery.edit.po +59 -39
  32. data/locale/gl/foreman_discovery.po +25 -10
  33. data/locale/it/LC_MESSAGES/foreman_discovery.mo +0 -0
  34. data/locale/it/foreman_discovery.edit.po +59 -39
  35. data/locale/it/foreman_discovery.po +25 -10
  36. data/locale/ja/LC_MESSAGES/foreman_discovery.mo +0 -0
  37. data/locale/ja/foreman_discovery.edit.po +68 -39
  38. data/locale/ja/foreman_discovery.po +25 -10
  39. data/locale/ko/LC_MESSAGES/foreman_discovery.mo +0 -0
  40. data/locale/ko/foreman_discovery.edit.po +59 -39
  41. data/locale/ko/foreman_discovery.po +25 -10
  42. data/locale/pt_BR/LC_MESSAGES/foreman_discovery.mo +0 -0
  43. data/locale/pt_BR/foreman_discovery.edit.po +68 -39
  44. data/locale/pt_BR/foreman_discovery.po +25 -10
  45. data/locale/ru/LC_MESSAGES/foreman_discovery.mo +0 -0
  46. data/locale/ru/foreman_discovery.edit.po +59 -39
  47. data/locale/ru/foreman_discovery.po +25 -10
  48. data/locale/sv_SE/LC_MESSAGES/foreman_discovery.mo +0 -0
  49. data/locale/sv_SE/foreman_discovery.edit.po +59 -39
  50. data/locale/sv_SE/foreman_discovery.po +25 -10
  51. data/locale/zh_CN/LC_MESSAGES/foreman_discovery.mo +0 -0
  52. data/locale/zh_CN/foreman_discovery.edit.po +68 -39
  53. data/locale/zh_CN/foreman_discovery.po +25 -10
  54. data/locale/zh_TW/LC_MESSAGES/foreman_discovery.mo +0 -0
  55. data/locale/zh_TW/foreman_discovery.edit.po +59 -39
  56. data/locale/zh_TW/foreman_discovery.po +25 -10
  57. data/package.json +39 -0
  58. data/test/functional/discovered_hosts_controller_test.rb +1 -1
  59. data/test/functional/discovery_rules_controller_test.rb +1 -1
  60. data/webpack/index.js +18 -0
  61. data/webpack/src/ForemanDiscovery/DiscoveredHosts/Components/EmptyState/EmptyState.js +28 -0
  62. data/webpack/src/ForemanDiscovery/DiscoveredHosts/Components/EmptyState/index.js +1 -0
  63. data/webpack/src/ForemanDiscovery/DiscoveredHosts/index.js +6 -0
  64. data/webpack/src/reducers.js +7 -0
  65. metadata +11 -4
@@ -6,7 +6,7 @@ class DiscoveryRulesControllerTest < ActionController::TestCase
6
6
  test "should add a link to navigation" do
7
7
  get :index, params: {}, session: set_session_user
8
8
  assert_response :success
9
- assert response.body =~ /"\/discovery_rules"/
9
+ assert response.body =~ /\/discovery_rules/
10
10
  end
11
11
 
12
12
  test "reader role should get index" do
@@ -0,0 +1,18 @@
1
+ /* eslint import/no-unresolved: [2, { ignore: [foremanReact/*] }] */
2
+ /* eslint-disable import/no-extraneous-dependencies */
3
+ /* eslint-disable import/extensions */
4
+ import componentRegistry from "foremanReact/components/componentRegistry";
5
+ import { registerReducer } from "foremanReact/common/MountingService";
6
+ import reducers from "./src/reducers";
7
+ import DiscoveredHosts from "./src/ForemanDiscovery/DiscoveredHosts";
8
+
9
+ // register reducers
10
+ Object.entries(reducers).forEach(([key, reducer]) =>
11
+ registerReducer(key, reducer)
12
+ );
13
+
14
+ // register components for erb mounting
15
+ componentRegistry.register({
16
+ name: "DiscoveredHosts",
17
+ type: DiscoveredHosts,
18
+ });
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import { translate as __ } from "foremanReact/common/I18n";
4
+ import ForemanEmptyState from "foremanReact/components/common/EmptyState";
5
+
6
+ const EmptyState = (props) => {
7
+ const description = __(
8
+ "No discovered hosts found in this context. This page shows discovered bare-metal or virtual nodes waiting to be provisioned."
9
+ );
10
+ const documentation = {
11
+ url: props.docUrl,
12
+ };
13
+ return (
14
+ <ForemanEmptyState
15
+ header="Foreman Discovery"
16
+ description={description}
17
+ icon="gears"
18
+ iconType="fa"
19
+ documentation={documentation}
20
+ />
21
+ );
22
+ };
23
+
24
+ EmptyState.propTypes = {
25
+ docUrl: PropTypes.string,
26
+ };
27
+
28
+ export default EmptyState;
@@ -0,0 +1 @@
1
+ export { default } from "./EmptyState";
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import EmptyState from "./Components/EmptyState";
3
+
4
+ const DiscoveredHosts = ({ docUrl }) => <EmptyState docUrl={docUrl} />;
5
+
6
+ export default DiscoveredHosts;
@@ -0,0 +1,7 @@
1
+ import { combineReducers } from "redux";
2
+
3
+ const reducers = {
4
+ foremanDiscovery: {},
5
+ };
6
+
7
+ export default reducers;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_discovery
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.2.0
4
+ version: 16.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aditi Puntambekar
@@ -71,7 +71,7 @@ authors:
71
71
  autorequire:
72
72
  bindir: bin
73
73
  cert_chain: []
74
- date: 2020-09-16 00:00:00.000000000 Z
74
+ date: 2020-10-29 00:00:00.000000000 Z
75
75
  dependencies: []
76
76
  description: MaaS Discovery Plugin engine for Foreman
77
77
  email: gsutclif@redhat.com
@@ -127,6 +127,7 @@ files:
127
127
  - app/views/api/v2/discovered_hosts/show.json.rabl
128
128
  - app/views/api/v2/discovered_hosts/update.json.rabl
129
129
  - app/views/api/v2/discovery_rules/base.json.rabl
130
+ - app/views/api/v2/discovery_rules/create.json.rabl
130
131
  - app/views/api/v2/discovery_rules/index.json.rabl
131
132
  - app/views/api/v2/discovery_rules/main.json.rabl
132
133
  - app/views/api/v2/discovery_rules/show.json.rabl
@@ -237,6 +238,7 @@ files:
237
238
  - locale/zh_TW/LC_MESSAGES/foreman_discovery.mo
238
239
  - locale/zh_TW/foreman_discovery.edit.po
239
240
  - locale/zh_TW/foreman_discovery.po
241
+ - package.json
240
242
  - test/factories/discovery_host_related.rb
241
243
  - test/factories/discovery_rule_related.rb
242
244
  - test/facts/bond0-eth0-eth1-active-passive.json
@@ -278,6 +280,11 @@ files:
278
280
  - test/unit/setting_discovered_test.rb
279
281
  - test/unit/ui_notifications/destroy_host_test.rb
280
282
  - test/unit/ui_notifications/new_host_test.rb
283
+ - webpack/index.js
284
+ - webpack/src/ForemanDiscovery/DiscoveredHosts/Components/EmptyState/EmptyState.js
285
+ - webpack/src/ForemanDiscovery/DiscoveredHosts/Components/EmptyState/index.js
286
+ - webpack/src/ForemanDiscovery/DiscoveredHosts/index.js
287
+ - webpack/src/reducers.js
281
288
  homepage: https://github.com/theforeman/foreman_discovery
282
289
  licenses:
283
290
  - GPL-3.0
@@ -324,8 +331,8 @@ test_files:
324
331
  - test/functional/api/v2/discovery_rules_controller_test.rb
325
332
  - test/functional/api/v2/fact_value_extensions_test.rb
326
333
  - test/functional/api/v2/settings_controller_test.rb
327
- - test/functional/discovery_rules_controller_test.rb
328
334
  - test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
335
+ - test/functional/discovery_rules_controller_test.rb
329
336
  - test/functional/discovered_hosts_controller_test.rb
330
337
  - test/integration/discovered_hosts_test.rb
331
338
  - test/models/setting_test.rb
@@ -340,6 +347,6 @@ test_files:
340
347
  - test/unit/setting_discovered_test.rb
341
348
  - test/unit/ui_notifications/destroy_host_test.rb
342
349
  - test/unit/ui_notifications/new_host_test.rb
343
- - test/unit/host_discovered_test.rb
344
350
  - test/unit/discovered_extensions_test.rb
345
351
  - test/unit/managed_extensions_test.rb
352
+ - test/unit/host_discovered_test.rb