foreman-tasks 6.0.1 → 6.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7fe4afd0fbe9eaa5cb5587310ddddd1538453e733b48b6f927e6bc14fa4ad42e
4
- data.tar.gz: 27591131ac0329e66625a15c4b512fa7a24b23b3623abdc1eaef40fee7bdea9a
3
+ metadata.gz: 67320a79cb65e4905cce8d31974e676c75eec1c665c583f8c9df99e54a426632
4
+ data.tar.gz: 249a186aea1f6aa781a654d763f213993d977577cef468c90bb8e0b7a6d9734a
5
5
  SHA512:
6
- metadata.gz: 042c221e1f3c01b2d38b2011165479282165846d9b46923b5ef7cc4fc8f91c3ab6ff5921bd229a4a26dbf661dccff3a9d0f0d474e11eb18b074880fc8fc25870
7
- data.tar.gz: 4fdf7dfc1836bd8b4ea0490f8c7a894569c7ccf9eca811945b517f7aedface6b04c0c6bbe9c7f34a7b7bbea77328edaadd27ebb624bc29c4acae2eb86bc25624
6
+ metadata.gz: 36b628ced0600bcc9e1a31d2325736eccbfd9591aa3a37b03f0e0c2106f3db6dc327d7829733179f24b52d19084abeedfb5f7f7949990d3a15778f6baf069354
7
+ data.tar.gz: c3ef36b4d8aaa7718f17d821d06b7b6297980a7cddf889a824f3c1bc34e26377cf64dc0579b74ffcf6e9e4d17b2e8f7d88697fc78a6af19b8668fb78bd0d8f55
@@ -90,7 +90,7 @@ module ForemanTasks
90
90
  def next_occurrence_time(time = Time.zone.now)
91
91
  @parser ||= CronParser.new(cron_line, Time.zone)
92
92
  # @parser.next(start_time) is not inclusive of the start_time hence stepping back one run to include checking start_time for the first run.
93
- before_next = @parser.next(@parser.last(time))
93
+ before_next = @parser.next(@parser.last(time.in_time_zone))
94
94
  return before_next if before_next >= time && tasks.count == 0
95
95
  @parser.next(time)
96
96
  end
@@ -42,17 +42,17 @@ module ForemanTasks
42
42
  security_block :foreman_tasks do |_map|
43
43
  permission :view_foreman_tasks, { :'foreman_tasks/tasks' => [:auto_complete_search, :sub_tasks, :index, :summary, :summary_sub_tasks, :show],
44
44
  :'foreman_tasks/react' => [:index],
45
- :'foreman_tasks/api/tasks' => [:bulk_search, :show, :index, :summary, :summary_sub_tasks, :details, :sub_tasks] }, :resource_type => ForemanTasks::Task.name
45
+ :'foreman_tasks/api/tasks' => [:bulk_search, :show, :index, :summary, :summary_sub_tasks, :details, :sub_tasks] }, :resource_type => 'ForemanTasks::Task'
46
46
  permission :edit_foreman_tasks, { :'foreman_tasks/tasks' => [:resume, :unlock, :force_unlock, :cancel_step, :cancel, :abort],
47
- :'foreman_tasks/api/tasks' => [:bulk_resume, :bulk_cancel, :bulk_stop] }, :resource_type => ForemanTasks::Task.name
47
+ :'foreman_tasks/api/tasks' => [:bulk_resume, :bulk_cancel, :bulk_stop] }, :resource_type => 'ForemanTasks::Task'
48
48
 
49
- permission :create_recurring_logics, {}, :resource_type => ForemanTasks::RecurringLogic.name
49
+ permission :create_recurring_logics, {}, :resource_type => 'ForemanTasks::RecurringLogic'
50
50
 
51
51
  permission :view_recurring_logics, { :'foreman_tasks/recurring_logics' => [:auto_complete_search, :index, :show],
52
- :'foreman_tasks/api/recurring_logics' => [:index, :show] }, :resource_type => ForemanTasks::RecurringLogic.name
52
+ :'foreman_tasks/api/recurring_logics' => [:index, :show] }, :resource_type => 'ForemanTasks::RecurringLogic'
53
53
 
54
54
  permission :edit_recurring_logics, { :'foreman_tasks/recurring_logics' => [:cancel, :enable, :disable, :clear_cancelled],
55
- :'foreman_tasks/api/recurring_logics' => [:cancel, :update, :bulk_destroy] }, :resource_type => ForemanTasks::RecurringLogic.name
55
+ :'foreman_tasks/api/recurring_logics' => [:cancel, :update, :bulk_destroy] }, :resource_type => 'ForemanTasks::RecurringLogic'
56
56
  end
57
57
 
58
58
  add_all_permissions_to_default_roles
@@ -116,7 +116,7 @@ module ForemanTasks
116
116
  register_graphql_query_field :recurring_logic, '::Types::RecurringLogic', :record_field
117
117
  register_graphql_query_field :recurring_logics, '::Types::RecurringLogic', :collection_field
118
118
 
119
- register_graphql_mutation_field :cancel_recurring_logic, ::Mutations::RecurringLogics::Cancel
119
+ register_graphql_mutation_field :cancel_recurring_logic, '::Mutations::RecurringLogics::Cancel'
120
120
 
121
121
  logger :dynflow, :enabled => true
122
122
  logger :action, :enabled => true
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = '6.0.1'.freeze
2
+ VERSION = '6.0.2'.freeze
3
3
  end
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
 
5
- import { Icon, Button, OverlayTrigger, Tooltip } from 'patternfly-react';
5
+ import { Button, Tooltip, TooltipPosition } from '@patternfly/react-core';
6
+ import { InfoCircleIcon } from '@patternfly/react-icons';
6
7
  import { translate as __ } from 'foremanReact/common/I18n';
7
8
  import {
8
9
  TASKS_DASHBOARD_AVAILABLE_QUERY_STATES,
@@ -10,30 +11,26 @@ import {
10
11
  } from '../../../../TasksDashboardConstants';
11
12
  import { queryPropType } from '../../../../TasksDashboardPropTypes';
12
13
 
13
- const tooltip = (
14
- <Tooltip id="stopped-tooltip">
15
- {__('Other includes all stopped tasks that are cancelled or pending')}
16
- </Tooltip>
17
- );
18
-
19
14
  export const OtherInfo = ({ updateQuery, otherCount, query }) => {
20
15
  const { OTHER } = TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS;
21
16
  const { STOPPED } = TASKS_DASHBOARD_AVAILABLE_QUERY_STATES;
22
17
  const active = query.state === STOPPED && query.result === OTHER;
23
18
  return (
24
19
  <span className={classNames(active && 'other-active')}>
25
- <OverlayTrigger
26
- overlay={tooltip}
27
- trigger={['hover', 'focus']}
28
- placement="bottom"
20
+ <Tooltip
21
+ id="stopped-tooltip"
22
+ content={__(
23
+ 'Other includes all stopped tasks that are cancelled or pending'
24
+ )}
25
+ position={TooltipPosition.bottom}
29
26
  >
30
27
  <span>
31
- <Icon type="pf" name="info" />
28
+ <InfoCircleIcon className="pficon" />
32
29
  <span>{__('Other:')} </span>
33
30
  </span>
34
- </OverlayTrigger>
31
+ </Tooltip>
35
32
  <Button
36
- bsStyle="link"
33
+ variant="link"
37
34
  onClick={() =>
38
35
  updateQuery({
39
36
  state: STOPPED,
@@ -4,43 +4,27 @@ exports[`OtherInfo render 1`] = `
4
4
  <span
5
5
  className=""
6
6
  >
7
- <OverlayTrigger
8
- defaultOverlayShown={false}
9
- overlay={
10
- <Tooltip
11
- bsClass="tooltip"
12
- id="stopped-tooltip"
13
- placement="right"
14
- >
15
- Other includes all stopped tasks that are cancelled or pending
16
- </Tooltip>
17
- }
18
- placement="bottom"
19
- trigger={
20
- Array [
21
- "hover",
22
- "focus",
23
- ]
24
- }
7
+ <Tooltip
8
+ content="Other includes all stopped tasks that are cancelled or pending"
9
+ id="stopped-tooltip"
10
+ position="bottom"
25
11
  >
26
12
  <span>
27
- <Icon
28
- name="info"
29
- type="pf"
13
+ <InfoCircleIcon
14
+ className="pficon"
15
+ color="currentColor"
16
+ noVerticalAlign={false}
17
+ size="sm"
30
18
  />
31
19
  <span>
32
20
  Other:
33
21
 
34
22
  </span>
35
23
  </span>
36
- </OverlayTrigger>
24
+ </Tooltip>
37
25
  <Button
38
- active={false}
39
- block={false}
40
- bsClass="btn"
41
- bsStyle="link"
42
- disabled={false}
43
26
  onClick={[Function]}
27
+ variant="link"
44
28
  >
45
29
  7
46
30
  </Button>
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: 6.0.1
4
+ version: 6.0.2
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: 1980-01-01 00:00:00.000000000 Z
11
+ date: 2022-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dynflow
@@ -608,7 +608,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
608
608
  - !ruby/object:Gem::Version
609
609
  version: '0'
610
610
  requirements: []
611
- rubygems_version: 3.2.26
611
+ rubygems_version: 3.1.4
612
612
  signing_key:
613
613
  specification_version: 4
614
614
  summary: Foreman plugin for showing tasks information for resources and users