Skip to content
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

update the related docs and code after changing the fe port #668

Merged
merged 1 commit into from
Jul 2, 2020
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
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