Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/26790.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: Refresh model within a namespace on the Secrets Sync overview page.
```
3 changes: 2 additions & 1 deletion ui/lib/sync/addon/components/secrets/page/overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export default class SyncSecretsDestinationsPageComponent extends Component<Args
yield this.store
.adapterFor('application')
.ajax('/v1/sys/activation-flags/secrets-sync/activate', 'POST', { namespace: null });
this.router.transitionTo('vault.cluster.sync.secrets.overview');
// must refresh and not transition because transition does not refresh the model from within a namespace
yield this.router.refresh();
} catch (error) {
this.error = errorMessage(error);
this.flashMessages.danger(`Error enabling feature \n ${errorMessage(error)}`);
Expand Down
4 changes: 2 additions & 2 deletions ui/tests/acceptance/sync/secrets/overview-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ module('Acceptance | sync | overview', function (hooks) {
});

test('it should make activation-flag requests to correct namespace', async function (assert) {
assert.expect(3);

assert.expect(4);
// should call GET activation-flags twice because we need an updated response after activating the feature
this.server.get('/sys/activation-flags', (_, req) => {
assert.deepEqual(req.requestHeaders, {}, 'Request is unauthenticated and in root namespace');
return {
Expand Down