Compare commits
No commits in common. "6e9d634f74d136889a0d63765a597104c3719bde" and "cf5c17bf59ae949ebf0eb8517746061af653bd1d" have entirely different histories.
6e9d634f74
...
cf5c17bf59
BIN
data/test.sqlite
BIN
data/test.sqlite
Binary file not shown.
@ -4,13 +4,6 @@
|
|||||||
class="table_view"
|
class="table_view"
|
||||||
>
|
>
|
||||||
<table>
|
<table>
|
||||||
<tr v-if="headings.length > 0">
|
|
||||||
<th
|
|
||||||
v-for="(heading,key) of headings"
|
|
||||||
:key="key"
|
|
||||||
v-text="heading"
|
|
||||||
/>
|
|
||||||
</tr>
|
|
||||||
<tr
|
<tr
|
||||||
v-for="(item,key) of items"
|
v-for="(item,key) of items"
|
||||||
:key="key"
|
:key="key"
|
||||||
@ -37,10 +30,6 @@ export default {
|
|||||||
columns: {
|
columns: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true
|
||||||
},
|
|
||||||
headings: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: { resolve_data }
|
methods: { resolve_data }
|
||||||
@ -49,7 +38,7 @@ export default {
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.table_view {
|
.table_view {
|
||||||
overflow-y: scoll;
|
overflow: auto;
|
||||||
width: max-content;
|
width: max-content;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100vh;
|
max-height: 100vh;
|
||||||
@ -65,7 +54,7 @@ tr:nth-child(odd) {
|
|||||||
color: var(--color-accent);
|
color: var(--color-accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
td, th {
|
td {
|
||||||
border: var(--sub-container-border);
|
border: var(--sub-container-border);
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
v-else
|
v-else
|
||||||
:items="data"
|
:items="data"
|
||||||
:columns="config.columns"
|
:columns="config.columns"
|
||||||
:headings="config.headings"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -6,10 +6,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
sources: [
|
sources: [
|
||||||
{ name: 'default', limit: 140, offset: 0 },
|
{
|
||||||
{ name: 'secondary', limit: 10, offset: 0 },
|
name: 'default',
|
||||||
{ name: 'version', limit: 1, offset: 0 }
|
limit: 140,
|
||||||
|
offset: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'secondary',
|
||||||
|
limit: 10,
|
||||||
|
offset: 0
|
||||||
|
}
|
||||||
],
|
],
|
||||||
displays: [
|
displays: [
|
||||||
{
|
{
|
||||||
@ -43,31 +50,12 @@ export default {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: 'secondary',
|
source: 'secondary',
|
||||||
type: 'table',
|
type: 'table',
|
||||||
headings: [
|
|
||||||
'timestamp',
|
|
||||||
'temperature',
|
|
||||||
'humidity',
|
|
||||||
'light',
|
|
||||||
'fan'
|
|
||||||
],
|
|
||||||
columns: [
|
columns: [
|
||||||
'timestamp',
|
'timestamp',
|
||||||
'data/temperature',
|
'data'
|
||||||
'data/humidity',
|
|
||||||
'data/light',
|
|
||||||
'data/latch'
|
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
source: 'version',
|
|
||||||
type: 'table',
|
|
||||||
headings: [ 'hardware version' ],
|
|
||||||
columns: [ 'message' ],
|
|
||||||
x: '',
|
|
||||||
y: [],
|
|
||||||
remove_duplicates: false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -47,12 +47,6 @@ export default {
|
|||||||
'chart'
|
'chart'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'headings',
|
|
||||||
type: 'array',
|
|
||||||
child: { type: 'string' },
|
|
||||||
if: { prop: 'type', op: '=', val: 'table' }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'columns',
|
name: 'columns',
|
||||||
type: 'array',
|
type: 'array',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user