Compare commits

..

No commits in common. "ca305dff732d100bb70055ece0fd450b56438271" and "f57444a3d12494d09164d8eddbe64f1f85c5d347" have entirely different histories.

5 changed files with 12 additions and 24 deletions

View File

@ -38,9 +38,6 @@ async function init (use_fake_seed) {
// await db.seed.run ({ specific: 'fake.js' }); // await db.seed.run ({ specific: 'fake.js' });
await job (db); await job (db);
setInterval (() => {
job (db);
}, 3600e3);
} }
function get_db () { function get_db () {

View File

@ -40,8 +40,6 @@ async function batch_update (knex, ids, data) {
} }
module.exports = async (knex) => { module.exports = async (knex) => {
console.log ('-- running database cleanup --');
const apps = await knex ('app') const apps = await knex ('app')
.select ('id', 'name', 'reduction'); .select ('id', 'name', 'reduction');

View File

@ -66,16 +66,7 @@ export default {
if (typeof y.max_value === 'number') if (typeof y.max_value === 'number')
range.suggestedMax = y.max_value; range.suggestedMax = y.max_value;
return { return { id: index, ticks: range };
id: index,
ticks: range,
scaleLabel: {
labelString: y.label,
display: true,
lineHeight: 1,
padding: 0.1
}
};
} }
) )
} }

View File

@ -41,11 +41,13 @@ export default new Vuex.Store ({
.then ((res) => res.json ()) .then ((res) => res.json ())
.then ((json) => json.map ((entry) => { .then ((json) => json.map ((entry) => {
entry.data = JSON.parse (entry.data); entry.data = JSON.parse (entry.data);
const time = new Date (entry.timestamp); const time
time.setMinutes (time.getMinutes () - time.getTimezoneOffset ()); = (/(?<y>[0-9]+-[0-9]+-[0-9]+)T(?<t>[0-9]+:[0-9]+:[0-9]+)/u)
entry.timestamp = time.toISOString () .exec (
.replace ('T', ' ') new Date (entry.timestamp)
.substr (0, 19); .toISOString ()
);
entry.timestamp = `${time.groups.y} ${time.groups.t}`;
return entry; return entry;
})); }));
logs[source.name] = log; logs[source.name] = log;

View File

@ -2,16 +2,16 @@
<div <div
class="grid" class="grid"
> >
<ConfigEditor
v-model="config"
:template="template"
/>
<ViewComponent <ViewComponent
v-for="(item,key) of saved_config.displays" v-for="(item,key) of saved_config.displays"
:key="key" :key="key"
:config="item" :config="item"
:data="log(item.source)" :data="log(item.source)"
/> />
<ConfigEditor
v-model="config"
:template="template"
/>
</div> </div>
</template> </template>