mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 14:42:02 +03:00
graph-view: fix app-name in metadata
This commit is contained in:
parent
af77d47e73
commit
e206b9c951
@ -46,18 +46,20 @@
|
||||
++ leave
|
||||
%- ot
|
||||
:~ resource+dejs:resource
|
||||
app+app
|
||||
==
|
||||
::
|
||||
++ delete
|
||||
%- ot
|
||||
:~ resource+dejs:resource
|
||||
app+app
|
||||
==
|
||||
::
|
||||
++ join
|
||||
%- ot
|
||||
:~ resource+dejs:resource
|
||||
ship+(su ;~(pfix sig fed:ag))
|
||||
app+app
|
||||
ship+(su ;~(pfix sig fed:ag))
|
||||
==
|
||||
::
|
||||
++ groupify
|
||||
|
@ -37,9 +37,9 @@
|
||||
app=app-name
|
||||
=associated
|
||||
==
|
||||
[%delete rid=resource]
|
||||
[%leave rid=resource]
|
||||
[%join rid=resource =ship app=app-name]
|
||||
[%delete rid=resource app=app-name]
|
||||
[%leave rid=resource app=app-name]
|
||||
[%join rid=resource app=app-name =ship]
|
||||
::[%invite rid=resource ships=(set ship)]
|
||||
[%groupify rid=resource app=app-name to=(unit resource)]
|
||||
==
|
||||
|
@ -41,7 +41,7 @@
|
||||
;< =bowl:spider bind:m get-bowl:strandio
|
||||
?< =(our.bowl entity.rid.action)
|
||||
;< group=(unit resource) bind:m
|
||||
(scry-metadata rid.action)
|
||||
(scry-metadata app.action rid.action)
|
||||
;< ~ bind:m (check-live entity.rid.action)
|
||||
?^ group
|
||||
:: We have group, graph is managed
|
||||
|
@ -7,24 +7,28 @@
|
||||
++ poke-our poke-our:strandio
|
||||
::
|
||||
++ scry-metadata
|
||||
|= rid=resource
|
||||
=/ m (strand ,(unit resource))
|
||||
;< pax=(unit path) bind:m
|
||||
%+ scry:strandio ,(unit path)
|
||||
|= [app=app-name:graph-view rid=resource]
|
||||
=/ m (strand ,resource)
|
||||
^- form:m
|
||||
;< pax=(unit (set path)) bind:m
|
||||
%+ scry:strandio ,(unit (set path))
|
||||
;: weld
|
||||
/gx/metadata-store/resource/graph
|
||||
/gx/metadata-store/resource/[app]
|
||||
(en-path:resource rid)
|
||||
/noun
|
||||
==
|
||||
(pure:m (bind pax de-path:resource))
|
||||
?> ?=(^ pax)
|
||||
?> ?=(^ u.pax)
|
||||
(pure:m (de-path:resource n.u.pax))
|
||||
::
|
||||
++ scry-group
|
||||
|= rid=resource
|
||||
=/ m (strand ,(unit resource))
|
||||
|= [app=app-name:graph-view rid=resource]
|
||||
=/ m (strand ,group)
|
||||
^- form:m
|
||||
;< ugroup=(unit group) bind:m
|
||||
%+ scry:strandio ,(unit group)
|
||||
;: weld
|
||||
/gx/group-store/resource/graph
|
||||
/gx/group-store/resource/[app]
|
||||
(en-path:resource rid)
|
||||
/noun
|
||||
==
|
||||
@ -33,10 +37,11 @@
|
||||
++ delete-graph
|
||||
|= rid=resource
|
||||
=/ m (strand ,~)
|
||||
^- form:m
|
||||
;< ~ bind:m
|
||||
(poke-our %graph-pull-hook %pull-hook-action [%remove rid.action])
|
||||
(poke-our %graph-pull-hook %pull-hook-action !>([%remove rid]))
|
||||
;< ~ bind:m
|
||||
(poke-our %graph-store %graph-update [%archive-graph rid.action])
|
||||
(poke-our %graph-store %graph-update !>([%archive-graph rid]))
|
||||
(pure:m ~)
|
||||
--
|
||||
::
|
||||
@ -48,17 +53,16 @@
|
||||
?> ?=(%leave -.action)
|
||||
;< =bowl:spider bind:m get-bowl:strandio
|
||||
?< =(our.bowl entity.rid.action)
|
||||
;< ugroup-rid=(unit resource) bind:m
|
||||
(scry-metadata rid.action)
|
||||
?~ ugroup-rid !!
|
||||
;< ugroup=(unit group)
|
||||
(scry-group u.ugroup-rid)
|
||||
?~ ugroup (fail:m %nonexistent)
|
||||
?. hidden.u.ugroup
|
||||
(delete-graph rid.action)
|
||||
;< 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 !>(~))
|
||||
;< ~ bind:m
|
||||
(poke-our %group-push-hook %pull-hook-action !>([%remove rid.action]))
|
||||
;< ~ bind:m
|
||||
(poke-our %group-store %group-action !>([%remove-group rid.action])
|
||||
(poke-our %group-store %group-action !>([%remove-group rid.action]))
|
||||
;< ~ bind:m (delete-graph rid.action)
|
||||
(pure:m !>(~))
|
||||
|
Loading…
Reference in New Issue
Block a user