Skip to content

Commit fd121bd

Browse files
authored
Don’t call unsupported endpoints in Parse Server (#660)
Also, this commit fixes 2 React warnings related to not setting a key in a few components (See Logs.react.js and Jobs.react.js)
1 parent ecded9b commit fd121bd

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default class Jobs extends TableView {
120120
renderRow(data) {
121121
if (this.props.params.section === 'all') {
122122
return (
123-
<tr key={data.objectId}>
123+
<tr key={data.jobName}>
124124
<td style={{width: '60%'}}>{data.jobName}</td>
125125
<td className={styles.buttonCell}>
126126
<RunNowButton job={data} width={'100px'} />

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ export default class JobsData extends React.Component {
1919
};
2020
}
2121

22+
// As parse-server doesn't support (yet?) these features, we are disabling
23+
// these calls in the meantime.
24+
25+
/*
2226
fetchRelease(app) {
2327
app.getLatestRelease().then(
2428
({ release }) => this.setState({ release }),
@@ -39,17 +43,18 @@ export default class JobsData extends React.Component {
3943
}, () => this.setState({ jobs: [], inUse: [] })
4044
);
4145
}
46+
*/
4247

4348
componentDidMount() {
44-
this.fetchJobs(this.context.currentApp);
45-
this.fetchRelease(this.context.currentApp);
49+
// this.fetchJobs(this.context.currentApp);
50+
// this.fetchRelease(this.context.currentApp);
4651
}
4752

4853
componentWillReceiveProps(props, context) {
4954
if (this.context !== context) {
5055
this.setState({ release: undefined, jobs: undefined, inUse: undefined });
51-
this.fetchJobs(context.currentApp);
52-
this.fetchRelease(context.currentApp);
56+
// this.fetchJobs(context.currentApp);
57+
// this.fetchRelease(context.currentApp);
5358
}
5459
}
5560

src/dashboard/Data/Logs/Logs.react.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ export default class Logs extends DashboardView {
3535

3636
componentDidMount() {
3737
this.fetchLogs(this.context.currentApp, this.props.params.type);
38-
this.fetchRelease(this.context.currentApp);
38+
// this.fetchRelease(this.context.currentApp);
3939
}
4040

4141
componentWillReceiveProps(nextProps, nextContext) {
4242
if (this.context !== nextContext) {
4343
this.fetchLogs(nextContext.currentApp, nextProps.params.type);
44-
this.fetchRelease(nextContext.currentApp);
44+
// this.fetchRelease(nextContext.currentApp);
4545
}
4646
}
4747

@@ -53,12 +53,17 @@ export default class Logs extends DashboardView {
5353
);
5454
}
5555

56+
// As parse-server doesn't support (yet?) versioning, we are disabling
57+
// this call in the meantime.
58+
59+
/*
5660
fetchRelease(app) {
5761
app.getLatestRelease().then(
5862
({ release }) => this.setState({ release }),
5963
() => this.setState({ release: null })
6064
);
6165
}
66+
*/
6267

6368
renderSidebar() {
6469
let current = this.props.params.type || '';
@@ -100,6 +105,7 @@ export default class Logs extends DashboardView {
100105
<div className={styles.content}>
101106
<LogView>
102107
{this.state.logs.map(({ message, timestamp }) => <LogViewEntry
108+
key={timestamp}
103109
text={message}
104110
timestamp={timestamp} />)}
105111
</LogView>

0 commit comments

Comments
 (0)