Skip to content

Commit fb0726b

Browse files
committed
Merge pull request #219 from dcdspace/master
Change app mode to production to show green badge
2 parents 9ef4a58 + 829cc2a commit fb0726b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ You can also manage apps that on Parse.com from the same dashboard. In your conf
4444
"masterKey": "myMasterKey",
4545
"javascriptKey": "myJavascriptKey",
4646
"restKey": "myRestKey",
47-
"appName": "My Parse.Com App"
47+
"appName": "My Parse.Com App",
48+
"production": true
4849
},
4950
{
5051
"serverURL": "http://localhost:1337/parse",
@@ -62,7 +63,7 @@ You can also manage apps that on Parse.com from the same dashboard. In your conf
6263

6364
## Other options
6465

65-
You can set `appNameForURL` in the config file for each app to control the url of your app within the dashboard. This can make it easier to use bookmarks or share links on your dashboard.
66+
You can set `appNameForURL` in the config file for each app to control the url of your app within the dashboard. This can make it easier to use bookmarks or share links on your dashboard. To change the app to production, simply set `production` to `true` in your config file. Defaults to false if not specified.
6667

6768
## Deploying the dashboard
6869

src/dashboard/Apps/AppsIndex.react.js

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import React from 'react';
2020
import styles from 'dashboard/Apps/AppsIndex.scss';
2121
import { center } from 'stylesheets/base.scss';
2222
import { Link } from 'react-router';
23+
import AppBadge from 'components/AppBadge/AppBadge.react';
2324

2425
function dash(value, content) {
2526
if (value === undefined) {
@@ -81,6 +82,7 @@ let AppCard = ({
8182
{versionMessage}
8283
</div>
8384
<CountsSection className={styles.glance} title='At a glance'>
85+
<AppBadge production={app.production} />
8486
<Metric number={dash(app.users, prettyNumber(app.users))} label='total users' />
8587
<Metric number={dash(app.installations, prettyNumber(app.installations))} label='total installations' />
8688
</CountsSection>

src/lib/ParseApp.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export default class ParseApp {
3737
apiKey,
3838
serverURL,
3939
serverInfo,
40+
production,
4041
...params,
4142
}) {
4243
this.name = appName;
@@ -54,7 +55,7 @@ export default class ParseApp {
5455
this.windowsKey = windowsKey;
5556
this.webhookKey = webhookKey;
5657
this.fileKey = apiKey;
57-
this.production = !!params['is_production?'];
58+
this.production = production;
5859
this.serverURL = serverURL;
5960
this.serverInfo = serverInfo;
6061

0 commit comments

Comments
 (0)