chart

package
v0.10.2-beta Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Charts map[string]*DSL = map[string]*DSL{}

Charts the loaded chart widgets

Functions

func Export

func Export() error

Export process & api

func Guard

func Guard(c *gin.Context)

Guard form widget chart

func Load

func Load(cfg config.Config) error

Load load task

func LoadAndExport

func LoadAndExport(cfg config.Config) error

LoadAndExport load table

func LoadFrom

func LoadFrom(dir string, prefix string) error

LoadFrom load from dir

Types

type ActionDSL

type ActionDSL struct {
	Setting    *action.Process `json:"setting,omitempty"`
	Component  *action.Process `json:"-"`
	Data       *action.Process `json:"data,omitempty"`
	BeforeData *hook.Before    `json:"before:data,omitempty"`
	AfterData  *hook.After     `json:"after:data,omitempty"`
}

ActionDSL the chart action DSL

func (*ActionDSL) SetDefaultProcess

func (act *ActionDSL) SetDefaultProcess()

SetDefaultProcess set the default value of action

type DSL

type DSL struct {
	ID     string                 `json:"id,omitempty"`
	Name   string                 `json:"name,omitempty"`
	Action *ActionDSL             `json:"action"`
	Layout *LayoutDSL             `json:"layout"`
	Fields *FieldsDSL             `json:"fields"`
	Config map[string]interface{} `json:"config,omitempty"`
	CProps field.CloudProps       `json:"-"`
	compute.Computable
}

DSL the chart DSL

func Get

func Get(chart interface{}) (*DSL, error)

Get chart via process or id

func MustGet

func MustGet(chart interface{}) *DSL

MustGet Get chart via process or id thow error

func New

func New(id string) *DSL

New create a new DSL

func (*DSL) Parse

func (dsl *DSL) Parse() error

Parse Layout

func (*DSL) Validate

func (dsl *DSL) Validate() error

Validate table

func (*DSL) Xgen

func (dsl *DSL) Xgen() (map[string]interface{}, error)

Xgen trans to xgen setting

type FieldsDSL

type FieldsDSL struct {
	Filter field.Filters `json:"filter,omitempty"`
	Chart  field.Columns `json:"chart,omitempty"`
	// contains filtered or unexported fields
}

FieldsDSL the chart fields DSL

func (*FieldsDSL) Xgen

func (fields *FieldsDSL) Xgen() (map[string]interface{}, error)

Xgen trans to xgen setting

type FilterLayoutDSL

type FilterLayoutDSL struct {
	Actions component.Actions   `json:"actions,omitempty"`
	Columns component.Instances `json:"columns,omitempty"`
}

FilterLayoutDSL layout.filter

type LayoutDSL

type LayoutDSL struct {
	Operation *OperationLayoutDSL `json:"operation,omitempty"`
	Chart     *ViewLayoutDSL      `json:"chart,omitempty"`
	Filter    *FilterLayoutDSL    `json:"filter,omitempty"`
}

LayoutDSL the chart layout DSL

func (*LayoutDSL) Xgen

func (layout *LayoutDSL) Xgen() (map[string]interface{}, error)

Xgen trans to Xgen setting

type OperationLayoutDSL

type OperationLayoutDSL struct {
	Actions []component.ActionDSL `json:"actions,omitempty"`
}

OperationLayoutDSL layout.operation

type ViewLayoutDSL

type ViewLayoutDSL struct {
	Columns component.Instances `json:"columns,omitempty"`
}

ViewLayoutDSL layout.form

Jump to

Keyboard shortcuts

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