2022-03-17 21:30:45 +00:00
|
|
|
(function () {
|
2023-05-18 21:54:46 +00:00
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
const PERSISTENCE_KEY = 'persistence-tests';
|
|
|
|
const openmct = window.openmct;
|
2022-03-17 21:30:45 +00:00
|
|
|
|
2023-05-18 21:54:46 +00:00
|
|
|
openmct.objects.addRoot({
|
|
|
|
namespace: PERSISTENCE_KEY,
|
|
|
|
key: PERSISTENCE_KEY
|
|
|
|
});
|
2022-03-17 21:30:45 +00:00
|
|
|
|
2023-05-18 21:54:46 +00:00
|
|
|
openmct.objects.addProvider(PERSISTENCE_KEY, {
|
|
|
|
get(identifier) {
|
|
|
|
if (identifier.key !== PERSISTENCE_KEY) {
|
|
|
|
return undefined;
|
|
|
|
} else {
|
|
|
|
return Promise.resolve({
|
|
|
|
identifier,
|
|
|
|
type: 'folder',
|
|
|
|
name: 'Persistence Testing',
|
|
|
|
location: 'ROOT',
|
|
|
|
composition: []
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2022-03-17 21:30:45 +00:00
|
|
|
});
|
2023-05-18 21:54:46 +00:00
|
|
|
});
|
|
|
|
})();
|