fixed some minor fuckups

master
cheetah 2 years ago
parent b69e7f9c76
commit f47f7e4704

@ -3,30 +3,5 @@
"url": "http://127.0.0.1:3000/api/message/advanced" "url": "http://127.0.0.1:3000/api/message/advanced"
}, },
"alarms": [ "alarms": [
{
"name": "Normal",
"params": {
"type": "duplex",
"routing": {
"device": "birdyslim",
"connectors": [
[
"dummy",
"1234567"
]
]
}
},
"weekDay": {
"0": false,
"2": false,
"6": true
},
"alarmSchedulingMode": "weekly",
"alarmTime": "23:50",
"payload": "Probealarm jeden sonntag 2350",
"firstOccWeekday": 0,
"specificWeekday": "27"
}
] ]
} }

@ -120,28 +120,6 @@
return { return {
EXPERTMODE: false, EXPERTMODE: false,
configTab: null, configTab: null,
pagerTypes: [
{ k: 'Simple', v: 'simple' },
{ k: 'Duplex', v: 'duplex' },
],
deviceType: [
{ k: 'Generic', v: 'generic' },
{ k: 'Birdy Slim (IoT)', v: 'birdyslim' },
],
connectorTypes: [
{ k: 'Dummy', v: 'dummy' },
{ k: 'POCSAG GW', v: 'pocsag' },
{ k: 'DAPNET', v: 'dapnet' },
{ k: 'e*Cityruf inetgw', v: 'ecityruf' },
{ k: 'e*Cityruf Puppeteer', v: 'em-p-cityruf' },
{ k: 'e*Cityruf alertManager', v: 'em-a-cityruf' },
{ k: 'e*2wayS Puppeteer', v: 'em-p-twoways' },
{ k: 'e*2wayS alertManager', v: 'em-a-twoways' },
{ k: 'LoRaWAN TTNv3', v: 'lorawan' },
],
alarmSchedulingMode: [ alarmSchedulingMode: [
{ k: 'Weekly', v: 'weekly' }, { k: 'Weekly', v: 'weekly' },
{ k: 'Monthly at first occurance of a specific weekday', v: 'monthlyFirstOccWeekday' }, { k: 'Monthly at first occurance of a specific weekday', v: 'monthlyFirstOccWeekday' },
@ -192,31 +170,22 @@
delete a._id delete a._id
return a return a
}) })
this.$http.post('/config', storeConfig).then(response => { this.$http.post('/config', storeConfig)
.then(response => {})
.then(this.$http.post('/restart'))
.then(() => {
document.body.style = 'display:none'
setTimeout(() => window.location.reload(), 1e3)
}) })
.then(this.$http.post('/restart'))
.then(() => {
document.body.style = 'display:none'
setTimeout(() => window.location.reload(), 1e3)
})
},
addDeliveryTarget(index) {
this.configData.alarms[index].params.routing.connectors.push(["connectorName", "connectorParam"])
}, },
addAlarm() { addAlarm() {
this.configData.alarms.push({ this.configData.alarms.push({
name: "Testalarm", name: "Testalarm",
params: { preset: null,
"type": "simple", alarmSchedulingMode: "weekly",
"routing": { alarmTime: "13:37",
"device": "generic", payload: "Probealarm jeden Tag 1337",
"connectors": [] weekDay: {
},
},
"alarmSchedulingMode": "weekly",
"alarmTime": "13:37",
"payload": "Probealarm jeden Tag 1337",
"weekDay": {
"0": true, "0": true,
"1": true, "1": true,
"2": true, "2": true,

@ -57,7 +57,7 @@ async function minuteCheck() {
break; break;
} }
if (alarmTrigger === true) { if (alarmTrigger === true) {
await axios.post(config.pager.url, Object.assign( !!alarm.preset await axios.post(new URL(config.pager.url).origin + '/api/message/' + (!!alarm.preset ? 'preset' : 'advanced'), Object.assign( !!alarm.preset
? { ...alarm.params } // backward compatibility ? { ...alarm.params } // backward compatibility
: { preset: alarm.preset } : { preset: alarm.preset }
, { payload: alarm.payload })) , { payload: alarm.payload }))

Loading…
Cancel
Save