foreman_bootdisk 18.1.0 → 19.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/foreman_bootdisk/disks_controller.rb +49 -2
  3. data/config/routes.rb +1 -0
  4. data/db/migrate/20140522185700_change_templatekind_to_bootdisk.rb +6 -7
  5. data/lib/foreman_bootdisk/engine.rb +4 -2
  6. data/lib/foreman_bootdisk/version.rb +1 -1
  7. data/locale/ca/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  8. data/locale/ca/foreman_bootdisk.edit.po +393 -0
  9. data/locale/ca/foreman_bootdisk.po +7 -1
  10. data/locale/ca/foreman_bootdisk.po.time_stamp +0 -0
  11. data/locale/de/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  12. data/locale/de/foreman_bootdisk.edit.po +398 -0
  13. data/locale/de/foreman_bootdisk.po +7 -1
  14. data/locale/de/foreman_bootdisk.po.time_stamp +0 -0
  15. data/locale/en/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  16. data/locale/en/foreman_bootdisk.edit.po +388 -0
  17. data/locale/en/foreman_bootdisk.po +7 -1
  18. data/locale/en/foreman_bootdisk.po.time_stamp +0 -0
  19. data/locale/en_GB/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  20. data/locale/en_GB/foreman_bootdisk.edit.po +394 -0
  21. data/locale/en_GB/foreman_bootdisk.po +7 -1
  22. data/locale/en_GB/foreman_bootdisk.po.time_stamp +0 -0
  23. data/locale/es/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  24. data/locale/es/foreman_bootdisk.edit.po +394 -0
  25. data/locale/es/foreman_bootdisk.po +7 -1
  26. data/locale/es/foreman_bootdisk.po.time_stamp +0 -0
  27. data/locale/foreman_bootdisk.pot +27 -14
  28. data/locale/fr/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  29. data/locale/fr/foreman_bootdisk.edit.po +394 -0
  30. data/locale/fr/foreman_bootdisk.po +7 -1
  31. data/locale/fr/foreman_bootdisk.po.time_stamp +0 -0
  32. data/locale/it/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  33. data/locale/it/foreman_bootdisk.edit.po +391 -0
  34. data/locale/it/foreman_bootdisk.po +7 -1
  35. data/locale/it/foreman_bootdisk.po.time_stamp +0 -0
  36. data/locale/ja/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  37. data/locale/ja/foreman_bootdisk.edit.po +393 -0
  38. data/locale/ja/foreman_bootdisk.po +12 -6
  39. data/locale/ja/foreman_bootdisk.po.time_stamp +0 -0
  40. data/locale/ko/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  41. data/locale/ko/foreman_bootdisk.edit.po +390 -0
  42. data/locale/ko/foreman_bootdisk.po +7 -1
  43. data/locale/ko/foreman_bootdisk.po.time_stamp +0 -0
  44. data/locale/pt_BR/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  45. data/locale/pt_BR/foreman_bootdisk.edit.po +394 -0
  46. data/locale/pt_BR/foreman_bootdisk.po +7 -1
  47. data/locale/pt_BR/foreman_bootdisk.po.time_stamp +0 -0
  48. data/locale/ru/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  49. data/locale/ru/foreman_bootdisk.edit.po +395 -0
  50. data/locale/ru/foreman_bootdisk.po +7 -1
  51. data/locale/ru/foreman_bootdisk.po.time_stamp +0 -0
  52. data/locale/sv_SE/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  53. data/locale/sv_SE/foreman_bootdisk.edit.po +392 -0
  54. data/locale/sv_SE/foreman_bootdisk.po +7 -1
  55. data/locale/sv_SE/foreman_bootdisk.po.time_stamp +0 -0
  56. data/locale/zh_CN/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  57. data/locale/zh_CN/foreman_bootdisk.edit.po +391 -0
  58. data/locale/zh_CN/foreman_bootdisk.po +12 -6
  59. data/locale/zh_CN/foreman_bootdisk.po.time_stamp +0 -0
  60. data/locale/zh_TW/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  61. data/locale/zh_TW/foreman_bootdisk.edit.po +391 -0
  62. data/locale/zh_TW/foreman_bootdisk.po +7 -1
  63. data/locale/zh_TW/foreman_bootdisk.po.time_stamp +0 -0
  64. data/package.json +42 -0
  65. data/webpack/__mocks__/foremanReact/common/HOC.js +30 -0
  66. data/webpack/__mocks__/foremanReact/common/I18n.js +7 -0
  67. data/webpack/__mocks__/foremanReact/common/helpers.js +7 -0
  68. data/webpack/__mocks__/foremanReact/common/urlHelpers.js +8 -0
  69. data/webpack/__mocks__/foremanReact/constants.js +24 -0
  70. data/webpack/__mocks__/foremanReact/redux/API/APISelectors.js +6 -0
  71. data/webpack/__mocks__/foremanReact/redux/API/index.js +10 -0
  72. data/webpack/global_index.js +12 -0
  73. data/webpack/global_test_setup.js +11 -0
  74. data/webpack/index.js +0 -0
  75. data/webpack/src/extensions/constants.js +2 -0
  76. data/webpack/src/extensions/host/HostBootdiskButtons.js +71 -0
  77. data/webpack/src/extensions/host/HostBootdiskButtonsSelectors.js +27 -0
  78. data/webpack/src/extensions/host/__tests__/HostBootdiskButtonsSelectors.test.js +66 -0
  79. data/webpack/src/extensions/host/__tests__/__snapshots__/HostBootdiskButtonsSelectors.test.js.snap +30 -0
  80. metadata +47 -21
  81. data/.github/workflows/rubocop.yaml +0 -19
  82. data/.tx/config +0 -8
  83. data/AUTHORS +0 -34
  84. data/release-gem +0 -84
  85. data/test/functional/foreman_bootdisk/api/v2/disks_controller_test.rb +0 -97
  86. data/test/functional/foreman_bootdisk/api/v2/subnet_disks_controller_test.rb +0 -37
  87. data/test/functional/foreman_bootdisk/disks_controller_test.rb +0 -97
  88. data/test/functional/foreman_bootdisk/subnet_disks_controller_test.rb +0 -51
  89. data/test/models/host/managed_test.rb +0 -26
  90. data/test/test_plugin_helper.rb +0 -72
  91. data/test/unit/access_permissions_test.rb +0 -10
  92. data/test/unit/concerns/compute_resources/vmware_test.rb +0 -83
  93. data/test/unit/concerns/host_test.rb +0 -84
  94. data/test/unit/concerns/orchestration/compute_test.rb +0 -69
  95. data/test/unit/foreman_bootdisk/renderer_test.rb +0 -36
  96. data/test/unit/foreman_bootdisk/scope/bootdisk_test.rb +0 -31
  97. data/test/unit/foreman_bootdisk/scope/full_host_bootdisk_test.rb +0 -30
  98. data/test/unit/iso_generator_test.rb +0 -74
@@ -0,0 +1,391 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the foreman_bootdisk package.
4
+ #
5
+ # Translators:
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: foreman_bootdisk 18.1.0\n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2021-11-30 18:05+0100\n"
11
+ "PO-Revision-Date: 2021-09-24 07:25+0000\n"
12
+ "Last-Translator: Transifex Bot <>\n"
13
+ "Language-Team: Chinese (Taiwan) (http://www.transifex.com/foreman/foreman/lang"
14
+ "uage/zh_TW/)\n"
15
+ "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=UTF-8\n"
17
+ "Content-Transfer-Encoding: 8bit\n"
18
+ "Language: zh_TW\n"
19
+ "Plural-Forms: nplurals=1; plural=0;\n"
20
+
21
+ #: ../app/controllers/concerns/allowed_actions.rb:7
22
+ msgid "This type of bootdisk is not allowed. Please contact administrator."
23
+ msgstr ""
24
+
25
+ #: ../app/controllers/foreman_bootdisk/api/v2/disks_controller.rb:21 ../app/views/foreman_bootdisk/disks/help.html.erb:1
26
+ msgid "Boot disks"
27
+ msgstr "開機磁碟"
28
+
29
+ #: ../app/controllers/foreman_bootdisk/api/v2/disks_controller.rb:24
30
+ msgid "Download generic image"
31
+ msgstr "下載泛型映像檔"
32
+
33
+ #: ../app/controllers/foreman_bootdisk/api/v2/disks_controller.rb:33
34
+ msgid "Download host image"
35
+ msgstr "下載主機映像檔"
36
+
37
+ #: ../app/controllers/foreman_bootdisk/api/v2/disks_controller.rb:34
38
+ msgid "True for full, false for basic reusable image"
39
+ msgstr "「true」代表完整,「false」則代表可重複使用的基本映像檔"
40
+
41
+ #: ../app/controllers/foreman_bootdisk/api/v2/disks_controller.rb:46 ../app/controllers/foreman_bootdisk/disks_controller.rb:126 ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:90
42
+ msgid "Host is not in build mode"
43
+ msgstr ""
44
+
45
+ #: ../app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb:23
46
+ msgid "Subnet boot disks"
47
+ msgstr "子網路開機磁碟"
48
+
49
+ #: ../app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb:26
50
+ msgid "Download subnet generic image"
51
+ msgstr "下載子網路泛型映像檔"
52
+
53
+ #: ../app/controllers/foreman_bootdisk/api/v2/subnet_disks_controller.rb:30 ../app/controllers/foreman_bootdisk/subnet_disks_controller.rb:15
54
+ msgid "TFTP feature not enabled for subnet %s"
55
+ msgstr "TFTP 功能並未啟動給子網路 %s 使用"
56
+
57
+ #: ../app/controllers/foreman_bootdisk/disks_controller.rb:63
58
+ msgid "Host is not in build mode."
59
+ msgstr ""
60
+
61
+ #: ../app/controllers/foreman_bootdisk/disks_controller.rb:95 ../app/helpers/concerns/foreman_bootdisk/pretty_error.rb:8
62
+ msgid "Failed to render boot disk template"
63
+ msgstr "轉譯開機磁碟範本失敗"
64
+
65
+ #: ../app/controllers/foreman_bootdisk/disks_controller.rb:120 ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:66
66
+ msgid "Host '%s' image"
67
+ msgstr "主機「%s」映像檔"
68
+
69
+ #: ../app/controllers/foreman_bootdisk/disks_controller.rb:120 ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:76 ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:86
70
+ msgid "Full host '%s' image"
71
+ msgstr "完整的主機 '%s' 映像檔"
72
+
73
+ #: ../app/controllers/foreman_bootdisk/disks_controller.rb:132
74
+ msgid "Boot disk help"
75
+ msgstr ""
76
+
77
+ #: ../app/helpers/bootdisk_links_helper.rb:27
78
+ msgid "Boot disk Help"
79
+ msgstr ""
80
+
81
+ #: ../app/helpers/bootdisk_links_helper.rb:40 ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:20 ../app/models/setting/bootdisk.rb:30 ../webpack/src/extensions/host/HostBootdiskButtons.js:65
82
+ msgid "Boot disk"
83
+ msgstr "開機磁碟"
84
+
85
+ #: ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:21 ../webpack/src/extensions/host/HostBootdiskButtons.js:54
86
+ msgid "Boot disk download not available for %s architecture"
87
+ msgstr ""
88
+
89
+ #: ../app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb:30
90
+ msgid "Subnet '%s' generic image"
91
+ msgstr "子網路「%s」泛型映像檔"
92
+
93
+ #: ../app/helpers/concerns/foreman_bootdisk/subnets_helper_ext.rb:10
94
+ msgid "Subnet generic image"
95
+ msgstr ""
96
+
97
+ #: ../app/helpers/concerns/foreman_bootdisk/subnets_helper_ext.rb:27 ../app/views/foreman_bootdisk/disks/help.html.erb:35
98
+ msgid "Generic image"
99
+ msgstr "泛型映像檔"
100
+
101
+ #: ../app/models/concerns/foreman_bootdisk/host_ext.rb:12 ../app/services/foreman_bootdisk/renderer.rb:53 ../app/services/foreman_bootdisk/renderer.rb:60
102
+ msgid "Unable to find template specified by %s setting"
103
+ msgstr "找不到 %s 設定所指定的範本"
104
+
105
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:30
106
+ msgid "Generating ISO image for %s"
107
+ msgstr ""
108
+
109
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:32
110
+ msgid "Upload ISO image to datastore for %s"
111
+ msgstr ""
112
+
113
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:34
114
+ msgid "Attach ISO image to CDROM drive for %s"
115
+ msgstr ""
116
+
117
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:38
118
+ msgid "Detach ISO image from CDROM drive for %s"
119
+ msgstr ""
120
+
121
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:73
122
+ msgid "Failed to generate ISO image for instance %{name}: %{message}"
123
+ msgstr ""
124
+
125
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:82
126
+ msgid "Failed to upload ISO image for instance %{name}: %{message}"
127
+ msgstr ""
128
+
129
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:91
130
+ msgid "Failed to attach ISO image to CDROM drive of instance %{name}: %{message}"
131
+ msgstr ""
132
+
133
+ #: ../app/models/concerns/foreman_bootdisk/orchestration/compute.rb:100
134
+ msgid "Failed to detach ISO image from CDROM drive of instance %{name}: %{message}"
135
+ msgstr ""
136
+
137
+ #: ../app/models/setting/bootdisk.rb:13
138
+ msgid "Path to directory containing iPXE images"
139
+ msgstr "包含 iPXE 映像檔的目錄之路徑"
140
+
141
+ #: ../app/models/setting/bootdisk.rb:13
142
+ msgid "iPXE directory"
143
+ msgstr ""
144
+
145
+ #: ../app/models/setting/bootdisk.rb:14
146
+ msgid "Path to directory containing isolinux images"
147
+ msgstr ""
148
+
149
+ #: ../app/models/setting/bootdisk.rb:14
150
+ msgid "ISOLINUX directory"
151
+ msgstr ""
152
+
153
+ #: ../app/models/setting/bootdisk.rb:15
154
+ msgid "Path to directory containing syslinux images"
155
+ msgstr "包含 syslinux 映像檔的目錄之路徑"
156
+
157
+ #: ../app/models/setting/bootdisk.rb:15
158
+ msgid "SYSLINUX directory"
159
+ msgstr ""
160
+
161
+ #: ../app/models/setting/bootdisk.rb:16
162
+ msgid "Path to directory containing grubx64.efi and shimx64.efi"
163
+ msgstr ""
164
+
165
+ #: ../app/models/setting/bootdisk.rb:16
166
+ msgid "Grub2 directory"
167
+ msgstr ""
168
+
169
+ #: ../app/models/setting/bootdisk.rb:17
170
+ msgid "iPXE template to use for host-specific boot disks"
171
+ msgstr "使用來作為主機特屬開機磁碟的 iPXE 範本"
172
+
173
+ #: ../app/models/setting/bootdisk.rb:18
174
+ msgid "Host image template"
175
+ msgstr ""
176
+
177
+ #: ../app/models/setting/bootdisk.rb:19
178
+ msgid "iPXE template to use for generic host boot disks"
179
+ msgstr "使用來作為泛型主機開機磁碟的 iPXE 範本"
180
+
181
+ #: ../app/models/setting/bootdisk.rb:20
182
+ msgid "Generic image template"
183
+ msgstr ""
184
+
185
+ #: ../app/models/setting/bootdisk.rb:21
186
+ msgid "Grub2 template to use for generic EFI host boot disks"
187
+ msgstr ""
188
+
189
+ #: ../app/models/setting/bootdisk.rb:22
190
+ msgid "Generic Grub2 EFI image template"
191
+ msgstr ""
192
+
193
+ #: ../app/models/setting/bootdisk.rb:23
194
+ msgid "Command to generate ISO image, use genisoimage or mkisofs"
195
+ msgstr "請使用 genisoimage 或是 mkisofs 來作為產生 ISO 映像檔的指令"
196
+
197
+ #: ../app/models/setting/bootdisk.rb:23
198
+ msgid "ISO generation command"
199
+ msgstr ""
200
+
201
+ #: ../app/models/setting/bootdisk.rb:24
202
+ msgid "Installation media files will be cached for full host images"
203
+ msgstr "安裝媒介檔案將會被快取以作為完整的主機映像檔"
204
+
205
+ #: ../app/models/setting/bootdisk.rb:24
206
+ msgid "Installation media caching"
207
+ msgstr ""
208
+
209
+ #: ../app/models/setting/bootdisk.rb:25
210
+ msgid "List of allowed bootdisk types, remove type to disable it"
211
+ msgstr ""
212
+
213
+ #: ../app/models/setting/bootdisk.rb:25
214
+ msgid "Allowed bootdisk types"
215
+ msgstr ""
216
+
217
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:16
218
+ msgid "Host is not in build mode, so the template cannot be rendered"
219
+ msgstr "主機不在組建模式下,因此無法編寫範本"
220
+
221
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:42
222
+ msgid "Unable to generate disk template, %{kind} template not found."
223
+ msgstr ""
224
+
225
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:52
226
+ msgid "Unable to generate disk %{kind} template: %{error}"
227
+ msgstr ""
228
+
229
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:94
230
+ msgid "Please ensure the isolinux/syslinux package(s) are installed."
231
+ msgstr ""
232
+
233
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:111
234
+ msgid "Please ensure the ipxe-bootimgs package is installed."
235
+ msgstr ""
236
+
237
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:128
238
+ msgid "Creating new image failed, install truncate utility"
239
+ msgstr ""
240
+
241
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:129
242
+ msgid "Failed to format the ESP image via mkfs.msdos"
243
+ msgstr ""
244
+
245
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:130 ../app/services/foreman_bootdisk/iso_generator.rb:131
246
+ msgid "Failed to create a directory within the ESP image"
247
+ msgstr ""
248
+
249
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:137
250
+ msgid "Ensure %{file} is readable (or update \"Grub2 directory\" setting)"
251
+ msgstr ""
252
+
253
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:138
254
+ msgid "Unable to mcopy %{file}"
255
+ msgstr ""
256
+
257
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:160
258
+ msgid "ISO build failed"
259
+ msgstr "建立 ISO 失敗"
260
+
261
+ #: ../app/services/foreman_bootdisk/iso_generator.rb:163
262
+ msgid "ISO hybrid conversion failed: %s"
263
+ msgstr ""
264
+
265
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:2
266
+ msgid "Back"
267
+ msgstr "上一步"
268
+
269
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:6
270
+ msgid "Various types of boot disks can be created to provision hosts without the need for PXE services. Boot disks can be attached to the host (physical or virtual) which boots from the disk, contacts Foreman and begins the OS installation."
271
+ msgstr "您可建立各種不同類型的開機磁碟來在不使用 PXE 服務的情況下佈建主機。開機磁碟能連接至由磁碟開機的主機(實體或虛擬),聯絡 Foreman 並開始進行 OS 的安裝程序。"
272
+
273
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:9
274
+ msgid "All images are usable as either ISOs or as disk images, including being written to a USB disk with `dd`."
275
+ msgstr "所有映像檔皆能作為 ISO 或是磁碟映像檔使用,包括以 `dd` 寫入一個 USB 磁碟中。"
276
+
277
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:12
278
+ msgid "Host images"
279
+ msgstr ""
280
+
281
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:14
282
+ msgid "These images are used for host. You can find them at host detail page."
283
+ msgstr ""
284
+
285
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:17
286
+ msgid "Host image"
287
+ msgstr "主機映像檔"
288
+
289
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:19
290
+ msgid "Per-host images contain data about a particular host registered in Foreman and set up fully static networking, avoiding the requirement for DHCP. After networking is configured, they chainload from Foreman, picking up the current OS configuration and build state from the server."
291
+ msgstr "個別主機的映像檔包含了有關於向 Foreman 註冊的特定主機的資料,並且會設置完整靜態的網路,以避免需要使用到 DHCP。在配置了網路後,它們便會由 Foreman 進行 chainload,取得目前的 OS 配置,並由伺服器建立狀態。"
292
+
293
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:22
294
+ msgid "Once chainloaded, the OS bootloader and installer are downloaded directly from the installation media configured in Foreman, and the provisioning script (kickstart/preseed) is downloaded from Foreman."
295
+ msgstr "在 chainload 之後,OS 開機載入程式和安裝程式將會直接從 Foreman 中所配置的安裝媒介下載,而佈建 script(kickstart/preseed)則會由 Foreman 下載。"
296
+
297
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:25
298
+ msgid "Full host image"
299
+ msgstr "完整的主機映像檔"
300
+
301
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:27
302
+ msgid "A variant of the per-host image which contains the OS bootloader embedded inside the disk. This may be useful if chainloading fails on certain hardware, but has the downside that the image must be regenerated for any change in the OS, bootloader or PXELinux templates."
303
+ msgstr "個別主機映像檔的變體,磁碟中嵌入了 OS 的開機載入程式。這對於在特定硬體上的 chainloading 失敗時特別有幫助,不過缺點就是若要對 OS、開機載入程式或 PXELinux 範本進行任何更改,映像檔就必須重新產生。"
304
+
305
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:30
306
+ msgid "Generic images"
307
+ msgstr ""
308
+
309
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:32
310
+ msgid "These images are more generic than previous images. You can find them at subnet index page."
311
+ msgstr ""
312
+
313
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:37
314
+ msgid "Generic images are a reusable disk image that works for any host registered in Foreman. It requires a basic DHCP and DNS service to function and contact the server, but does not require DHCP reservations or static IP addresses."
315
+ msgstr "泛型映像檔是個可重複使用的磁碟映像檔,並且可使用於任何向 Foreman 註冊過的主機上。它需要一項基本的 DHCP 和 DNS 服務才能運作和聯絡伺服器,不過並不需要 DHCP 預留或靜態 IP 位址。"
316
+
317
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:40
318
+ msgid "The OS install continues using the installation media configured in Foreman, and it will typically configure static networking, depending on how the OS iPXE template is configured."
319
+ msgstr "OS 安裝程序會繼續使用配置於 Foreman 中的安裝媒介,並且它一般會根據 OS iPXE 範本的配置方法來配置靜態網路。"
320
+
321
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:43
322
+ msgid "Subnet image"
323
+ msgstr "子網路映像檔"
324
+
325
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:45
326
+ msgid "Subnet images are similar to generic images, but chain-loading is done via the TFTP Smart Proxy assigned to the Subnet of the host. The smart proxy must have the \"Templates\" module enabled and configured."
327
+ msgstr "子網路映像檔跟泛型映像檔類似,但連鎖載入(chain-loading)是透過 TFTP 智慧型代理指定至主機的子網路。智慧型代理必須啟用並配置了「模版」(Templates)模組。"
328
+
329
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:48
330
+ msgid "This image is generic for all hosts with a provisioning NIC on that subnet."
331
+ msgstr "這映像檔對在該子網路上配有網路卡的所有主機來說,是通用的。"
332
+
333
+ #: ../app/views/foreman_bootdisk/disks/help.html.erb:51
334
+ msgid "* - These bootdisk types were disabled, you can enable them in Administer - Settings."
335
+ msgstr ""
336
+
337
+ #: ../app/views/foreman_bootdisk/host.erb:9
338
+ msgid "Host has no provisioning interface defined"
339
+ msgstr "主機沒有網路卡"
340
+
341
+ #: ../app/views/foreman_bootdisk/host.erb:10
342
+ msgid "Host has no IPv4 or IPv6 address defined"
343
+ msgstr ""
344
+
345
+ #: ../app/views/foreman_bootdisk/host.erb:11
346
+ msgid "Host has no subnet defined"
347
+ msgstr "主機尚未定義子網路"
348
+
349
+ #: ../app/views/foreman_bootdisk/host.erb:12
350
+ msgid "Host has no domain defined"
351
+ msgstr "主機尚未定義區域"
352
+
353
+ #: ../app/views/foreman_bootdisk/host.erb:19
354
+ msgid "Host bootdisk does not work with static IPv6"
355
+ msgstr ""
356
+
357
+ #: ../app/views/foreman_bootdisk/host.erb:21
358
+ msgid "Both IP and Subnet must be set"
359
+ msgstr ""
360
+
361
+ #: ../lib/foreman_bootdisk/engine.rb:60
362
+ msgid "Boot disk based"
363
+ msgstr ""
364
+
365
+ #: ../lib/foreman_bootdisk/engine.rb:61
366
+ msgid "Boot disk embedded template"
367
+ msgstr ""
368
+
369
+ #: ../webpack/src/extensions/host/HostBootdiskButtons.js:59
370
+ msgid "Not available"
371
+ msgstr ""
372
+
373
+ #: action_names.rb:2
374
+ msgid "Remote action:"
375
+ msgstr "遠端動作:"
376
+
377
+ #: action_names.rb:3
378
+ msgid "Import Puppet classes"
379
+ msgstr "匯入 Puppet 類別"
380
+
381
+ #: action_names.rb:4
382
+ msgid "Import facts"
383
+ msgstr "匯入詳情"
384
+
385
+ #: action_names.rb:5
386
+ msgid "Action with sub plans"
387
+ msgstr "有子計畫的動作"
388
+
389
+ #: gemspec.rb:4
390
+ msgid "Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure."
391
+ msgstr "能建立基於 iPXE 的開機磁碟的 Foreman 外掛程式,以在不需要 PXE 設備的情況下佈建主機。"
@@ -5,7 +5,7 @@
5
5
  # Translators:
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: foreman_bootdisk 18.0.0\n"
8
+ "Project-Id-Version: foreman_bootdisk 18.1.0\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "PO-Revision-Date: 2021-09-24 07:25+0000\n"
11
11
  "Last-Translator: Transifex Bot <>\n"
@@ -53,6 +53,9 @@ msgstr ""
53
53
  msgid "Boot disk embedded template"
54
54
  msgstr ""
55
55
 
56
+ msgid "Boot disk help"
57
+ msgstr ""
58
+
56
59
  msgid "Boot disks"
57
60
  msgstr "開機磁碟"
58
61
 
@@ -194,6 +197,9 @@ msgstr "安裝媒介檔案將會被快取以作為完整的主機映像檔"
194
197
  msgid "List of allowed bootdisk types, remove type to disable it"
195
198
  msgstr ""
196
199
 
200
+ msgid "Not available"
201
+ msgstr ""
202
+
197
203
  msgid "Once chainloaded, the OS bootloader and installer are downloaded directly from the installation media configured in Foreman, and the provisioning script (kickstart/preseed) is downloaded from Foreman."
198
204
  msgstr "在 chainload 之後,OS 開機載入程式和安裝程式將會直接從 Foreman 中所配置的安裝媒介下載,而佈建 script(kickstart/preseed)則會由 Foreman 下載。"
199
205
 
File without changes
data/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "foreman_bootdisk",
3
+ "version": "1.0.0",
4
+ "description": "Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure.",
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_bootdisk.git"
19
+ },
20
+ "bugs": {
21
+ "url": "http://projects.theforeman.org/projects/foreman_bootdisk/issues"
22
+ },
23
+ "peerDependencies": {
24
+ "@theforeman/vendor": ">= 8.15.0"
25
+ },
26
+ "devDependencies": {
27
+ "@babel/core": "^7.7.0",
28
+ "@sheerun/mutationobserver-shim": "^0.3.3",
29
+ "@theforeman/builder": "^8.15.0",
30
+ "@theforeman/eslint-plugin-foreman": "8.15.0",
31
+ "@theforeman/find-foreman": "^8.15.0",
32
+ "@theforeman/stories": "^8.15.0",
33
+ "@theforeman/test": "^8.15.0",
34
+ "@theforeman/vendor-dev": "^8.15.0",
35
+ "babel-eslint": "^10.0.3",
36
+ "eslint": "^6.7.2",
37
+ "prettier": "^1.19.1",
38
+ "stylelint-config-standard": "^18.0.0",
39
+ "stylelint": "^9.3.0",
40
+ "jed": "^1.1.1"
41
+ }
42
+ }
@@ -0,0 +1,30 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+
3
+ export const withRenderHandler = ({ Component }) => componentProps => (
4
+ <Component {...componentProps} />
5
+ );
6
+
7
+ export const callOnMount = callback => WrappedComponent => componentProps => {
8
+ callback(componentProps);
9
+
10
+ return <WrappedComponent {...componentProps} />;
11
+ };
12
+
13
+ export const callOnPopState = callback => WrappedComponent => componentProps => {
14
+ const didMount = useRef(false);
15
+ const {
16
+ history: {
17
+ action,
18
+ location: { search },
19
+ },
20
+ } = componentProps;
21
+ useEffect(() => {
22
+ if (action === 'POP' && didMount.current) {
23
+ callback(componentProps);
24
+ } else {
25
+ didMount.current = true;
26
+ }
27
+ }, [search, action, componentProps]);
28
+
29
+ return <WrappedComponent {...componentProps} />;
30
+ };
@@ -0,0 +1,7 @@
1
+ export { sprintf } from 'jed';
2
+
3
+ export const translate = s => s;
4
+
5
+ export const ngettext = s => s;
6
+
7
+ export const documentLocale = () => 'en';
@@ -0,0 +1,7 @@
1
+ export const getURIQuery = jest.fn(() => ({}));
2
+
3
+ export const deepPropsToCamelCase = jest.fn(props => props);
4
+
5
+ export const foremanUrl = jest.fn(() => '');
6
+
7
+ export const noop = Function.prototype;
@@ -0,0 +1,8 @@
1
+ export const getURIsearch = () => 'a=b';
2
+
3
+ export const getParams = () => ({
4
+ page: 1,
5
+ perPage: 20,
6
+ searchQuery: '',
7
+ sort: {},
8
+ });
@@ -0,0 +1,24 @@
1
+ export const STATUS = {
2
+ PENDING: 'PENDING',
3
+ RESOLVED: 'RESOLVED',
4
+ ERROR: 'ERROR',
5
+ };
6
+
7
+ export const getControllerSearchProps = (
8
+ controller,
9
+ id = 'searchBar',
10
+ canCreateBookmarks = true
11
+ ) => ({
12
+ controller,
13
+ autocomplete: {
14
+ id,
15
+ searchQuery: '',
16
+ url: `${controller}/auto_complete_search`,
17
+ useKeyShortcuts: true,
18
+ },
19
+ bookmarks: {
20
+ url: '/api/bookmarks',
21
+ canCreateBookmarks,
22
+ documentationUrl: `4.1.5Searching`,
23
+ },
24
+ });
@@ -0,0 +1,6 @@
1
+ export const selectAPIResponse = (state, key) =>
2
+ selectAPIByKey(state, key).response;
3
+
4
+ export const selectAPIStatus = (state, key) => 'PENDING';
5
+ export const selectAPIByKey = (state, key) => state.API[key];
6
+ export const selectAPIError = (state, key) => ({ error: `${key} ERRROR` });
@@ -0,0 +1,10 @@
1
+ export const API = {
2
+ get: jest.fn(),
3
+ put: jest.fn(),
4
+ post: jest.fn(),
5
+ delete: jest.fn(),
6
+ patch: jest.fn(),
7
+ };
8
+
9
+ export const get = data => ({ type: 'get-some-type', ...data });
10
+ export const post = data => ({ type: 'post-some-type', ...data });
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+
3
+ import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
4
+
5
+ import HostBootdiskButtons from './src/extensions/host/HostBootdiskButtons';
6
+
7
+ addGlobalFill(
8
+ 'host-details-kebab',
9
+ 'host-bootdisk-buttons',
10
+ <HostBootdiskButtons key="host-bootdisk-buttons" />,
11
+ 300
12
+ );
@@ -0,0 +1,11 @@
1
+ // runs before each test to make sure console.error output will
2
+ // fail a test (i.e. default PropType missing). Check the error
3
+ // output and traceback for actual error.
4
+ global.console.error = (error, stack) => {
5
+ /* eslint-disable-next-line no-console */
6
+ if (stack) console.log(stack); // Prints out original stack trace
7
+ throw new Error(error);
8
+ };
9
+
10
+ // Increase jest timeout as some tests using multiple http mocks can time out on CI systems.
11
+ jest.setTimeout(10000);
data/webpack/index.js ADDED
File without changes
@@ -0,0 +1,2 @@
1
+ export const HOST_BOOTDISK_BUTTONS_REQUEST_KEY = 'HOST_BOOTDISK_BUTTONS';
2
+ export const HOST_DETAILS_REQUEST_KEY = 'HOST_DETAILS';
@@ -0,0 +1,71 @@
1
+ import React, { useEffect } from 'react';
2
+ import { useSelector, useDispatch } from 'react-redux';
3
+
4
+ import { DropdownItem, DropdownGroup } from '@patternfly/react-core';
5
+
6
+ import { get } from 'foremanReact/redux/API';
7
+ import { foremanUrl } from 'foremanReact/common/helpers';
8
+ import { sprintf, translate as __ } from 'foremanReact/common/I18n';
9
+
10
+ import Loading from 'foremanReact/components/Loading';
11
+
12
+ import { HOST_BOOTDISK_BUTTONS_REQUEST_KEY } from '../constants';
13
+
14
+ import {
15
+ selectHostId,
16
+ selectIsLoading,
17
+ selectBootdiskOptions,
18
+ } from './HostBootdiskButtonsSelectors';
19
+
20
+ const HostBootdiskButtons = () => {
21
+ const dispatch = useDispatch();
22
+ const hostId = useSelector(selectHostId);
23
+ const isLoading = useSelector(selectIsLoading);
24
+ const options = useSelector(selectBootdiskOptions);
25
+
26
+ useEffect(() => {
27
+ dispatch(
28
+ get({
29
+ key: HOST_BOOTDISK_BUTTONS_REQUEST_KEY,
30
+ url: foremanUrl(`/bootdisk/disks/bootdisk_options/${hostId}`),
31
+ })
32
+ );
33
+ }, [dispatch, hostId]);
34
+
35
+ let content = null;
36
+ if (options.bootdiskDownloadable) {
37
+ content = options.actions.map((action, i) => (
38
+ <DropdownItem
39
+ key={`bootdisk-${i}`}
40
+ href={foremanUrl(action.link)}
41
+ isDisabled={action.disabled}
42
+ description={action.description}
43
+ >
44
+ {action.title}
45
+ </DropdownItem>
46
+ ));
47
+ } else {
48
+ content = (
49
+ <DropdownItem
50
+ key="bootdisk-unavailable"
51
+ component="button"
52
+ href="#"
53
+ tooltip={sprintf(
54
+ __('Boot disk download not available for %s architecture'),
55
+ options.architectureName
56
+ )}
57
+ tooltipProps={{ entryDelay: 0, exitDelay: 0 }}
58
+ >
59
+ {__('Not available')}
60
+ </DropdownItem>
61
+ );
62
+ }
63
+
64
+ return (
65
+ <DropdownGroup label={__('Boot disk')} key="bootdisk-group">
66
+ {isLoading ? <Loading showText={false} /> : content}
67
+ </DropdownGroup>
68
+ );
69
+ };
70
+
71
+ export default HostBootdiskButtons;