Documentation ¶
Index ¶
- Constants
- Variables
- func GetPagingFromGlobalState(globalState cptype.GlobalStateData) (pageNo int64, pageSize int64)
- func IdNameValuesToSelectOptions(values []*IdNameValue) []model.SelectOption
- func SetPagingToGlobalState(globalState cptype.GlobalStateData, opData table.OpTableChangePageClientData)
- func SetSortsToGlobalState(globalState cptype.GlobalStateData, opData table.OpTableChangeSortClientData)
- type ConfigurableFilterOptions
- func (f *ConfigurableFilterOptions) DecodeFromClientData(data filter.OpFilterClientData) *ConfigurableFilterOptions
- func (f *ConfigurableFilterOptions) GetFromGlobalState(gs cptype.GlobalStateData) *ConfigurableFilterOptions
- func (f *ConfigurableFilterOptions) SetToGlobalState(gs cptype.GlobalStateData)
- func (f *ConfigurableFilterOptions) UpdateName(name string) *ConfigurableFilterOptions
- type IdNameValue
- type InParams
- type Sort
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 ¶
View Source
var LevelColors = map[string]string{ Fatal: ColorError, Critical: ColorWarning, Warning: ColorDefault, Notice: ColorProcessing, }
View Source
var StateColors = map[string]string{ Alert: ColorError, Recover: ColorProcessing, Pause: ColorDefault, Stop: ColorWarning, }
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 (f *ConfigurableFilterOptions) DecodeFromClientData(data filter.OpFilterClientData) *ConfigurableFilterOptions
func (*ConfigurableFilterOptions) GetFromGlobalState ¶
func (f *ConfigurableFilterOptions) GetFromGlobalState(gs cptype.GlobalStateData) *ConfigurableFilterOptions
func (*ConfigurableFilterOptions) SetToGlobalState ¶
func (f *ConfigurableFilterOptions) SetToGlobalState(gs cptype.GlobalStateData)
func (*ConfigurableFilterOptions) UpdateName ¶
func (f *ConfigurableFilterOptions) UpdateName(name string) *ConfigurableFilterOptions
type IdNameValue ¶
type IdNameValue struct { Id interface{} Name string }
type Sort ¶
func GetSortsFromGlobalState ¶
func GetSortsFromGlobalState(globalState cptype.GlobalStateData) []*Sort
Click to show internal directories.
Click to hide internal directories.