Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Commit

Permalink
Horizontal stacking of fields and Configurable form field width in st…
Browse files Browse the repository at this point in the history
…epper

Signed-off-by: Luis Enriquez <felipe096@gmail.com>
  • Loading branch information
lenriquez committed Jun 3, 2021
1 parent cb60e49 commit 331ef55
Show file tree
Hide file tree
Showing 22 changed files with 827 additions and 930 deletions.
1 change: 1 addition & 0 deletions changelogs/unreleased/2020-lenriquez
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Horizontal stacking of fields
1 change: 1 addition & 0 deletions cmd/octant-sample-plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ func initRoutes(router *service.Router) {
form := component.Form{Fields: []component.FormField{
component.NewFormFieldHidden("action", pluginActionName),
}}

testButton := component.Action{
Name: "Test Button",
Title: "Test Button",
Expand Down
4 changes: 3 additions & 1 deletion pkg/view/component/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const (
TypeAccordion = "accordion"
// TypeAnnotations is an annotations component.
TypeAnnotations = "annotations"
// ButtonGroup is a button group component.
// TypeButtonGroup is a button group component.
TypeButtonGroup = "buttonGroup"
// TypeCard is a card component.
TypeCard = "card"
Expand All @@ -36,6 +36,8 @@ const (
TypeExpressionSelector = "expressionSelector"
// TypeFlexLayout is a flex layout component.
TypeFlexLayout = "flexlayout"
// TypeFormField is a form field component.
TypeFormField = "formField"
// TypeGraphviz is a graphviz component.
TypeGraphviz = "graphviz"
// TypeGridActions is a grid actions component.
Expand Down
2 changes: 1 addition & 1 deletion pkg/view/component/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ type containersMarshal Containers
// MarshalJSON implements json.Marshaler
func (t *Containers) MarshalJSON() ([]byte, error) {
m := containersMarshal(*t)
m.Metadata.Type = "containers"
m.Metadata.Type = TypeContainers
return json.Marshal(&m)
}
Loading

0 comments on commit 331ef55

Please sign in to comment.