v0.38.0 lwconf updates for deployment
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s
lwconf: sparse stages, every problem of a part, pastes read by form
This commit is contained in:
1 parent
15ea410a0a
commit
6a168212de
17 files changed
+376
-180
No files matched your search
@@ -338,7 +338,7 @@ func (a *app) summary(n compose.Node) string {
|
||||
if n.Role == "filters" {
|
||||
var out []string
|
||||
for _, f := range a.pipeline().Flow.Filters {
|
||||
sign := map[config.FilterType]string{"include": "+", "exclude": "-"}[f.Type]
|
||||
sign := map[config.FilterType]string{"include": "+", "exclude": "-"}[filled(f).Type]
|
||||
out = append(out, sign+strings.Join(f.Patterns, "|"))
|
||||
}
|
||||
return strings.Join(out, " ")
|
||||
|
||||
@@ -52,7 +52,7 @@ func (a *app) lines() []line {
|
||||
filters := a.pipeline().Flow.Filters
|
||||
for i, f := range filters {
|
||||
fn := compose.Node{Role: "filters", Index: i}
|
||||
out = append(out, line{node: fn, group: fmt.Sprintf("%d %s", i+1, f.Type), item: -1})
|
||||
out = append(out, line{node: fn, group: fmt.Sprintf("%d %s", i+1, filled(f).Type), item: -1})
|
||||
if a.insp.open[a.foldKey(fn, "")] {
|
||||
out = a.keyLines(out, fn, a.keys(n), "", 1)
|
||||
}
|
||||
@@ -60,6 +60,12 @@ func (a *app) lines() []line {
|
||||
return append(out, line{node: compose.Node{Role: "filters", Index: len(filters)}, item: -1, add: true})
|
||||
}
|
||||
|
||||
// filled is a filter as it runs: an unset type or logic its default
|
||||
func filled(f config.FilterConfig) config.FilterConfig {
|
||||
config.Fill(&f)
|
||||
return f
|
||||
}
|
||||
|
||||
func (a *app) keyLines(out []line, n compose.Node, keys []config.Key, prefix string, depth int) []line {
|
||||
for _, k := range keys {
|
||||
name := k.Name
|
||||
@@ -285,7 +291,7 @@ func choice(k config.Key, cur any) int {
|
||||
// keys, a filter's logic and patterns
|
||||
func (a *app) groupSummary(l line) string {
|
||||
if l.key.Name == "" {
|
||||
f := a.pipeline().Flow.Filters[l.node.Index]
|
||||
f := filled(a.pipeline().Flow.Filters[l.node.Index])
|
||||
return string(f.Logic) + " " + strings.Join(f.Patterns, " ")
|
||||
}
|
||||
switch v := a.value(l.node, l.key.Name).(type) {
|
||||
|
||||
@@ -761,7 +761,7 @@ func (a *app) verdict(w *row) string {
|
||||
text := fmt.Sprintf("dropped by filter %d", w.index+1)
|
||||
if pi := a.pipeIndex(w.pipe); pi >= 0 {
|
||||
if fs := a.comp.Pipelines[pi].Flow.Filters; w.index < len(fs) {
|
||||
text += " (" + string(fs[w.index].Type) + " " + strings.Join(fs[w.index].Patterns, " | ") + ")"
|
||||
text += " (" + string(filled(fs[w.index]).Type) + " " + strings.Join(fs[w.index].Patterns, " | ") + ")"
|
||||
}
|
||||
}
|
||||
return text
|
||||
|
||||
Reference in new issue
Block a user