2020-09-03 08:07:18 +03:00
|
|
|
/- spider, graph-view, graph=graph-store, *metadata-store, *group
|
|
|
|
/+ strandio, resource
|
|
|
|
=>
|
|
|
|
|%
|
|
|
|
++ strand strand:spider
|
|
|
|
++ poke poke:strandio
|
|
|
|
++ poke-our poke-our:strandio
|
2020-09-04 10:51:28 +03:00
|
|
|
::
|
2020-09-03 08:07:18 +03:00
|
|
|
++ scry-metadata
|
2020-09-11 03:10:44 +03:00
|
|
|
|= [app=app-name:graph-view rid=resource]
|
|
|
|
=/ m (strand ,resource)
|
|
|
|
^- form:m
|
|
|
|
;< pax=(unit (set path)) bind:m
|
|
|
|
%+ scry:strandio ,(unit (set path))
|
2020-09-03 08:07:18 +03:00
|
|
|
;: weld
|
2020-09-11 03:10:44 +03:00
|
|
|
/gx/metadata-store/resource/[app]
|
2020-09-03 08:07:18 +03:00
|
|
|
(en-path:resource rid)
|
|
|
|
/noun
|
|
|
|
==
|
2020-09-11 03:10:44 +03:00
|
|
|
?> ?=(^ pax)
|
|
|
|
?> ?=(^ u.pax)
|
|
|
|
(pure:m (de-path:resource n.u.pax))
|
2020-09-04 10:51:28 +03:00
|
|
|
::
|
2020-09-03 08:07:18 +03:00
|
|
|
++ scry-group
|
2020-09-11 03:10:44 +03:00
|
|
|
|= [app=app-name:graph-view rid=resource]
|
|
|
|
=/ m (strand ,group)
|
|
|
|
^- form:m
|
2020-09-03 08:07:18 +03:00
|
|
|
;< ugroup=(unit group) bind:m
|
|
|
|
%+ scry:strandio ,(unit group)
|
|
|
|
;: weld
|
2020-09-11 03:10:44 +03:00
|
|
|
/gx/group-store/resource/[app]
|
2020-09-03 08:07:18 +03:00
|
|
|
(en-path:resource rid)
|
|
|
|
/noun
|
|
|
|
==
|
|
|
|
(pure:m (need ugroup))
|
2020-09-04 10:51:28 +03:00
|
|
|
::
|
2020-09-03 08:07:18 +03:00
|
|
|
++ delete-graph
|
|
|
|
|= rid=resource
|
|
|
|
=/ m (strand ,~)
|
2020-09-11 03:10:44 +03:00
|
|
|
^- form:m
|
2020-09-03 08:07:18 +03:00
|
|
|
;< ~ bind:m
|
2020-09-11 03:10:44 +03:00
|
|
|
(poke-our %graph-pull-hook %pull-hook-action !>([%remove rid]))
|
2020-09-03 08:07:18 +03:00
|
|
|
;< ~ bind:m
|
2020-09-11 03:10:44 +03:00
|
|
|
(poke-our %graph-store %graph-update !>([%archive-graph rid]))
|
2020-09-03 08:07:18 +03:00
|
|
|
(pure:m ~)
|
|
|
|
--
|
2020-09-04 10:51:28 +03:00
|
|
|
::
|
2020-09-03 08:07:18 +03:00
|
|
|
^- thread:spider
|
|
|
|
|= arg=vase
|
|
|
|
=/ m (strand ,vase)
|
|
|
|
^- form:m
|
|
|
|
=+ !<([=action:graph-view ~] arg)
|
|
|
|
?> ?=(%leave -.action)
|
|
|
|
;< =bowl:spider bind:m get-bowl:strandio
|
2020-09-11 06:08:16 +03:00
|
|
|
?: =(our.bowl entity.rid.action)
|
|
|
|
(strand-fail:strandio %bad-request ~)
|
2020-09-11 03:10:44 +03:00
|
|
|
;< group-rid=resource bind:m
|
|
|
|
(scry-metadata app.action rid.action)
|
|
|
|
;< g=group bind:m
|
|
|
|
(scry-group app.action group-rid)
|
|
|
|
?. hidden.g
|
|
|
|
;< ~ bind:m (delete-graph rid.action)
|
|
|
|
(pure:m !>(~))
|
2020-09-03 08:07:18 +03:00
|
|
|
;< ~ bind:m
|
2020-09-10 13:20:00 +03:00
|
|
|
(poke-our %group-push-hook %pull-hook-action !>([%remove rid.action]))
|
2020-09-03 08:07:18 +03:00
|
|
|
;< ~ bind:m
|
2020-09-11 03:10:44 +03:00
|
|
|
(poke-our %group-store %group-action !>([%remove-group rid.action]))
|
2020-09-03 08:07:18 +03:00
|
|
|
;< ~ bind:m (delete-graph rid.action)
|
|
|
|
(pure:m !>(~))
|