From d10901804f218c90a61fa083ba8a88898909b9b8 Mon Sep 17 00:00:00 2001 From: davidvader Date: Tue, 31 Oct 2023 12:39:10 -0500 Subject: [PATCH] tweak: use rankdir consistent naming --- docker-compose.yml | 4 +++- src/elm/Main.elm | 6 +++--- src/elm/Pages/Build/Graph/DOT.elm | 10 +++++----- src/elm/Pages/Build/Graph/View.elm | 2 +- src/elm/Vela.elm | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2498e4d92..ee81ff153 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,7 +34,9 @@ services: # https://go-vela.github.io/docs/administration/server/ server: container_name: server - image: target/vela-server:latest + # image: target/vela-server:latest + build: + context: ../server/ networks: - vela environment: diff --git a/src/elm/Main.elm b/src/elm/Main.elm index a0b8fc5c3..ec3ef85a9 100644 --- a/src/elm/Main.elm +++ b/src/elm/Main.elm @@ -979,8 +979,8 @@ update msg model = BuildGraphRotate -> let - orientation = - case gm.orientation of + rankdir = + case gm.rankdir of DOT.LR -> DOT.TB @@ -989,7 +989,7 @@ update msg model = ugm = { gm - | orientation = orientation + | rankdir = rankdir } um_ = diff --git a/src/elm/Pages/Build/Graph/DOT.elm b/src/elm/Pages/Build/Graph/DOT.elm index 11c0841a2..c09c5439d 100644 --- a/src/elm/Pages/Build/Graph/DOT.elm +++ b/src/elm/Pages/Build/Graph/DOT.elm @@ -135,9 +135,9 @@ renderDOT model repo build buildGraph = else "" - -- reverse the subgraphs for top-bottom orientation to consistently group services and built-ins + -- reverse the subgraphs for top-bottom rankdir to consistently group services and built-ins rotation = - case model.repo.build.graph.orientation of + case model.repo.build.graph.rankdir of TB -> List.reverse @@ -157,7 +157,7 @@ renderDOT model repo build buildGraph = , serviceSubgraph ] in - digraph (baseGraphStyles model.repo.build.graph.orientation) + digraph (baseGraphStyles model.repo.build.graph.rankdir) (rotation subgraphs) @@ -296,8 +296,8 @@ edgeToString edge = {-| baseGraphStyles : returns the base styles applied to the root graph. -} baseGraphStyles : Rankdir -> Styles -baseGraphStyles orientation = - { rankdir = orientation +baseGraphStyles rankdir = + { rankdir = rankdir , graph = escapeAttributes [ ( "bgcolor", DefaultEscape "transparent" ) diff --git a/src/elm/Pages/Build/Graph/View.elm b/src/elm/Pages/Build/Graph/View.elm index 550041a9b..df9650ce0 100644 --- a/src/elm/Pages/Build/Graph/View.elm +++ b/src/elm/Pages/Build/Graph/View.elm @@ -54,7 +54,7 @@ view model msgs org repo buildNumber = , class "-icon" , class "build-graph-action-rotate" , class <| - case model.repo.build.graph.orientation of + case model.repo.build.graph.rankdir of DOT.TB -> "-vertical" diff --git a/src/elm/Vela.elm b/src/elm/Vela.elm index 00f858cf8..bffbad0b8 100644 --- a/src/elm/Vela.elm +++ b/src/elm/Vela.elm @@ -1416,7 +1416,7 @@ type alias BuildGraphRenderInteropData = type alias BuildGraphModel = { buildNumber : BuildNumber , graph : WebData BuildGraph - , orientation : DOT.Rankdir + , rankdir : DOT.Rankdir , filter : String , focusedNode : Int , showServices : Bool