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

feat: remove auth for tidb-dashboard-for-debugportal #1392

Merged
merged 3 commits into from
Aug 22, 2022
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 ui/packages/tidb-dashboard-for-debugportal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pingcap/tidb-dashboard-for-debugportal",
"version": "0.0.5",
"version": "0.0.6",
"main": "dist/dashboardApp.js",
"module": "dist/dashboardApp.js",
"files": [
Expand Down
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import client, {
CodeShareRequest,
MetricsPutCustomPromAddressRequest
} from '~/client'
import auth from '~/uilts/auth'

class DataSource implements IUserProfileDataSource {
userGetSignOutInfo(redirectUrl?: string, options?: ReqConfig) {
Expand Down Expand Up @@ -55,9 +54,7 @@ class DataSource implements IUserProfileDataSource {
}

class EventHandler implements IUserProfileEvent {
logOut(): void {
auth.clearAuthToken()
}
logOut(): void {}
}

export const ctx: IUserProfileContext = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ import React from 'react'
import i18next from 'i18next'
import axios, { AxiosInstance } from 'axios'
import { message, Modal, notification } from 'antd'
import * as singleSpa from 'single-spa'

import { routing, i18n } from '@pingcap/tidb-dashboard-lib'
import {
Configuration,
DefaultApi as DashboardApi
} from '@pingcap/tidb-dashboard-client'

import auth from '~/uilts/auth'

import translations from './translations'

export * from '@pingcap/tidb-dashboard-client'
Expand Down Expand Up @@ -69,8 +66,6 @@ function applyErrorHandlerInterceptor(instance: AxiosInstance) {
if (!routing.isLocationMatch('/') && !routing.isSignInPage()) {
message.error({ content, key: errCode })
}
auth.clearAuthToken()
singleSpa.navigateToUrl('#' + routing.signInRoute)
err.handled = true
} else if (handleError === 'default') {
if (method === 'get') {
Expand Down

This file was deleted.

Loading