Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
### NEXT RELEASE

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

### 1.0.28
* Feature: Add ability to search Object columns (#727), thanks to [Samuli Siivinen](https://github.com/ssamuli)
Expand Down
21 changes: 21 additions & 0 deletions src/dashboard/Data/Jobs/JobScheduleReminder.react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import { horizontalCenter } from 'stylesheets/base.scss'

export default class JobScheduleReminder extends React.Component {
render() {
return (
<div className={horizontalCenter}>
<p>
{"Be noted that "}
<b>{"parse-server doesn't run the jobs in the scheduled times"}</b>
{" by itself."}
</p>
<p>
{"Please take a look at the "}
<a href="http://docs.parseplatform.org/parse-server/guide/#jobs">{'docs'}</a>
{" on how to do that."}
</p>
</div>
);
}
}
55 changes: 29 additions & 26 deletions src/dashboard/Data/Jobs/Jobs.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
import { ActionTypes } from 'lib/stores/JobsStore';
import Button from 'components/Button/Button.react';
import * as DateUtils from 'lib/DateUtils';
import CategoryList from 'components/CategoryList/CategoryList.react';
import EmptyState from 'components/EmptyState/EmptyState.react';
import history from 'dashboard/history';
import Icon from 'components/Icon/Icon.react';
import Modal from 'components/Modal/Modal.react';
import React from 'react';
import ReleaseInfo from 'components/ReleaseInfo/ReleaseInfo';
import RunNowButton from 'dashboard/Data/Jobs/RunNowButton.react';
import SidebarAction from 'components/Sidebar/SidebarAction';
import StatusIndicator from 'components/StatusIndicator/StatusIndicator.react';
import styles from 'dashboard/Data/Jobs/Jobs.scss';
import browserStyles from 'dashboard/Data/Browser/Browser.scss';
import subscribeTo from 'lib/subscribeTo';
import TableHeader from 'components/Table/TableHeader.react';
import TableView from 'dashboard/TableView.react';
import Toolbar from 'components/Toolbar/Toolbar.react';
import { ActionTypes } from 'lib/stores/JobsStore';
import Button from 'components/Button/Button.react';
import * as DateUtils from 'lib/DateUtils';
import CategoryList from 'components/CategoryList/CategoryList.react';
import EmptyState from 'components/EmptyState/EmptyState.react';
import history from 'dashboard/history';
import Icon from 'components/Icon/Icon.react';
import JobScheduleReminder from 'dashboard/Data/Jobs/JobScheduleReminder.react';
import Modal from 'components/Modal/Modal.react';
import React from 'react';
import ReleaseInfo from 'components/ReleaseInfo/ReleaseInfo';
import RunNowButton from 'dashboard/Data/Jobs/RunNowButton.react';
import SidebarAction from 'components/Sidebar/SidebarAction';
import StatusIndicator from 'components/StatusIndicator/StatusIndicator.react';
import styles from 'dashboard/Data/Jobs/Jobs.scss';
import browserStyles from 'dashboard/Data/Browser/Browser.scss';
import subscribeTo from 'lib/subscribeTo';
import TableHeader from 'components/Table/TableHeader.react';
import TableView from 'dashboard/TableView.react';
import Toolbar from 'components/Toolbar/Toolbar.react';

let subsections = {
all: 'All Jobs',
Expand Down Expand Up @@ -180,6 +181,14 @@ export default class Jobs extends TableView {
}
}

renderFooter() {
if (this.props.params.section === 'scheduled') {
return <JobScheduleReminder />
}

return null;
}

renderEmpty() {
if (this.props.params.section === 'all') {
return (
Expand All @@ -196,13 +205,7 @@ export default class Jobs extends TableView {
<div>
<p>{'On this page you can create JobSchedule objects.'}</p>
<br/>
<p>
{"Be noted that "}
<b>{"parse-server doesn't schedule or run them. "}</b>
{"Please take a look at the "}
<a href="http://docs.parseplatform.org/parse-server/guide/#jobs">{'docs'}</a>
{" on how to do that."}
</p>
<JobScheduleReminder />
</div>
icon='cloud-happy' />
);
Expand Down
36 changes: 19 additions & 17 deletions src/dashboard/Data/Jobs/JobsForm.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
import DashboardView from 'dashboard/DashboardView.react';
import DateTimeInput from 'components/DateTimeInput/DateTimeInput.react';
import Dropdown from 'components/Dropdown/Dropdown.react';
import Field from 'components/Field/Field.react';
import Fieldset from 'components/Fieldset/Fieldset.react';
import FlowView from 'components/FlowView/FlowView.react';
import IntervalInput from 'components/IntervalInput/IntervalInput.react';
import Label from 'components/Label/Label.react';
import Option from 'components/Dropdown/Option.react';
import pluralize from 'lib/pluralize';
import React from 'react';
import ReleaseInfo from 'components/ReleaseInfo/ReleaseInfo';
import styles from 'dashboard/Data/Jobs/Jobs.scss';
import TextInput from 'components/TextInput/TextInput.react';
import TimeInput from 'components/TimeInput/TimeInput.react';
import Toggle from 'components/Toggle/Toggle.react';
import Toolbar from 'components/Toolbar/Toolbar.react';
import DashboardView from 'dashboard/DashboardView.react';
import DateTimeInput from 'components/DateTimeInput/DateTimeInput.react';
import Dropdown from 'components/Dropdown/Dropdown.react';
import Field from 'components/Field/Field.react';
import Fieldset from 'components/Fieldset/Fieldset.react';
import FlowView from 'components/FlowView/FlowView.react';
import IntervalInput from 'components/IntervalInput/IntervalInput.react';
import JobScheduleReminder from 'dashboard/Data/Jobs/JobScheduleReminder.react';
import Label from 'components/Label/Label.react';
import Option from 'components/Dropdown/Option.react';
import pluralize from 'lib/pluralize';
import React from 'react';
import ReleaseInfo from 'components/ReleaseInfo/ReleaseInfo';
import styles from 'dashboard/Data/Jobs/Jobs.scss';
import TextInput from 'components/TextInput/TextInput.react';
import TimeInput from 'components/TimeInput/TimeInput.react';
import Toggle from 'components/Toggle/Toggle.react';
import Toolbar from 'components/Toolbar/Toolbar.react';
import { hoursFrom, dateStringUTC } from 'lib/DateUtils';

export default class JobsForm extends DashboardView {
Expand Down Expand Up @@ -139,6 +140,7 @@ export default class JobsForm extends DashboardView {
}
return (
<div className={styles.jobsFlow}>
<JobScheduleReminder />
<Fieldset
legend='Pick a Job'
description='Choose a job from your cloud code, and specify the parameters to run it with'>
Expand Down
6 changes: 6 additions & 0 deletions src/dashboard/TableView.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ export default class TableView extends DashboardView {
return widths;
}

renderFooter() {
return null;
}

renderContent() {
let toolbar = this.renderToolbar();
let data = this.tableData();
let footer = this.renderFooter();
let content = null;
let headers = null;
if (data !== undefined) {
Expand All @@ -40,6 +45,7 @@ export default class TableView extends DashboardView {
{data.map((row) => this.renderRow(row))}
</tbody>
</table>
{footer}
</div>
);
headers = this.renderHeaders();
Expand Down