Replace the unicode arrows

This commit is contained in:
Eugene Yokota 2021-01-10 14:20:43 -05:00
parent dacffb5095
commit ab402543d3
3 changed files with 7 additions and 7 deletions

View File

@ -20,13 +20,13 @@ object IvyReport {
def fromReportXML(doc: Document): ModuleGraph = { def fromReportXML(doc: Document): ModuleGraph = {
def edgesForModule(id: GraphModuleId, revision: NodeSeq): Seq[Edge] = def edgesForModule(id: GraphModuleId, revision: NodeSeq): Seq[Edge] =
for { for {
caller revision \ "caller" caller <- revision \ "caller"
callerModule = moduleIdFromElement(caller, caller.attribute("callerrev").get.text) callerModule = moduleIdFromElement(caller, caller.attribute("callerrev").get.text)
} yield (moduleIdFromElement(caller, caller.attribute("callerrev").get.text), id) } yield (moduleIdFromElement(caller, caller.attribute("callerrev").get.text), id)
val moduleEdges: Seq[(Module, Seq[Edge])] = for { val moduleEdges: Seq[(Module, Seq[Edge])] = for {
mod doc \ "dependencies" \ "module" mod <- doc \ "dependencies" \ "module"
revision mod \ "revision" revision <- mod \ "revision"
rev = revision.attribute("name").get.text rev = revision.attribute("name").get.text
moduleId = moduleIdFromElement(mod, rev) moduleId = moduleIdFromElement(mod, rev)
module = Module( module = Module(

View File

@ -20,7 +20,7 @@ object DOT {
labelRendering: HTMLLabelRendering labelRendering: HTMLLabelRendering
): String = { ): String = {
val nodes = { val nodes = {
for (n graph.nodes) yield { for (n <- graph.nodes) yield {
val style = if (n.isEvicted) EvictedStyle else "" val style = if (n.isEvicted) EvictedStyle else ""
val label = nodeFormation(n.id.organization, n.id.name, n.id.version) val label = nodeFormation(n.id.organization, n.id.name, n.id.version)
""" "%s"[%s style="%s"]""".format( """ "%s"[%s style="%s"]""".format(
@ -56,7 +56,7 @@ object DOT {
.filterNot(e => originWasEvicted(e) || evictionTargetEdges(e)) ++ evictedByEdges .filterNot(e => originWasEvicted(e) || evictionTargetEdges(e)) ++ evictedByEdges
val edges = { val edges = {
for (e filteredEdges) yield { for (e <- filteredEdges) yield {
val extra = val extra =
if (graph.module(e._1).isEvicted) if (graph.module(e._1).isEvicted)
s""" [label="Evicted By" style="$EvictedStyle"]""" s""" [label="Evicted By" style="$EvictedStyle"]"""

View File

@ -15,7 +15,7 @@ import scala.xml.XML
object GraphML { object GraphML {
def saveAsGraphML(graph: ModuleGraph, outputFile: String): Unit = { def saveAsGraphML(graph: ModuleGraph, outputFile: String): Unit = {
val nodesXml = val nodesXml =
for (n graph.nodes) for (n <- graph.nodes)
yield <node id={n.id.idString}><data key="d0"> yield <node id={n.id.idString}><data key="d0">
<y:ShapeNode> <y:ShapeNode>
<y:NodeLabel>{n.id.idString}</y:NodeLabel> <y:NodeLabel>{n.id.idString}</y:NodeLabel>
@ -23,7 +23,7 @@ object GraphML {
</data></node> </data></node>
val edgesXml = val edgesXml =
for (e graph.edges) for (e <- graph.edges)
yield <edge source={e._1.idString} target={e._2.idString}/> yield <edge source={e._1.idString} target={e._2.idString}/>
val xml = val xml =