From 7d6a2fa8b211ecf703910c8f38cc76d886a766e5 Mon Sep 17 00:00:00 2001 From: Yannick Schaus Date: Sun, 2 Jul 2023 15:14:42 +0200 Subject: [PATCH] Update parameter name to staticDataOnly Signed-off-by: Yannick Schaus --- .../web/src/components/config/controls/item-picker.vue | 2 +- .../web/src/components/config/controls/rule-picker.vue | 2 +- .../web/src/components/config/controls/script-editor.vue | 2 +- .../web/src/components/config/controls/thing-picker.vue | 2 +- .../web/src/components/config/editor/hint-components.js | 2 +- .../web/src/components/config/editor/hint-rules.js | 2 +- .../web/src/components/model/model-picker-popup.vue | 2 +- bundles/org.openhab.ui/web/src/pages/home/homecards-mixin.js | 2 +- .../org.openhab.ui/web/src/pages/settings/items/item-edit.vue | 2 +- bundles/org.openhab.ui/web/src/pages/settings/model/model.vue | 2 +- .../org.openhab.ui/web/src/pages/settings/settings-menu.vue | 4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/components/config/controls/item-picker.vue b/bundles/org.openhab.ui/web/src/components/config/controls/item-picker.vue index bad142997d..372e14fd21 100644 --- a/bundles/org.openhab.ui/web/src/components/config/controls/item-picker.vue +++ b/bundles/org.openhab.ui/web/src/components/config/controls/item-picker.vue @@ -49,7 +49,7 @@ export default { created () { this.smartSelectParams.closeOnSelect = !(this.multiple) if (!this.items || !this.items.length) { - this.$oh.api.get('/rest/items?cacheable=true').then((items) => { + this.$oh.api.get('/rest/items?staticDataOnly=true').then((items) => { this.sortAndFilterItems(items) }) } else { diff --git a/bundles/org.openhab.ui/web/src/components/config/controls/rule-picker.vue b/bundles/org.openhab.ui/web/src/components/config/controls/rule-picker.vue index 7acf43c917..d58ec660de 100644 --- a/bundles/org.openhab.ui/web/src/components/config/controls/rule-picker.vue +++ b/bundles/org.openhab.ui/web/src/components/config/controls/rule-picker.vue @@ -32,7 +32,7 @@ export default { }, created () { this.smartSelectParams.closeOnSelect = !(this.multiple) - this.$oh.api.get('/rest/rules?cacheable=true').then((data) => { + this.$oh.api.get('/rest/rules?staticDataOnly=true').then((data) => { this.rules = data.sort((a, b) => { const labelA = a.name const labelB = b.name diff --git a/bundles/org.openhab.ui/web/src/components/config/controls/script-editor.vue b/bundles/org.openhab.ui/web/src/components/config/controls/script-editor.vue index 2c75252c9f..9af0e2f2ae 100644 --- a/bundles/org.openhab.ui/web/src/components/config/controls/script-editor.vue +++ b/bundles/org.openhab.ui/web/src/components/config/controls/script-editor.vue @@ -228,7 +228,7 @@ export default { } server.on('completion', this.ternComplete) }) - this.$oh.api.get('/rest/items?cacheable=true').then((data) => { this.$set(this, 'itemsCache', data) }) + this.$oh.api.get('/rest/items?staticDataOnly=true').then((data) => { this.$set(this, 'itemsCache', data) }) } const server = new _CodeMirror.TernServer({ defs: (this.mode.indexOf('version=ECMAScript-5.1') > 0) ? [EcmascriptDefs, NashornDefs] : [EcmascriptDefs, OpenhabJsDefs], diff --git a/bundles/org.openhab.ui/web/src/components/config/controls/thing-picker.vue b/bundles/org.openhab.ui/web/src/components/config/controls/thing-picker.vue index dc87005d6a..6736c58ec5 100644 --- a/bundles/org.openhab.ui/web/src/components/config/controls/thing-picker.vue +++ b/bundles/org.openhab.ui/web/src/components/config/controls/thing-picker.vue @@ -33,7 +33,7 @@ export default { }, created () { this.smartSelectParams.closeOnSelect = !(this.multiple) - this.$oh.api.get('/rest/things?cacheable=true').then((data) => { + this.$oh.api.get('/rest/things?staticDataOnly=true').then((data) => { this.things = data.sort((a, b) => { const labelA = a.label const labelB = b.label diff --git a/bundles/org.openhab.ui/web/src/components/config/editor/hint-components.js b/bundles/org.openhab.ui/web/src/components/config/editor/hint-components.js index 9d9b5bf966..bb258d84ce 100644 --- a/bundles/org.openhab.ui/web/src/components/config/editor/hint-components.js +++ b/bundles/org.openhab.ui/web/src/components/config/editor/hint-components.js @@ -52,7 +52,7 @@ function getWidgetDefinitions (cm) { function hintItems (cm, line, replaceAfterColon, addStatePropertySuffix, addQuotes) { const cursor = cm.getCursor() - const promise = (itemsCache) ? Promise.resolve(itemsCache) : cm.state.$oh.api.get('/rest/items?cacheable=true') + const promise = (itemsCache) ? Promise.resolve(itemsCache) : cm.state.$oh.api.get('/rest/items?staticDataOnly=true') return promise.then((data) => { if (!itemsCache) itemsCache = data let ret = { diff --git a/bundles/org.openhab.ui/web/src/components/config/editor/hint-rules.js b/bundles/org.openhab.ui/web/src/components/config/editor/hint-rules.js index 817b48d7ff..f1b11c0c68 100644 --- a/bundles/org.openhab.ui/web/src/components/config/editor/hint-rules.js +++ b/bundles/org.openhab.ui/web/src/components/config/editor/hint-rules.js @@ -14,7 +14,7 @@ function getModuleTypes (cm, section) { function hintItems (cm, line, replaceAfterColon, addStatePropertySuffix) { const cursor = cm.getCursor() if (!cm.state.$oh) return - const promise = (itemsCache) ? Promise.resolve(itemsCache) : cm.state.$oh.api.get('/rest/items?cacheable=true') + const promise = (itemsCache) ? Promise.resolve(itemsCache) : cm.state.$oh.api.get('/rest/items?staticDataOnly=true') return promise.then((data) => { if (!itemsCache) itemsCache = data let ret = { diff --git a/bundles/org.openhab.ui/web/src/components/model/model-picker-popup.vue b/bundles/org.openhab.ui/web/src/components/model/model-picker-popup.vue index 15e007c830..1bcb64f618 100644 --- a/bundles/org.openhab.ui/web/src/components/model/model-picker-popup.vue +++ b/bundles/org.openhab.ui/web/src/components/model/model-picker-popup.vue @@ -149,7 +149,7 @@ export default { load (update) { // if (this.ready) return this.loading = true - const items = this.$oh.api.get('/rest/items?cacheable=true&metadata=.+') + const items = this.$oh.api.get('/rest/items?staticDataOnly=true&metadata=.+') const links = this.$oh.api.get('/rest/links') Promise.all([items, links]).then((data) => { this.items = data[0] diff --git a/bundles/org.openhab.ui/web/src/pages/home/homecards-mixin.js b/bundles/org.openhab.ui/web/src/pages/home/homecards-mixin.js index 182b7cf319..ba1eb82dca 100644 --- a/bundles/org.openhab.ui/web/src/pages/home/homecards-mixin.js +++ b/bundles/org.openhab.ui/web/src/pages/home/homecards-mixin.js @@ -120,7 +120,7 @@ export default { item.children.forEach(child => this.sortModel(child)) }, loadModel (page) { - this.$oh.api.get('/rest/items?cacheable=true&metadata=semantics,listWidget,widgetOrder') + this.$oh.api.get('/rest/items?staticDataOnly=true&metadata=semantics,listWidget,widgetOrder') .then((data) => { this.items = data let filteredItems = { diff --git a/bundles/org.openhab.ui/web/src/pages/settings/items/item-edit.vue b/bundles/org.openhab.ui/web/src/pages/settings/items/item-edit.vue index 585a7645ef..032109d0b0 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/items/item-edit.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/items/item-edit.vue @@ -107,7 +107,7 @@ export default { created: false } this.$set(this, 'item', newItem) - this.$oh.api.get('/rest/items&cacheable=true').then((items) => { + this.$oh.api.get('/rest/items&staticDataOnly=true').then((items) => { this.items = items this.ready = true }) diff --git a/bundles/org.openhab.ui/web/src/pages/settings/model/model.vue b/bundles/org.openhab.ui/web/src/pages/settings/model/model.vue index ae615dc162..3eb250af07 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/model/model.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/model/model.vue @@ -288,7 +288,7 @@ export default { load (update) { // if (this.ready) return this.loading = true - const items = this.$oh.api.get('/rest/items?cacheable=true&metadata=.+') + const items = this.$oh.api.get('/rest/items?staticDataOnly=true&metadata=.+') const links = this.$oh.api.get('/rest/links') Promise.all([items, links]).then((data) => { this.items = data[0] diff --git a/bundles/org.openhab.ui/web/src/pages/settings/settings-menu.vue b/bundles/org.openhab.ui/web/src/pages/settings/settings-menu.vue index 73241722ad..46f629808f 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/settings-menu.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/settings-menu.vue @@ -187,8 +187,8 @@ export default { loadCounters () { if (!this.apiEndpoints) return if (this.$store.getters.apiEndpoint('inbox')) this.$oh.api.get('/rest/inbox').then((data) => { this.inboxCount = data.filter((e) => e.flag === 'NEW').length.toString() }) - if (this.$store.getters.apiEndpoint('things')) this.$oh.api.get('/rest/things?cacheable=true').then((data) => { this.thingsCount = data.length.toString() }) - if (this.$store.getters.apiEndpoint('items')) this.$oh.api.get('/rest/items?cacheable=true').then((data) => { this.itemsCount = data.length.toString() }) + if (this.$store.getters.apiEndpoint('things')) this.$oh.api.get('/rest/things?staticDataOnly=true').then((data) => { this.thingsCount = data.length.toString() }) + if (this.$store.getters.apiEndpoint('items')) this.$oh.api.get('/rest/items?staticDataOnly=true').then((data) => { this.itemsCount = data.length.toString() }) if (this.$store.getters.apiEndpoint('ui')) this.$oh.api.get('/rest/ui/components/system:sitemap').then((data) => { this.sitemapsCount = data.length }) }, navigateToStore (tab) {