// Copyright 2024 CloudDetail
// SPDX-License-Identifier: Apache-2.0

package code

var enText = map[string]string{
	ServerError:           "Internal server error",
	ParamBindError:        "Parameter error",
	DbConnectError:        "Failed to connect Database",
	UnAuth:                "not logged in",
	InValidToken:          "invalid token",
	UserNoPermissionError: "You have no permission",
	GroupNoDataError:      "There is no corresponding type of data in the data group",

	MockCreateError: "Failed to create mock",
	MockListError:   "Failed to get mock list",
	MockDetailError: "Failed to get mock detail",
	MockDeleteError: "Failed to delete mock",

	GetServiceUrlRelationError:     "Failed to get service url relation",
	GetDescendantMetricsError:      "Failed to get descendant metrics",
	GetDescendantRelevanceError:    "Failed to get descendant relevance",
	GetPolarisInferError:           "Failed to get polaris infer",
	GetErrorInstanceError:          "Failed to get error instance",
	GetErrorInstanceLogsError:      "Failed to get error instance logs",
	GetLogMetricsError:             "Failed to get log metrics",
	GetLogLogsError:                "Failed to get log logs",
	GetTraceMetricsError:           "Failed to get trace metrics",
	GetTraceLogsError:              "Failed to get trace logs",
	GetServiceListError:            "Failed to get service list",
	GetServiceInstanceOptionsError: "Failed to get service instance list",
	GetServiceEntryEndpointsError:  "Failed to get service entry endpoint list",
	GetK8sEventError:               "Failed to get k8s events",
	GetServiceEndPointListError:    "Failed to get service endpoint list",
	GetServiceRYGLightError:        "Failed to get service RYG light",
	GetSQLMetricError:              "Failed to get sql metric",
	GetNamespaceListError:          "Failed to get namespace list",
	GetServiceREDChartsError:       "Failed to get services's RED charts",

	GetFaultLogContentError: "Failed to get fault log content",
	GetMonitorStatusError:   "Failed to get monitor status",
	QueryLogContextError:    "Failed to query log context",
	QueryLogError:           "Failed to query all logs",
	GetLogChartError:        "Failed to get log chart",
	GetLogIndexError:        "Failed to get log index",

	GetLogTableInfoError:    "Failed to get log table info",
	GetLogParseRuleError:    "Failed to get log parse rule",
	UpdateLogParseRuleError: "Failed to update log parse rule",

	GetTracePageListError:    "Failed to get trace pagelist",
	GetTraceFiltersError:     "Failed to get trace filters",
	GetTraceFilterValueError: "Failed to get trace filter value",
	GetOnOffCPUError:         "Failed to get on off cpu value",
	GetSingleTraceError:      "Failed to get single trace value",
	GetFlameGraphError:       "Failed to get flame graph",

	GetOverviewServiceInstanceListError: "Failed to get overview service instance list",
	GetServiceMoreUrlListError:          "Failed to get service more url list",
	GetThresholdError:                   "Failed to get threshold",
	GetTop3UrlListError:                 "Failed to get top3 url list",
	SetThresholdError:                   "Failed to set threshold",
	GetServicesAlertError:               "Failed to get services alert",
	SetTTLError:                         "Failed to set ttl",
	GetTTLError:                         "Failed to get ttl",
	SetSingleTableTTLError:              "Failed to set single table ttl",

	GetAlertEventsError:       "Failed to get alert events",
	GetAlertEventsSampleError: "Failed to get sample alert events",

	GetAlertRuleError:    "Failed to get alert rule",
	AddAlertRuleError:    "Failed to add alert rule",
	UpdateAlertRuleError: "Failed to update alert rule",
	DeleteAlertRuleError: "Failed to delete alert rule",

	UpdateAlertRuleValidateError:    "Failed to validate alertRule, usually expr is illegle",
	AlertGroupAndLabelMismatchError: "Group and group field in label mismatch",
	AlertKeepFiringForIllegalError:  "'keepFiringFor' illegal",
	AlertForIllegalError:            "'for' illegal",
	AlertOldGroupNotExistError:      "chosen group does not exist",
	AlertAlertNotExistError:         "chosen alert does not exist",
	AlertAlertAlreadyExistError:     "alert already exist",
	AlertConfigFileNotExistError:    "config file does not exist",
	AlertTargetGroupNotExistError:   "target group does not exist",

	GetAMConfigReceiverError:    "Failed to get alertManager config receiver",
	AddAMConfigReceiverError:    "Failed to add alertManager config receiver",
	UpdateAMConfigReceiverError: "Failed to update alertManager config receiver",
	DeleteConfigReceiverError:   "Failed to delete alertManager config receiver",

	AlertManagerReceiverAlreadyExistsError:  "alertManager receiver name already exists",
	AlertManagerReceiverNotExistsError:      "alertManager receiver name not exists",
	AlertManagerReceiverEmailHostMissing:    "alertManager receiver email 'smarthost' missing",
	AlertManagerReceiverEmailFromMissing:    "alertManager receiver email 'from' missing",
	AlertManagerEmptyReceiver:               "alertManager receiver neither set webhook nor set email config",
	AlertManagerDefaultReceiverCannotDelete: "alertManager default receiver cannot be deleted",

	AlertEventImpactError:                        "Failed to get alert event impact",
	AlertEventImpactMissingTag:                   "Failed to get alert event impact, event missing tag ",
	AlertEventImpactNoMatchedService:             "Failed to get alert event impact, no matched service for event ",
	AlertEventIDMissing:                          "Failed to get alert event impact, can not find event by id within the search time range.",
	AlertAnalyzeDescendantAnormalEventDeltaError: "Failed to analyze descendant anormal event",
	GetAnomalySpanError:                          "get anomaly span failed",
	GetDetectMutationExecListError:               "Failed to get detect mutation exec list",
	GetDetectMutationRuleListError:               "Failed to get detect mutation rule list",
	GetQuickMutationMetricError:                  "Failed to get quick mutation metric",
	GetMetricPQLError:                            "Failed to get quick alert rule metrics",

	MutationPQLCheckFailed: "Failed to check mutation by PQL",

	AlertAnalyzeDescendantAnormalEventError:   "Failed to analyze descendant anormal event",
	AlertAnalyzeDescendantAnormalContribution: "Failed to analyze descendant anormal contribution",
	DetectDefectsError:                        "Failed to detect defects",
	DetectDefectsCreatAlertError:              "Failed to detect defects when create alert",
	AddExecRecordError:                        "Failed to add exec record",

	K8sGetResourceError: "Failed to get k8s resource",

	UserNotExistsError:       "User does not exist",
	UserPasswdIncorrectError: "Password is incorrect",
	UserLoginError:           "Failed to login",
	UserTokenExpireError:     "Login expired, please log in again",
	UserAlreadyExists:        "User already exists",
	UserCreateError:          "Failed to create user",
	UserUpdateError:          "Failed to update",
	UserConfirmPasswdError:   "Password inconsistent",
	GetUserInfoError:         "Failed to get user information",
	RemoveUserError:          "Failed to remove user",
	UserPasswdSimpleError:    "Password too week, contains at least one uppercase, lowercase, special characters, and numbers and length greater than 8",
	UserRemoveSelfError:      "Cannot remove yourself",
	UserEmailUsed:            "Email was used",
	UserPhoneUsed:            "Phone was used",
	UserPhoneFormatError:     "Phone number format incorrect",
	UserGrantRoleError:       "Failed to grant permission",
	UserGetRolesERROR:        "Failed to get roles",
	RoleNotExistsError:       "Role does not exist",
	GetMenuConfigError:       "Failed to get menu config",
	UpdateMenuConfigError:    "Failed to update menu config",
	RoleGrantedError:         "Role has been granted to user",
	GetFeatureError:          "Failed to get feature list",
	AuthSubjectNotExistError: "Subject of authorisation does not exist",
	UserGrantPermissionError: "Failed to grant permission",
	ConfigureMenuError:       "Failed to configure menu",
	PermissionNotExistError:  "Menu item does not exist",
	CheckRouterError:         "Failed to check router",
	RouterNotExistsError:     "Router does not exist",

	GetAlertsInputTargetTagsError: "Failed to get alertinput target tags",
	CreateAlertSourceFailed:       "Failed to create alert source",
	AlertSourceAlreadyExisted:     "Failed to create or update alert source caused by duplicated type and name",

	DeleteAlertSourceFailed:           "Failed to delete alert source",
	GetAlertSourceFailed:              "Failed to get alert source",
	CreateClusterFailed:               "Failed to create cluster",
	CreateSchemaFailed:                "Failed to create schema",
	ListSchemaFailed:                  "Failed to list schema",
	DeleteSchemaFailed:                "Failed to delete schema",
	GetSchemaColumnsFailed:            "Failed to get schema columns",
	UpdateSchemaDataFailed:            "Failed to update schema data",
	CheckSchemaUsedFailed:             "Failed to check if schema is used",
	GetSchemaDataFailed:               "Failed to get schema data",
	SetDefaultAlertEnrichRuleFailed:   "Failed to set default alert enrich rule",
	ClearDefaultAlertEnrichRuleFailed: "Failed to clear default alert enrich rule",
	UpdateAlertEnrichRuleFailed:       "Failed to update alert enrich rule",
	UpdateAlertSourceFailed:           "Failed to update alert source",
	AcceptAlertEventFailed:            "Failed to accept alert event",
	ProcessAlertEventFailed:           "Failed to process alert event",
	DeleteClusterFailed:               "Failed to delete cluster",
	ListAlertSourceFailed:             "Failed to list alert source",
	ListClusterFailed:                 "Failed to list cluster",
	GetAlertEnrichRuleFailed:          "Failed to get alert enrich rule",
	AlertSourceNotExisted:             "Alert source does not exist",
	SetupAlertProviderWebhookError:    "Failed to setup alert provider webhook",

	GetDatasourceError:      "Failed to get datasource",
	DataSourceNotExistError: "Datasource does not exist",
	CreateDataGroupError:    "Failed to create data group",
	DeleteDataGroupError:    "Failed to delete data group",
	DataGroupNotExistError:  "Data group does not exist",
	GetDataGroupError:       "Failed to get data group",
	UpdateDataGroupError:    "Failed to update data group name",
	AllocateDatasourceError: "Failed to allocate datasource",
	GetGroupDatasourceError: "Failed to get group's datasource",
	DataGroupExistError:     "Data group already exists",
	DatasourceNotExistError: "Datasource does not exist",
	AssignDataGroupError:    "Failed to assign data group",
	RoleExistsError:         "Role already exists",
	CreateRoleError:         "Failed to create role",
	UpdateRoleError:         "Failed to update role",
	DeleteRoleError:         "Failed to delete role",
	APINotExist:             "Api does not exist",
	AuthError:               "Failed to authorize permission",
	GetGroupSubsError:       "Failed to get data group's assigned subjects",
	UserNameError:           "UserName format invaild",
	AccessGroupError:        "Failed to access group",

	CreateTeamError:       "Failed to create team",
	TeamAlreadyExistError: "Team already exists",
	TeamNotExistError:     "Team does not exist",
	GetTeamError:          "Failed to get team",
	UpdateTeamError:       "Failed to update team",
	DeleteTeamError:       "Failed to delete team",
	AssignToTeamError:     "Failed to assign to team",
	UnSupportedSubType:    "Subject type is unsupported",

	GetIntegrationInstallDocFailed:        "Get integration install doc failed",
	GetIntegrationInstallConfigFileFailed: "Get integration install config file failed",
	GetClusterIntegrationFailed:           "Get cluster integration failed",

	GetAlertEventListError:     "Failed to get alert event list",
	GetAlertEventClassifyError: "Failed to classify alert event list",

	GetAlertSlienceError:    "Failed to get AlertSlience",
	ListAlertSlienceError:   "Failed to list AlertSlience",
	SetAlertSlienceError:    "Failed to set alertSlience",
	RemoveAlertSlienceError: "Failed to remove alertSlience",
	MarkAlertResolvedError:  "Failed to mark alertResourved",

	SearchAlertLabelFilterError: "Failed to search alert label filter",
	SearchAlertFilterValueError: "Failed to search alert filter value",

	CreateCustomTopologyError:     "Failed to create custom topology",
	DeleteCustomTopologyError:     "Failed to delete custom topology",
	ListCustomTopologyError:       "Failed to list custom topology",
	CheckServiceNameRuleError:     "Failed to check service name rule",
	SetServiceNameRuleError:       "Failed to set service name rule",
	ListServiceNameRuleError:      "Failed to list service name rule",
	DeleteServiceNameRuleError:    "Failed to delete service name rule",
	ServiceNameRuleNotExistsError: "service name rule not exists",
	QueryAPPInfoTagsError:         "Failed to query APP info tags",
	QueryAPPInfoValuesError:       "Failed to query APP info values",

	QueryPodsError: "Failed to get pod list",
}
