mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 05:43:51 +00:00
[improvement][semantic-fe] Adding batch operations for indicators/dimensions/models (#313)
* [improvement][semantic-fe] Add model alias setting & Add view permission restrictions to the model permission management tab. [improvement][semantic-fe] Add permission control to the action buttons for the main domain; apply high sensitivity filtering to the authorization of metrics/dimensions. [improvement][semantic-fe] Optimize the editing mode in the dimension/metric/datasource components to use the modelId stored in the database for data, instead of relying on the data from the state manager. * [improvement][semantic-fe] Add time granularity setting in the data source configuration. * [improvement][semantic-fe] Dictionary import for dimension values supported in Q&A visibility * [improvement][semantic-fe] Modification of data source creation prompt wording" * [improvement][semantic-fe] metric market experience optimization * [improvement][semantic-fe] enhance the analysis of metric trends * [improvement][semantic-fe] optimize the presentation of metric trend permissions * [improvement][semantic-fe] add metric trend download functionality * [improvement][semantic-fe] fix the dimension initialization issue in metric correlation * [improvement][semantic-fe] Fix the issue of database changes not taking effect when creating based on an SQL data source. * [improvement][semantic-fe] Optimizing pagination logic and some CSS styles * [improvement][semantic-fe] Fixing the API for the indicator list by changing "current" to "pageNum" * [improvement][semantic-fe] Fixing the default value setting for the indicator list * [improvement][semantic-fe] Adding batch operations for indicators/dimensions/models
This commit is contained in:
@@ -116,6 +116,18 @@ export function updateExprMetric(data: any): Promise<any> {
|
||||
});
|
||||
}
|
||||
|
||||
export function batchUpdateMetricStatus(data: any): Promise<any> {
|
||||
return request.post(`${process.env.API_BASE_URL}metric/batchUpdateStatus`, {
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
export function batchUpdateDimensionStatus(data: any): Promise<any> {
|
||||
return request.post(`${process.env.API_BASE_URL}dimension/batchUpdateStatus`, {
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
export function mockMetricAlias(data: any): Promise<any> {
|
||||
return request.post(`${process.env.API_BASE_URL}metric/mockMetricAlias`, {
|
||||
data,
|
||||
@@ -126,6 +138,12 @@ export function getMetricTags(): Promise<any> {
|
||||
return request.get(`${process.env.API_BASE_URL}metric/getMetricTags`);
|
||||
}
|
||||
|
||||
export function getDrillDownDimension(metricId: number): Promise<any> {
|
||||
return request.get(`${process.env.API_BASE_URL}metric/getDrillDownDimension`, {
|
||||
params: { metricId },
|
||||
});
|
||||
}
|
||||
|
||||
export function getMeasureListByModelId(modelId: number): Promise<any> {
|
||||
return request.get(`${process.env.API_BASE_URL}datasource/getMeasureListOfModel/${modelId}`);
|
||||
}
|
||||
@@ -380,6 +398,13 @@ const downloadStruct = (blob: Blob) => {
|
||||
document.body.removeChild(link);
|
||||
};
|
||||
|
||||
export function queryDimValue(data: any): Promise<any> {
|
||||
return request(`${process.env.API_BASE_URL}query/queryDimValue`, {
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
export async function queryStruct({
|
||||
modelId,
|
||||
bizName,
|
||||
@@ -387,6 +412,8 @@ export async function queryStruct({
|
||||
startDate,
|
||||
endDate,
|
||||
download = false,
|
||||
groups = [],
|
||||
dimensionFilters = [],
|
||||
}: {
|
||||
modelId: number;
|
||||
bizName: string;
|
||||
@@ -394,6 +421,8 @@ export async function queryStruct({
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
download?: boolean;
|
||||
groups?: string[];
|
||||
dimensionFilters?: string[];
|
||||
}): Promise<any> {
|
||||
const response = await request(
|
||||
`${process.env.API_BASE_URL}query/${download ? 'download/' : ''}struct`,
|
||||
@@ -402,7 +431,8 @@ export async function queryStruct({
|
||||
...(download ? { responseType: 'blob', getResponse: true } : {}),
|
||||
data: {
|
||||
modelId,
|
||||
groups: [dateField],
|
||||
groups: [dateField, ...groups],
|
||||
dimensionFilters,
|
||||
aggregators: [
|
||||
{
|
||||
column: bizName,
|
||||
@@ -412,7 +442,6 @@ export async function queryStruct({
|
||||
},
|
||||
],
|
||||
orders: [],
|
||||
dimensionFilters: [],
|
||||
metricFilters: [],
|
||||
params: [],
|
||||
dateInfo: {
|
||||
|
||||
Reference in New Issue
Block a user