Skip to content

Commit

Permalink
tweak: use rankdir consistent naming
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Oct 31, 2023
1 parent 519859c commit d109018
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions src/elm/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,8 @@ update msg model =

BuildGraphRotate ->
let
orientation =
case gm.orientation of
rankdir =
case gm.rankdir of
DOT.LR ->
DOT.TB

Expand All @@ -989,7 +989,7 @@ update msg model =

ugm =
{ gm
| orientation = orientation
| rankdir = rankdir
}

um_ =
Expand Down
10 changes: 5 additions & 5 deletions src/elm/Pages/Build/Graph/DOT.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)


Expand Down Expand Up @@ -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" )
Expand Down
2 changes: 1 addition & 1 deletion src/elm/Pages/Build/Graph/View.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/elm/Vela.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d109018

Please sign in to comment.