display result of bunting every top-level mark

This commit is contained in:
Anton Dyudin 2016-11-16 15:58:56 -08:00
parent 32c2cac1a8
commit 62bb062bcb
2 changed files with 62 additions and 6 deletions

View File

@ -1,18 +1,64 @@
|%
++ results (map mark (each vase tang))
++ show-results
=, js:eyre
|= a/results ^- json
:- %o
%- ~(run by a)
|= b/(each vase tang)
?- -.b
$& (jape (text p.b))
$| (jape (rolt (wush 160 (flop p.b))))
==
++ rolt |=(a/wall `tape`?~(a ~ :(weld i.a "\0a" $(a t.a))))
++ wush
|= {wid/@u tan/tang} ^- wall
(zing (turn tan |=(a/tank (wash 0^wid a))))
--
::
=, ^gall
=, ^ford
=, space:clay
|_ {bowl $~}
++ peek _~
++ peer-scry-x
|= path
:_ +>
[ost %diff [%json a+list-marks]]~
[[ost %exec /all-marks our `build-marks]~ +>]
::
++ made-all-marks
|= {path @uvH a/gage}
:_ +>.$
?> ?=($tabl -.a)
=; res/results
[ost %diff [%json (show-results res)]]~
%- malt
%+ turn p.a
|= {k/gage v/gage} ^- {mark (each vase tang)}
:- ?>(?=({$& $mark * @tas} k) q.q.p.k)
?- -.v
$tabl !!
$& [%& q.p.v]
$| v
==
::
++ build-marks
^- {beak silk}
:- now-beak
:- %tabl
%+ turn list-marks
|= {a/mark $~} ^- {silk silk}
:- [%$ %mark !>(a)]
[%bunt a]
::
++ poke-noun
|= *
~& have+list-marks
`+>
::
++ now-beak %_(byk r [%da now])
++ list-marks
=+ .^(arch %cy /(scot %p our)/home/(scot %da now)/mar)
%+ turn (~(tap by dir))
|=({a/mark $~} [%s a])
=+ .^(arch %cy (tope now-beak /mar))
%+ skim (~(tap by dir))
|= {a/mark $~}
?=(^ (file (tope now-beak /hoon/[a]/mar)))
--

View File

@ -1,10 +1,20 @@
TreeActions = window.tree.actions
d = React.DOM
TreeActions.registerComponent("mark-dashboard", React.createClass({
render: function(){ return React.DOM.div({},""+this.state.data)},
render: function(){
return d.ul({},
!this.state.data ? "loading..." :
_.map(this.state.data,
function(result,mark){
return d.li({key:mark},"%"+mark, " ",
(!/\n/.test(result) ? d.code({},result) : d.pre({},d.code({},result)))
)})
)},
getInitialState: function(){ return {data:null}},
componentDidMount: function(){
$this = this
urb.bind("/scry/x/main",
{appl:"mark-dashboard"},
function(err, dat){