vault/ui/app/utils/shared-model-boundary.js
Vault Automation 2eb6905459
UI: remove cluster route and model boundary route mixins (#11873) (#12025)
* remove cluster route and model boundary route mixins

* add copyright header

* remove old unit test

* change replication/application route

* don't use cluster route in replication

* why have a base class at all?

* test tweaks

* remove afterModel redirect in replication

* refactor targetRouteName to use derived state

* Update route class name on replication-dr-promote.js



---------

Co-authored-by: Matthew Irish <39469+meirish@users.noreply.github.com>
Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
2026-01-29 11:02:04 -06:00

18 lines
459 B
JavaScript

/**
* Copyright IBM Corp. 2016, 2025
* SPDX-License-Identifier: BUSL-1.1
*/
export default function clearModelCache(store, modelType) {
if (!modelType) {
return;
}
const modelTypes = Array.isArray(modelType) ? modelType : [modelType];
if (store.isDestroyed || store.isDestroying) {
// Prevent unload attempt after test teardown, resulting in test failure
return;
}
modelTypes.forEach((type) => {
store.unloadAll(type);
});
}