Unverified Commit 1f16401e authored by zhu-mingye's avatar zhu-mingye Committed by GitHub

[fix][web] hotfix-some-import-interface-bug (#2249)

* hotfix-some-import-interface-bug * hotfix-some-import-interface-bug * formatcode * hotfix-some-import-interface-bug
parent 99f702ce
......@@ -43,6 +43,6 @@ jobs:
uses: ./.github/actions/comment-on-issue
with:
message: |
Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to [send us a Pull Request](https://help.github.com/en/articles/creating-a-pull-request) for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the [Pull Request Template](https://github.com/DataLinkDC/dinky/blob/dev/.github/PULL_REQUEST_TEMPLATE.md) here, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
* In order for us to understand your request as soon as possible, please provide detailed information, version or pictures.
GITHUB_TOKEN: ${{ secrets.TOKEN }}
\ No newline at end of file
......@@ -18,7 +18,7 @@
[submodule ".github/actions/comment-on-issue"]
path = .github/actions/comment-on-issue
url = https://github.com/xingchun-chen/actions-comment-on-issue
url = https://github.com/ben-z/actions-comment-on-issue
[submodule ".github/actions/translate-on-issue"]
path = .github/actions/translate-on-issue
url = https://github.com/xingchun-chen/translation-helper
......
......@@ -19,7 +19,6 @@ import Footer from '@/components/Footer';
import RightContent from '@/components/RightContent';
import { AccessContextProvider } from '@/hooks/useAccess';
import { UnAccessible } from '@/pages/Other/403';
import { API_CONSTANTS } from '@/services/constants';
import { SysMenu } from '@/types/AuthCenter/data';
import { THEME } from '@/types/Public/data';
import { l } from '@/utils/intl';
......
import {TagAlignLeft} from '@/components/StyledComponents';
import {BtnRoute} from '@/pages/DataStudio/route';
import { TagAlignLeft } from '@/components/StyledComponents';
import { BtnRoute } from '@/pages/DataStudio/route';
import SchemaTree from '@/pages/RegCenter/DataSource/components/DataSourceDetail/SchemaTree';
import {DataSources} from '@/types/RegCenter/data';
import {l} from '@/utils/intl';
import {DatabaseOutlined, TableOutlined} from '@ant-design/icons';
import {Key, ProForm, ProFormSelect} from '@ant-design/pro-components';
import {connect} from '@umijs/max';
import {Spin, Tag} from 'antd';
import {useEffect, useState} from 'react';
import {StateType, STUDIO_MODEL} from '../../model';
import {clearMetaDataTable, showMetaDataTable} from './service';
import { DataSources } from '@/types/RegCenter/data';
import { l } from '@/utils/intl';
import { DatabaseOutlined, TableOutlined } from '@ant-design/icons';
import { Key, ProForm, ProFormSelect } from '@ant-design/pro-components';
import { connect } from '@umijs/max';
import { Spin, Tag } from 'antd';
import { useEffect, useState } from 'react';
import { StateType, STUDIO_MODEL } from '../../model';
import { clearMetaDataTable, showMetaDataTable } from './service';
const MetaData = (props: any) => {
const {
......@@ -32,7 +32,7 @@ const MetaData = (props: any) => {
}
setIsLoadingDatabase(true);
const tables = await showMetaDataTable(databaseId) ?? []
const tables = (await showMetaDataTable(databaseId)) ?? [];
setIsLoadingDatabase(false);
for (let table of tables) {
......@@ -113,7 +113,7 @@ const MetaData = (props: any) => {
return;
}
const queryParams = {id: selectDatabaseId, schemaName, tableName};
const queryParams = { id: selectDatabaseId, schemaName, tableName };
dispatch({
type: STUDIO_MODEL.addTab,
payload: {
......@@ -121,9 +121,9 @@ const MetaData = (props: any) => {
id: selectDatabaseId + schemaName + tableName,
breadcrumbLabel: [selectDb.type, selectDb.name].join('/'),
label: schemaName + '.' + tableName,
params: {queryParams: queryParams, tableInfo: fullInfo},
type: 'metadata',
},
params: { queryParams: queryParams, tableInfo: fullInfo },
type: 'metadata'
}
});
};
......
......@@ -3,16 +3,15 @@ import { l } from '@/utils/intl';
/*--- 刷新 元数据表 ---*/
export async function showMetaDataTable(id: number) {
try {
const result = await handleGetOption(
'api/database/getSchemasAndTables',
l('pages.metadata.DataSearch'),
{id: id},
'api/database/getSchemasAndTables',
l('pages.metadata.DataSearch'),
{ id: id }
);
return result?.datas;
} catch (e) {
console.error(e)
console.error(e);
return null;
}
}
......
......@@ -20,7 +20,8 @@
import CodeEdit from '@/components/CustomEditor/CodeEdit';
import { CLONE_TYPES, GIT_PROJECT_CODE_TYPE_ENUM } from '@/pages/RegCenter/GitProject/constans';
import { getDataByParams } from '@/services/BusinessCrud';
import { API_CONSTANTS, SWITCH_OPTIONS } from '@/services/constants';
import { SWITCH_OPTIONS } from '@/services/constants';
import { API_CONSTANTS } from '@/services/endpoints';
import { GitProject } from '@/types/RegCenter/data';
import { l } from '@/utils/intl';
import {
......@@ -69,9 +70,9 @@ const ProjectForm: React.FC<ProjectFormProps> = (props) => {
*/
const getBranchList = async () => {
const values = form.getFieldsValue();
await getDataByParams(API_CONSTANTS.GIT_BRANCH, { ...values }).then((result: any) => {
setBranches(result);
});
await getDataByParams(API_CONSTANTS.GIT_BRANCH, { ...values }).then((result: any) =>
setBranches(result)
);
};
/**
......@@ -186,7 +187,7 @@ const ProjectForm: React.FC<ProjectFormProps> = (props) => {
<ProForm.Group>
<ProForm.Item name='buildArgs' label={l('rc.gp.buildArgs')}>
<CodeEdit
onChange={(value) => setBuildArgsValue(value)}
onChange={(value) => setBuildArgsValue(value ?? '')}
code={buildArgs}
{...CodeEditProps}
/>
......
......@@ -29,7 +29,8 @@ import {
} from '@/pages/RegCenter/UDF/constants';
import { queryList } from '@/services/api';
import { handleAddOrUpdate, handleRemoveById, updateDataByParam } from '@/services/BusinessCrud';
import { API_CONSTANTS, PROTABLE_OPTIONS_PUBLIC } from '@/services/constants';
import { PROTABLE_OPTIONS_PUBLIC } from '@/services/constants';
import { API_CONSTANTS } from '@/services/endpoints';
import { UDFTemplate } from '@/types/RegCenter/data';
import { l } from '@/utils/intl';
import { ProTable } from '@ant-design/pro-components';
......
......@@ -19,7 +19,7 @@ import GeneralConfig from '@/pages/SettingCenter/GlobalSetting/SettingOverView/G
import { LoadUser } from '@/pages/SettingCenter/GlobalSetting/SettingOverView/LdapConfig/compontents/LoadUser';
import { TestLogin } from '@/pages/SettingCenter/GlobalSetting/SettingOverView/LdapConfig/compontents/TestLogin';
import { queryDataByParams } from '@/services/BusinessCrud';
import { API_CONSTANTS } from '@/services/constants';
import { API_CONSTANTS } from '@/services/endpoints';
import { BaseConfigProperties } from '@/types/SettingCenter/data';
import { l } from '@/utils/intl';
import { SuccessMessage } from '@/utils/messages';
......
......@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { API_CONSTANTS } from '@/services/constants';
import { API_CONSTANTS } from '@/services/endpoints';
import { l } from '@/utils/intl';
import { ErrorNotification } from '@/utils/messages';
import { history } from '@@/core/history';
......
......@@ -26,7 +26,8 @@ import {
removeById,
updateDataByParams
} from '@/services/api';
import { API_CONSTANTS, METHOD_CONSTANTS, RESPONSE_CODE } from '@/services/constants';
import { METHOD_CONSTANTS, RESPONSE_CODE } from '@/services/constants';
import { API_CONSTANTS } from '@/services/endpoints';
import { l } from '@/utils/intl';
import { LoadingMessageAsync, SuccessMessage, WarningMessage } from '@/utils/messages';
import { request } from '@@/exports';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment