diff --git a/addons/api/addon/handlers/indexed-db-handler.js b/addons/api/addon/handlers/indexed-db-handler.js index d6b9455dc..e9e527169 100644 --- a/addons/api/addon/handlers/indexed-db-handler.js +++ b/addons/api/addon/handlers/indexed-db-handler.js @@ -36,7 +36,7 @@ export default class IndexedDbHandler { query, options: { pushToStore = true, - peekIndexedDB = false, + peekDb = false, storeToken = true, } = {}, } = data; @@ -55,7 +55,7 @@ export default class IndexedDbHandler { const schema = store.modelFor(type); const serializer = store.serializerFor(type); - if (!peekIndexedDB) { + if (!peekDb) { const tokenKey = `${type}-${hashCode(remainingQuery)}`; let payload; let listToken; diff --git a/addons/api/tests/unit/handlers/indexed-db-handler-test.js b/addons/api/tests/unit/handlers/indexed-db-handler-test.js index d4cdbc0b1..3723ba9b4 100644 --- a/addons/api/tests/unit/handlers/indexed-db-handler-test.js +++ b/addons/api/tests/unit/handlers/indexed-db-handler-test.js @@ -149,7 +149,7 @@ module('Unit | Handler | indexed-db-handler', function (hooks) { ); }); - test('it loads from indexeddb only and does not fetch from api, when peekIndexedDB option is used', async function (assert) { + test('it loads from indexeddb only and does not fetch from api, when peekDb option is used', async function (assert) { const callCounts = { get writeToIndexedDb() { return indexedbHandlerSpy.writeToIndexedDb.callCount; @@ -181,7 +181,7 @@ module('Unit | Handler | indexed-db-handler', function (hooks) { expectedWriteToIndexedDbCallCount, ); - await store.query('alias', {}, { peekIndexedDB: true }); + await store.query('alias', {}, { peekDb: true }); assert.strictEqual(results.length, 50); // second run does not increase call counts to api or writes to indexeddb diff --git a/ui/admin/app/routes/scopes/scope/aliases/index.js b/ui/admin/app/routes/scopes/scope/aliases/index.js index 7b83b6747..bab85cb99 100644 --- a/ui/admin/app/routes/scopes/scope/aliases/index.js +++ b/ui/admin/app/routes/scopes/scope/aliases/index.js @@ -118,7 +118,7 @@ export default class ScopesScopeAliasesIndexRoute extends Route { if (totalItems > 0) { return true; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const aliases = await this.store.query( 'alias', { diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/index.js b/ui/admin/app/routes/scopes/scope/auth-methods/index.js index f14779897..71c352448 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/index.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/index.js @@ -132,7 +132,7 @@ export default class ScopesScopeAuthMethodsIndexRoute extends Route { if (totalItems > 0) { return true; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const authMethod = await this.store.query( 'auth-method', { diff --git a/ui/admin/app/routes/scopes/scope/credential-stores/index.js b/ui/admin/app/routes/scopes/scope/credential-stores/index.js index e905ee83a..503bff94f 100644 --- a/ui/admin/app/routes/scopes/scope/credential-stores/index.js +++ b/ui/admin/app/routes/scopes/scope/credential-stores/index.js @@ -117,7 +117,7 @@ export default class ScopesScopeCredentialStoresIndexRoute extends Route { if (totalItems > 0) { return true; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const credentialStore = await this.store.query( 'credential-store', { diff --git a/ui/admin/app/routes/scopes/scope/groups/index.js b/ui/admin/app/routes/scopes/scope/groups/index.js index 84c9dc83c..ce2a0ebc9 100644 --- a/ui/admin/app/routes/scopes/scope/groups/index.js +++ b/ui/admin/app/routes/scopes/scope/groups/index.js @@ -99,7 +99,7 @@ export default class ScopesScopeGroupsIndexRoute extends Route { if (totalItems > 0) { return true; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const group = await this.store.query( 'group', { diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/index.js b/ui/admin/app/routes/scopes/scope/host-catalogs/index.js index dfeccdd74..c7da30b42 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/index.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/index.js @@ -108,7 +108,7 @@ export default class ScopesScopeHostCatalogsIndexRoute extends Route { return true; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const hostCatalogs = await this.store.query( 'host-catalog', { diff --git a/ui/admin/app/routes/scopes/scope/roles/index.js b/ui/admin/app/routes/scopes/scope/roles/index.js index 3706ff72f..6c9e523d3 100644 --- a/ui/admin/app/routes/scopes/scope/roles/index.js +++ b/ui/admin/app/routes/scopes/scope/roles/index.js @@ -117,7 +117,7 @@ export default class ScopesScopeRolesIndexRoute extends Route { if (totalItems > 0) { return true; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const role = await this.store.query( 'role', { diff --git a/ui/admin/app/routes/scopes/scope/roles/role/manage-scopes/manage-custom-scopes.js b/ui/admin/app/routes/scopes/scope/roles/role/manage-scopes/manage-custom-scopes.js index 479991258..6f0370678 100644 --- a/ui/admin/app/routes/scopes/scope/roles/role/manage-scopes/manage-custom-scopes.js +++ b/ui/admin/app/routes/scopes/scope/roles/role/manage-scopes/manage-custom-scopes.js @@ -108,7 +108,7 @@ export default class ScopesScopeRolesRoleManageScopesManageCustomScopesRoute ext * @returns {Promise<[ScopeModel]>} */ async getAllProjects() { - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; return this.store.query( 'scope', { @@ -156,7 +156,7 @@ export default class ScopesScopeRolesRoleManageScopesManageCustomScopesRoute ext if (!search) { return totalItems; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const filters = canSelectOrgs ? { scope_id: [{ equals: 'global' }] } : { type: [{ equals: TYPE_SCOPE_PROJECT }] }; diff --git a/ui/admin/app/routes/scopes/scope/roles/role/manage-scopes/manage-org-projects.js b/ui/admin/app/routes/scopes/scope/roles/role/manage-scopes/manage-org-projects.js index ef2532d45..af4fc27b6 100644 --- a/ui/admin/app/routes/scopes/scope/roles/role/manage-scopes/manage-org-projects.js +++ b/ui/admin/app/routes/scopes/scope/roles/role/manage-scopes/manage-org-projects.js @@ -93,7 +93,7 @@ export default class ScopesScopeRolesRoleManageScopesManageOrgProjectsRoute exte if (!search) { return totalItems; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const scopes = await this.store.query( 'scope', { @@ -123,7 +123,7 @@ export default class ScopesScopeRolesRoleManageScopesManageOrgProjectsRoute exte if (role.scope.isGlobal && selectedProjectIDs.length) { const id = []; selectedProjectIDs.forEach((projectID) => id.push({ equals: projectID })); - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const projects = await this.store.query( 'scope', { scope_id: 'global', query: { filters: { id } } }, diff --git a/ui/admin/app/routes/scopes/scope/roles/role/scopes.js b/ui/admin/app/routes/scopes/scope/roles/role/scopes.js index 5df64af03..971427f6a 100644 --- a/ui/admin/app/routes/scopes/scope/roles/role/scopes.js +++ b/ui/admin/app/routes/scopes/scope/roles/role/scopes.js @@ -103,7 +103,7 @@ export default class ScopesScopeRolesRoleScopesRoute extends Route { * @returns {Promise<[ScopeModel]>} */ async getAllGrantScopes(id) { - const options = { pushToStore: false, peekIndexedDb: true }; + const options = { pushToStore: false, peekDb: true }; return this.store.query( 'scope', { scope_id: 'global', query: { filters: { id } } }, diff --git a/ui/admin/app/routes/scopes/scope/scopes/index.js b/ui/admin/app/routes/scopes/scope/scopes/index.js index 9477502a1..c011d0c5b 100644 --- a/ui/admin/app/routes/scopes/scope/scopes/index.js +++ b/ui/admin/app/routes/scopes/scope/scopes/index.js @@ -101,7 +101,7 @@ export default class ScopesScopeScopesIndexRoute extends Route { if (totalItems > 0) { return true; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const scopes = await this.store.query( 'scope', { diff --git a/ui/admin/app/routes/scopes/scope/session-recordings/index.js b/ui/admin/app/routes/scopes/scope/session-recordings/index.js index 252ea5cc5..bed76f962 100644 --- a/ui/admin/app/routes/scopes/scope/session-recordings/index.js +++ b/ui/admin/app/routes/scopes/scope/session-recordings/index.js @@ -171,7 +171,7 @@ export default class ScopesScopeSessionRecordingsIndexRoute extends Route { * @param {string} scope_id */ async getAllSessionRecordings(scope_id) { - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; this.allSessionRecordings = await this.store.query( 'session-recording', { @@ -192,7 +192,7 @@ export default class ScopesScopeSessionRecordingsIndexRoute extends Route { if (totalItems > 0) { return true; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const sessionRecordings = await this.store.query( 'session-recording', { diff --git a/ui/admin/app/routes/scopes/scope/targets/index.js b/ui/admin/app/routes/scopes/scope/targets/index.js index 8d77121d2..6366fcbff 100644 --- a/ui/admin/app/routes/scopes/scope/targets/index.js +++ b/ui/admin/app/routes/scopes/scope/targets/index.js @@ -149,7 +149,7 @@ export default class ScopesScopeTargetsIndexRoute extends Route { if (totalItems > 0) { return true; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const targets = await this.store.query( 'target', { diff --git a/ui/admin/app/routes/scopes/scope/users/index.js b/ui/admin/app/routes/scopes/scope/users/index.js index 34b458dbd..3559050d9 100644 --- a/ui/admin/app/routes/scopes/scope/users/index.js +++ b/ui/admin/app/routes/scopes/scope/users/index.js @@ -102,7 +102,7 @@ export default class ScopesScopeUsersIndexRoute extends Route { if (totalItems > 0) { return true; } - const options = { pushToStore: false, peekIndexedDB: true }; + const options = { pushToStore: false, peekDb: true }; const user = await this.store.query( 'user', {