Skip to content

Change app mode to production to show green badge #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 2, 2016
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ You can also manage apps that on Parse.com from the same dashboard. In your conf
"masterKey": "myMasterKey",
"javascriptKey": "myJavascriptKey",
"restKey": "myRestKey",
"appName": "My Parse.Com App"
"appName": "My Parse.Com App",
"production": true
},
{
"serverURL": "http://localhost:1337/parse",
Expand All @@ -62,7 +63,7 @@ You can also manage apps that on Parse.com from the same dashboard. In your conf

## Other options

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.
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.

## Deploying the dashboard

Expand Down
2 changes: 2 additions & 0 deletions src/dashboard/Apps/AppsIndex.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import React from 'react';
import styles from 'dashboard/Apps/AppsIndex.scss';
import { center } from 'stylesheets/base.scss';
import { Link } from 'react-router';
import AppBadge from 'components/AppBadge/AppBadge.react';

function dash(value, content) {
if (value === undefined) {
Expand Down Expand Up @@ -81,6 +82,7 @@ let AppCard = ({
{versionMessage}
</div>
<CountsSection className={styles.glance} title='At a glance'>
<AppBadge production={app.production} />
<Metric number={dash(app.users, prettyNumber(app.users))} label='total users' />
<Metric number={dash(app.installations, prettyNumber(app.installations))} label='total installations' />
</CountsSection>
Expand Down
3 changes: 2 additions & 1 deletion src/lib/ParseApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default class ParseApp {
apiKey,
serverURL,
serverInfo,
production,
...params,
}) {
this.name = appName;
Expand All @@ -54,7 +55,7 @@ export default class ParseApp {
this.windowsKey = windowsKey;
this.webhookKey = webhookKey;
this.fileKey = apiKey;
this.production = !!params['is_production?'];
this.production = production;
this.serverURL = serverURL;
this.serverInfo = serverInfo;

Expand Down