Skip to content

Commit

Permalink
Release v2023.06.07.1 [skip pd_pr] (#1532)
Browse files Browse the repository at this point in the history
* chore: support skip gen api

* fix: fix skip gen api

* chore: add netlify.toml

* update tidb-dashboard-for-clinic-op

* fix: fix tidb-dashboard-for-clinic-op

* chore: remove authorization header for tidb-dashboard-for-clinic-cloud

* chore: migrate to new prow reviewing (#1510)

* chore: migrate to new prow reviewing

- Backgroup: https://internals.tidb.io/t/topic/854
- Ref: ti-community-infra/configs#824

Signed-off-by: wuhuizuo <[email protected]>

* chore: update `OWNERS` file

---------

Signed-off-by: wuhuizuo <[email protected]>

* fix: make Resource Manager entry show correctly (#1531)

* update version to 2023.06.07.1

---------

Signed-off-by: wuhuizuo <[email protected]>
Co-authored-by: wuhuizuo <[email protected]>
  • Loading branch information
baurine and wuhuizuo authored Jun 7, 2023
1 parent 488a6d0 commit 661f075
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 14 deletions.
9 changes: 9 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# See the OWNERS docs at https://go.k8s.io/owners
approvers:
# diagnostic-maintainers:
- baurine
# diagnostic-committers:
- shhdgit
- zhongzc
reviewers:
# diagnostic-reviewers:
2 changes: 1 addition & 1 deletion release-version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This file specifies the TiDB Dashboard internal version, which will be printed in `--version`
# and UI. In release branch, changing this file will result in publishing a new version and tag.
7.1.0
2023.06.07.1
3 changes: 3 additions & 0 deletions ui/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# See the OWNERS docs at https://go.k8s.io/owners
labels:
- area/frontend
5 changes: 5 additions & 0 deletions ui/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[headers]]
# Define which paths this specific [[headers]] block will cover.
for = "/*"
[headers.values]
Access-Control-Allow-Origin = "*"
8 changes: 7 additions & 1 deletion ui/packages/clinic-client/gulpfile.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ task('tsc:build', shell.task('tsc'))
///////////////////////////

task('dev', series('swagger:gen', 'tsc:build'))
task('build', series('swagger:gen', 'tsc:build'))

// in netlify or vercel, we only build frontend, we don't need to generate api, else it will fail because we don't have go and java
if (process.env.SKIP_GEN_API === '1') {
task('build', shell.task('echo "skip gen api" & tsc'))
} else {
task('build', series('swagger:gen', 'tsc:build'))
}
7 changes: 6 additions & 1 deletion ui/packages/tidb-dashboard-client/gulpfile.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ if (process.env.WATCH_API === '1') {
task('dev', series('swagger:gen', 'tsc:build'))
}

task('build', series('swagger:gen', 'tsc:build'))
// in netlify or vercel, we only build frontend, we don't need to generate api, else it will fail because we don't have go and java
if (process.env.SKIP_GEN_API === '1') {
task('build', shell.task('echo "skip gen api" & tsc'))
} else {
task('build', series('swagger:gen', 'tsc:build'))
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ function initAxios(clientOptions: ClientOptions, clusterInfo: ClusterInfo) {
let headers = {}
// for clinic
headers['x-csrf-token'] = apiToken

// for tidb cloud
headers['authorization'] = `Bearer ${apiToken}`
// headers['authorization'] = `Bearer ${apiToken}`

if (provider) {
headers['x-provider'] = provider
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export type DsExtra = {
oid: string
cid: string
itemID: string
beginTime: string
endTime: string
beginTime: number
endTime: number
curQueryID: string
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,24 @@ import { SlowQueryApp, SlowQueryProvider } from '@pingcap/tidb-dashboard-lib'
import { ctx, DsExtra } from './context'

function getDsExtra(): DsExtra {
const searchParams = new URLSearchParams(window.location.search)
const oid = searchParams.get('oid') || ''
const cid = searchParams.get('cid') || ''
const itemID = searchParams.get('item_id') || ''

const urlHashParmasStr = window.location.hash.slice(
window.location.hash.indexOf('?')
)
const params = new URLSearchParams(urlHashParmasStr)
const beginTime = parseInt(params.get('from') || '0')
const endTime = parseInt(params.get('to') || '0')

return {
oid: params.get('oid')!,
cid: params.get('cid')!,
itemID: params.get('item_id')!,
beginTime: params.get('begin_time')!,
endTime: params.get('end_time')!,
oid,
cid,
itemID,
beginTime,
endTime,
curQueryID: ''
}
}
Expand Down Expand Up @@ -54,6 +62,5 @@ export default function () {
</SlowQueryProvider>
)
}

return <div>loading...</div>
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ function Sider({
)

const supportTopSQL = useIsFeatureSupport('topsql')
// const supportResourceManager = useIsFeatureSupport('resource_manager')
const supportResourceManager = true
const supportResourceManager = useIsFeatureSupport('resource_manager')
const menuItems = [
useAppMenuItem(registry, 'overview'),
useAppMenuItem(registry, 'cluster_info'),
Expand Down

0 comments on commit 661f075

Please sign in to comment.