common

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentNameConfigurableFilter = "configurableFilter"
	ComponentNameSearchFilter       = "searchFilter"
	ComponentNameTable              = "table"
)
View Source
const (
	GlobalStateKeyConfigurableFilterOptionsKey = "gsConfigurableFilterOptions"
	GlobalStateKeySearchFilterOptionsKey       = "gsSearchFilterOptions"
	GlobalStateKeyPaging                       = "table_paging"
	GlobalStateKeySort                         = "table_sort"
)
View Source
const (
	Fatal    string = "FATAL"
	Critical string = "CRITICAL"
	Warning  string = "WARNING"
	Notice   string = "NOTICE"

	Alert   string = "alert"
	Recover string = "recover"
	Pause   string = "pause"
	Stop    string = "stop"

	System string = "System"
	Custom string = "Custom"

	ColorProcessing string = "processing"
	ColorDefault    string = "default"
	ColorWarning    string = "warning"
	ColorError      string = "error"
)
View Source
const DefaultPageSize = 20
View Source
const ScenarioKey = "msp-alert-event-list"

Variables

Functions

func GetPagingFromGlobalState

func GetPagingFromGlobalState(globalState cptype.GlobalStateData) (pageNo int64, pageSize int64)

func IdNameValuesToSelectOptions

func IdNameValuesToSelectOptions(values []*IdNameValue) []model.SelectOption

func SetPagingToGlobalState

func SetPagingToGlobalState(globalState cptype.GlobalStateData, opData table.OpTableChangePageClientData)

func SetSortsToGlobalState

func SetSortsToGlobalState(globalState cptype.GlobalStateData, opData table.OpTableChangeSortClientData)

Types

type ConfigurableFilterOptions

type ConfigurableFilterOptions struct {
	Name               string    `json:"name,omitempty"`
	AlertRuleIds       []uint64  `json:"alertRuleIds,omitempty"`
	AlertIds           []uint64  `json:"alertIds,omitempty"`
	AlertLevels        []string  `json:"alertLevels,omitempty"`
	AlertStates        []string  `json:"alertStates,omitempty"`
	AlertSources       []string  `json:"alertSources,omitempty"`
	LastTriggerTime    []*uint64 `json:"lastTriggerTime,omitempty"`
	LastTriggerTimeMin uint64    `json:"lastTriggerTimeMin,omitempty"`
	LastTriggerTimeMax uint64    `json:"lastTriggerTimeMax,omitempty"`
}

func NewConfigurableFilterOptions

func NewConfigurableFilterOptions() *ConfigurableFilterOptions

func (*ConfigurableFilterOptions) DecodeFromClientData

func (*ConfigurableFilterOptions) GetFromGlobalState

func (*ConfigurableFilterOptions) SetToGlobalState

func (f *ConfigurableFilterOptions) SetToGlobalState(gs cptype.GlobalStateData)

func (*ConfigurableFilterOptions) UpdateName

type IdNameValue

type IdNameValue struct {
	Id   interface{}
	Name string
}

type InParams

type InParams struct {
	Scope   string `json:"scope"`
	ScopeId string `json:"scopeId"`
}

func ParseFromCpSdk

func ParseFromCpSdk(sdk *cptype.SDK) (*InParams, error)

type Sort

type Sort struct {
	FieldKey  string
	Ascending bool
}

func GetSortsFromGlobalState

func GetSortsFromGlobalState(globalState cptype.GlobalStateData) []*Sort

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL