Documentation ¶
Index ¶
- Constants
- func FormatTimeMs(timestamp int64) string
- func GetAlertEventFromGlobalState(gs cptype.GlobalStateData) *pb.AlertEventItem
- func GetInterval(startTimeMs, endTimeMs int64, minInterval time.Duration, preferredPoints int64) string
- func GetMonitorAlertServiceFromContext(ctx context.Context) monitorpb.AlertServiceServer
- func GetMonitorMetricServiceFromContext(ctx context.Context) metricpb.MetricServiceServer
- func GetPagingFromGlobalState(globalState cptype.GlobalStateData) (pageNo int64, pageSize int64)
- func SetAlertEventToGlobalState(gs cptype.GlobalStateData, alertEvent *pb.AlertEventItem)
- func SetPagingToGlobalState(globalState cptype.GlobalStateData, opData table.OpTableChangePageClientData)
- func SetSortsToGlobalState(globalState cptype.GlobalStateData, opData table.OpTableChangeSortClientData)
- type AlertExpression
- type AlertExpressionFilter
- type AlertExpressionFunction
- type InParams
- type Sort
Constants ¶
View Source
const ( ComponentNameMoreOperations = "moreOperations" ComponentNamePauseFormModal = "pauseFormModal" ComponentNameEventOverviewInfo = "eventOverviewInfo" ComponentNameEventStatusInfo = "eventStatusInfo" ComponentNameMonitorDataChart = "monitorDataChart" ComponentNameEventHistoryTable = "eventHistoryTable" )
View Source
const ( StateKeyAlertEvent = "alertEvent" StateKeyPageTitle = "pageTitle" )
View Source
const ( GlobalStateKeyConfigurableFilterOptionsKey = "gsConfigurableFilterOptions" GlobalStateKeyPaging = "table_paging" GlobalStateKeySort = "table_sort" )
View Source
const ( AlertEventStateAlert = "alert" AlertEventStateRecover = "recover" AlertEventStatePause = "pause" AlertEventStateStop = "stop" )
View Source
const DefaultPageSize = 10
View Source
const ScenarioKey = "msp-alert-event-detail"
View Source
const TimeFormatLayout = "2006/01/02 15:04:05"
Variables ¶
This section is empty.
Functions ¶
func FormatTimeMs ¶
func GetAlertEventFromGlobalState ¶
func GetAlertEventFromGlobalState(gs cptype.GlobalStateData) *pb.AlertEventItem
func GetInterval ¶
func GetMonitorAlertServiceFromContext ¶
func GetMonitorAlertServiceFromContext(ctx context.Context) monitorpb.AlertServiceServer
func GetMonitorMetricServiceFromContext ¶
func GetMonitorMetricServiceFromContext(ctx context.Context) metricpb.MetricServiceServer
func GetPagingFromGlobalState ¶
func GetPagingFromGlobalState(globalState cptype.GlobalStateData) (pageNo int64, pageSize int64)
func SetAlertEventToGlobalState ¶
func SetAlertEventToGlobalState(gs cptype.GlobalStateData, alertEvent *pb.AlertEventItem)
func SetPagingToGlobalState ¶
func SetPagingToGlobalState(globalState cptype.GlobalStateData, opData table.OpTableChangePageClientData)
func SetSortsToGlobalState ¶
func SetSortsToGlobalState(globalState cptype.GlobalStateData, opData table.OpTableChangeSortClientData)
Types ¶
type AlertExpression ¶
type AlertExpression struct { Filters []*AlertExpressionFilter `json:"filters"` Functions []*AlertExpressionFunction `json:"functions"` Group []string `json:"group"` Metric string `json:"metric"` Metrics []string `json:"metrics"` Outputs []string `json:"outputs"` Select map[string]string `json:"select"` Window *int64 `json:"window"` }
type AlertExpressionFilter ¶
type AlertExpressionFunction ¶
type AlertExpressionFunction struct { Alias *string `json:"alias"` Aggregator string `json:"aggregator"` Field string `json:"field"` FieldScript *string `json:"fieldScript"` Operator *string `json:"operator"` Value interface{} `json:"value"` Trigger string `json:"trigger"` Condition string `json:"condition"` }
type InParams ¶
type Sort ¶
func GetSortsFromGlobalState ¶
func GetSortsFromGlobalState(globalState cptype.GlobalStateData) []*Sort
Click to show internal directories.
Click to hide internal directories.