Skip to content

Commit de91dd9

Browse files
committed
Merge branch 'dev-4.2.3'
2 parents b4b092b + 9c38cc8 commit de91dd9

10 files changed

Lines changed: 32 additions & 24 deletions

File tree

.licenserc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ header:
22
license:
33
spdx-id: Apache-2.0
44
copyright-owner: OceanBase
5+
copyright-year: '2023'
56
paths:
67
- 'src/**/*.ts'
78
- 'src/**/*.js'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
},
7070
"devDependencies": {
7171
"@ant-design/icons": "^4.0.0",
72-
"@oceanbase-odc/monaco-plugin-ob": "^0.1.1",
72+
"@oceanbase-odc/monaco-plugin-ob": "^0.1.2",
7373
"@oceanbase-odc/ob-intl-cli": "^1.1.5",
7474
"@oceanbase-odc/ob-parser-js": "^3.0.1",
7575
"@oceanbase-odc/ob-react-data-grid": "^3.0.6",

pnpm-lock.yaml

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/component/MonacoEditor/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import styles from './index.less';
2828
import * as groovy from './plugins/languageSupport/groovy';
2929
import { apply as markerPluginApply } from './plugins/marker';
3030
import { getModelService } from './plugins/ob-language/service';
31+
import logger from '@/util/logger';
3132
export interface IEditor extends monaco.editor.IStandaloneCodeEditor {
3233
doFormat: () => void;
3334
getSelectionContent: () => string;
@@ -138,6 +139,7 @@ const MonacoEditor: React.FC<IProps> = function (props) {
138139
),
139140
);
140141
markerPluginApply(editorRef.current.getModel());
142+
logger.debug('init plugin done')
141143
}
142144

143145
async function initEditor() {
@@ -154,6 +156,10 @@ const MonacoEditor: React.FC<IProps> = function (props) {
154156
readOnly: readOnly,
155157
});
156158
await initPlugin();
159+
editorRef.current.updateOptions({
160+
readOnly,
161+
theme: themeValue,
162+
});
157163
if (!editorRef.current?.getModel?.()) {
158164
return;
159165
}

src/component/SelectTransfer/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default function SelectTransfer(props: IProps) {
120120
/>
121121
</Card>
122122
</div>
123-
<div style={{ width: '100%', height: '100%' }}>
123+
<div style={{ width: '50%', height: '100%' }}>
124124
<Card
125125
title={
126126
formatMessage(
@@ -155,6 +155,7 @@ export default function SelectTransfer(props: IProps) {
155155
overflow: 'hidden',
156156
whiteSpace: 'nowrap',
157157
textOverflow: 'ellipsis',
158+
wordBreak: "break-all"
158159
}}
159160
title={node.title}
160161
>

src/page/Project/Project/ListItem/index.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,7 @@
3434
flex-basis: 20%;
3535
min-width: 260px;
3636
color: var(--text-color-secondary);
37+
overflow: hidden;
38+
text-overflow: ellipsis;
3739
}
3840
}

src/page/Project/Project/ListItem/index.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,11 @@ export default forwardRef(function ListItem(
4545
<div className={classNames(styles.block, styles.name)}>{data.name}</div>
4646
<div className={classNames(styles.block, styles.desc)}>{data.description || '-'}</div>
4747
<div className={classNames(styles.block, styles.users)}>
48-
<Space>
49-
<Icon style={{ color: 'var(--icon-color-disable)' }} component={UserSvg} />
50-
{data.members
51-
?.filter((item) => item.role === ProjectRole.OWNER)
52-
?.map((a) => a.name)
53-
?.join(', ') || '-'}
54-
</Space>
48+
<Icon style={{ color: 'var(--icon-color-disable)', marginRight: 5 }} component={UserSvg} />
49+
{data.members
50+
?.filter((item) => item.role === ProjectRole.OWNER)
51+
?.map((a) => a.name)
52+
?.join(', ') || '-'}
5553
</div>
5654
</div>
5755
);

src/page/Secure/Env/components/EnvironmentTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const EnvironmentTable = ({ ruleType }) => {
8585
}
8686
if (supportedDialectTypes) {
8787
filteredRules = filteredRules?.filter((item) =>
88-
item?.metadata?.supportedDialectTypes?.some((supportedDialectType) =>
88+
item?.appliedDialectTypes?.some((supportedDialectType) =>
8989
supportedDialectTypes?.includes(supportedDialectType),
9090
),
9191
);
@@ -119,7 +119,7 @@ const EnvironmentTable = ({ ruleType }) => {
119119
}
120120
if (supportedDialectTypes) {
121121
filteredRules = filteredRules?.filter((item) =>
122-
item?.metadata?.supportedDialectTypes?.some((supportedDialectType) =>
122+
item?.appliedDialectTypes?.some((supportedDialectType) =>
123123
supportedDialectTypes?.includes(supportedDialectType),
124124
),
125125
);

src/store/setting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const themeConfig: { [key: string]: IThemeConfig } = {
5858
},
5959
[EThemeConfigKey.ODC_DARK]: {
6060
key: 'odc-dark',
61-
editorTheme: 'vs-dark',
61+
editorTheme: 'obdark',
6262
className: 'odc-dark',
6363
sheetTheme: 'dark',
6464
cmdTheme: 'dark',

src/util/dataSourceParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { formatMessage } from '@/util/intl';
18-
import { isUndefined } from 'lodash';
18+
import { isUndefined, isNil } from 'lodash';
1919

2020
function unifiedStr(value: string) {
2121
return value?.replace(/\\"|\\t|\'/g, '');
@@ -150,7 +150,7 @@ class Parser {
150150
const next = args[i + 1];
151151
const isNextValid = !next?.startsWith('-');
152152
let value: any = isNextValid ? next : null;
153-
result[name] = isUndefined(value) ? value : type(value, name, result[name]);
153+
result[name] = isNil(value) ? value : type(value, name, result[name]);
154154
if (isNextValid) {
155155
++i;
156156
}

0 commit comments

Comments
 (0)