Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improvement][headless-fe] Added the ability to export metrics and dimensions to a specific target. #801

Merged
merged 126 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
dcc0a96
[improvement][semantic-fe] Add model alias setting & Add view permiss…
Sep 9, 2023
109cc91
Merge branch 'tencentmusic:master' into master
sevenliu1896 Sep 11, 2023
82b1955
[improvement][semantic-fe] Add time granularity setting in the data s…
Sep 11, 2023
602e532
Merge branch 'tencentmusic:master' into master
sevenliu1896 Sep 14, 2023
e12fa20
[improvement][semantic-fe] Dictionary import for dimension values sup…
Sep 14, 2023
ef391d3
Merge branch 'tencentmusic:master' into master
sevenliu1896 Sep 19, 2023
9488453
[improvement][semantic-fe] Modification of data source creation promp…
Sep 19, 2023
5672b82
Merge branch 'tencentmusic:master' into master
sevenliu1896 Sep 20, 2023
215c25e
[improvement][semantic-fe] metric market experience optimization
Sep 20, 2023
1083531
Merge branch 'tencentmusic:master' into master
sevenliu1896 Oct 16, 2023
b7d8a73
[improvement][semantic-fe] enhance the analysis of metric trends
Oct 16, 2023
901ca64
[improvement][semantic-fe] optimize the presentation of metric trend …
Oct 16, 2023
bc523ae
Merge branch 'master' into master
sevenliu1896 Oct 16, 2023
fce2a9f
[improvement][semantic-fe] add metric trend download functionality
Oct 17, 2023
050a331
Merge branch 'tencentmusic:master' into master
sevenliu1896 Oct 17, 2023
9e202cd
Merge branch 'master' of https://github.com/sevenliu1896/supersonic
Oct 17, 2023
3b278fb
Merge branch 'tencentmusic:master' into master
sevenliu1896 Oct 17, 2023
803b487
[improvement][semantic-fe] fix the dimension initialization issue in …
Oct 17, 2023
b57016d
Merge branch 'tencentmusic:master' into master
sevenliu1896 Oct 18, 2023
29ddf88
[improvement][semantic-fe] Fix the issue of database changes not taki…
Oct 18, 2023
ccfb31c
[improvement][semantic-fe] Optimizing pagination logic and some CSS s…
Oct 26, 2023
239851d
Merge branch 'tencentmusic:master' into master
sevenliu1896 Oct 26, 2023
a801dbd
Merge branch 'master' of https://github.com/sevenliu1896/supersonic
Oct 26, 2023
f59b7f6
[improvement][semantic-fe] Fixing the API for the indicator list by c…
Oct 26, 2023
f0e98e3
Merge branch 'tencentmusic:master' into master
sevenliu1896 Oct 26, 2023
8469bf3
Merge branch 'master' of https://github.com/sevenliu1896/supersonic
Oct 26, 2023
6401227
Merge branch 'tencentmusic:master' into master
sevenliu1896 Oct 27, 2023
0f77cec
[improvement][semantic-fe] Fixing the default value setting for the i…
Oct 27, 2023
a9e5e8c
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 2, 2023
e600d1f
[improvement][semantic-fe] Adding batch operations for indicators/dim…
Nov 2, 2023
a105f99
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 6, 2023
3f63ac1
[improvement][semantic-fe] Replacing the single status update API for…
Nov 6, 2023
257720a
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 9, 2023
fea84c6
[improvement][semantic-fe] Redesigning the indicator homepage to inco…
Nov 9, 2023
6a758de
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 14, 2023
f63c1d0
[improvement][semantic-fe] Optimizing the logic for setting dimension…
Nov 14, 2023
50e1058
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 17, 2023
5d735f5
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 20, 2023
bdc7564
[improvement][semantic-fe] Upgrading antd version to 5.x, extracting …
Nov 20, 2023
72a6999
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 20, 2023
f000a86
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 23, 2023
9895571
[improvement][semantic-fe] Adding the ability to filter dimensions b…
Nov 23, 2023
cfe3232
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 27, 2023
14267da
[improvement][semantic-fe] Adding the ability to edit relationships b…
Nov 27, 2023
8e10f45
[improvement][semantic-fe] Updating the datePicker component to use d…
Nov 27, 2023
2b094da
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 27, 2023
00f46b0
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 27, 2023
7d58cc4
[improvement][semantic-fe] Fixing the issue with passing the model ID…
Nov 27, 2023
a969391
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 27, 2023
1fab051
Merge branch 'tencentmusic:master' into master
sevenliu1896 Nov 30, 2023
a378a53
[improvement][semantic-fe] Fixing the abnormal state of the popup whe…
Nov 30, 2023
9d83f62
Merge branch 'tencentmusic:master' into master
sevenliu1896 Dec 4, 2023
e71c187
[improvement][semantic-fe] Adding permission logic for bulk operation…
Dec 4, 2023
1cf8835
Merge branch 'tencentmusic:master' into master
sevenliu1896 Dec 6, 2023
01b10b1
[improvement][semantic-fe] Adding the ability to download and transpo…
Dec 6, 2023
529eed5
Merge branch 'tencentmusic:master' into master
sevenliu1896 Dec 8, 2023
b9b3378
[improvement][semantic-fe] Fixing the initialization issue with the d…
Dec 8, 2023
9584a6d
Merge branch 'tencentmusic:master' into master
sevenliu1896 Dec 12, 2023
b47cf1f
[improvement][semantic-fe] Fixing the logic error in the dimension va…
Dec 12, 2023
a44e276
Merge branch 'tencentmusic:master' into master
sevenliu1896 Dec 14, 2023
50d47ff
[improvement][semantic-fe] Fixing the synchronization issue with the …
Dec 14, 2023
c22de1b
Merge branch 'tencentmusic:master' into master
sevenliu1896 Dec 15, 2023
15f99ed
[improvement][semantic-fe] Optimizing the canvas functionality for be…
Dec 15, 2023
ebc637c
Merge branch 'tencentmusic:master' into master
sevenliu1896 Dec 18, 2023
aa98f32
[improvement][semantic-fe] Optimizing the update process for drawing …
Dec 18, 2023
0a8000a
Merge branch 'tencentmusic:master' into master
sevenliu1896 Dec 18, 2023
e56fd1a
[improvement][semantic-fe] Changing the line type for canvas connecti…
Dec 18, 2023
7b22f5f
Merge branch 'tencentmusic:master' into master
sevenliu1896 Dec 20, 2023
771a53a
[improvement][semantic-fe] Replacing the initialization variable fro…
Dec 20, 2023
0351910
Merge branch 'tencentmusic:master' into master
sevenliu1896 Dec 28, 2023
9307922
[improvement][semantic-fe] Fixing the missing migration issue for def…
Dec 28, 2023
9083e48
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 2, 2024
0a7fd68
[improvement][semantic-fe] Updating the logic for the fieldName.
Jan 2, 2024
adae7ab
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 3, 2024
47383d7
[improvement][semantic-fe] Adjusting the position of the metrics tab.
Jan 3, 2024
e639240
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 5, 2024
2a02d65
[improvement][semantic-fe] Changing the 字段名称 to 英文名称.
Jan 5, 2024
bf8cbfc
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 8, 2024
d880b01
[improvement][semantic-fe] Fix metric measurement deletion.
Jan 8, 2024
fda743b
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 9, 2024
5c41a40
[improvement][semantic-fe] UI optimization for metric details page.
Jan 9, 2024
d9a53dc
[improvement][semantic-fe] UI optimization for metric details page.
Jan 9, 2024
d7f3075
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 9, 2024
75d0a2c
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 11, 2024
d20f795
[improvement][semantic-fe] UI adjustment for metric details page.
Jan 11, 2024
b7f0c4d
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 15, 2024
8779bc5
[improvement][semantic-fe] The granularity field in the time type of …
Jan 15, 2024
b582ea7
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 19, 2024
71f75ff
[improvement][semantic-fe] Added field type and metric type to the me…
Jan 19, 2024
7cdbcf1
[improvement][semantic-fe] The organization structure selection featu…
Jan 19, 2024
ae11f07
Merge branch 'master' into master
sevenliu1896 Jan 19, 2024
5a894b6
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 19, 2024
557d09a
[improvement][semantic-fe] Improved user experience for the metric list.
Jan 19, 2024
91ab5f1
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 22, 2024
3d1f79d
[improvement][semantic-fe] fix update the metric list.
Jan 22, 2024
b9918b1
Merge branch 'tencentmusic:master' into master
sevenliu1896 Jan 30, 2024
552cf1f
[improvement][headless-fe] Added view management functionality.
Jan 30, 2024
c7f4713
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 4, 2024
bea1c1c
[improvement][headless-fe] The view management functionality has been…
Feb 4, 2024
30b91c6
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 5, 2024
25eb4d2
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 21, 2024
c1f3fad
[improvement][headless-fe] Added model editing side effect detection.
Feb 21, 2024
cdbf382
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 22, 2024
f085ea0
[improvement][headless-fe] Fixed the logic error in view editing.
Feb 22, 2024
c527b65
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 22, 2024
4f4f3cd
[improvement][headless-fe] Fixed the issue with initializing dimensio…
Feb 22, 2024
e3d9b6e
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 23, 2024
6877baf
[improvement][headless-fe] Added the ability to hide the Q&A settings…
Feb 23, 2024
4adeb3c
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 23, 2024
9d58871
[improvement][headless-fe] Fixed the issue with selecting search resu…
Feb 23, 2024
1032c57
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 24, 2024
9926e17
[improvement][headless-fe] Added search functionality to the field li…
Feb 24, 2024
2795aca
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 26, 2024
6d71228
[improvement][headless-fe] fix the field list in model editing
Feb 26, 2024
fbc44ac
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 26, 2024
73b8dce
[improvement][headless-fe] Restructured the data for the dimension va…
Feb 26, 2024
2032bf8
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 26, 2024
de5dfb4
[improvement][headless-fe] Added dynamic variable functionality to mo…
Feb 26, 2024
0ef1658
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 26, 2024
7bb869a
[improvement][headless-fe] Added support for passing dynamic variable…
Feb 26, 2024
bd908e5
Merge branch 'tencentmusic:master' into master
sevenliu1896 Feb 27, 2024
0411466
[improvement][headless-fe] Resolved the issue where users were unable…
Feb 27, 2024
f6fc749
Merge branch 'tencentmusic:master' into master
sevenliu1896 Mar 2, 2024
a24a373
[improvement][headless-fe] Replaced the term "view" with "dataset"
Mar 2, 2024
1e35daf
Merge branch 'tencentmusic:master' into master
sevenliu1896 Mar 12, 2024
b0e4c15
[improvement][headless-fe] Added the ability to export metrics and di…
Mar 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions webapp/packages/supersonic-fe/config/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,33 @@ const ROUTES = [
},
],
},

{
path: '/tag',
name: 'tag',
component: './SemanticModel/Insights',
envEnableList: [ENV_KEY.SEMANTIC],
routes: [
{
path: '/tag',
redirect: '/tag/market',
},
{
path: '/tag/market',
component: './SemanticModel/Insights/Market',
hideInMenu: true,
envEnableList: [ENV_KEY.SEMANTIC],
},
{
path: '/tag/detail/:tagId',
name: 'tagDetail',
hideInMenu: true,
component: './SemanticModel/Insights/Detail',
envEnableList: [ENV_KEY.SEMANTIC],
},
],
},

{
path: '/plugin',
name: 'plugin',
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/supersonic-fe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"react-syntax-highlighter": "^15.4.3",
"sql-formatter": "^2.3.3",
"supersonic-chat-sdk": "0.0.0",
"supersonic-insights-flow-components": "^1.4.6",
"umi": "3.5",
"umi-request": "^1.4.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
StopOutlined,
CloudDownloadOutlined,
DeleteOutlined,
ExportOutlined,
} from '@ant-design/icons';

export type BatchCtrlDropDownButtonProps = {
Expand All @@ -14,6 +15,7 @@ export type BatchCtrlDropDownButtonProps = {
downloadLoading?: boolean;
disabledList?: string[];
hiddenList?: string[];
extenderEnable?: boolean;
};
const { RangePicker } = DatePicker;

Expand All @@ -24,10 +26,21 @@ const BatchCtrlDropDownButton: FC<BatchCtrlDropDownButtonProps> = ({
downloadLoading,
disabledList = [],
hiddenList = [],
extenderEnable = false,
}) => {
const [popoverOpenState, setPopoverOpenState] = useState<boolean>(false);
const [pickerType, setPickerType] = useState<string>('day');
const dateRangeRef = useRef<any>([]);

const exportTagButton = {
key: 'exportTagButton',
label: '导出为标签',
icon: <ExportOutlined />,
disabled: disabledList?.includes('exportTagButton'),
};

const extenderList: any[] = extenderEnable ? [exportTagButton] : [];

const dropdownButtonItems: any[] = [
{
key: 'batchStart',
Expand Down Expand Up @@ -55,6 +68,11 @@ const BatchCtrlDropDownButton: FC<BatchCtrlDropDownButtonProps> = ({
icon: <CloudDownloadOutlined />,
disabled: disabledList?.includes('batchDownload'),
},
{
key: 'divider',
type: 'divider',
},
...extenderList,
{
key: 'batchDeleteDivider',
type: 'divider',
Expand Down
2 changes: 2 additions & 0 deletions webapp/packages/supersonic-fe/src/locales/zh-CN/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export default {
'menu.semanticModel': '语义建模',
'menu.metric': '指标市场',
'menu.metric.metricDetail': '指标详情页',
'menu.tag': '标签市场',
'menu.tag.tagDetail': '标签详情页',
'menu.database': '数据库管理',
'menu.chatSetting': '问答设置',
'menu.plugin': '插件市场',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
import { message, Tabs, Button, Space } from 'antd';
import React, { useState, useEffect } from 'react';
import { getTagData } from '../service';
import { connect, useParams, history } from 'umi';
import type { StateType } from '../model';
import styles from './style.less';
import { ArrowLeftOutlined } from '@ant-design/icons';
import TagTrendSection from './components/TagTrendSection';
import { ISemantic } from '../data';
import TagInfoSider from './components/TagInfoSider';
import { getDimensionList, queryMetric } from '../service';
import type { TabsProps } from 'antd';

type Props = Record<string, any>;

const TagDetail: React.FC<Props> = () => {
const params: any = useParams();
const tagId = params.tagId;
const [tagData, setTagData] = useState<ISemantic.IMetricItem>();
const [dimensionMap, setDimensionMap] = useState<Record<string, ISemantic.IDimensionItem>>({});

const [metricMap, setMetricMap] = useState<Record<string, ISemantic.IMetricItem>>({});

const [relationDimensionOptions, setRelationDimensionOptions] = useState<
{ value: string; label: string; modelId: number }[]
>([]);

useEffect(() => {
queryTagData(tagId);
}, [tagId]);

const queryTagData = async (tagId: number) => {
const { code, data, msg } = await getTagData(tagId);
if (code === 200) {
queryDimensionList(data.modelId);
queryMetricList(data.modelId);
setTagData({ ...data });
return;
}
message.error(msg);
};

const tabItems: TabsProps['items'] = [
{
key: 'trend',
label: '图表',
children: (
// <></>
<TagTrendSection
tagData={tagData}
relationDimensionOptions={relationDimensionOptions}
dimensionList={[]}
/>
),
},
// {
// key: 'metricCaliberInput',
// label: '基础信息',
// children: <></>,
// },
// {
// key: 'metricDataRemark',
// label: '备注',
// children: <></>,
// },
];

const queryDimensionList = async (modelId: number) => {
const { code, data, msg } = await getDimensionList({ modelId });
if (code === 200 && Array.isArray(data?.list)) {
const { list } = data;
setDimensionMap(
list.reduce(
(infoMap: Record<string, ISemantic.IDimensionItem>, item: ISemantic.IDimensionItem) => {
infoMap[`${item.id}`] = item;
return infoMap;
},
{},
),
);
} else {
message.error(msg);
}
};

const queryMetricList = async (modelId: number) => {
const { code, data, msg } = await queryMetric({
modelId: modelId,
});
const { list } = data || {};
if (code === 200) {
setMetricMap(
list.reduce(
(infoMap: Record<string, ISemantic.IMetricItem>, item: ISemantic.IMetricItem) => {
infoMap[`${item.id}`] = item;
return infoMap;
},
{},
),
);
} else {
message.error(msg);
}
};

return (
<>
<div className={styles.tagDetailWrapper}>
<div className={styles.tagDetail}>
<div className={styles.tabContainer}>
<Tabs
defaultActiveKey="trend"
items={tabItems}
tabBarExtraContent={{
right: (
<Button
size="middle"
type="link"
key="backListBtn"
onClick={() => {
history.push('/tag/market');
}}
>
<Space>
<ArrowLeftOutlined />
返回列表页
</Space>
</Button>
),
}}
size="large"
className={styles.tagDetailTab}
/>
</div>
<div className={styles.siderContainer}>
<TagInfoSider
dimensionMap={dimensionMap}
metricMap={metricMap}
// relationDimensionOptions={relationDimensionOptions}
tagData={tagData}
/>
</div>
</div>
</div>
</>
);
};

export default connect(({ domainManger }: { domainManger: StateType }) => ({
domainManger,
}))(TagDetail);
Loading
Loading