foreman-tasks 0.17.5 → 0.17.6

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
  SHA256:
3
- metadata.gz: 643cb1c2534982870c1596b11ae870ac9b2ae0bd044a7a8478860bc81cb3ef6f
4
- data.tar.gz: 8af310f891f2a938f687ddb0cbc8f6bc1a0aa89b2c81302e544c20b113bc4979
3
+ metadata.gz: 2b4e3250fe2916ec688e6f9c00499f89b5bebe513ddbd783850a3fe7e9c990f7
4
+ data.tar.gz: bcbd6c4b489aab5f9a166b5ba48cac75849746d13f5f9f40d425dae792db3629
5
5
  SHA512:
6
- metadata.gz: 1695ffe92d34e48a3d06120aff778d46f3b522203b603421260eb86bb3368af5d3ec3b159168bcd0e14b309eb222512511921ce5c9a2af8ddcb727a15e234e64
7
- data.tar.gz: 874641b33c524355abca31cf1d9016ff02ab51bf72a8efdc7893e1ec66baf0aab749c18f5f73723d87b44efd848dac45813beb4e2c7e8a4bd49f5ad593b9dac8
6
+ metadata.gz: a7c6f1a0aefbc547a84c10ff6e64c96631de2a9056638084184c423274dfeaed77924f58b827c4fea8b1a53b19d12e049ce85d8d79489700b2aaa3c339942e42
7
+ data.tar.gz: 3741f57f5fc0b34109f254afda46ccadcb80e46ab4e828ce185ecfd4c1f6952d2fae114314e5a1a3207759f0cbac03797cc59ef093a054249120b8ba5bc23563
@@ -28,7 +28,7 @@ module ForemanTasks
28
28
  def troubleshooting_info_text
29
29
  return if @task.state != 'paused' || @task.main_action.nil?
30
30
  helper = TroubleshootingHelpGenerator.new(@task.main_action)
31
- helper.generate_text
31
+ helper.generate_html
32
32
  end
33
33
 
34
34
  def username_link_task(owner, username)
@@ -44,10 +44,6 @@ module ForemanTasks
44
44
  # rubocop:enable Rails/OutputSafety
45
45
  end
46
46
 
47
- def generate_text
48
- (description + link_descriptions_html).join("\n")
49
- end
50
-
51
47
  def link_descriptions_html
52
48
  links.map do |link|
53
49
  link.description % { link: %(<a href="%{href}">%{title}</a>) % link.to_h }
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = '0.17.5'.freeze
2
+ VERSION = '0.17.6'.freeze
3
3
  end
@@ -25,6 +25,7 @@
25
25
  "@theforeman/vendor": "^1.4.0",
26
26
  "c3": "^0.4.11",
27
27
  "humanize-duration": "^3.20.1",
28
+ "react-html-parser": "^2.0.2",
28
29
  "react-intl": "^2.8.0"
29
30
  },
30
31
  "devDependencies": {
@@ -4,6 +4,7 @@ import { Grid, Row, Col, ProgressBar } from 'patternfly-react';
4
4
  import { translate as __ } from 'foremanReact/common/I18n';
5
5
  import EllipsisWithTooltip from 'react-ellipsis-with-tooltip';
6
6
  import RelativeDateTime from 'foremanReact/components/common/dates/RelativeDateTime';
7
+ import ReactHtmlParser from 'react-html-parser';
7
8
 
8
9
  class TaskInfo extends Component {
9
10
  isDelayed = () => {
@@ -173,14 +174,7 @@ class TaskInfo extends Component {
173
174
  <b>{__('Troubleshooting')}</b>
174
175
  </span>
175
176
  </p>
176
- <p>
177
- {help.split('\n').map((item, i) => (
178
- <React.Fragment key={i}>
179
- {item}
180
- <br />
181
- </React.Fragment>
182
- ))}
183
- </p>
177
+ <p>{ReactHtmlParser(help)}</p>
184
178
  </Col>
185
179
  </Row>
186
180
  )}
@@ -30,7 +30,7 @@ export const selectErrors = state => {
30
30
 
31
31
  export const selectProgress = state =>
32
32
  selectTaskDetails(state).progress
33
- ? selectTaskDetails(state).progress.toFixed(4) * 100
33
+ ? parseFloat((selectTaskDetails(state).progress * 100).toFixed(2))
34
34
  : 0;
35
35
 
36
36
  export const selectUsername = state =>
@@ -1,10 +1,6 @@
1
1
  import { getControllerSearchProps } from 'foremanReact/constants';
2
2
 
3
3
  export const TASKS_TABLE_ID = 'TASKS_TABLE';
4
- export const TASKS_CONTROLLER = 'tasks';
5
- export const TASKS_SUCCESS = 'TASKS_SUCCESS';
6
- export const TASKS_REQUEST = 'TASKS_REQUEST';
7
- export const TASKS_FAILURE = 'TASKS_FAILURE';
8
4
  export const SELECT_ROWS = 'SELECT_ROWS';
9
5
  export const UNSELECT_ROWS = 'UNSELECT_ROWS';
10
6
  export const UNSELECT_ALL_ROWS = 'UNSELECT_ALL_ROWS';
@@ -13,4 +9,7 @@ export const RESUME = 'RESUME';
13
9
  export const CLOSED = 'CLOSED';
14
10
 
15
11
  export const TASKS_TABLE_SELECTED_MODAL = 'TASKS_TABLE_SELECTED_MODAL';
16
- export const TASKS_SEARCH_PROPS = getControllerSearchProps('tasks');
12
+ export const TASKS_SEARCH_PROPS = {
13
+ ...getControllerSearchProps('tasks'),
14
+ controller: 'foreman_tasks/tasks'
15
+ };
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.5
4
+ version: 0.17.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-12 00:00:00.000000000 Z
11
+ date: 2020-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman-tasks-core