Skip to content

Commit 7d9925f

Browse files
natanrolnikflovilmart
authored andcommitted
Show jobs schedule reminder message (#741)
* When there are no scheduled jobs * When scheduling a new job * When viewing the list of current scheduled jobs
1 parent 3bb6d7f commit 7d9925f

File tree

5 files changed

+79
-47
lines changed

5 files changed

+79
-47
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
### NEXT RELEASE
44

55
* _Contributing to this repo? Add info about your change here to be included in next release_
6-
* Fix: Added on the empty Scheduled Jobs page a message that notifies about jobs not being run by parse-server but requires further setup
7-
* Feature: When editing Object or Array fields the data is displayed in a prettier format and the textarea is resizable
8-
* Fix: Display bug on safari when table has empty cells ('')
9-
* Feature: UI for managing push audiences, thanks to [Davi Macedo](https://github.com/davimacedo)
6+
* Feature: UI for managing push audiences (#712), thanks to [Davi Macedo](https://github.com/davimacedo)
7+
* Feature: When editing Object or Array fields the data is displayed in a prettier format and the textarea is resizable (#734), thanks to [Samuli Siivinen](https://github.com/ssamuli)
8+
* Fix: Display bug on safari when table has empty cells ('') (#731), thanks to [Samuli Siivinen](https://github.com/ssamuli)
9+
* Fix: Added message that notifies Background Jobs requiring additional setup (#740 & #741), thanks to [Samuli Siivinen](https://github.com/ssamuli) and [Natan Rolnik](https://github.com/natanrolnik)
1010

1111
### 1.0.28
1212
* Feature: Add ability to search Object columns (#727), thanks to [Samuli Siivinen](https://github.com/ssamuli)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from 'react';
2+
import { horizontalCenter } from 'stylesheets/base.scss'
3+
4+
export default class JobScheduleReminder extends React.Component {
5+
render() {
6+
return (
7+
<div className={horizontalCenter}>
8+
<p>
9+
{"Be noted that "}
10+
<b>{"parse-server doesn't run the jobs in the scheduled times"}</b>
11+
{" by itself."}
12+
</p>
13+
<p>
14+
{"Please take a look at the "}
15+
<a href="http://docs.parseplatform.org/parse-server/guide/#jobs">{'docs'}</a>
16+
{" on how to do that."}
17+
</p>
18+
</div>
19+
);
20+
}
21+
}

src/dashboard/Data/Jobs/Jobs.react.js

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@
55
* This source code is licensed under the license found in the LICENSE file in
66
* the root directory of this source tree.
77
*/
8-
import { ActionTypes } from 'lib/stores/JobsStore';
9-
import Button from 'components/Button/Button.react';
10-
import * as DateUtils from 'lib/DateUtils';
11-
import CategoryList from 'components/CategoryList/CategoryList.react';
12-
import EmptyState from 'components/EmptyState/EmptyState.react';
13-
import history from 'dashboard/history';
14-
import Icon from 'components/Icon/Icon.react';
15-
import Modal from 'components/Modal/Modal.react';
16-
import React from 'react';
17-
import ReleaseInfo from 'components/ReleaseInfo/ReleaseInfo';
18-
import RunNowButton from 'dashboard/Data/Jobs/RunNowButton.react';
19-
import SidebarAction from 'components/Sidebar/SidebarAction';
20-
import StatusIndicator from 'components/StatusIndicator/StatusIndicator.react';
21-
import styles from 'dashboard/Data/Jobs/Jobs.scss';
22-
import browserStyles from 'dashboard/Data/Browser/Browser.scss';
23-
import subscribeTo from 'lib/subscribeTo';
24-
import TableHeader from 'components/Table/TableHeader.react';
25-
import TableView from 'dashboard/TableView.react';
26-
import Toolbar from 'components/Toolbar/Toolbar.react';
8+
import { ActionTypes } from 'lib/stores/JobsStore';
9+
import Button from 'components/Button/Button.react';
10+
import * as DateUtils from 'lib/DateUtils';
11+
import CategoryList from 'components/CategoryList/CategoryList.react';
12+
import EmptyState from 'components/EmptyState/EmptyState.react';
13+
import history from 'dashboard/history';
14+
import Icon from 'components/Icon/Icon.react';
15+
import JobScheduleReminder from 'dashboard/Data/Jobs/JobScheduleReminder.react';
16+
import Modal from 'components/Modal/Modal.react';
17+
import React from 'react';
18+
import ReleaseInfo from 'components/ReleaseInfo/ReleaseInfo';
19+
import RunNowButton from 'dashboard/Data/Jobs/RunNowButton.react';
20+
import SidebarAction from 'components/Sidebar/SidebarAction';
21+
import StatusIndicator from 'components/StatusIndicator/StatusIndicator.react';
22+
import styles from 'dashboard/Data/Jobs/Jobs.scss';
23+
import browserStyles from 'dashboard/Data/Browser/Browser.scss';
24+
import subscribeTo from 'lib/subscribeTo';
25+
import TableHeader from 'components/Table/TableHeader.react';
26+
import TableView from 'dashboard/TableView.react';
27+
import Toolbar from 'components/Toolbar/Toolbar.react';
2728

2829
let subsections = {
2930
all: 'All Jobs',
@@ -180,6 +181,14 @@ export default class Jobs extends TableView {
180181
}
181182
}
182183

184+
renderFooter() {
185+
if (this.props.params.section === 'scheduled') {
186+
return <JobScheduleReminder />
187+
}
188+
189+
return null;
190+
}
191+
183192
renderEmpty() {
184193
if (this.props.params.section === 'all') {
185194
return (
@@ -196,13 +205,7 @@ export default class Jobs extends TableView {
196205
<div>
197206
<p>{'On this page you can create JobSchedule objects.'}</p>
198207
<br/>
199-
<p>
200-
{"Be noted that "}
201-
<b>{"parse-server doesn't schedule or run them. "}</b>
202-
{"Please take a look at the "}
203-
<a href="http://docs.parseplatform.org/parse-server/guide/#jobs">{'docs'}</a>
204-
{" on how to do that."}
205-
</p>
208+
<JobScheduleReminder />
206209
</div>
207210
icon='cloud-happy' />
208211
);

src/dashboard/Data/Jobs/JobsForm.react.js

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,24 @@
55
* This source code is licensed under the license found in the LICENSE file in
66
* the root directory of this source tree.
77
*/
8-
import DashboardView from 'dashboard/DashboardView.react';
9-
import DateTimeInput from 'components/DateTimeInput/DateTimeInput.react';
10-
import Dropdown from 'components/Dropdown/Dropdown.react';
11-
import Field from 'components/Field/Field.react';
12-
import Fieldset from 'components/Fieldset/Fieldset.react';
13-
import FlowView from 'components/FlowView/FlowView.react';
14-
import IntervalInput from 'components/IntervalInput/IntervalInput.react';
15-
import Label from 'components/Label/Label.react';
16-
import Option from 'components/Dropdown/Option.react';
17-
import pluralize from 'lib/pluralize';
18-
import React from 'react';
19-
import ReleaseInfo from 'components/ReleaseInfo/ReleaseInfo';
20-
import styles from 'dashboard/Data/Jobs/Jobs.scss';
21-
import TextInput from 'components/TextInput/TextInput.react';
22-
import TimeInput from 'components/TimeInput/TimeInput.react';
23-
import Toggle from 'components/Toggle/Toggle.react';
24-
import Toolbar from 'components/Toolbar/Toolbar.react';
8+
import DashboardView from 'dashboard/DashboardView.react';
9+
import DateTimeInput from 'components/DateTimeInput/DateTimeInput.react';
10+
import Dropdown from 'components/Dropdown/Dropdown.react';
11+
import Field from 'components/Field/Field.react';
12+
import Fieldset from 'components/Fieldset/Fieldset.react';
13+
import FlowView from 'components/FlowView/FlowView.react';
14+
import IntervalInput from 'components/IntervalInput/IntervalInput.react';
15+
import JobScheduleReminder from 'dashboard/Data/Jobs/JobScheduleReminder.react';
16+
import Label from 'components/Label/Label.react';
17+
import Option from 'components/Dropdown/Option.react';
18+
import pluralize from 'lib/pluralize';
19+
import React from 'react';
20+
import ReleaseInfo from 'components/ReleaseInfo/ReleaseInfo';
21+
import styles from 'dashboard/Data/Jobs/Jobs.scss';
22+
import TextInput from 'components/TextInput/TextInput.react';
23+
import TimeInput from 'components/TimeInput/TimeInput.react';
24+
import Toggle from 'components/Toggle/Toggle.react';
25+
import Toolbar from 'components/Toolbar/Toolbar.react';
2526
import { hoursFrom, dateStringUTC } from 'lib/DateUtils';
2627

2728
export default class JobsForm extends DashboardView {
@@ -139,6 +140,7 @@ export default class JobsForm extends DashboardView {
139140
}
140141
return (
141142
<div className={styles.jobsFlow}>
143+
<JobScheduleReminder />
142144
<Fieldset
143145
legend='Pick a Job'
144146
description='Choose a job from your cloud code, and specify the parameters to run it with'>

src/dashboard/TableView.react.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@ export default class TableView extends DashboardView {
2121
return widths;
2222
}
2323

24+
renderFooter() {
25+
return null;
26+
}
27+
2428
renderContent() {
2529
let toolbar = this.renderToolbar();
2630
let data = this.tableData();
31+
let footer = this.renderFooter();
2732
let content = null;
2833
let headers = null;
2934
if (data !== undefined) {
@@ -40,6 +45,7 @@ export default class TableView extends DashboardView {
4045
{data.map((row) => this.renderRow(row))}
4146
</tbody>
4247
</table>
48+
{footer}
4349
</div>
4450
);
4551
headers = this.renderHeaders();

0 commit comments

Comments
 (0)