Skip to content

Commit b9cb603

Browse files
fix route-refresh helper invocation deprecation and ember-can deprecation (#23011)
1 parent 6b1e87c commit b9cb603

File tree

8 files changed

+22
-13
lines changed

8 files changed

+22
-13
lines changed

ui/packages/consul-lock-sessions/app/templates/dc/nodes/show/sessions.hbs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
}}
55

66
<Route
7-
@name={{routeName}}
7+
@name={{this.routeName}}
88
as |route|>
99
<DataLoader @src={{uri '/${partition}/${nspace}/${dc}/sessions/for-node/${node}'
1010
(hash
@@ -23,7 +23,7 @@ as |route|>
2323
</BlockSlot>
2424

2525
<BlockSlot @name="loaded">
26-
{{#let api.data as |items|}}
26+
{{#let api.data (refresh-route) as |items refreshRoute|}}
2727
<div class="tab-section">
2828
<DataWriter
2929
@sink={{uri '/${partition}/${dc}/${nspace}/session/'
@@ -35,7 +35,8 @@ as |route|>
3535
}}
3636
@type="session"
3737
@label="Lock Session"
38-
@ondelete={{refresh-route}}
38+
{{!-- @ondelete={{refresh-route}} --}}
39+
@ondelete={{refreshRoute}}
3940
as |writer|>
4041

4142
<BlockSlot @name="removed" as |after|>

ui/packages/consul-nspaces/app/templates/dc/nspaces/index.hbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ as |route|>
7474
{{/if}}
7575
</BlockSlot>
7676
<BlockSlot @name="content">
77+
{{#let (refresh-route) as |refreshRoute|}}
7778
<DataWriter
7879
@sink={{uri '/${partition}/${dc}/${nspace}/nspace/'
7980
(hash
@@ -84,7 +85,7 @@ as |route|>
8485
}}
8586
@type="nspace"
8687
@label="Namespace"
87-
@ondelete={{refresh-route}}
88+
@ondelete={{refreshRoute}}
8889
as |writer|>
8990
<BlockSlot @name="removed" as |after|>
9091
<Consul::Nspace::Notifications
@@ -150,6 +151,7 @@ as |route|>
150151
</DataCollection>
151152
</BlockSlot>
152153
</DataWriter>
154+
{{/let}}
153155
</BlockSlot>
154156
</AppView>
155157
{{/let}}

ui/packages/consul-partitions/app/templates/dc/partitions/index.hbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ as |route|>
7474
{{/if}}
7575
</BlockSlot>
7676
<BlockSlot @name="content">
77+
{{#let (refresh-route) as |refreshRoute|}}
7778
<DataWriter
7879
@sink={{uri '/${partition}/${dc}/${nspace}/partition/'
7980
(hash
@@ -84,7 +85,7 @@ as |route|>
8485
}}
8586
@type="partition"
8687
@label="Partition"
87-
@ondelete={{refresh-route}}
88+
@ondelete={{refreshRoute}}
8889
as |writer|>
8990
<BlockSlot @name="removed" as |after|>
9091
<Consul::Partition::Notifications
@@ -140,6 +141,7 @@ as |route|>
140141
</DataCollection>
141142
</BlockSlot>
142143
</DataWriter>
144+
{{/let}}
143145
</BlockSlot>
144146
</AppView>
145147
{{/let}}

ui/packages/consul-ui/.template-lintrc.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ module.exports = {
2828
'style-concatenation': false,
2929
'link-rel-noopener': false,
3030

31-
'no-implicit-this': {
32-
allow: ['refresh-route'],
33-
},
31+
'no-implicit-this': 'error',
3432
'no-curly-component-invocation': false,
3533
'no-action': false,
3634
'no-negated-condition': false,

ui/packages/consul-ui/app/services/abilities.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: BUSL-1.1
44
*/
55

6-
import Service from 'ember-can/services/can';
6+
import Service from 'ember-can/services/abilities';
77

88
export default class AbilitiesService extends Service {
99
parse(str) {

ui/packages/consul-ui/app/templates/dc/intentions/index.hbs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ as |route|>
8181

8282
</BlockSlot>
8383
<BlockSlot @name="content">
84+
{{#let (refresh-route) as |refreshRoute|}}
8485
<DataWriter
8586
@sink={{uri '/${partition}/${dc}/${nspace}/intention/'
8687
(hash
@@ -90,8 +91,8 @@ as |route|>
9091
)
9192
}}
9293
@type="intention"
93-
@ondelete={{refresh-route}}
94-
@onchange={{refresh-route}}
94+
@ondelete={{refreshRoute}}
95+
@onchange={{refreshRoute}}
9596
as |writer|>
9697
<BlockSlot @name="content">
9798
<DataCollection
@@ -153,6 +154,7 @@ as |route|>
153154
</DataCollection>
154155
</BlockSlot>
155156
</DataWriter>
157+
{{/let}}
156158
</BlockSlot>
157159
</AppView>
158160

ui/packages/consul-ui/app/templates/dc/kv/index.hbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ as |sort filters parent items|}}
138138
{{/if}}
139139
</BlockSlot>
140140
<BlockSlot @name="content">
141+
{{#let (refresh-route) as |refreshRoute|}}
141142
<DataWriter
142143
@sink={{uri '/${partition}/${nspace}/${dc}/kv/'
143144
(hash
@@ -148,7 +149,7 @@ as |sort filters parent items|}}
148149
}}
149150
@type="kv"
150151
@label="key"
151-
@ondelete={{refresh-route}}
152+
@ondelete={{refreshRoute}}
152153
as |writer|>
153154
<BlockSlot @name="content">
154155
<DataCollection
@@ -208,6 +209,7 @@ as |sort filters parent items|}}
208209
</DataCollection>
209210
</BlockSlot>
210211
</DataWriter>
212+
{{/let}}
211213
</BlockSlot>
212214
</AppView>
213215
{{/let}}

ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ as |route|>
6666
@filter={{filters}}
6767
/>
6868
{{/if}}
69+
{{#let (refresh-route) as |refreshRoute|}}
6970
<DataWriter
7071
@sink={{uri
7172
'/${partition}/${dc}/${nspace}/intention/'
@@ -76,7 +77,7 @@ as |route|>
7677
)
7778
}}
7879
@type="intention"
79-
@ondelete={{refresh-route}}
80+
@ondelete={{refreshRoute}}
8081
as |writer|>
8182
<BlockSlot @name="content">
8283
<DataCollection
@@ -140,6 +141,7 @@ as |route|>
140141
</DataCollection>
141142
</BlockSlot>
142143
</DataWriter>
144+
{{/let}}
143145
</div>
144146
{{/let}}
145147
</BlockSlot>

0 commit comments

Comments
 (0)