Skip to content

Commit

Permalink
Update parameter name to staticDataOnly
Browse files Browse the repository at this point in the history
Signed-off-by: Yannick Schaus <github@schaus.net>
  • Loading branch information
ghys authored Jul 2, 2023
1 parent 1049246 commit 7d6a2fa
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7d6a2fa

Please sign in to comment.