foreman-tasks 6.0.1 → 6.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/foreman_tasks/recurring_logic.rb +1 -1
- data/lib/foreman_tasks/engine.rb +6 -6
- data/lib/foreman_tasks/version.rb +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/OtherInfo.js +11 -14
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/__snapshots__/OtherInfo.test.js.snap +11 -27
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67320a79cb65e4905cce8d31974e676c75eec1c665c583f8c9df99e54a426632
|
4
|
+
data.tar.gz: 249a186aea1f6aa781a654d763f213993d977577cef468c90bb8e0b7a6d9734a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/foreman_tasks/engine.rb
CHANGED
@@ -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
|
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
|
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
|
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
|
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
|
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
|
@@ -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 {
|
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
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
-
<
|
28
|
+
<InfoCircleIcon className="pficon" />
|
32
29
|
<span>{__('Other:')} </span>
|
33
30
|
</span>
|
34
|
-
</
|
31
|
+
</Tooltip>
|
35
32
|
<Button
|
36
|
-
|
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
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
-
<
|
28
|
-
|
29
|
-
|
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
|
-
</
|
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.
|
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:
|
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.
|
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
|