Skip to content

Commit 0ddd93b

Browse files
committed
added production setting for badge
1 parent 9ef4a58 commit 0ddd93b

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ If you want to manage multiple apps from the same dashboard, you can start the d
2727
"serverURL": "http://localhost:1337/parse",
2828
"appId": "myAppId",
2929
"masterKey": "myMasterKey",
30-
"appName": "MyApp"
30+
"appName": "MyApp",
3131
}
3232
]
3333
}
@@ -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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 2 additions & 1 deletion
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)