From d061348087da70c2eb1f740e41bf2e97faae9fc3 Mon Sep 17 00:00:00 2001 From: MaMe82 Date: Wed, 1 Aug 2018 13:11:11 +0200 Subject: [PATCH] Installer disables network service, fix in rbuild (dev only) --- Makefile | 1 + rbuild.sh | 5 +-- web_client/hvueCompHIDJobs.go | 57 +++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 web_client/hvueCompHIDJobs.go diff --git a/Makefile b/Makefile index 22ed186..f0d3abc 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,7 @@ install: # careful testing #sudo update-rc.d dhcpcd disable #sudo update-rc.d dnsmasq disable + systemctl disable networking.service # disable network service, relevant parts are wrapped by P4wnP1 (boottime below 20 seconds) # reinit service daemon systemctl daemon-reload diff --git a/rbuild.sh b/rbuild.sh index 741adaf..917cfde 100755 --- a/rbuild.sh +++ b/rbuild.sh @@ -1,9 +1,10 @@ #!/bin/bash -env GOBIN=$(pwd)/build GOOS=linux GOARCH=arm go install ./... # compile all main packages to the build folder +#env GOBIN=$(pwd)/build GOOS=linux GOARCH=arm go install cmd/... # compile all main packages to the build folder +env GOOS=linux GOARCH=arm go build -o build/P4wnP1_service cmd/P4wnP1_service/P4wnP1_service.go +env GOOS=linux GOARCH=arm go build -o build/P4wnP1_cli cmd/P4wnP1_cli/P4wnP1_cli.go scp build/P4wnP1_service pi@raspberrypi.local:~/P4wnP1_go scp build/P4wnP1_cli pi@raspberrypi.local:~/P4wnP1_go -#env GOOS=linux GOARCH=arm go build P4wnP1_service.go #scp P4wnP1_service pi@raspberrypi.local:~/P4wnP1_go #env GOOS=linux GOARCH=arm go build P4wnP1_cli.go #scp P4wnP1_cli pi@raspberrypi.local:~/P4wnP1_go diff --git a/web_client/hvueCompHIDJobs.go b/web_client/hvueCompHIDJobs.go new file mode 100644 index 0000000..d355fa1 --- /dev/null +++ b/web_client/hvueCompHIDJobs.go @@ -0,0 +1,57 @@ +// +build js + +package main + +import ( + "github.com/gopherjs/gopherjs/js" + "github.com/mame82/hvue" +) + +type CompEthernetAddressesData2 struct { + *js.Object + +} + +func newCompEthernetAddressesData2(vm *hvue.VM) interface{} { + + cc := &CompEthernetAddressesData2{ + Object: js.Global.Get("Object").New(), + } + + + return cc +} + +func InitCompEthernetAddresses2() { + /* + o := vue.NewOption() + o.Name = "EthernetAddresses" + o.SetDataWithMethods(newCompEthernetAddressesData2) + o.Template = compEthernetAddressesTemplate2 + o.AddProp("settings") + */ + + hvue.NewComponent( + "ethernet-addresses", + hvue.Template(compEthernetAddressesTemplate2), + hvue.DataFunc(newCompEthernetAddressesData2), + hvue.PropObj("settings", hvue.Types(hvue.PObject)), + ) +} + +const ( + + compEthernetAddressesTemplate2 = ` +
+ + + + + + + +
Host MAC address
Device MAC address
+
+` +) +