foreman-tasks 0.17.0 → 0.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/foreman_tasks/tasks.css.scss +3 -3
- data/app/controllers/foreman_tasks/api/tasks_controller.rb +50 -30
- data/app/controllers/foreman_tasks/tasks_controller.rb +8 -17
- data/app/models/foreman_tasks/task.rb +6 -4
- data/app/models/foreman_tasks/task/search.rb +0 -25
- data/app/models/setting/foreman_tasks.rb +19 -23
- data/app/views/foreman_tasks/api/tasks/show.json.rabl +1 -0
- data/app/views/foreman_tasks/layouts/react.html.erb +4 -1
- data/config/routes.rb +17 -3
- data/db/migrate/20180927120509_add_user_id.foreman_tasks.rb +4 -2
- data/lib/foreman_tasks/dynflow.rb +1 -1
- data/lib/foreman_tasks/dynflow/console_authorizer.rb +13 -2
- data/lib/foreman_tasks/engine.rb +1 -1
- data/lib/foreman_tasks/version.rb +1 -1
- data/package.json +1 -0
- data/test/controllers/tasks_controller_test.rb +35 -4
- data/test/unit/dynflow_console_authorizer_test.rb +1 -1
- data/test/unit/otp_manager_test.rb +24 -17
- data/test/unit/task_test.rb +48 -2
- data/webpack/ForemanTasks/Components/TaskDetails/Components/Task.js +29 -16
- data/webpack/ForemanTasks/Components/TaskDetails/Components/TaskHelper.js +3 -17
- data/webpack/ForemanTasks/Components/TaskDetails/Components/TaskInfo.js +18 -5
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/TaskHelper.test.js +1 -56
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/Task.test.js.snap +24 -44
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/TaskInfo.test.js.snap +22 -10
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsActions.js +6 -0
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsSelectors.js +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/__snapshots__/TaskDetails.test.js.snap +2 -0
- data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboard.js +6 -3
- data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboardActions.js +2 -3
- data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboardHelper.js +10 -41
- data/webpack/ForemanTasks/Components/TasksDashboard/TasksDashboardReducer.js +0 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboard.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboardReducer.test.js.snap +1 -6
- data/webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js +30 -0
- data/webpack/ForemanTasks/Components/TasksTable/TaskTableFormmatters.js +53 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksIndexPage.js +10 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksTable.js +119 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableActions.js +67 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableConstants.js +5 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableHelpers.js +64 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksTablePage.js +63 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksTablePage.scss +29 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableReducer.js +35 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableSchema.js +67 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableSelectors.js +39 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/SubTasksPage.test.js +20 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksIndexPage.test.js +12 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.fixtures.js +42 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.test.js +9 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableActions.test.js +48 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableHelpers.test.js +28 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTablePage.test.js +26 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableReducer.test.js +37 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/SubTasksPage.test.js.snap +49 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksIndexPage.test.js.snap +42 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTable.test.js.snap +72 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTableActions.test.js.snap +115 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTablePage.test.js.snap +194 -0
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTableReducer.test.js.snap +32 -0
- data/webpack/ForemanTasks/Components/TasksTable/index.js +32 -0
- data/webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.js +39 -0
- data/webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js +45 -0
- data/webpack/ForemanTasks/Components/common/ActionButtons/CancelButton.js +23 -0
- data/webpack/ForemanTasks/Components/common/ActionButtons/CancelButton.test.js +27 -0
- data/webpack/ForemanTasks/Components/common/ActionButtons/ResumeButton.js +23 -0
- data/webpack/ForemanTasks/Components/common/ActionButtons/ResumeButton.test.js +27 -0
- data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/ActionButton.test.js.snap +28 -0
- data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/CancelButton.test.js.snap +15 -0
- data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/ResumeButton.test.js.snap +15 -0
- data/webpack/ForemanTasks/ForemanTasks.js +1 -17
- data/webpack/ForemanTasks/ForemanTasksReducers.js +2 -0
- data/webpack/ForemanTasks/Routes/ForemanTasksRouter.test.js +5 -1
- data/webpack/ForemanTasks/Routes/ForemanTasksRoutes.js +9 -3
- data/webpack/ForemanTasks/Routes/ForemanTasksRoutes.test.js +1 -1
- data/webpack/ForemanTasks/Routes/ShowTask/__tests__/ShowTask.test.js +5 -1
- data/webpack/ForemanTasks/Routes/__snapshots__/ForemanTasksRoutes.test.js.snap +18 -2
- data/webpack/ForemanTasks/__snapshots__/ForemanTasks.test.js.snap +1 -54
- data/webpack/__mocks__/foremanReact/common/helpers.js +1 -0
- data/webpack/__mocks__/foremanReact/common/urlHelpers.js +1 -0
- data/webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js +2 -0
- data/webpack/__mocks__/foremanReact/components/common/MessageBox.js +4 -0
- data/webpack/__mocks__/foremanReact/components/common/dates/LongDateTime.js +5 -0
- data/webpack/__mocks__/foremanReact/components/common/dates/RelativeDateTime.js +3 -0
- data/webpack/__mocks__/foremanReact/components/common/table.js +4 -0
- data/webpack/__mocks__/foremanReact/components/common/table/actionsHelpers/actionTypeCreator.js +7 -0
- data/webpack/__mocks__/foremanReact/constants.js +24 -0
- data/webpack/__mocks__/foremanReact/redux/actions/toasts.js +8 -0
- data/webpack/__mocks__/foremanReact/routes/common/PageLayout/PageLayout.js +10 -0
- data/webpack/__mocks__/foremanReact/routes/common/PageLayout/components/ExportButton/ExportButton.js +5 -0
- data/webpack/index.js +5 -0
- metadata +49 -9
- data/app/views/foreman_tasks/tasks/index.html.erb +0 -46
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/TaskHelper.test.js.snap +0 -37
- data/webpack/ForemanTasks/Routes/IndexTasks/IndexTasks.js +0 -10
- data/webpack/ForemanTasks/Routes/IndexTasks/__tests__/IndexTasks.test.js +0 -10
- data/webpack/ForemanTasks/Routes/IndexTasks/__tests__/__snapshots__/IndexTasks.test.js.snap +0 -12
- data/webpack/ForemanTasks/Routes/IndexTasks/index.js +0 -1
- data/webpack/ForemanTasks/Routes/IndexTasks/indexTasks.scss +0 -0
@@ -2,59 +2,6 @@
|
|
2
2
|
|
3
3
|
exports[`ForemanTasks render without Props 1`] = `
|
4
4
|
<BrowserRouter>
|
5
|
-
<
|
6
|
-
<div
|
7
|
-
style={
|
8
|
-
Object {
|
9
|
-
"paddingBottom": "10px",
|
10
|
-
"paddingTop": "10px",
|
11
|
-
}
|
12
|
-
}
|
13
|
-
>
|
14
|
-
<ButtonGroup
|
15
|
-
block={false}
|
16
|
-
bsClass="btn-group"
|
17
|
-
bsSize="large"
|
18
|
-
justified={false}
|
19
|
-
vertical={false}
|
20
|
-
>
|
21
|
-
<LinkContainer
|
22
|
-
activeClassName="active"
|
23
|
-
exact={false}
|
24
|
-
replace={false}
|
25
|
-
strict={false}
|
26
|
-
to="/foreman_tasks/ex_tasks"
|
27
|
-
>
|
28
|
-
<Button
|
29
|
-
active={false}
|
30
|
-
block={false}
|
31
|
-
bsClass="btn"
|
32
|
-
bsStyle="link"
|
33
|
-
disabled={false}
|
34
|
-
>
|
35
|
-
index-tasks-page
|
36
|
-
</Button>
|
37
|
-
</LinkContainer>
|
38
|
-
<LinkContainer
|
39
|
-
activeClassName="active"
|
40
|
-
exact={false}
|
41
|
-
replace={false}
|
42
|
-
strict={false}
|
43
|
-
to="/foreman_tasks/ex_tasks/some-id"
|
44
|
-
>
|
45
|
-
<Button
|
46
|
-
active={false}
|
47
|
-
block={false}
|
48
|
-
bsClass="btn"
|
49
|
-
bsStyle="link"
|
50
|
-
disabled={false}
|
51
|
-
>
|
52
|
-
show-task-page
|
53
|
-
</Button>
|
54
|
-
</LinkContainer>
|
55
|
-
</ButtonGroup>
|
56
|
-
</div>
|
57
|
-
<ForemanTasksRouter />
|
58
|
-
</div>
|
5
|
+
<ForemanTasksRouter />
|
59
6
|
</BrowserRouter>
|
60
7
|
`;
|
@@ -0,0 +1 @@
|
|
1
|
+
export const getURIsearch = () => 'a=b';
|
@@ -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
|
+
});
|
data/webpack/index.js
CHANGED
@@ -7,6 +7,7 @@ import reducers from './ForemanTasks/ForemanTasksReducers';
|
|
7
7
|
import ForemanTasks from './ForemanTasks';
|
8
8
|
import TasksDashboard from './ForemanTasks/Components/TasksDashboard';
|
9
9
|
import TaskDetails from './ForemanTasks/Components/TaskDetails';
|
10
|
+
import TasksTable from './ForemanTasks/Components/TasksTable';
|
10
11
|
|
11
12
|
// register reducers
|
12
13
|
Object.entries(reducers).forEach(([key, reducer]) =>
|
@@ -26,3 +27,7 @@ componentRegistry.register({
|
|
26
27
|
name: 'TaskDetails',
|
27
28
|
type: TaskDetails,
|
28
29
|
});
|
30
|
+
componentRegistry.register({
|
31
|
+
name: 'TasksTable',
|
32
|
+
type: TasksTable,
|
33
|
+
});
|
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.
|
4
|
+
version: 0.17.1
|
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-
|
11
|
+
date: 2019-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks-core
|
@@ -205,7 +205,6 @@ files:
|
|
205
205
|
- app/views/foreman_tasks/task_groups/recurring_logic_task_groups/_recurring_logic_task_group.html.erb
|
206
206
|
- app/views/foreman_tasks/tasks/dashboard/_latest_tasks_in_error_warning.html.erb
|
207
207
|
- app/views/foreman_tasks/tasks/dashboard/_tasks_status.html.erb
|
208
|
-
- app/views/foreman_tasks/tasks/index.html.erb
|
209
208
|
- app/views/foreman_tasks/tasks/show.html.erb
|
210
209
|
- bin/dynflow-executor
|
211
210
|
- bin/foreman-tasks
|
@@ -329,7 +328,6 @@ files:
|
|
329
328
|
- webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/Raw.test.js.snap
|
330
329
|
- webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/RunningSteps.test.js.snap
|
331
330
|
- webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/Task.test.js.snap
|
332
|
-
- webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/TaskHelper.test.js.snap
|
333
331
|
- webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/TaskInfo.test.js.snap
|
334
332
|
- webpack/ForemanTasks/Components/TaskDetails/TaskDetails.js
|
335
333
|
- webpack/ForemanTasks/Components/TaskDetails/TaskDetails.scss
|
@@ -417,6 +415,42 @@ files:
|
|
417
415
|
- webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboardActions.test.js.snap
|
418
416
|
- webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboardReducer.test.js.snap
|
419
417
|
- webpack/ForemanTasks/Components/TasksDashboard/index.js
|
418
|
+
- webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
|
419
|
+
- webpack/ForemanTasks/Components/TasksTable/TaskTableFormmatters.js
|
420
|
+
- webpack/ForemanTasks/Components/TasksTable/TasksIndexPage.js
|
421
|
+
- webpack/ForemanTasks/Components/TasksTable/TasksTable.js
|
422
|
+
- webpack/ForemanTasks/Components/TasksTable/TasksTableActions.js
|
423
|
+
- webpack/ForemanTasks/Components/TasksTable/TasksTableConstants.js
|
424
|
+
- webpack/ForemanTasks/Components/TasksTable/TasksTableHelpers.js
|
425
|
+
- webpack/ForemanTasks/Components/TasksTable/TasksTablePage.js
|
426
|
+
- webpack/ForemanTasks/Components/TasksTable/TasksTablePage.scss
|
427
|
+
- webpack/ForemanTasks/Components/TasksTable/TasksTableReducer.js
|
428
|
+
- webpack/ForemanTasks/Components/TasksTable/TasksTableSchema.js
|
429
|
+
- webpack/ForemanTasks/Components/TasksTable/TasksTableSelectors.js
|
430
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/SubTasksPage.test.js
|
431
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/TasksIndexPage.test.js
|
432
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.fixtures.js
|
433
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.test.js
|
434
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableActions.test.js
|
435
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableHelpers.test.js
|
436
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTablePage.test.js
|
437
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableReducer.test.js
|
438
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/SubTasksPage.test.js.snap
|
439
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksIndexPage.test.js.snap
|
440
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTable.test.js.snap
|
441
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTableActions.test.js.snap
|
442
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTablePage.test.js.snap
|
443
|
+
- webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTableReducer.test.js.snap
|
444
|
+
- webpack/ForemanTasks/Components/TasksTable/index.js
|
445
|
+
- webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.js
|
446
|
+
- webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js
|
447
|
+
- webpack/ForemanTasks/Components/common/ActionButtons/CancelButton.js
|
448
|
+
- webpack/ForemanTasks/Components/common/ActionButtons/CancelButton.test.js
|
449
|
+
- webpack/ForemanTasks/Components/common/ActionButtons/ResumeButton.js
|
450
|
+
- webpack/ForemanTasks/Components/common/ActionButtons/ResumeButton.test.js
|
451
|
+
- webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/ActionButton.test.js.snap
|
452
|
+
- webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/CancelButton.test.js.snap
|
453
|
+
- webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/ResumeButton.test.js.snap
|
420
454
|
- webpack/ForemanTasks/Components/common/ClickConfirmation/index.js
|
421
455
|
- webpack/ForemanTasks/ForemanTasks.js
|
422
456
|
- webpack/ForemanTasks/ForemanTasks.test.js
|
@@ -426,11 +460,6 @@ files:
|
|
426
460
|
- webpack/ForemanTasks/Routes/ForemanTasksRouter.test.js
|
427
461
|
- webpack/ForemanTasks/Routes/ForemanTasksRoutes.js
|
428
462
|
- webpack/ForemanTasks/Routes/ForemanTasksRoutes.test.js
|
429
|
-
- webpack/ForemanTasks/Routes/IndexTasks/IndexTasks.js
|
430
|
-
- webpack/ForemanTasks/Routes/IndexTasks/__tests__/IndexTasks.test.js
|
431
|
-
- webpack/ForemanTasks/Routes/IndexTasks/__tests__/__snapshots__/IndexTasks.test.js.snap
|
432
|
-
- webpack/ForemanTasks/Routes/IndexTasks/index.js
|
433
|
-
- webpack/ForemanTasks/Routes/IndexTasks/indexTasks.scss
|
434
463
|
- webpack/ForemanTasks/Routes/ShowTask/ShowTask.js
|
435
464
|
- webpack/ForemanTasks/Routes/ShowTask/__tests__/ShowTask.test.js
|
436
465
|
- webpack/ForemanTasks/Routes/ShowTask/__tests__/__snapshots__/ShowTask.test.js.snap
|
@@ -443,7 +472,18 @@ files:
|
|
443
472
|
- webpack/__mocks__/foremanReact/API.js
|
444
473
|
- webpack/__mocks__/foremanReact/common/I18n.js
|
445
474
|
- webpack/__mocks__/foremanReact/common/helpers.js
|
475
|
+
- webpack/__mocks__/foremanReact/common/urlHelpers.js
|
446
476
|
- webpack/__mocks__/foremanReact/components/Layout/LayoutActions.js
|
477
|
+
- webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js
|
478
|
+
- webpack/__mocks__/foremanReact/components/common/MessageBox.js
|
479
|
+
- webpack/__mocks__/foremanReact/components/common/dates/LongDateTime.js
|
480
|
+
- webpack/__mocks__/foremanReact/components/common/dates/RelativeDateTime.js
|
481
|
+
- webpack/__mocks__/foremanReact/components/common/table.js
|
482
|
+
- webpack/__mocks__/foremanReact/components/common/table/actionsHelpers/actionTypeCreator.js
|
483
|
+
- webpack/__mocks__/foremanReact/constants.js
|
484
|
+
- webpack/__mocks__/foremanReact/redux/actions/toasts.js
|
485
|
+
- webpack/__mocks__/foremanReact/routes/common/PageLayout/PageLayout.js
|
486
|
+
- webpack/__mocks__/foremanReact/routes/common/PageLayout/components/ExportButton/ExportButton.js
|
447
487
|
- webpack/index.js
|
448
488
|
- webpack/stories/decorators/index.js
|
449
489
|
- webpack/stories/decorators/withCardsDecorator.js
|
@@ -1,46 +0,0 @@
|
|
1
|
-
<% content_for(:javascripts) do %>
|
2
|
-
<%= webpacked_plugins_js_for :'foreman-tasks' %>
|
3
|
-
<% end %>
|
4
|
-
<% content_for(:stylesheets) do %>
|
5
|
-
<%= webpacked_plugins_css_for :'foreman-tasks' %>
|
6
|
-
<% end %>
|
7
|
-
<% content_for(:before_search_bar) do %>
|
8
|
-
<div id="tasks-dashboard"></div>
|
9
|
-
<%= mount_react_component('TasksDashboard', '#tasks-dashboard', {
|
10
|
-
yo: 'ya'
|
11
|
-
}.to_json) %>
|
12
|
-
<% end %>
|
13
|
-
<% content_for(:breadcrumbs) do %>
|
14
|
-
<% breadcrumbs(:items => breadcrumb_items) %>
|
15
|
-
<% end %>
|
16
|
-
|
17
|
-
<% title _("Tasks") %>
|
18
|
-
<% title_actions csv_link, help_button %>
|
19
|
-
<% stylesheet 'foreman_tasks/tasks' %>
|
20
|
-
|
21
|
-
<div id="tasks-table">
|
22
|
-
<table class="<%= table_css_classes('table-fixed') %>">
|
23
|
-
<tr>
|
24
|
-
<th class="col-md-4"><%= _("Action") %></th>
|
25
|
-
<th class="col-md-1"><%= _("State") %></th>
|
26
|
-
<th class="col-md-1"><%= _("Result") %></th>
|
27
|
-
<th class="col-md-2"><%= sort :started_at, :as => _("Started at") %></th>
|
28
|
-
<th class="col-md-2"><%= sort :ended_at, :as => _("Ended at") %></th>
|
29
|
-
<th class="col-md-2"><%= _("User") %></th>
|
30
|
-
</tr>
|
31
|
-
<% @tasks.each do |task| %>
|
32
|
-
<tr>
|
33
|
-
<td class="task-id ellipsis">
|
34
|
-
<%= link_to_if_authorized(format_task_input(task),
|
35
|
-
hash_for_foreman_tasks_task_path(:id => task)) %>
|
36
|
-
</td>
|
37
|
-
<td class="ellipsis"><%= task.state %> <%= _("(Disabled)") if task.frozen %></td>
|
38
|
-
<td class="ellipsis"><%= task.result %></td>
|
39
|
-
<td class="ellipsis"><%= task.started_at.try(:in_time_zone) %></td>
|
40
|
-
<td class="ellipsis"><%= task.ended_at.try(:in_time_zone) %></td>
|
41
|
-
<td class="ellipsis"><%= task.username %></td>
|
42
|
-
</tr>
|
43
|
-
<% end %>
|
44
|
-
</table>
|
45
|
-
<%= will_paginate_with_info @tasks %>
|
46
|
-
</div>
|
@@ -1,37 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`timeInWords should work for future days 1`] = `
|
4
|
-
<span>
|
5
|
-
in 5 days
|
6
|
-
</span>
|
7
|
-
`;
|
8
|
-
|
9
|
-
exports[`timeInWords should work for future hours 1`] = `
|
10
|
-
<span>
|
11
|
-
in 5 hours
|
12
|
-
</span>
|
13
|
-
`;
|
14
|
-
|
15
|
-
exports[`timeInWords should work for future minutes 1`] = `
|
16
|
-
<span>
|
17
|
-
in 5 minutes
|
18
|
-
</span>
|
19
|
-
`;
|
20
|
-
|
21
|
-
exports[`timeInWords should work for past days 1`] = `
|
22
|
-
<span>
|
23
|
-
5 days ago
|
24
|
-
</span>
|
25
|
-
`;
|
26
|
-
|
27
|
-
exports[`timeInWords should work for past hours 1`] = `
|
28
|
-
<span>
|
29
|
-
5 hours ago
|
30
|
-
</span>
|
31
|
-
`;
|
32
|
-
|
33
|
-
exports[`timeInWords should work for past minutes 1`] = `
|
34
|
-
<span>
|
35
|
-
5 minutes ago
|
36
|
-
</span>
|
37
|
-
`;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
|
2
|
-
|
3
|
-
import IndexTasks from '../IndexTasks';
|
4
|
-
|
5
|
-
const fixtures = {
|
6
|
-
'render without Props': {},
|
7
|
-
};
|
8
|
-
|
9
|
-
describe('IndexTasks', () =>
|
10
|
-
testComponentSnapshotsWithFixtures(IndexTasks, fixtures));
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default } from './IndexTasks';
|
File without changes
|