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 job (db);
setInterval (() => {
job (db);
}, 3600e3);
}
function get_db () {

View File

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

View File

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

View File

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

View File

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