mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-29 16:14:42 +00:00
* chore(dashboard): intial commit * chore(dashboard): bring all the code in module * chore(dashboard): remove lock unlock from ee codebase * chore(dashboard): go deps * chore(dashboard): fix lint * chore(dashboard): implement the store * chore(dashboard): add migration * chore(dashboard): fix lint * chore(dashboard): api and frontend changes * chore(dashboard): frontend changes for new dashboards * chore(dashboard): fix test cases * chore(dashboard): add lock unlock APIs * chore(dashboard): add lock unlock APIs * chore(dashboard): move integrations controller out from module * chore(dashboard): move integrations controller out from module * chore(dashboard): move integrations controller out from module * chore(dashboard): rename migration file * chore(dashboard): surface errors for lock/unlock dashboard * chore(dashboard): some testing cleanups * chore(dashboard): fix postgres migrations --------- Co-authored-by: Vibhu Pandey <vibhupandey28@gmail.com>
20 lines
593 B
TypeScript
20 lines
593 B
TypeScript
import axios from 'api';
|
|
import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';
|
|
import { AxiosError } from 'axios';
|
|
import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';
|
|
import { Dashboard, PayloadProps } from 'types/api/dashboard/getAll';
|
|
|
|
const getAll = async (): Promise<SuccessResponseV2<Dashboard[]>> => {
|
|
try {
|
|
const response = await axios.get<PayloadProps>('/dashboards');
|
|
return {
|
|
httpStatusCode: response.status,
|
|
data: response.data.data,
|
|
};
|
|
} catch (error) {
|
|
ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);
|
|
}
|
|
};
|
|
|
|
export default getAll;
|