AppReports/src/template.js
Timo Hocker 36d12a784a
Some checks failed
continuous-integration/drone/push Build is failing
polishing chart, build info in top left
2020-08-24 21:20:58 +02:00

82 lines
1.9 KiB
JavaScript

/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of appreports which is released under GPL-3.0-or-later.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, August 2020
*/
export default {
type: 'object',
properties: [
{
type: 'array',
name: 'sources',
child: {
type: 'object',
properties: [
{
type: 'string',
name: 'name'
},
{
type: 'number',
name: 'limit'
},
{
type: 'number',
name: 'offset'
}
]
}
},
{
type: 'array',
name: 'displays',
child: {
type: 'object',
properties: [
{
type: 'string',
name: 'source'
},
{
type: 'string',
name: 'type',
choices: [
'table',
'chart'
]
},
{
name: 'columns',
type: 'array',
child: { type: 'string' },
if: { prop: 'type', op: '=', val: 'table' }
},
{
name: 'x',
type: 'string',
if: { prop: 'type', op: '=', val: 'chart' }
},
{
name: 'y',
type: 'array',
if: { prop: 'type', op: '=', val: 'chart' },
child: {
type: 'object',
properties: [
{ type: 'string', name: 'label' },
{ type: 'string', name: 'field' },
{ type: 'string', name: 'color' },
{ type: 'string', name: 'fill' },
{ type: 'number', name: 'min_value' },
{ type: 'number', name: 'max_value' }
]
}
}
]
}
}
]
};