|
|
@ -3,9 +3,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<head>
|
|
|
|
<title>Testalarm Configuration</title>
|
|
|
|
<title>Testalarm Configuration</title>
|
|
|
|
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
|
|
|
|
<!-- <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> -->
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@4.x/css/materialdesignicons.min.css" rel="stylesheet">
|
|
|
|
<link href="css/materialdesignicons.min.css" rel="stylesheet">
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet">
|
|
|
|
<link href="css/vuetify.min.css" rel="stylesheet">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
@ -30,12 +30,15 @@
|
|
|
|
<v-container>
|
|
|
|
<v-container>
|
|
|
|
<p>Targets:</p>
|
|
|
|
<p>Targets:</p>
|
|
|
|
<v-row>
|
|
|
|
<v-row>
|
|
|
|
<v-btn color="success" @click="addAlarm()">Add</v-btn>
|
|
|
|
<v-btn color="primary" fab dark small icon @click="addAlarm()">
|
|
|
|
|
|
|
|
<v-icon>mdi-plus</v-icon>
|
|
|
|
|
|
|
|
</v-btn>
|
|
|
|
</v-row>
|
|
|
|
</v-row>
|
|
|
|
<v-row v-for="(alarmConfig, index) in configData.alarms" :key="alarmConfig._id"
|
|
|
|
|
|
|
|
style="border-bottom: 2px solid black;">
|
|
|
|
<v-row v-for="(alarmConfig, index) in configData.alarms" :key="alarmConfig._id">
|
|
|
|
|
|
|
|
<v-card>
|
|
|
|
<v-col cols="12" sm="12" md="12">
|
|
|
|
<v-col cols="12" sm="12" md="12">
|
|
|
|
<v-btn color="error" @click="configData.alarms.splice(index, 1)" icon>
|
|
|
|
<v-btn color="error" dark small fab @click="configData.alarms.splice(index, 1)" icon>
|
|
|
|
<v-icon>mdi-delete</v-icon>
|
|
|
|
<v-icon>mdi-delete</v-icon>
|
|
|
|
</v-btn>
|
|
|
|
</v-btn>
|
|
|
|
</v-col>
|
|
|
|
</v-col>
|
|
|
@ -44,9 +47,7 @@
|
|
|
|
<v-row>
|
|
|
|
<v-row>
|
|
|
|
<v-select :items="alarmSchedulingMode" v-model="alarmConfig.alarmSchedulingMode"
|
|
|
|
<v-select :items="alarmSchedulingMode" v-model="alarmConfig.alarmSchedulingMode"
|
|
|
|
item-text="k" item-value="v" label="Scheduling Mode"></v-select>
|
|
|
|
item-text="k" item-value="v" label="Scheduling Mode"></v-select>
|
|
|
|
</v-row>
|
|
|
|
<v-text-field v-model="alarmConfig.alarmTime" type="time" label="Time"></v-text-field>
|
|
|
|
<v-row>
|
|
|
|
|
|
|
|
<v-time-picker format="24hr" v-model="alarmConfig.alarmTime"></v-time-picker>
|
|
|
|
|
|
|
|
</v-row>
|
|
|
|
</v-row>
|
|
|
|
<v-row cols="3" sm="3" md="3" v-show="alarmConfig.alarmSchedulingMode == 'weekly'">
|
|
|
|
<v-row cols="3" sm="3" md="3" v-show="alarmConfig.alarmSchedulingMode == 'weekly'">
|
|
|
|
<v-checkbox v-for="(WN, index) of weekDays" v-model="alarmConfig.weekDay[ index ]" :label="WN"></v-checkbox>
|
|
|
|
<v-checkbox v-for="(WN, index) of weekDays" v-model="alarmConfig.weekDay[ index ]" :label="WN"></v-checkbox>
|
|
|
@ -96,6 +97,7 @@
|
|
|
|
</v-col>
|
|
|
|
</v-col>
|
|
|
|
</v-row>
|
|
|
|
</v-row>
|
|
|
|
</v-col>
|
|
|
|
</v-col>
|
|
|
|
|
|
|
|
</v-card>
|
|
|
|
</v-row>
|
|
|
|
</v-row>
|
|
|
|
<v-row>
|
|
|
|
<v-row>
|
|
|
|
<v-btn color="success" @click="storeConfig()">Store & Restart</v-btn>
|
|
|
|
<v-btn color="success" @click="storeConfig()">Store & Restart</v-btn>
|
|
|
@ -122,9 +124,10 @@
|
|
|
|
</v-app>
|
|
|
|
</v-app>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script>
|
|
|
|
<script src="js/moment-with-locales.min.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>
|
|
|
|
<script src="js/vue/vue.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/vue-resource@1.5.1"></script>
|
|
|
|
<script src="js/vue/vuetify.js"></script>
|
|
|
|
|
|
|
|
<script src="js/vue/vue-resource_1.5.1.js"></script>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
new Vue({
|
|
|
|
new Vue({
|
|
|
|
el: '#app',
|
|
|
|
el: '#app',
|
|
|
@ -217,6 +220,7 @@
|
|
|
|
"device": "generic",
|
|
|
|
"device": "generic",
|
|
|
|
"connectors": []
|
|
|
|
"connectors": []
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
"alarmSchedulingMode": "weekly",
|
|
|
|
"alarmSchedulingMode": "weekly",
|
|
|
|
"alarmTime": "13:37",
|
|
|
|
"alarmTime": "13:37",
|
|
|
|
"payload": "Probealarm jeden Tag 1337",
|
|
|
|
"payload": "Probealarm jeden Tag 1337",
|
|
|
@ -229,7 +233,6 @@
|
|
|
|
"5": true,
|
|
|
|
"5": true,
|
|
|
|
"6": true
|
|
|
|
"6": true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|