allow setting of default domain on page level
This commit is contained in:
parent
36abaf6f74
commit
f674fca741
3 changed files with 5 additions and 3 deletions
|
@ -75,7 +75,7 @@ function exec() {
|
||||||
}
|
}
|
||||||
this.output += '\n' + value
|
this.output += '\n' + value
|
||||||
console.log('exec:', value)
|
console.log('exec:', value)
|
||||||
sendMsg(conf, [conf.domain, this.action, this.name, data.id], data)
|
sendMsg(conf, [this.domain, this.action, this.name, data.id], data)
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle(msg) {
|
function handle(msg) {
|
||||||
|
@ -83,7 +83,7 @@ function handle(msg) {
|
||||||
const [ domain, action, class_, item ] = msg.path.split('/')
|
const [ domain, action, class_, item ] = msg.path.split('/')
|
||||||
//console.log('msgbase: ', domain, action, class_, item)
|
//console.log('msgbase: ', domain, action, class_, item)
|
||||||
// TODO: check message parts (using default values), select handler fct
|
// TODO: check message parts (using default values), select handler fct
|
||||||
const comp = this.components[class_ || data]
|
const comp = this.components[class_ || 'data']
|
||||||
if (domain && domain != comp.domain) {
|
if (domain && domain != comp.domain) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@ date: 2023-03-14
|
||||||
author: helmutm
|
author: helmutm
|
||||||
draft: false
|
draft: false
|
||||||
weight: 100
|
weight: 100
|
||||||
|
api:
|
||||||
|
domain: system
|
||||||
---
|
---
|
||||||
|
|
||||||
cyberscopes example site - Login Form
|
cyberscopes example site - Login Form
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{- $name := .Get "name" | default "data" -}}
|
{{- $name := .Get "name" | default "data" -}}
|
||||||
{{- $action := .Get "action" | default "data" -}}
|
{{- $action := .Get "action" | default "data" -}}
|
||||||
{{- $domain := .Get "domain" -}}
|
{{- $domain := .Get "domain" | default $.Page.Params.api.domain -}}
|
||||||
{{- $comp := .Get "component" | default "Data" -}}
|
{{- $comp := .Get "component" | default "Data" -}}
|
||||||
<div v-scope="{{ $comp }}('{{ $name }}', '{{ $action }}', '{{ $domain }}')">
|
<div v-scope="{{ $comp }}('{{ $name }}', '{{ $action }}', '{{ $domain }}')">
|
||||||
{{ .Inner }}
|
{{ .Inner }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue