2021-04-06 12:40:40 +00:00
|
|
|
<Route
|
|
|
|
@name={{routeName}}
|
|
|
|
as |route|>
|
2021-09-15 18:50:11 +00:00
|
|
|
<DataLoader
|
|
|
|
@src={{
|
|
|
|
uri '/${partition}/${nspace}/${dc}/intentions'
|
|
|
|
(hash
|
|
|
|
partition=route.params.partition
|
|
|
|
nspace=route.params.nspace
|
|
|
|
dc=route.params.dc
|
|
|
|
)}}
|
|
|
|
as |api|>
|
2020-07-09 09:08:47 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
<BlockSlot @name="error">
|
|
|
|
<AppError
|
|
|
|
@error={{api.error}}
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
/>
|
|
|
|
</BlockSlot>
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
<BlockSlot @name="loaded">
|
|
|
|
{{#let
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
(hash
|
|
|
|
value=(or sortBy "Action:asc")
|
|
|
|
change=(action (mut sortBy) value="target.selected")
|
2020-12-01 15:45:09 +00:00
|
|
|
)
|
2021-04-06 12:40:40 +00:00
|
|
|
|
|
|
|
(hash
|
|
|
|
access=(hash
|
|
|
|
value=(if access (split access ',') undefined)
|
|
|
|
change=(action (mut access) value="target.selectedItems")
|
|
|
|
)
|
|
|
|
searchproperty=(hash
|
|
|
|
value=(if (not-eq searchproperty undefined)
|
|
|
|
(split searchproperty ',')
|
|
|
|
searchProperties
|
|
|
|
)
|
|
|
|
change=(action (mut searchproperty) value="target.selectedItems")
|
|
|
|
default=searchProperties
|
2021-01-25 18:13:54 +00:00
|
|
|
)
|
|
|
|
)
|
2020-10-26 09:30:07 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
api.data
|
2020-09-01 18:13:11 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
as |sort filters items|}}
|
2020-09-01 18:13:11 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
2021-09-15 18:50:11 +00:00
|
|
|
<route.Title @title="Intentions" /> <em>{{format-number items.length}} total</em>
|
2021-04-06 12:40:40 +00:00
|
|
|
</h1>
|
|
|
|
<label for="toolbar-toggle"></label>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
|
|
|
{{#if (can 'create intentions')}}
|
2023-02-22 21:05:15 +00:00
|
|
|
<Hds::Button
|
|
|
|
@text='Create'
|
|
|
|
@route='dc.intentions.create'
|
|
|
|
data-test-create
|
|
|
|
/>
|
2021-04-06 12:40:40 +00:00
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="toolbar">
|
2020-10-26 09:30:07 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
{{#if (gt items.length 0) }}
|
|
|
|
<Consul::Intention::SearchBar
|
|
|
|
@search={{search}}
|
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
@sort={{sort}}
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
@filter={{filters}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
<DataWriter
|
2021-09-15 18:50:11 +00:00
|
|
|
@sink={{uri '/${partition}/${dc}/${nspace}/intention/'
|
|
|
|
(hash
|
|
|
|
partition=route.params.partition
|
|
|
|
nspace=route.params.nspace
|
|
|
|
dc=route.params.dc
|
|
|
|
)
|
|
|
|
}}
|
2021-04-06 12:40:40 +00:00
|
|
|
@type="intention"
|
|
|
|
@ondelete={{refresh-route}}
|
|
|
|
as |writer|>
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
<DataCollection
|
|
|
|
@type="intention"
|
|
|
|
@sort={{sort.value}}
|
|
|
|
@filters={{filters}}
|
|
|
|
@search={{search}}
|
|
|
|
@items={{items}}
|
|
|
|
as |collection|>
|
|
|
|
<collection.Collection>
|
|
|
|
<Consul::Intention::List
|
|
|
|
@items={{collection.items}}
|
|
|
|
@delete={{writer.delete}}
|
|
|
|
as |list|>
|
|
|
|
<list.CustomResourceNotice />
|
|
|
|
<list.Table />
|
|
|
|
</Consul::Intention::List>
|
|
|
|
</collection.Collection>
|
|
|
|
<collection.Empty>
|
|
|
|
<EmptyState
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h2>
|
2022-04-11 11:49:59 +00:00
|
|
|
{{t 'routes.dc.intentions.index.empty.header'
|
|
|
|
items=items.length
|
|
|
|
}}
|
2021-04-06 12:40:40 +00:00
|
|
|
</h2>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
2022-04-11 11:49:59 +00:00
|
|
|
{{t 'routes.dc.intentions.index.empty.body'
|
|
|
|
items=items.length
|
2022-10-06 17:01:49 +00:00
|
|
|
canUseACLs=(can "use acls")
|
2022-04-11 11:49:59 +00:00
|
|
|
htmlSafe=true
|
|
|
|
}}
|
2021-04-06 12:40:40 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
2023-02-22 21:05:15 +00:00
|
|
|
<li>
|
|
|
|
<Hds::Link::Standalone
|
|
|
|
@text='Documentation on intentions'
|
|
|
|
@href="{{env 'CONSUL_DOCS_URL'}}/commands/intention"
|
|
|
|
@icon='docs-link'
|
|
|
|
@iconPosition='trailing'
|
|
|
|
@size='small'
|
|
|
|
/>
|
2021-04-06 12:40:40 +00:00
|
|
|
</li>
|
2023-02-22 21:05:15 +00:00
|
|
|
<li>
|
|
|
|
<Hds::Link::Standalone
|
|
|
|
@text='Take the tutorial'
|
|
|
|
@href="{{env 'CONSUL_DOCS_LEARN_URL'}}/consul/getting-started/connect"
|
|
|
|
@icon='learn-link'
|
|
|
|
@iconPosition='trailing'
|
|
|
|
@size='small'
|
|
|
|
/>
|
2021-04-06 12:40:40 +00:00
|
|
|
</li>
|
|
|
|
</BlockSlot>
|
|
|
|
</EmptyState>
|
|
|
|
</collection.Empty>
|
|
|
|
</DataCollection>
|
|
|
|
</BlockSlot>
|
|
|
|
</DataWriter>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
</DataLoader>
|
|
|
|
</Route>
|