Fixed equals method and refactored vue folder

This commit is contained in:
Ziver Koc 2025-10-24 01:10:58 +02:00
parent c96a00333b
commit ac97ca8068
13 changed files with 111 additions and 29 deletions

View file

@ -17,7 +17,7 @@ export default {
},
template: `
<tr :data-device-id="event.id">
<td><a :href="'?id=' + event.id">{{ event.name }}</a></td>
<td><a :href="'event/' + event.id">{{ event.name }}</a></td>
<td>{{ event.configType }}</td>
<td>{{ event.data?.valueStr }}</td>
<td class="timestamp">{{ timestamp }}</td>

View file

@ -1,3 +1,27 @@
<!--
~ The MIT License (MIT)
~
~ Copyright (c) 2025 Ziver Koc
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in
~ all copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
-->
<!DOCTYPE html>
<html lang="en">
<head>
@ -53,14 +77,14 @@
<script type="importmap">
{
"imports": {
"vue": "./js/vue/vue.esm-browser.js",
"vue-router": "./js/vue/vue-router.esm-browser.js",
"vue": "./js/vue/lib/vue.esm-browser.js",
"vue-router": "./js/vue/lib/vue-router.esm-browser.js",
"@vue/devtools-api": "https://unpkg.com/@vue/devtools-api@6.4.5/lib/esm/index.js",
{{#javascriptModules}}"{{.getModuleName()}}": "{{.getScriptPath()}}",
{{/javascriptModules}}
"App": "./js/vue/components/App.js"
"App": "./js/vue/App.js"
}
}
</script>

View file

@ -1,3 +1,27 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2025 Ziver Koc
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package se.hal.page;
import se.hal.intf.HalJavascriptModule;
@ -7,7 +31,7 @@ public class JavascriptModules implements HalJavascriptModule {
@Override
public HalJsModule[] getJavascriptModules() {
HalWebPage.getRootNav().createSubNav("Events").createSubNav("event_overview", "Overview");
HalWebPage.getRootNav().createSubNav("Events").createSubNav("events", "Overview");
return new HalJsModule[] {
new HalJsModule("AlertStore", "./js/vue/stores/AlertStore.js"),
@ -19,7 +43,7 @@ public class JavascriptModules implements HalJavascriptModule {
new HalJsModule("EventActionComponent", "./js/vue/components/EventActionComponent.js"),
new HalJsModulePage("EventDetailPageComponent", "./js/vue/components/EventDetailPageComponent.js", "/event/:id"),
new HalJsModulePage("EventOverviewPageComponent", "./js/vue/components/EventOverviewPageComponent.js", "/event_overview"),
new HalJsModulePage("EventOverviewPageComponent", "./js/vue/components/EventOverviewPageComponent.js", "/events"),
new HalJsModule("EventTableComponent", "./js/vue/components/EventTableComponent.js"),
new HalJsModule("EventTableRowComponent", "./js/vue/components/EventTableRowComponent.js"),
};