Merge branch 'mark-dashboard' into zuseflat-pretty

Keep track of what files build in userspace
This commit is contained in:
Anton Dyudin 2017-02-13 14:32:17 -08:00
commit 21ce58d6f1
3 changed files with 99 additions and 0 deletions

64
app/mark-dashboard.hoon Normal file
View File

@ -0,0 +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 (of-wall (wush 160 (flop p.b))))
==
++ wush
|= {wid/@u tan/tang} ^- wall
(zing (turn tan |=(a/tank (wash 0^wid a))))
--
::
=, ^gall
=, ^ford
|_ {bowl $~}
++ peek _~
++ peer-scry-x
|= path
[[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
=, space:userlib
=, format
=+ .^(arch %cy (en-beam now-beak /mar))
%+ skim (~(tap by dir))
|= {a/mark $~}
?=(^ (file (en-beam now-beak /hoon/[a]/mar)))
--

9
web/mark-dashboard.hoon Normal file
View File

@ -0,0 +1,9 @@
::
:::: /hoon/mark-dashboard/web
::
/? 310
;div.mini-module
;script@"/~/at/lib/js/urb.js";
;mark-dashboard;
;script@"main.js";
==

View File

@ -0,0 +1,26 @@
TreeActions = window.tree.actions
d = React.DOM
TreeActions.registerComponent("mark-dashboard", React.createClass({
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){
urb.drop("/scry/x/main", {appl:"mark-dashboard"})
$this.setState({data:dat.data})
}
)
}
}))