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 DefaultPageSize = 20
View Source
const ScenarioKey = "msp-notify-list"

Variables

This section is empty.

Functions

func GetPagingFromGlobalState

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

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 {
	NotifyName string  `json:"notifyName"`
	Status     string  `json:"status"`
	Channel    string  `json:"channel"`
	AlertId    int64   `json:"alertId"`
	SendTime   []int64 `json:"sendTime"`
}

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 DataRef

type DataRef struct {
	DataRef map[string]interface{} `json:"dataRef"`
}

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 NotifyAttributes

type NotifyAttributes struct {
	AlertId   int64  `json:"alertId"`
	AlertName string `json:"alertName"`
	GroupId   int64  `json:"groupId"`
}

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