Compare commits

..

2 Commits

Author SHA1 Message Date
Ishan Uniyal
afc85a2d27 feat: testcase added 2026-02-23 17:59:10 +05:30
Ishan Uniyal
f1cf7a0dab feat: color fallback and red checks 2026-02-23 15:31:50 +05:30
13 changed files with 201 additions and 329 deletions

View File

@@ -326,9 +326,6 @@ components:
type: string
url:
type: string
required:
- code
- message
type: object
ErrorsResponseerroradditional:
properties:
@@ -1664,9 +1661,6 @@ components:
$ref: '#/components/schemas/ErrorsJSON'
status:
type: string
required:
- status
- error
type: object
RoletypesGettableResources:
properties:
@@ -2156,9 +2150,6 @@ paths:
type: array
status:
type: string
required:
- status
- data
type: object
description: OK
"500":
@@ -2242,9 +2233,6 @@ paths:
$ref: '#/components/schemas/AuthtypesGettableToken'
status:
type: string
required:
- status
- data
type: object
description: See Other
"400":
@@ -2283,9 +2271,6 @@ paths:
$ref: '#/components/schemas/AuthtypesGettableToken'
status:
type: string
required:
- status
- data
type: object
description: See Other
"400":
@@ -2349,9 +2334,6 @@ paths:
$ref: '#/components/schemas/AuthtypesGettableToken'
status:
type: string
required:
- status
- data
type: object
description: See Other
"400":
@@ -2446,9 +2428,6 @@ paths:
$ref: '#/components/schemas/DashboardtypesGettablePublicDasbhboard'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -2503,9 +2482,6 @@ paths:
$ref: '#/components/schemas/TypesIdentifiable'
status:
type: string
required:
- status
- data
type: object
description: Created
"401":
@@ -2599,9 +2575,6 @@ paths:
type: array
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -2649,9 +2622,6 @@ paths:
$ref: '#/components/schemas/AuthtypesGettableAuthDomain'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -2848,9 +2818,6 @@ paths:
$ref: '#/components/schemas/TelemetrytypesGettableFieldKeys'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -2941,9 +2908,6 @@ paths:
$ref: '#/components/schemas/TelemetrytypesGettableFieldValues'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -2993,9 +2957,6 @@ paths:
$ref: '#/components/schemas/TypesResetPasswordToken'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -3051,9 +3012,6 @@ paths:
$ref: '#/components/schemas/TypesGettableGlobalConfig'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -3099,9 +3057,6 @@ paths:
type: array
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -3149,9 +3104,6 @@ paths:
$ref: '#/components/schemas/TypesInvite'
status:
type: string
required:
- status
- data
type: object
description: Created
"400":
@@ -3265,9 +3217,6 @@ paths:
$ref: '#/components/schemas/TypesInvite'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -3311,9 +3260,6 @@ paths:
$ref: '#/components/schemas/TypesUser'
status:
type: string
required:
- status
- data
type: object
description: Created
"400":
@@ -3408,9 +3354,6 @@ paths:
type: array
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -3509,9 +3452,6 @@ paths:
type: array
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -3561,9 +3501,6 @@ paths:
$ref: '#/components/schemas/PreferencetypesPreference'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -3677,9 +3614,6 @@ paths:
type: array
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -3727,9 +3661,6 @@ paths:
$ref: '#/components/schemas/TypesGettableAPIKey'
status:
type: string
required:
- status
- data
type: object
description: Created
"400":
@@ -3897,9 +3828,6 @@ paths:
$ref: '#/components/schemas/DashboardtypesGettablePublicDashboardData'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -3953,9 +3881,6 @@ paths:
$ref: '#/components/schemas/Querybuildertypesv5QueryRangeResponse'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -4033,9 +3958,6 @@ paths:
type: array
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -4083,9 +4005,6 @@ paths:
$ref: '#/components/schemas/TypesIdentifiable'
status:
type: string
required:
- status
- data
type: object
description: Created
"400":
@@ -4220,9 +4139,6 @@ paths:
$ref: '#/components/schemas/RoletypesRole'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -4346,9 +4262,6 @@ paths:
type: array
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -4488,9 +4401,6 @@ paths:
$ref: '#/components/schemas/RoletypesGettableResources'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -4536,9 +4446,6 @@ paths:
type: array
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -4633,9 +4540,6 @@ paths:
$ref: '#/components/schemas/TypesUser'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -4695,9 +4599,6 @@ paths:
$ref: '#/components/schemas/TypesUser'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -4753,9 +4654,6 @@ paths:
$ref: '#/components/schemas/TypesUser'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -4798,9 +4696,6 @@ paths:
type: array
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -4850,9 +4745,6 @@ paths:
$ref: '#/components/schemas/PreferencetypesPreference'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -4995,9 +4887,6 @@ paths:
type: array
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -5050,9 +4939,6 @@ paths:
$ref: '#/components/schemas/GatewaytypesGettableIngestionKeys'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -5100,9 +4986,6 @@ paths:
$ref: '#/components/schemas/GatewaytypesGettableCreatedIngestionKey'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -5241,9 +5124,6 @@ paths:
$ref: '#/components/schemas/GatewaytypesGettableCreatedIngestionKeyLimit'
status:
type: string
required:
- status
- data
type: object
description: Created
"401":
@@ -5385,9 +5265,6 @@ paths:
$ref: '#/components/schemas/GatewaytypesGettableIngestionKeys'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -5451,9 +5328,6 @@ paths:
$ref: '#/components/schemas/MetricsexplorertypesListMetricsResponse'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -5509,9 +5383,6 @@ paths:
$ref: '#/components/schemas/MetricsexplorertypesMetricAlertsResponse'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -5578,9 +5449,6 @@ paths:
$ref: '#/components/schemas/MetricsexplorertypesMetricAttributesResponse'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -5636,9 +5504,6 @@ paths:
$ref: '#/components/schemas/MetricsexplorertypesMetricDashboardsResponse'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -5695,9 +5560,6 @@ paths:
$ref: '#/components/schemas/MetricsexplorertypesMetricHighlightsResponse'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -5754,9 +5616,6 @@ paths:
$ref: '#/components/schemas/MetricsexplorertypesMetricMetadata'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -5873,9 +5732,6 @@ paths:
$ref: '#/components/schemas/MetricsexplorertypesStatsResponse'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -5931,9 +5787,6 @@ paths:
$ref: '#/components/schemas/MetricsexplorertypesTreemapResponse'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -5983,9 +5836,6 @@ paths:
$ref: '#/components/schemas/TypesOrganization'
status:
type: string
required:
- status
- data
type: object
description: OK
"401":
@@ -6116,9 +5966,6 @@ paths:
$ref: '#/components/schemas/AuthtypesSessionContext'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -6156,9 +6003,6 @@ paths:
$ref: '#/components/schemas/AuthtypesGettableToken'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -6202,9 +6046,6 @@ paths:
$ref: '#/components/schemas/AuthtypesGettableToken'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -6237,9 +6078,6 @@ paths:
$ref: '#/components/schemas/ZeustypesGettableHost'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -6754,9 +6592,6 @@ paths:
$ref: '#/components/schemas/Querybuildertypesv5QueryRangeResponse'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":
@@ -6811,9 +6646,6 @@ paths:
$ref: '#/components/schemas/Querybuildertypesv5QueryRangeRequest'
status:
type: string
required:
- status
- data
type: object
description: OK
"400":

View File

@@ -436,7 +436,7 @@ export interface ErrorsJSONDTO {
/**
* @type string
*/
code: string;
code?: string;
/**
* @type array
*/
@@ -444,7 +444,7 @@ export interface ErrorsJSONDTO {
/**
* @type string
*/
message: string;
message?: string;
/**
* @type string
*/
@@ -1985,11 +1985,11 @@ export enum Querybuildertypesv5VariableTypeDTO {
text = 'text',
}
export interface RenderErrorResponseDTO {
error: ErrorsJSONDTO;
error?: ErrorsJSONDTO;
/**
* @type string
*/
status: string;
status?: string;
}
/**
@@ -2599,30 +2599,30 @@ export type AuthzCheck200 = {
/**
* @type array
*/
data: AuthtypesGettableTransactionDTO[];
data?: AuthtypesGettableTransactionDTO[];
/**
* @type string
*/
status: string;
status?: string;
};
export type ChangePasswordPathParameters = {
id: string;
};
export type CreateSessionByGoogleCallback303 = {
data: AuthtypesGettableTokenDTO;
data?: AuthtypesGettableTokenDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type CreateSessionByOIDCCallback303 = {
data: AuthtypesGettableTokenDTO;
data?: AuthtypesGettableTokenDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type CreateSessionBySAMLCallbackParams = {
@@ -2650,11 +2650,11 @@ export type CreateSessionBySAMLCallbackBody = {
};
export type CreateSessionBySAMLCallback303 = {
data: AuthtypesGettableTokenDTO;
data?: AuthtypesGettableTokenDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type DeletePublicDashboardPathParameters = {
@@ -2664,22 +2664,22 @@ export type GetPublicDashboardPathParameters = {
id: string;
};
export type GetPublicDashboard200 = {
data: DashboardtypesGettablePublicDasbhboardDTO;
data?: DashboardtypesGettablePublicDasbhboardDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type CreatePublicDashboardPathParameters = {
id: string;
};
export type CreatePublicDashboard201 = {
data: TypesIdentifiableDTO;
data?: TypesIdentifiableDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type UpdatePublicDashboardPathParameters = {
@@ -2689,19 +2689,19 @@ export type ListAuthDomains200 = {
/**
* @type array
*/
data: AuthtypesGettableAuthDomainDTO[];
data?: AuthtypesGettableAuthDomainDTO[];
/**
* @type string
*/
status: string;
status?: string;
};
export type CreateAuthDomain200 = {
data: AuthtypesGettableAuthDomainDTO;
data?: AuthtypesGettableAuthDomainDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type DeleteAuthDomainPathParameters = {
@@ -2757,11 +2757,11 @@ export type GetFieldsKeysParams = {
};
export type GetFieldsKeys200 = {
data: TelemetrytypesGettableFieldKeysDTO;
data?: TelemetrytypesGettableFieldKeysDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetFieldsValuesParams = {
@@ -2821,49 +2821,49 @@ export type GetFieldsValuesParams = {
};
export type GetFieldsValues200 = {
data: TelemetrytypesGettableFieldValuesDTO;
data?: TelemetrytypesGettableFieldValuesDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetResetPasswordTokenPathParameters = {
id: string;
};
export type GetResetPasswordToken200 = {
data: TypesResetPasswordTokenDTO;
data?: TypesResetPasswordTokenDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetGlobalConfig200 = {
data: TypesGettableGlobalConfigDTO;
data?: TypesGettableGlobalConfigDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type ListInvite200 = {
/**
* @type array
*/
data: TypesInviteDTO[];
data?: TypesInviteDTO[];
/**
* @type string
*/
status: string;
status?: string;
};
export type CreateInvite201 = {
data: TypesInviteDTO;
data?: TypesInviteDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type DeleteInvitePathParameters = {
@@ -2873,19 +2873,19 @@ export type GetInvitePathParameters = {
token: string;
};
export type GetInvite200 = {
data: TypesInviteDTO;
data?: TypesInviteDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type AcceptInvite201 = {
data: TypesUserDTO;
data?: TypesUserDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type ListPromotedAndIndexedPaths200 = {
@@ -2893,33 +2893,33 @@ export type ListPromotedAndIndexedPaths200 = {
* @type array
* @nullable true
*/
data: PromotetypesPromotePathDTO[] | null;
data?: PromotetypesPromotePathDTO[] | null;
/**
* @type string
*/
status: string;
status?: string;
};
export type ListOrgPreferences200 = {
/**
* @type array
*/
data: PreferencetypesPreferenceDTO[];
data?: PreferencetypesPreferenceDTO[];
/**
* @type string
*/
status: string;
status?: string;
};
export type GetOrgPreferencePathParameters = {
name: string;
};
export type GetOrgPreference200 = {
data: PreferencetypesPreferenceDTO;
data?: PreferencetypesPreferenceDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type UpdateOrgPreferencePathParameters = {
@@ -2929,19 +2929,19 @@ export type ListAPIKeys200 = {
/**
* @type array
*/
data: TypesGettableAPIKeyDTO[];
data?: TypesGettableAPIKeyDTO[];
/**
* @type string
*/
status: string;
status?: string;
};
export type CreateAPIKey201 = {
data: TypesGettableAPIKeyDTO;
data?: TypesGettableAPIKeyDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type RevokeAPIKeyPathParameters = {
@@ -2954,11 +2954,11 @@ export type GetPublicDashboardDataPathParameters = {
id: string;
};
export type GetPublicDashboardData200 = {
data: DashboardtypesGettablePublicDashboardDataDTO;
data?: DashboardtypesGettablePublicDashboardDataDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetPublicDashboardWidgetQueryRangePathParameters = {
@@ -2966,30 +2966,30 @@ export type GetPublicDashboardWidgetQueryRangePathParameters = {
idx: string;
};
export type GetPublicDashboardWidgetQueryRange200 = {
data: Querybuildertypesv5QueryRangeResponseDTO;
data?: Querybuildertypesv5QueryRangeResponseDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type ListRoles200 = {
/**
* @type array
*/
data: RoletypesRoleDTO[];
data?: RoletypesRoleDTO[];
/**
* @type string
*/
status: string;
status?: string;
};
export type CreateRole201 = {
data: TypesIdentifiableDTO;
data?: TypesIdentifiableDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type DeleteRolePathParameters = {
@@ -2999,11 +2999,11 @@ export type GetRolePathParameters = {
id: string;
};
export type GetRole200 = {
data: RoletypesRoleDTO;
data?: RoletypesRoleDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type PatchRolePathParameters = {
@@ -3017,11 +3017,11 @@ export type GetObjects200 = {
/**
* @type array
*/
data: AuthtypesObjectDTO[];
data?: AuthtypesObjectDTO[];
/**
* @type string
*/
status: string;
status?: string;
};
export type PatchObjectsPathParameters = {
@@ -3029,22 +3029,22 @@ export type PatchObjectsPathParameters = {
relation: string;
};
export type GetResources200 = {
data: RoletypesGettableResourcesDTO;
data?: RoletypesGettableResourcesDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type ListUsers200 = {
/**
* @type array
*/
data: TypesUserDTO[];
data?: TypesUserDTO[];
/**
* @type string
*/
status: string;
status?: string;
};
export type DeleteUserPathParameters = {
@@ -3054,52 +3054,52 @@ export type GetUserPathParameters = {
id: string;
};
export type GetUser200 = {
data: TypesUserDTO;
data?: TypesUserDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type UpdateUserPathParameters = {
id: string;
};
export type UpdateUser200 = {
data: TypesUserDTO;
data?: TypesUserDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetMyUser200 = {
data: TypesUserDTO;
data?: TypesUserDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type ListUserPreferences200 = {
/**
* @type array
*/
data: PreferencetypesPreferenceDTO[];
data?: PreferencetypesPreferenceDTO[];
/**
* @type string
*/
status: string;
status?: string;
};
export type GetUserPreferencePathParameters = {
name: string;
};
export type GetUserPreference200 = {
data: PreferencetypesPreferenceDTO;
data?: PreferencetypesPreferenceDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type UpdateUserPreferencePathParameters = {
@@ -3109,11 +3109,11 @@ export type GetFeatures200 = {
/**
* @type array
*/
data: FeaturetypesGettableFeatureDTO[];
data?: FeaturetypesGettableFeatureDTO[];
/**
* @type string
*/
status: string;
status?: string;
};
export type GetIngestionKeysParams = {
@@ -3130,19 +3130,19 @@ export type GetIngestionKeysParams = {
};
export type GetIngestionKeys200 = {
data: GatewaytypesGettableIngestionKeysDTO;
data?: GatewaytypesGettableIngestionKeysDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type CreateIngestionKey200 = {
data: GatewaytypesGettableCreatedIngestionKeyDTO;
data?: GatewaytypesGettableCreatedIngestionKeyDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type DeleteIngestionKeyPathParameters = {
@@ -3155,11 +3155,11 @@ export type CreateIngestionKeyLimitPathParameters = {
keyId: string;
};
export type CreateIngestionKeyLimit201 = {
data: GatewaytypesGettableCreatedIngestionKeyLimitDTO;
data?: GatewaytypesGettableCreatedIngestionKeyLimitDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type DeleteIngestionKeyLimitPathParameters = {
@@ -3187,11 +3187,11 @@ export type SearchIngestionKeysParams = {
};
export type SearchIngestionKeys200 = {
data: GatewaytypesGettableIngestionKeysDTO;
data?: GatewaytypesGettableIngestionKeysDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type ListMetricsParams = {
@@ -3220,22 +3220,22 @@ export type ListMetricsParams = {
};
export type ListMetrics200 = {
data: MetricsexplorertypesListMetricsResponseDTO;
data?: MetricsexplorertypesListMetricsResponseDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetMetricAlertsPathParameters = {
metricName: string;
};
export type GetMetricAlerts200 = {
data: MetricsexplorertypesMetricAlertsResponseDTO;
data?: MetricsexplorertypesMetricAlertsResponseDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetMetricAttributesPathParameters = {
@@ -3257,117 +3257,117 @@ export type GetMetricAttributesParams = {
};
export type GetMetricAttributes200 = {
data: MetricsexplorertypesMetricAttributesResponseDTO;
data?: MetricsexplorertypesMetricAttributesResponseDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetMetricDashboardsPathParameters = {
metricName: string;
};
export type GetMetricDashboards200 = {
data: MetricsexplorertypesMetricDashboardsResponseDTO;
data?: MetricsexplorertypesMetricDashboardsResponseDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetMetricHighlightsPathParameters = {
metricName: string;
};
export type GetMetricHighlights200 = {
data: MetricsexplorertypesMetricHighlightsResponseDTO;
data?: MetricsexplorertypesMetricHighlightsResponseDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetMetricMetadataPathParameters = {
metricName: string;
};
export type GetMetricMetadata200 = {
data: MetricsexplorertypesMetricMetadataDTO;
data?: MetricsexplorertypesMetricMetadataDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type UpdateMetricMetadataPathParameters = {
metricName: string;
};
export type GetMetricsStats200 = {
data: MetricsexplorertypesStatsResponseDTO;
data?: MetricsexplorertypesStatsResponseDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetMetricsTreemap200 = {
data: MetricsexplorertypesTreemapResponseDTO;
data?: MetricsexplorertypesTreemapResponseDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetMyOrganization200 = {
data: TypesOrganizationDTO;
data?: TypesOrganizationDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetSessionContext200 = {
data: AuthtypesSessionContextDTO;
data?: AuthtypesSessionContextDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type CreateSessionByEmailPassword200 = {
data: AuthtypesGettableTokenDTO;
data?: AuthtypesGettableTokenDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type RotateSession200 = {
data: AuthtypesGettableTokenDTO;
data?: AuthtypesGettableTokenDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type GetHosts200 = {
data: ZeustypesGettableHostDTO;
data?: ZeustypesGettableHostDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type QueryRangeV5200 = {
data: Querybuildertypesv5QueryRangeResponseDTO;
data?: Querybuildertypesv5QueryRangeResponseDTO;
/**
* @type string
*/
status: string;
status?: string;
};
export type ReplaceVariables200 = {
data: Querybuildertypesv5QueryRangeRequestDTO;
data?: Querybuildertypesv5QueryRangeRequestDTO;
/**
* @type string
*/
status: string;
status?: string;
};

View File

@@ -21,7 +21,7 @@ export function getDefaultCellStyle(isDarkMode?: boolean): CSSProperties {
export const defaultTableStyle: CSSProperties = {
minWidth: '40rem',
maxWidth: '90rem',
maxWidth: '60rem',
};
export const defaultListViewPanelStyle: CSSProperties = {

View File

@@ -48,9 +48,7 @@ function ForgotPassword({
}
try {
ErrorResponseHandlerV2(
(mutationError as unknown) as AxiosError<ErrorV2Resp>,
);
ErrorResponseHandlerV2(mutationError as AxiosError<ErrorV2Resp>);
} catch (apiError) {
return apiError as APIError;
}

View File

@@ -342,7 +342,7 @@ function MultiIngestionSettings(): JSX.Element {
useEffect(() => {
if (isError) {
showErrorNotification(notifications, (error as unknown) as AxiosError);
showErrorNotification(notifications, error as AxiosError);
}
}, [error, isError, notifications]);

View File

@@ -1,7 +1,6 @@
import { ReactNode, useCallback, useEffect, useRef, useState } from 'react';
import { ReactNode, useState } from 'react';
import MEditor, { EditorProps, Monaco } from '@monaco-editor/react';
import { Color } from '@signozhq/design-tokens';
import type { InputRef } from 'antd';
import {
Button,
Collapse,
@@ -47,23 +46,12 @@ function Overview({
handleChangeSelectedView,
}: Props): JSX.Element {
const [isWrapWord, setIsWrapWord] = useState<boolean>(true);
const [isSearchVisible, setIsSearchVisible] = useState<boolean>(true);
const [isSearchVisible, setIsSearchVisible] = useState<boolean>(false);
const [isAttributesExpanded, setIsAttributesExpanded] = useState<boolean>(
true,
);
const [fieldSearchInput, setFieldSearchInput] = useState<string>('');
const focusTimerRef = useRef<ReturnType<typeof setTimeout>>();
const searchInputRef = useCallback((node: InputRef | null) => {
clearTimeout(focusTimerRef.current);
if (node) {
focusTimerRef.current = setTimeout(() => node.focus(), 100);
}
}, []);
useEffect(() => (): void => clearTimeout(focusTimerRef.current), []);
const isDarkMode = useIsDarkMode();
const options: EditorProps['options'] = {
@@ -208,7 +196,7 @@ function Overview({
<>
{isSearchVisible && (
<Input
ref={searchInputRef}
autoFocus
placeholder="Search for a field..."
className="search-input"
value={fieldSearchInput}

View File

@@ -0,0 +1,34 @@
import { Color } from '@signozhq/design-tokens';
import { getColorsForSeverityLabels, isRedLike } from '../utils';
describe('getColorsForSeverityLabels', () => {
it('should return slate for blank labels', () => {
expect(getColorsForSeverityLabels('', 0)).toBe(Color.BG_SLATE_300);
expect(getColorsForSeverityLabels(' ', 0)).toBe(Color.BG_SLATE_300);
});
it('should return correct colors for known severity variants', () => {
expect(getColorsForSeverityLabels('INFO', 0)).toBe(Color.BG_ROBIN_600);
expect(getColorsForSeverityLabels('ERROR', 0)).toBe(Color.BG_CHERRY_600);
expect(getColorsForSeverityLabels('WARN', 0)).toBe(Color.BG_AMBER_600);
expect(getColorsForSeverityLabels('DEBUG', 0)).toBe(Color.BG_AQUA_600);
expect(getColorsForSeverityLabels('TRACE', 0)).toBe(Color.BG_FOREST_600);
expect(getColorsForSeverityLabels('FATAL', 0)).toBe(Color.BG_SAKURA_600);
});
it('should return non-red colors for unrecognized labels at any index', () => {
for (let i = 0; i < 30; i++) {
const color = getColorsForSeverityLabels('4', i);
expect(isRedLike(color)).toBe(false);
}
});
it('should return non-red colors for numeric severity text', () => {
const numericLabels = ['1', '2', '4', '9', '13', '17', '21'];
numericLabels.forEach((label) => {
const color = getColorsForSeverityLabels(label, 0);
expect(isRedLike(color)).toBe(false);
});
});
});

View File

@@ -1,7 +1,16 @@
import { Color } from '@signozhq/design-tokens';
import { themeColors } from 'constants/theme';
import { colors } from 'lib/getRandomColor';
// Function to determine if a color is "red-like" based on its RGB values
export function isRedLike(hex: string): boolean {
const r = parseInt(hex.slice(1, 3), 16);
const g = parseInt(hex.slice(3, 5), 16);
const b = parseInt(hex.slice(5, 7), 16);
return r > 180 && r > g * 1.4 && r > b * 1.4;
}
const SAFE_FALLBACK_COLORS = colors.filter((c) => !isRedLike(c));
const SEVERITY_VARIANT_COLORS: Record<string, string> = {
TRACE: Color.BG_FOREST_600,
Trace: Color.BG_FOREST_500,
@@ -67,8 +76,13 @@ export function getColorsForSeverityLabels(
label: string,
index: number,
): string {
// Check if we have a direct mapping for this severity variant
const variantColor = SEVERITY_VARIANT_COLORS[label.trim()];
const trimmed = label.trim();
if (!trimmed) {
return Color.BG_SLATE_300;
}
const variantColor = SEVERITY_VARIANT_COLORS[trimmed];
if (variantColor) {
return variantColor;
}
@@ -103,5 +117,8 @@ export function getColorsForSeverityLabels(
return Color.BG_SAKURA_500;
}
return colors[index % colors.length] || themeColors.red;
return (
SAFE_FALLBACK_COLORS[index % SAFE_FALLBACK_COLORS.length] ||
Color.BG_SLATE_400
);
}

View File

@@ -111,19 +111,23 @@ const InfinityTable = forwardRef<TableVirtuosoHandle, InfinityTableProps>(
);
const itemContent = useCallback(
(index: number, log: Record<string, unknown>): JSX.Element => (
<TableRow
tableColumns={tableColumns}
index={index}
log={log}
logs={tableViewProps.logs}
hasActions
fontSize={tableViewProps.fontSize}
onShowLogDetails={onSetActiveLog}
isActiveLog={activeLog?.id === log.id}
onClearActiveLog={onCloseActiveLog}
/>
),
(index: number, log: Record<string, unknown>): JSX.Element => {
return (
<div key={log.id as string}>
<TableRow
tableColumns={tableColumns}
index={index}
log={log}
logs={tableViewProps.logs}
hasActions
fontSize={tableViewProps.fontSize}
onShowLogDetails={onSetActiveLog}
isActiveLog={activeLog?.id === log.id}
onClearActiveLog={onCloseActiveLog}
/>
</div>
);
},
[
tableColumns,
onSetActiveLog,
@@ -139,8 +143,7 @@ const InfinityTable = forwardRef<TableVirtuosoHandle, InfinityTableProps>(
{tableColumns
.filter((column) => column.key)
.map((column) => {
const isDragColumn =
column.key !== 'expand' && column.key !== 'state-indicator';
const isDragColumn = column.key !== 'expand';
return (
<TableHeaderCellStyled

View File

@@ -86,9 +86,9 @@ export default function OnboardingIngestionDetails(): JSX.Element {
<div className="ingestion-endpoint-section-error-container">
<Typography.Text className="ingestion-endpoint-section-error-text error">
<TriangleAlert size={14} />{' '}
{((error as unknown) as AxiosError<RenderErrorResponseDTO>)?.response
?.data?.error.message ||
((error as unknown) as AxiosError)?.message ||
{(error as AxiosError<RenderErrorResponseDTO>)?.response?.data?.error
?.message ||
(error as AxiosError)?.message ||
'Something went wrong'}
</Typography.Text>

View File

@@ -110,7 +110,7 @@ function AuthDomain(): JSX.Element {
let errorResult: APIError | null = null;
try {
ErrorResponseHandlerV2(
(errorFetchingAuthDomainListResponse as unknown) as AxiosError<ErrorV2Resp>,
errorFetchingAuthDomainListResponse as AxiosError<ErrorV2Resp>,
);
} catch (error) {
errorResult = error as APIError;

View File

@@ -6,8 +6,8 @@ import (
)
type JSON struct {
Code string `json:"code" required:"true"`
Message string `json:"message" required:"true"`
Code string `json:"code"`
Message string `json:"message"`
Url string `json:"url,omitempty"`
Errors []responseerroradditional `json:"errors,omitempty"`
}

View File

@@ -16,13 +16,13 @@ const (
var json = jsoniter.ConfigCompatibleWithStandardLibrary
type SuccessResponse struct {
Status string `json:"status" required:"true"`
Data interface{} `json:"data,omitempty" required:"true"`
Status string `json:"status"`
Data interface{} `json:"data,omitempty"`
}
type ErrorResponse struct {
Status string `json:"status" required:"true"`
Error *errors.JSON `json:"error" required:"true"`
Status string `json:"status"`
Error *errors.JSON `json:"error"`
}
func Success(rw http.ResponseWriter, httpCode int, data interface{}) {