diff --git a/webapp/packages/supersonic-fe/src/pages/SemanticModel/SemanticGraph/components/ToolBar.tsx b/webapp/packages/supersonic-fe/src/pages/SemanticModel/SemanticGraph/components/ToolBar.tsx index abcae06f0..e4c82a8a7 100644 --- a/webapp/packages/supersonic-fe/src/pages/SemanticModel/SemanticGraph/components/ToolBar.tsx +++ b/webapp/packages/supersonic-fe/src/pages/SemanticModel/SemanticGraph/components/ToolBar.tsx @@ -20,7 +20,7 @@ const visibleModeIconSvgPath = ` - + - + = ({ }> - - + + @@ -271,7 +271,7 @@ const ViewCreateFormModal: React.FC = ({ = forwardRef( }; useEffect(() => { - const viewModelConfigs = viewItem?.viewDetail?.viewModelConfigs; - if (Array.isArray(viewModelConfigs)) { + const dataSetModelConfigs = viewItem?.dataSetDetail?.dataSetModelConfigs; + if (Array.isArray(dataSetModelConfigs)) { const idList: number[] = []; const transferKeys: React.Key[] = []; const viewConfigMap = {}; const allMetrics: number[] = []; const allDimensions: number[] = []; - viewModelConfigs.forEach((item: ISemantic.IViewModelConfigItem) => { + dataSetModelConfigs.forEach((item: ISemantic.IViewModelConfigItem) => { const { id, metrics, dimensions } = item; idList.push(id); allMetrics.push(...metrics); @@ -115,13 +115,13 @@ const ViewModelConfigTransfer: React.FC = forwardRef( if (!dimensionList || !metricList) { return; } - const viewModelConfigs = isArrayOfValues(Object.values(viewModelConfigsMap)) + const dataSetModelConfigs = isArrayOfValues(Object.values(viewModelConfigsMap)) ? (Object.values(viewModelConfigsMap) as ISemantic.IViewModelConfigItem[]) - : viewItem?.viewDetail?.viewModelConfigs; - if (isArrayOfValues(viewModelConfigs)) { + : viewItem?.dataSetDetail?.dataSetModelConfigs; + if (isArrayOfValues(dataSetModelConfigs)) { const allMetrics: number[] = []; const allDimensions: number[] = []; - viewModelConfigs.forEach((item: ISemantic.IViewModelConfigItem) => { + dataSetModelConfigs.forEach((item: ISemantic.IViewModelConfigItem) => { const { metrics, dimensions } = item; allMetrics.push(...metrics); allDimensions.push(...dimensions); @@ -146,12 +146,14 @@ const ViewModelConfigTransfer: React.FC = forwardRef( submitData: Record, selectedKeys: React.Key[], ) => { - const viewModelConfigs = Object.values(submitData) as ISemantic.IViewModelConfigItem[]; + const dataSetModelConfigs = Object.values( + submitData, + ) as ISemantic.IViewModelConfigItem[]; - if (isArrayOfValues(viewModelConfigs)) { + if (isArrayOfValues(dataSetModelConfigs)) { const allMetrics: number[] = []; const allDimensions: number[] = []; - viewModelConfigs.forEach((item: ISemantic.IViewModelConfigItem) => { + dataSetModelConfigs.forEach((item: ISemantic.IViewModelConfigItem) => { const { metrics, dimensions } = item; allMetrics.push(...metrics); allDimensions.push(...dimensions); diff --git a/webapp/packages/supersonic-fe/src/pages/SemanticModel/View/components/ViewSearchFormModal.tsx b/webapp/packages/supersonic-fe/src/pages/SemanticModel/View/components/ViewSearchFormModal.tsx index 6d712cf21..301e06311 100644 --- a/webapp/packages/supersonic-fe/src/pages/SemanticModel/View/components/ViewSearchFormModal.tsx +++ b/webapp/packages/supersonic-fe/src/pages/SemanticModel/View/components/ViewSearchFormModal.tsx @@ -33,11 +33,11 @@ const ViewSearchFormModal: React.FC = ({ const [metricList, setMetricList] = useState(); useEffect(() => { - const viewModelConfigs = viewItem?.viewDetail?.viewModelConfigs; - if (Array.isArray(viewModelConfigs)) { + const dataSetModelConfigs = viewItem?.dataSetDetail?.dataSetModelConfigs; + if (Array.isArray(dataSetModelConfigs)) { const allMetrics: number[] = []; const allDimensions: number[] = []; - viewModelConfigs.forEach((item: ISemantic.IViewModelConfigItem) => { + dataSetModelConfigs.forEach((item: ISemantic.IViewModelConfigItem) => { const { metrics, dimensions } = item; allMetrics.push(...metrics); allDimensions.push(...dimensions); @@ -135,7 +135,7 @@ const ViewSearchFormModal: React.FC = ({ = ({ disabledEdit = false, modelList, domainMan }, { dataIndex: 'name', - title: '视图名称', + title: '数据集名称', search: false, }, { @@ -212,7 +212,7 @@ const ViewTable: React.FC = ({ disabledEdit = false, modelList, domainMan setCreateDataSourceModalOpen(true); }} > - 创建视图 + 创建数据集 , ] } diff --git a/webapp/packages/supersonic-fe/src/pages/SemanticModel/components/DomainManagerTab.tsx b/webapp/packages/supersonic-fe/src/pages/SemanticModel/components/DomainManagerTab.tsx index 82d81e79a..e11b74e1b 100644 --- a/webapp/packages/supersonic-fe/src/pages/SemanticModel/components/DomainManagerTab.tsx +++ b/webapp/packages/supersonic-fe/src/pages/SemanticModel/components/DomainManagerTab.tsx @@ -56,8 +56,8 @@ const DomainManagerTab: React.FC = ({ ), }, { - label: '视图管理', - key: 'viewManange', + label: '数据集管理', + key: 'dataSetManange', children: ( { } export function getViewList(domainId: number): Promise { - return request(`${process.env.API_BASE_URL}view/getViewList`, { + return request(`${process.env.API_BASE_URL}dataSet/getDataSetList`, { method: 'GET', params: { domainId }, }); } export function createView(data: any): Promise { - return request(`${process.env.API_BASE_URL}view`, { + return request(`${process.env.API_BASE_URL}dataSet`, { method: 'POST', data, }); } export function updateView(data: any): Promise { - return request(`${process.env.API_BASE_URL}view`, { + return request(`${process.env.API_BASE_URL}dataSet`, { method: 'PUT', data, }); } export function deleteView(viewId: number): Promise { - return request(`${process.env.API_BASE_URL}view/${viewId}`, { + return request(`${process.env.API_BASE_URL}dataSet/${viewId}`, { method: 'DELETE', }); }