diff --git a/package-lock.json b/package-lock.json index ce12ffb7c5..8e7a9c1762 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2377,7 +2377,6 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -3659,8 +3658,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -3681,14 +3679,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3703,20 +3699,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -3833,8 +3826,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -3846,7 +3838,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3861,7 +3852,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3869,14 +3859,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3895,7 +3883,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -3976,8 +3963,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -3989,7 +3975,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -4075,8 +4060,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -4112,7 +4096,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4132,7 +4115,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4176,14 +4158,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -6525,7 +6505,6 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -6546,7 +6525,6 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -6746,8 +6724,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -6867,8 +6844,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", - "dev": true, - "optional": true + "dev": true } } }, @@ -9515,8 +9491,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "optional": true + "dev": true }, "loose-envify": { "version": "1.3.1", diff --git a/src/components/Sidebar/AppsMenu.react.js b/src/components/Sidebar/AppsMenu.react.js index 740ec8a25e..c8b422d19e 100644 --- a/src/components/Sidebar/AppsMenu.react.js +++ b/src/components/Sidebar/AppsMenu.react.js @@ -5,12 +5,13 @@ * This source code is licensed under the license found in the LICENSE file in * the root directory of this source tree. */ -import AppBadge from 'components/AppBadge/AppBadge.react'; -import html from 'lib/htmlString'; -import { Link } from 'react-router-dom'; -import React from 'react'; -import styles from 'components/Sidebar/Sidebar.scss'; -import { unselectable } from 'stylesheets/base.scss'; +import AppBadge from 'components/AppBadge/AppBadge.react'; +import html from 'lib/htmlString'; +import { Link } from 'react-router-dom'; +import React from 'react'; +import styles from 'components/Sidebar/Sidebar.scss'; +import { unselectable } from 'stylesheets/base.scss'; +import { applyMountPath } from "lib/path"; let AppsMenu = ({ apps, current, height, onSelect }) => (
@@ -23,7 +24,7 @@ let AppsMenu = ({ apps, current, height, onSelect }) => ( return null; } return ( - + {app.name} diff --git a/src/components/Sidebar/AppsSelector.react.js b/src/components/Sidebar/AppsSelector.react.js index f1805443b9..73419310f4 100644 --- a/src/components/Sidebar/AppsSelector.react.js +++ b/src/components/Sidebar/AppsSelector.react.js @@ -5,15 +5,16 @@ * This source code is licensed under the license found in the LICENSE file in * the root directory of this source tree. */ -import PropTypes from 'lib/PropTypes'; -import AppsMenu from 'components/Sidebar/AppsMenu.react'; -import Popover from 'components/Popover/Popover.react'; -import history from 'dashboard/history'; -import ParseApp from 'lib/ParseApp'; -import Position from 'lib/Position'; -import React from 'react'; -import ReactDOM from 'react-dom'; -import styles from 'components/Sidebar/Sidebar.scss'; +import PropTypes from 'lib/PropTypes'; +import AppsMenu from 'components/Sidebar/AppsMenu.react'; +import Popover from 'components/Popover/Popover.react'; +import history from 'dashboard/history'; +import ParseApp from 'lib/ParseApp'; +import Position from 'lib/Position'; +import React from 'react'; +import ReactDOM from 'react-dom'; +import styles from 'components/Sidebar/Sidebar.scss'; +import { applyMountPath } from "lib/path"; export default class AppsSelector extends React.Component { constructor() { @@ -58,7 +59,7 @@ export default class AppsSelector extends React.Component { if (sections[0] === '') { sections.shift(); } - history.push(`/apps/${value}/${sections[2]}`); + history.push(applyMountPath(`apps/${value}/${sections[2]}`)); } }); } diff --git a/src/components/Sidebar/FooterMenu.react.js b/src/components/Sidebar/FooterMenu.react.js index 2852c9e44a..075a17c651 100644 --- a/src/components/Sidebar/FooterMenu.react.js +++ b/src/components/Sidebar/FooterMenu.react.js @@ -5,13 +5,12 @@ * This source code is licensed under the license found in the LICENSE file in * the root directory of this source tree. */ -import Icon from 'components/Icon/Icon.react'; -import Popover from 'components/Popover/Popover.react'; -import Position from 'lib/Position'; -import React from 'react'; -import styles from 'components/Sidebar/Sidebar.scss'; - -let mountPath = window.PARSE_DASHBOARD_PATH; +import Icon from 'components/Icon/Icon.react'; +import Popover from 'components/Popover/Popover.react'; +import Position from 'lib/Position'; +import React from 'react'; +import styles from 'components/Sidebar/Sidebar.scss'; +import { applyMountPath } from 'lib/path'; export default class FooterMenu extends React.Component { constructor() { @@ -41,7 +40,7 @@ export default class FooterMenu extends React.Component { position={this.state.position} onExternalClick={() => this.setState({ show: false })}>
- Log Out 👋 + Log Out 👋 Server Guide 📚 Code-level Questions Server Questions diff --git a/src/components/Sidebar/SidebarHeader.react.js b/src/components/Sidebar/SidebarHeader.react.js index 67de9c4cad..8d953f76f7 100644 --- a/src/components/Sidebar/SidebarHeader.react.js +++ b/src/components/Sidebar/SidebarHeader.react.js @@ -5,10 +5,11 @@ * This source code is licensed under the license found in the LICENSE file in * the root directory of this source tree. */ -import Icon from 'components/Icon/Icon.react'; -import { Link } from 'react-router-dom'; -import React from 'react'; -import styles from 'components/Sidebar/Sidebar.scss'; +import Icon from 'components/Icon/Icon.react'; +import { Link } from 'react-router-dom'; +import React from 'react'; +import styles from 'components/Sidebar/Sidebar.scss'; +import { mountPath, applyMountPath } from 'lib/path'; // get the package.json environment variable const version = process.env.version; @@ -18,7 +19,6 @@ export default class SidebarHeader extends React.Component { this.state = { }; } componentWillMount() { - let mountPath = window.PARSE_DASHBOARD_PATH; fetch(mountPath).then(response => { this.setState({ dashboardUser: response.headers.get('username') }); }); @@ -26,10 +26,10 @@ export default class SidebarHeader extends React.Component { render() { return (
- + - +
Parse Dashboard {version} diff --git a/src/dashboard/AppData.react.js b/src/dashboard/AppData.react.js index 997c292181..c803a044d6 100644 --- a/src/dashboard/AppData.react.js +++ b/src/dashboard/AppData.react.js @@ -5,13 +5,14 @@ * This source code is licensed under the license found in the LICENSE file in * the root directory of this source tree. */ -import React from 'react'; -import PropTypes from 'lib/PropTypes'; -import AppSelector from 'dashboard/AppSelector.react'; -import AppsManager from 'lib/AppsManager'; -import history from 'dashboard/history'; -import ParseApp from 'lib/ParseApp'; -import createClass from 'create-react-class'; +import React from 'react'; +import PropTypes from 'lib/PropTypes'; +import AppSelector from 'dashboard/AppSelector.react'; +import AppsManager from 'lib/AppsManager'; +import history from 'dashboard/history'; +import ParseApp from 'lib/ParseApp'; +import createClass from 'create-react-class'; +import { applyMountPath } from 'lib/path'; let AppData = createClass({ childContextTypes: { @@ -27,7 +28,7 @@ let AppData = createClass({ }, generatePath(path) { - return '/apps/' + this.props.params.appId + '/' + path; + return applyMountPath('apps/' + this.props.params.appId + '/' + path); }, render() { @@ -39,7 +40,7 @@ let AppData = createClass({ if (current) { current.setParseKeys(); } else { - history.replace('/apps'); + history.replace(applyMountPath('apps')); return
; } return ( diff --git a/src/dashboard/AppSelector.react.js b/src/dashboard/AppSelector.react.js index d4d3fe7a84..b5c6a87e1b 100644 --- a/src/dashboard/AppSelector.react.js +++ b/src/dashboard/AppSelector.react.js @@ -5,14 +5,15 @@ * This source code is licensed under the license found in the LICENSE file in * the root directory of this source tree. */ -import AppsManager from 'lib/AppsManager'; -import Dropdown from 'components/Dropdown/Dropdown.react'; -import Field from 'components/Field/Field.react'; -import history from 'dashboard/history'; -import Label from 'components/Label/Label.react'; -import Modal from 'components/Modal/Modal.react'; -import Option from 'components/Dropdown/Option.react'; -import React from 'react'; +import AppsManager from 'lib/AppsManager'; +import Dropdown from 'components/Dropdown/Dropdown.react'; +import Field from 'components/Field/Field.react'; +import history from 'dashboard/history'; +import Label from 'components/Label/Label.react'; +import Modal from 'components/Modal/Modal.react'; +import Option from 'components/Dropdown/Option.react'; +import React from 'react'; +import { applyMountPath } from 'lib/path' export default class AppSelector extends React.Component { constructor(props, context) { @@ -30,7 +31,7 @@ export default class AppSelector extends React.Component { } handleCancel() { - history.push('/apps'); + history.push(applyMountPath('apps')); } render() { diff --git a/src/dashboard/Apps/AppsIndex.react.js b/src/dashboard/Apps/AppsIndex.react.js index 164151d96a..6b3f5cc930 100644 --- a/src/dashboard/Apps/AppsIndex.react.js +++ b/src/dashboard/Apps/AppsIndex.react.js @@ -5,18 +5,19 @@ * This source code is licensed under the license found in the LICENSE file in * the root directory of this source tree. */ -import AppsManager from 'lib/AppsManager'; -import FlowFooter from 'components/FlowFooter/FlowFooter.react'; -import history from 'dashboard/history'; -import html from 'lib/htmlString'; -import Icon from 'components/Icon/Icon.react'; -import joinWithFinal from 'lib/joinWithFinal'; -import LiveReload from 'components/LiveReload/LiveReload.react'; -import prettyNumber from 'lib/prettyNumber'; -import React from 'react'; -import styles from 'dashboard/Apps/AppsIndex.scss'; -import { center } from 'stylesheets/base.scss'; -import AppBadge from 'components/AppBadge/AppBadge.react'; +import AppsManager from 'lib/AppsManager'; +import FlowFooter from 'components/FlowFooter/FlowFooter.react'; +import history from 'dashboard/history'; +import html from 'lib/htmlString'; +import Icon from 'components/Icon/Icon.react'; +import joinWithFinal from 'lib/joinWithFinal'; +import LiveReload from 'components/LiveReload/LiveReload.react'; +import prettyNumber from 'lib/prettyNumber'; +import React from 'react'; +import styles from 'dashboard/Apps/AppsIndex.scss'; +import { center } from 'stylesheets/base.scss'; +import AppBadge from 'components/AppBadge/AppBadge.react'; +import { applyMountPath } from 'lib/path'; function dash(value, content) { if (value === undefined) { @@ -36,7 +37,7 @@ let CloningNote = ({ app, clone_status, clone_progress }) => { } let progress = { let currentAppProgress = data.find(({ appId }) => appId === app.applicationId); let progressStr = currentAppProgress ? currentAppProgress.progress.toString() : '0'; @@ -64,7 +65,7 @@ let AppCard = ({ app, icon, }) => { - let canBrowse = app.serverInfo.error ? null : () => history.push(html`/apps/${app.slug}/browser`); + let canBrowse = app.serverInfo.error ? null : () => history.push(applyMountPath(`apps/${app.slug}/browser`)); let versionMessage = app.serverInfo.error ?
Server not reachable: {app.serverInfo.error.toString()}
:
@@ -98,7 +99,7 @@ export default class AppsIndex extends React.Component { componentWillMount() { if (AppsManager.apps().length === 1) { const [app] = AppsManager.apps(); - history.push(`/apps/${app.slug}/browser`); + history.push(applyMountPath(`apps/${app.slug}/browser`)); return; } document.body.addEventListener('keydown', this.focusField); diff --git a/src/dashboard/Dashboard.js b/src/dashboard/Dashboard.js index e48e93cd1a..d22064bad5 100644 --- a/src/dashboard/Dashboard.js +++ b/src/dashboard/Dashboard.js @@ -5,48 +5,49 @@ * This source code is licensed under the license found in the LICENSE file in * the root directory of this source tree. */ -import AccountOverview from './Account/AccountOverview.react'; -import AccountView from './AccountView.react'; -import AnalyticsOverview from './Analytics/Overview/Overview.react'; -import ApiConsole from './Data/ApiConsole/ApiConsole.react'; -import AppData from './AppData.react'; -import AppsIndex from './Apps/AppsIndex.react'; -import AppsManager from 'lib/AppsManager'; -import Browser from './Data/Browser/Browser.react'; -import CloudCode from './Data/CloudCode/CloudCode.react'; -import Config from './Data/Config/Config.react'; -import Explorer from './Analytics/Explorer/Explorer.react'; -import FourOhFour from 'components/FourOhFour/FourOhFour.react'; -import GeneralSettings from './Settings/GeneralSettings.react'; -import history from 'dashboard/history'; -import HostingSettings from './Settings/HostingSettings.react'; -import Icon from 'components/Icon/Icon.react'; -import JobEdit from 'dashboard/Data/Jobs/JobEdit.react'; -import Jobs from './Data/Jobs/Jobs.react'; -import JobsData from 'dashboard/Data/Jobs/JobsData.react'; -import Loader from 'components/Loader/Loader.react'; -import Logs from './Data/Logs/Logs.react'; -import Migration from './Data/Migration/Migration.react'; -import ParseApp from 'lib/ParseApp'; -import Performance from './Analytics/Performance/Performance.react'; -import PushAudiencesIndex from './Push/PushAudiencesIndex.react'; -import PushDetails from './Push/PushDetails.react'; -import PushIndex from './Push/PushIndex.react'; -import PushNew from './Push/PushNew.react'; -import PushSettings from './Settings/PushSettings.react'; -import React from 'react'; -import Retention from './Analytics/Retention/Retention.react'; -import SchemaOverview from './Data/Browser/SchemaOverview.react'; -import SecuritySettings from './Settings/SecuritySettings.react'; -import SettingsData from './Settings/SettingsData.react'; -import SlowQueries from './Analytics/SlowQueries/SlowQueries.react'; -import styles from 'dashboard/Apps/AppsIndex.scss'; -import UsersSettings from './Settings/UsersSettings.react'; -import Webhooks from './Data/Webhooks/Webhooks.react'; -import { AsyncStatus } from 'lib/Constants'; -import { center } from 'stylesheets/base.scss'; -import { get } from 'lib/AJAX'; -import { setBasePath } from 'lib/AJAX'; +import AccountOverview from './Account/AccountOverview.react'; +import AccountView from './AccountView.react'; +import AnalyticsOverview from './Analytics/Overview/Overview.react'; +import ApiConsole from './Data/ApiConsole/ApiConsole.react'; +import AppData from './AppData.react'; +import AppsIndex from './Apps/AppsIndex.react'; +import AppsManager from 'lib/AppsManager'; +import Browser from './Data/Browser/Browser.react'; +import CloudCode from './Data/CloudCode/CloudCode.react'; +import Config from './Data/Config/Config.react'; +import Explorer from './Analytics/Explorer/Explorer.react'; +import FourOhFour from 'components/FourOhFour/FourOhFour.react'; +import GeneralSettings from './Settings/GeneralSettings.react'; +import history from 'dashboard/history'; +import HostingSettings from './Settings/HostingSettings.react'; +import Icon from 'components/Icon/Icon.react'; +import JobEdit from 'dashboard/Data/Jobs/JobEdit.react'; +import Jobs from './Data/Jobs/Jobs.react'; +import JobsData from 'dashboard/Data/Jobs/JobsData.react'; +import Loader from 'components/Loader/Loader.react'; +import Logs from './Data/Logs/Logs.react'; +import Migration from './Data/Migration/Migration.react'; +import ParseApp from 'lib/ParseApp'; +import Performance from './Analytics/Performance/Performance.react'; +import PushAudiencesIndex from './Push/PushAudiencesIndex.react'; +import PushDetails from './Push/PushDetails.react'; +import PushIndex from './Push/PushIndex.react'; +import PushNew from './Push/PushNew.react'; +import PushSettings from './Settings/PushSettings.react'; +import React from 'react'; +import Retention from './Analytics/Retention/Retention.react'; +import SchemaOverview from './Data/Browser/SchemaOverview.react'; +import SecuritySettings from './Settings/SecuritySettings.react'; +import SettingsData from './Settings/SettingsData.react'; +import SlowQueries from './Analytics/SlowQueries/SlowQueries.react'; +import styles from 'dashboard/Apps/AppsIndex.scss'; +import UsersSettings from './Settings/UsersSettings.react'; +import Webhooks from './Data/Webhooks/Webhooks.react'; +import { AsyncStatus } from 'lib/Constants'; +import { center } from 'stylesheets/base.scss'; +import { get } from 'lib/AJAX'; +import { setBasePath } from 'lib/AJAX'; +import { mountPath, applyMountPath } from 'lib/path'; import { Router, Switch, @@ -173,6 +174,7 @@ export default class Dashboard extends React.Component { } render() { + if (this.state.configLoadingState === AsyncStatus.PROGRESS) { return
; } @@ -205,7 +207,7 @@ export default class Dashboard extends React.Component { - ) + ); const JobsRoute = (props) => ( @@ -224,14 +226,14 @@ export default class Dashboard extends React.Component { )} /> - + - ) + ); const AnalyticsRoute = ({ match }) => ( - + @@ -262,15 +264,15 @@ export default class Dashboard extends React.Component { ( )} /> - + /> - - + + ( @@ -282,9 +284,9 @@ export default class Dashboard extends React.Component { )} /> {/* Unused routes... */} - + - + @@ -293,9 +295,9 @@ export default class Dashboard extends React.Component { const Index = () => (
- - - + + +
) @@ -306,10 +308,10 @@ export default class Dashboard extends React.Component { Parse Dashboard - - - - + + + +
diff --git a/src/dashboard/DashboardView.react.js b/src/dashboard/DashboardView.react.js index 849d823a1b..f4e7d929ff 100644 --- a/src/dashboard/DashboardView.react.js +++ b/src/dashboard/DashboardView.react.js @@ -5,12 +5,13 @@ * This source code is licensed under the license found in the LICENSE file in * the root directory of this source tree. */ -import PropTypes from 'lib/PropTypes'; -import ParseApp from 'lib/ParseApp'; -import React from 'react'; -import Sidebar from 'components/Sidebar/Sidebar.react'; -import SidebarToggle from 'components/Sidebar/SidebarToggle.react'; -import styles from 'dashboard/Dashboard.scss'; +import PropTypes from 'lib/PropTypes'; +import ParseApp from 'lib/ParseApp'; +import React from 'react'; +import Sidebar from 'components/Sidebar/Sidebar.react'; +import SidebarToggle from 'components/Sidebar/SidebarToggle.react'; +import styles from 'dashboard/Dashboard.scss'; +import { applyMountPath } from 'lib/path'; export default class DashboardView extends React.Component { @@ -241,7 +242,7 @@ export default class DashboardView extends React.Component { appSelector={true} section={this.section} subsection={this.subsection} - prefix={'/apps/' + appSlug} + prefix={applyMountPath('apps/' + appSlug)} action={this.action} primaryBackgroundColor={this.context.currentApp.primaryBackgroundColor} secondaryBackgroundColor={this.context.currentApp.secondaryBackgroundColor} diff --git a/src/dashboard/Push/PushDetails.react.js b/src/dashboard/Push/PushDetails.react.js index 2c69bed8c6..59238483c2 100644 --- a/src/dashboard/Push/PushDetails.react.js +++ b/src/dashboard/Push/PushDetails.react.js @@ -32,6 +32,7 @@ import Toolbar from 'components/Toolbar/Toolbar.react'; import { Directions } from 'lib/Constants'; import { Link } from 'react-router-dom'; import { tableInfoBuilder } from 'lib/PushUtils'; +import { applyMountPath } from "lib/path"; const EXP_STATS_URL = 'http://docs.parseplatform.org/ios/guide/#push-experiments'; @@ -178,7 +179,7 @@ let getExperimentPartial = (pushDetails, type, isMessageType, style) => { } let getPushDetailUrl = (context, pushId) => { - return `/apps/${context.currentApp.slug}/push/${pushId}`; + return applyMountPath(`apps/${context.currentApp.slug}/push/${pushId}`); } let formatAnalyticsData = (data) => { diff --git a/src/dashboard/Settings/GeneralSettings.react.js b/src/dashboard/Settings/GeneralSettings.react.js index 17ecccac9a..300257fcb5 100644 --- a/src/dashboard/Settings/GeneralSettings.react.js +++ b/src/dashboard/Settings/GeneralSettings.react.js @@ -38,6 +38,7 @@ import unique from 'lib/unique'; import validateAndSubmitConnectionString from 'lib/validateAndSubmitConnectionString'; import { cost, features } from 'dashboard/Settings/GeneralSettings.scss'; import { Link } from 'react-router-dom'; +import { applyMountPath } from "lib/path"; const DEFAULT_SETTINGS_LABEL_WIDTH = 62; @@ -225,7 +226,7 @@ let ManageAppFields = ({ description='View your migration progress.' />} input={ history.push(`/apps/${appSlug}/migration`)} + onClick={() => history.push(applyMountPath(`apps/${appSlug}/migration`))} value='View progress' />} /> } else { migrateAppField = [ -
{cloneAppMessage} Check out the progress on your apps page!
+
{cloneAppMessage} Check out the progress on your apps page!
: null} {!isCollaborator ? history.push(`/apps/${this.context.currentApp.slug}/migration`)} + onSuccess={() => history.push(applyMountPath(`apps/${this.context.currentApp.slug}/migration`))} clearFields={() => this.setState({ migrationMongoURL: '', migrationWarnings: [], @@ -535,7 +536,7 @@ export default class GeneralSettings extends DashboardView { inProgressText={'Deleting\u2026'} enabled={this.state.password.length > 0} onSubmit={() => AppsManager.deleteApp(this.context.currentApp.slug, this.state.password)} - onSuccess={() => history.push('/apps')} + onSuccess={() => history.push(applyMountPath('apps'))} onClose={() => this.setState({showDeleteAppModal: false})} clearFields={() => this.setState({password: ''})}> {passwordField} diff --git a/src/dashboard/Settings/HostingSettings.react.js b/src/dashboard/Settings/HostingSettings.react.js index 546756bf54..6f91b26380 100644 --- a/src/dashboard/Settings/HostingSettings.react.js +++ b/src/dashboard/Settings/HostingSettings.react.js @@ -20,6 +20,7 @@ import TextInput from 'components/TextInput/TextInput.react'; import Toggle from 'components/Toggle/Toggle.react'; import Toolbar from 'components/Toolbar/Toolbar.react'; import unique from 'lib/unique'; +import { applyMountPath } from 'lib/path'; export default class HostingSettings extends DashboardView { constructor() { @@ -220,7 +221,7 @@ export default class HostingSettings extends DashboardView { label={