Skip to content

Commit

Permalink
update the related docs and code after changing the default fe port t…
Browse files Browse the repository at this point in the history
…o 3001 (#668)
  • Loading branch information
baurine authored Jul 2, 2020
1 parent efac307 commit 4a764c1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The followings are required for developing TiDB Dashboard:

1. That's it! You can access TiDB Dashboard now:
TiDB Dashboard UI: http://127.0.0.1:3000
TiDB Dashboard UI: http://127.0.0.1:3001
Swagger UI for TiDB Dashboard APIs: http://localhost:12333/dashboard/api/swagger
Expand Down
8 changes: 4 additions & 4 deletions ui/src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const dashboardApiPrefix =

// The diagnose report will be served via WebpackDevServer.

// In debug mode, frontend host is localhost:3000, while the backend is 127.0.0.1:12333
// In debug mode, frontend host is localhost:3001, while the backend is 127.0.0.1:12333
// In productio mode, frontend and backend host is the same
module.exports = function (app) {
// Proxy the `data.js` trick to the backend server.
// Proxy http://localhost:3000/dashboard/api/diagnose/reports/*/data.js to
// Proxy http://localhost:3001/dashboard/api/diagnose/reports/*/data.js to
// http://http://127.0.0.1:12333/dashboard/api/diagnose/reports/*/data.js
app.use(
'/',
Expand All @@ -21,8 +21,8 @@ module.exports = function (app) {
)

// Rewrite the webpage to our static HTML.
// Rewrite http://localhost:3000/dashboard/api/diagnose/reports/*/detail
// to http://localhost:3000/dashboard/diagnoseReport.html
// Rewrite http://localhost:3001/dashboard/api/diagnose/reports/*/detail
// to http://localhost:3001/dashboard/diagnoseReport.html
app.use('/dashboard/api/diagnose/reports/:id/detail', function (req, res) {
req.url = paths.publicUrlOrPath + 'diagnoseReport.html'
app.handle(req, res)
Expand Down
4 changes: 2 additions & 2 deletions ui/tests/config-portal-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
function changeApp(app) {
console.log('app:', app)
const dashboard = document.getElementById('dashboard')
dashboard.src = `http://localhost:3000/dashboard/#/${app}`
dashboard.src = `http://localhost:3001/dashboard/#/${app}`
}

window.onload = function () {
Expand Down Expand Up @@ -49,7 +49,7 @@ <h1>iframe test</h1>
id="dashboard"
width="100%"
height="100%"
src="http://localhost:3000/dashboard/#/portal"
src="http://localhost:3001/dashboard/#/portal"
></iframe>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ui/tests/e2e/test_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export let SERVER_URL = `${
process.env.SERVER_URL || 'http://localhost:3000/dashboard'
process.env.SERVER_URL || 'http://localhost:3001/dashboard'
}#`
export const LOGIN_URL = SERVER_URL + '/signin'
export const OVERVIEW_URL = SERVER_URL + '/overview'
Expand Down

0 comments on commit 4a764c1

Please sign in to comment.