Skip to content

Commit

Permalink
feat: remove auth for tidb-dashboard-for-debugportal (#1392)
Browse files Browse the repository at this point in the history
  • Loading branch information
baurine authored Aug 22, 2022
1 parent 825e98a commit 6764ed5
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 893 deletions.
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

0 comments on commit 6764ed5

Please sign in to comment.