Skip to content

Commit

Permalink
ui: bump dependencies (pingcap#1066)
Browse files Browse the repository at this point in the history
  • Loading branch information
breezewish authored and baurine committed Dec 30, 2021
1 parent 50daa9e commit 819a45a
Show file tree
Hide file tree
Showing 6 changed files with 7,552 additions and 7,503 deletions.
15 changes: 0 additions & 15 deletions ui/config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,6 @@ function isBuildAsDevServer() {
return process.env.NODE_ENV !== 'production'
}

const enableEslintIgnore = () => (config) => {
const eslintRule = config.module.rules.filter(
(r) =>
r.use && r.use.some((u) => u.options && u.options.useEslintrc !== void 0)
)[0]
const options = eslintRule.use[0].options
options.ignore = true
options.ignorePattern = 'lib/client/api/*.ts'
options.baseConfig.rules = {
'jsx-a11y/anchor-is-valid': 'off',
}
return config
}

const disableMinimize = () => (config) => {
config.optimization.minimize = false
config.optimization.splitChunks = false
Expand Down Expand Up @@ -187,7 +173,6 @@ module.exports = override(
}),
addAlias(),
addDecoratorsLegacy(),
enableEslintIgnore(),
addYaml,
addWebpackBundleSize(),
addWebpackPlugin(new WebpackBar()),
Expand Down
24 changes: 12 additions & 12 deletions ui/diagnoseReportApp/components/DiagnosisTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function DiagnosisRow({ row }: { row: TableRowDef }) {
return (
<>
<tr>
{(row.Values || []).map((val, valIdx) => (
{(row.values || []).map((val, valIdx) => (
<td key={valIdx}>
{t(`diagnosis.tables.table.name.${val}`, val)}
{valIdx === 0 &&
Expand All @@ -36,7 +36,7 @@ function DiagnosisRow({ row }: { row: TableRowDef }) {
</div>
</div>
)}
{valIdx === 0 && (row.SubValues || []).length > 0 && (
{valIdx === 0 && (row.sub_values || []).length > 0 && (
<>
&nbsp;&nbsp;&nbsp;
<span
Expand All @@ -50,7 +50,7 @@ function DiagnosisRow({ row }: { row: TableRowDef }) {
</td>
))}
</tr>
{(row.SubValues || []).map((subVals, subValsIdx) => (
{(row.sub_values || []).map((subVals, subValsIdx) => (
<tr
key={subValsIdx}
className={`subvalues ${!internalExpand && 'fold'}`}
Expand All @@ -72,35 +72,35 @@ type Props = {
}

export default function DiagnosisTable({ diagnosis }: Props) {
const { Category, Title, Column, Rows } = diagnosis
const { category, title, column, rows } = diagnosis
const { t } = useTranslation()

return (
<div className="report-container" id={Title}>
{(Category || []).map((c, idx) => (
<div className="report-container" id={title}>
{(category || []).map((c, idx) => (
<h1 className={`title is-size-${idx + 2}`} key={idx}>
{c && t(`diagnosis.tables.category.${c}`)}
</h1>
))}
<h3 className="is-size-4">{t(`diagnosis.tables.title.${Title}`)}</h3>
<p>
<ReactMarkdown source={t(`diagnosis.tables.comment.${Title}`, '')} />
</p>
<h3 className="is-size-4">{t(`diagnosis.tables.title.${title}`)}</h3>
<ReactMarkdown>
{t(`diagnosis.tables.comment.${title}`, '')}
</ReactMarkdown>
<table
className="table is-bordered is-hoverable is-narrow is-fullwidth"
style={{ position: 'relative' }}
>
<thead>
<tr>
{Column.map((col, colIdx) => (
{column.map((col, colIdx) => (
<th className="table-header-row" key={colIdx}>
{col}
</th>
))}
</tr>
</thead>
<tbody>
{(Rows || []).map((row, rowIdx) => (
{(rows || []).map((row, rowIdx) => (
<DiagnosisRow key={rowIdx} row={row} />
))}
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion ui/lib/apps/UserProfile/Form.Session.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function ShareSessionButton() {
onCancel={handleClose}
width={600}
>
<ReactMarkdown source={t('user_profile.share_session.text')} />
<ReactMarkdown>{t('user_profile.share_session.text')}</ReactMarkdown>
<Alert
message={t('user_profile.share_session.warning')}
type="warning"
Expand Down
19 changes: 11 additions & 8 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ace-builds": "^1.4.12",
"ahooks": "^2.9.2",
"antd": "~4.8.5",
"axios": "^0.21.1",
"axios": "^0.21.4",
"bulma": "^0.9.0",
"classnames": "^2.2.6",
"d3": "^5.16.0",
Expand All @@ -31,14 +31,15 @@
"moize": "^5.4.7",
"nprogress": "^0.2.0",
"office-ui-fabric-react": "^7.123.10",
"pullstate": "^1.22.1",
"pullstate": "^1.23.0",
"rc-animate": "^3.1.0",
"react": "^16.13.1",
"react-ace": "^9.1.1",
"react-copy-to-clipboard": "^5.0.2",
"react-dom": "^16.13.1",
"react-highlight-words": "^0.16.0",
"react-i18next": "^11.7.0",
"react-markdown": "^7.1.0",
"react-router": "^6.0.0-alpha.3",
"react-router-dom": "^6.0.0-alpha.3",
"react-split": "^2.0.9",
Expand Down Expand Up @@ -79,11 +80,11 @@
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.10.5",
"@openapitools/openapi-generator-cli": "^1.0.15-4.3.1",
"@storybook/addon-actions": "^6.0.0-rc.3",
"@storybook/addon-links": "^6.0.0-rc.3",
"@storybook/addons": "^6.0.0-rc.3",
"@storybook/addon-actions": "^6.3.12",
"@storybook/addon-links": "^6.3.12",
"@storybook/addons": "^6.3.12",
"@storybook/preset-create-react-app": "^3.1.4",
"@storybook/react": "^6.0.0-rc.3",
"@storybook/react": "^6.3.12",
"@types/d3": "^5.7.2",
"@types/lodash": "^4.14.158",
"@types/node": "^14.0.27",
Expand All @@ -110,10 +111,12 @@
"react-app-rewire-multiple-entry": "^2.1.0",
"react-app-rewire-yaml": "^1.1.0",
"react-app-rewired": "^2.1.5",
"react-markdown": "^4.3.1",
"react-scripts": "3.4.1",
"react-scripts": "^4.0.3",
"typescript": "^3.9.7",
"webpack-bundle-analyzer": "^3.7.0",
"webpackbar": "^4.0.0"
},
"resolutions": {
"babel-loader": "8.1.0"
}
}
3 changes: 2 additions & 1 deletion ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"isolatedModules": true,
"noEmit": true,
"experimentalDecorators": true,
"jsx": "react"
"jsx": "react",
"noFallthroughCasesInSwitch": true
},
"include": [
"src",
Expand Down

0 comments on commit 819a45a

Please sign in to comment.