|
|
|
@ -15,6 +15,7 @@
|
|
|
|
|
<v-app-bar app>
|
|
|
|
|
<v-toolbar-title>DWD Module Configuration</v-toolbar-title>
|
|
|
|
|
<v-spacer></v-spacer>
|
|
|
|
|
<v-btn color="success" @click="storeConfig()">Store & Restart</v-btn>
|
|
|
|
|
<v-checkbox label="Expert Mode" v-model="EXPERTMODE"></v-checkbox>
|
|
|
|
|
</v-app-bar>
|
|
|
|
|
<v-content>
|
|
|
|
@ -22,41 +23,52 @@
|
|
|
|
|
<v-tabs v-model="configTab" next-icon="mdi-arrow-right-bold-box-outline" prev-icon="mdi-arrow-left-bold-box-outline" show-arrows>
|
|
|
|
|
<v-tabs-slider></v-tabs-slider>
|
|
|
|
|
<v-tab key="regions">Regions</v-tab>
|
|
|
|
|
<v-tab key="notificationConfig">Notification Configuration</v-tab>
|
|
|
|
|
<v-tab key="notificationConfig" v-show="EXPERTMODE">Notification Configuration</v-tab>
|
|
|
|
|
</v-tabs>
|
|
|
|
|
<v-tabs-items v-model="configTab">
|
|
|
|
|
<v-tab-item key="regions">
|
|
|
|
|
<v-container>
|
|
|
|
|
<v-row>
|
|
|
|
|
<v-checkbox label="German Umlaut Support" v-model="configData.germanUmlautSupport"></v-checkbox>
|
|
|
|
|
<v-checkbox label="use German POCSAG" v-model="configData.germanUmlautSupport"></v-checkbox>
|
|
|
|
|
</v-row>
|
|
|
|
|
<v-row>
|
|
|
|
|
<h3>Regions:</h3>
|
|
|
|
|
</v-row>
|
|
|
|
|
<v-row>
|
|
|
|
|
<v-btn color="success" @click="addRegionCMD()" ><v-icon>mdi-plus</v-icon> Add</v-btn>
|
|
|
|
|
<v-btn color="primary" fab dark small icon @click="addRegionCMD()">
|
|
|
|
|
<v-icon>mdi-plus</v-icon>
|
|
|
|
|
</v-btn>
|
|
|
|
|
</v-row>
|
|
|
|
|
<v-row v-for="(region, index) in configData.regions" :key="region._id" >
|
|
|
|
|
<v-col>
|
|
|
|
|
<v-row cols="6" sm="12" md="4">
|
|
|
|
|
|
|
|
|
|
<v-col>
|
|
|
|
|
<v-checkbox label="Active" v-model="region.active"></v-checkbox>
|
|
|
|
|
</v-col>
|
|
|
|
|
<v-col>
|
|
|
|
|
<v-text-field v-model="region.name" label="Name"></v-text-field>
|
|
|
|
|
</v-col>
|
|
|
|
|
<v-col>
|
|
|
|
|
<v-text-field v-model="region.dwdID" label="DWD ID"></v-text-field>
|
|
|
|
|
</v-col>
|
|
|
|
|
<v-col>
|
|
|
|
|
<v-btn color="error" @click="configData.regions.splice(index, 1)" icon><v-icon>mdi-delete</v-icon></v-btn>
|
|
|
|
|
</v-col>
|
|
|
|
|
<v-col cols="4">
|
|
|
|
|
<v-checkbox label="Active" v-model="region.active"></v-checkbox>
|
|
|
|
|
<v-text-field v-model="region.name" label="Name"></v-text-field>
|
|
|
|
|
<v-text-field v-model="region.dwdID" label="DWD ID"></v-text-field>
|
|
|
|
|
<v-autocomplete
|
|
|
|
|
v-model="region.preset"
|
|
|
|
|
:items="presetSearchItems"
|
|
|
|
|
:loading="!presetSearchItems.length > 0"
|
|
|
|
|
color="white"
|
|
|
|
|
hide-no-data
|
|
|
|
|
dense
|
|
|
|
|
label="Profile"
|
|
|
|
|
placeholder="Start typing to Search"
|
|
|
|
|
prepend-icon="mdi-database-search"
|
|
|
|
|
></v-autocomplete>
|
|
|
|
|
</v-col>
|
|
|
|
|
<v-col cols="3">
|
|
|
|
|
<v-row v-for="(dwdType) of dwdTypes1">
|
|
|
|
|
<v-select v-model="region.levels[ dwdType.u ]" :label="dwdType.k" :items="dwdType.i" ></v-checkbox>
|
|
|
|
|
</v-row>
|
|
|
|
|
</v-col>
|
|
|
|
|
</v-row>
|
|
|
|
|
<v-row>
|
|
|
|
|
<v-btn color="success" @click="storeConfig()">Store & Restart</v-btn>
|
|
|
|
|
<v-col cols="3">
|
|
|
|
|
<v-row v-for="(dwdType) of dwdTypes2">
|
|
|
|
|
<v-select v-model="region.levels[ dwdType.u ]" :label="dwdType.k" :items="dwdType.i" ></v-checkbox>
|
|
|
|
|
</v-row>
|
|
|
|
|
</v-col>
|
|
|
|
|
<v-col cols="2">
|
|
|
|
|
<v-btn color="error" @click="configData.regions.splice(index, 1)" fab icon><v-icon>mdi-delete</v-icon></v-btn>
|
|
|
|
|
</v-col>
|
|
|
|
|
</v-row>
|
|
|
|
|
</v-container>
|
|
|
|
|
</v-tab-item>
|
|
|
|
@ -64,33 +76,9 @@
|
|
|
|
|
<v-container>
|
|
|
|
|
<b>Routing Paramters:</b>
|
|
|
|
|
<v-row>
|
|
|
|
|
<v-col cols="12" sm="12" md="6" v-show="EXPERTMODE">
|
|
|
|
|
<v-text-field label="Daemon Endpoint URL" v-model="configData.pager.url"></v-text-field>
|
|
|
|
|
</v-col>
|
|
|
|
|
<v-col cols="12" sm="12" md="6">
|
|
|
|
|
<v-select :items="pagerTypes" v-model="configData.pager.params.type" item-text="k" item-value="v" label="Delivery Type"></v-select>
|
|
|
|
|
</v-col>
|
|
|
|
|
</v-row>
|
|
|
|
|
<v-row>
|
|
|
|
|
<v-col cols="12" sm="12" md="6">
|
|
|
|
|
<v-select :items="deviceType" v-model="configData.pager.params.routing.device" item-text="k" item-value="v" label="Device"></v-select>
|
|
|
|
|
</v-col>
|
|
|
|
|
</v-row>
|
|
|
|
|
<b>Delivery Targets:</b>
|
|
|
|
|
<v-btn color="success" @click="addDeliveryTarget()">Add</v-btn>
|
|
|
|
|
<v-row v-for="(connector, index) in configData.pager.params.routing.connectors" :key="index">
|
|
|
|
|
<v-col cols="6" sm="4" md="4">
|
|
|
|
|
<v-select :items="connectorTypes" v-model="connector[0]" item-text="k" item-value="v" label="Gateway"></v-select>
|
|
|
|
|
</v-col>
|
|
|
|
|
<v-col cols="6" sm="4" md="4">
|
|
|
|
|
<v-text-field v-model="connector[1]" label="Call ID"></v-text-field>
|
|
|
|
|
<v-col cols="12" sm="12" md="6">
|
|
|
|
|
<v-text-field label="Daemon Endpoint URL" v-model="configData.pager.url"></v-text-field>
|
|
|
|
|
</v-col>
|
|
|
|
|
<v-col cols="6" sm="4" md="4">
|
|
|
|
|
<v-btn color="error" @click="configData.pager.params.routing.connectors.splice(index, 1)" icon><v-icon>mdi-delete</v-icon></v-btn>
|
|
|
|
|
</v-col>
|
|
|
|
|
</v-row>
|
|
|
|
|
<v-row>
|
|
|
|
|
<v-btn color="success" @click="storeConfig()">Store & Restart</v-btn>
|
|
|
|
|
</v-row>
|
|
|
|
|
</v-container>
|
|
|
|
|
</v-tab-item>
|
|
|
|
@ -102,7 +90,7 @@
|
|
|
|
|
<div>Hilfe (de)</div>
|
|
|
|
|
<div class="text--primary">
|
|
|
|
|
DWD ID auf <a href="https://wettwarn.de/wettwarn_wetterwarnungen/warnregion_waehlen/index.html">WettWarn</a> generieren und 3 stelligen Code einfügen
|
|
|
|
|
|
|
|
|
|
<a href="https://wettwarn.de/ueber_wetterwarnungen/warnkriterien/index.html">Warnstufen</a>
|
|
|
|
|
</div>
|
|
|
|
|
</v-card-text>
|
|
|
|
|
</v-card>
|
|
|
|
@ -122,28 +110,6 @@
|
|
|
|
|
return {
|
|
|
|
|
EXPERTMODE: false,
|
|
|
|
|
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'},
|
|
|
|
|
],
|
|
|
|
|
configData: {
|
|
|
|
|
"pager": {
|
|
|
|
|
"url": "",
|
|
|
|
@ -158,12 +124,93 @@
|
|
|
|
|
"menuSupport": false,
|
|
|
|
|
"regions": []
|
|
|
|
|
},
|
|
|
|
|
presetSearchItems: [],
|
|
|
|
|
dwdTypes1: [
|
|
|
|
|
{ n: 4, k: 'Wind / Sturm / Orkan', u: 'wind_storm',
|
|
|
|
|
i: [
|
|
|
|
|
{ text: 'ignore', value: 666 },
|
|
|
|
|
{ text: 'Level 1 or higher', value: 1 },
|
|
|
|
|
{ text: 'Level 2 or higher', value: 2 },
|
|
|
|
|
{ text: 'Level 3 or higher', value: 3 },
|
|
|
|
|
{ text: 'Level 4', value: 4 },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{ n: 4, k: 'Gewitter', u: 'thunderstorm',
|
|
|
|
|
i: [
|
|
|
|
|
{ text: 'ignore', value: 666 },
|
|
|
|
|
{ text: 'Level 1 or higher', value: 1 },
|
|
|
|
|
{ text: 'Level 2 or higher', value: 2 },
|
|
|
|
|
{ text: 'Level 3 or higher', value: 3 },
|
|
|
|
|
{ text: 'Level 4', value: 4 },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{ n: 4, k: 'Starkregen', u: 'rain1',
|
|
|
|
|
i: [
|
|
|
|
|
{ text: 'ignore', value: 666 },
|
|
|
|
|
{ text: 'Level 2 or higher', value: 2 },
|
|
|
|
|
{ text: 'Level 3 or higher', value: 3 },
|
|
|
|
|
{ text: 'Level 4', value: 4 },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{ n: 4, k: 'Dauerregen', u: 'rain2',
|
|
|
|
|
i: [
|
|
|
|
|
{ text: 'ignore', value: 666 },
|
|
|
|
|
{ text: 'Level 2 or higher', value: 2 },
|
|
|
|
|
{ text: 'Level 3 or higher', value: 3 },
|
|
|
|
|
{ text: 'Level 4', value: 4 },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
dwdTypes2: [
|
|
|
|
|
{ n: 4, k: 'Schneefall/-verwehungen', u: 'snow',
|
|
|
|
|
i: [
|
|
|
|
|
{ text: 'ignore', value: 666 },
|
|
|
|
|
{ text: 'Level 1 or higher', value: 1 },
|
|
|
|
|
{ text: 'Level 2 or higher', value: 2 },
|
|
|
|
|
{ text: 'Level 3 or higher', value: 3 },
|
|
|
|
|
{ text: 'Level 4', value: 4 },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{ n: 4, k: 'Glaette', u: 'ice',
|
|
|
|
|
i: [
|
|
|
|
|
{ text: 'ignore', value: 666 },
|
|
|
|
|
{ text: 'Level 1 or higher', value: 1 },
|
|
|
|
|
{ text: 'Level 2 or higher', value: 2 },
|
|
|
|
|
{ text: 'Level 3 or higher', value: 3 },
|
|
|
|
|
{ text: 'Level 4', value: 4 },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{ n: 2, k: 'Frost', u: 'frost',
|
|
|
|
|
i: [
|
|
|
|
|
{ text: 'ignore', value: 666 },
|
|
|
|
|
{ text: 'Level 1 or higher', value: 1 },
|
|
|
|
|
{ text: 'Level 2', value: 2 },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{ n: 1, k: 'Nebel', u: 'fog',
|
|
|
|
|
i: [
|
|
|
|
|
{ text: 'ignore', value: 666 },
|
|
|
|
|
{ text: 'Level 1', value: 1 },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.loadPresets()
|
|
|
|
|
this.loadConfig()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
loadPresets() {
|
|
|
|
|
this.$http.get('/api/deliveryPresets')
|
|
|
|
|
.then(response => {
|
|
|
|
|
this.presetSearchItems = response.body.map(x => { return {
|
|
|
|
|
text: x.name,
|
|
|
|
|
value: x.key,
|
|
|
|
|
}})
|
|
|
|
|
}, response => {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
loadConfig() {
|
|
|
|
|
this.$http.get('/config').then(response => {
|
|
|
|
|
const newConfig = response.body
|
|
|
|
@ -192,6 +239,7 @@
|
|
|
|
|
this.configData.regions.push({
|
|
|
|
|
name: "",
|
|
|
|
|
active: true,
|
|
|
|
|
levels: [],
|
|
|
|
|
dwdID: "",
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|