Skip to content

Commit

Permalink
Add igviz.alpha with a dsl to describe how to draw the graph
Browse files Browse the repository at this point in the history
  • Loading branch information
madstap committed Jan 23, 2021
1 parent ca90fc5 commit c82efae
Show file tree
Hide file tree
Showing 6 changed files with 432 additions and 22 deletions.
23 changes: 12 additions & 11 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{:paths ["src"]
:deps {org.clojure/clojure {:mvn/version "1.10.1"}
org.clojure/alpha.spec
{:git/url "https://github.com/clojure/spec-alpha2.git"
:sha "b644e4d8c5553e10544d920306690fffe9b53e15"}
org.clojure/tools.namespace {:mvn/version "0.3.1"}
ubergraph {:mvn/version "0.8.2"}
integrant {:mvn/version "0.8.0"}
ubergraph/ubergraph {:mvn/version "0.8.2"}
integrant/integrant {:mvn/version "0.8.0"}
integrant/repl {:mvn/version "0.3.1"}
dorothy {:mvn/version "0.0.7"}
madstap/comfy {:mvn/version "1.0.5"}
medley {:mvn/version "1.2.0"}
rhizome {:mvn/version "0.2.9"}
dorothy/dorothy {:mvn/version "0.0.7"}
medley/medley {:mvn/version "1.2.0"}
rhizome/rhizome {:mvn/version "0.2.9"}
macroz/tangle {:mvn/version "0.2.2"}
meta-merge {:mvn/version "1.0.0"}}
:aliases {:dev {:extra-paths ["examples"]}}}
meta-merge/meta-merge {:mvn/version "1.0.0"}}
:aliases {:dev {:extra-paths ["examples"]
:extra-deps {madstap/comfy {:mvn/version "1.0.5"}
org.clojure/alpha.spec
{:git/url "https://github.com/clojure/spec-alpha2.git"
:sha "b644e4d8c5553e10544d920306690fffe9b53e15"}}}
:test {:extra-paths ["test"]}}}
24 changes: 23 additions & 1 deletion examples/kafka.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns kafka
(:require [integrant.core :as ig]
[madstap.igviz :as igviz]
[madstap.igviz.alpha :as igviz]
[medley.core :as medley]))

(defmacro noop-keys [& ks]
Expand Down Expand Up @@ -50,6 +50,28 @@

(comment

(igviz/viz sconf-new (igviz/diff sconf-old) {:open? true})

(def rules
(igviz/comp
;; (diff sconf-old)
igviz/label-edges
{:derived {::topic {:merge-attrs {:shape :box
:height 0.5
:width 4}
:show-config [:topic-name]}
::db {:merge-attrs {:shape :cylinder}
:show-config [:url :wat]}}
:ks {::consumer1 {:merge-attrs {:color :red}}
;; ::error-component :select
}}
))


(igviz/viz config rules {:open? true})

(igviz/viz config {:open? true})

(ig/init config)

(future
Expand Down
Loading

0 comments on commit c82efae

Please sign in to comment.