Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
willie68 committed Mar 27, 2021
2 parents aec7195 + 2e7c087 commit f68827d
Show file tree
Hide file tree
Showing 21 changed files with 792 additions and 167 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ service/cmd/__debug_bin
webclient/RecosUI/public/assets/

webclient/recosadmin/public/assets/

*.syso

*.bak

service/devdata/sessions/sessions/
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,58 @@ parameters:
waitOnClose: true
```

##### Start Browser

`Type`: `BROWSE`

Parameter:

`url`: the URL to show in the system browser. On Windows if you choose a normal filesystem folder, it will automatically start the explorer on this path.

Example 1

```yaml
type: BROWSE
name: browse
description: start a new browser windows with a url
parameters:
url: https://www.wk-music.de
```

Example 2

```yaml
type: BROWSE
name: browse
description: start a new explorer windows with a filepath
parameters:
url: c:\windows
```



##### Ping, shows ping times to a server

Here you can test your connection to a server. Ping will test the connection to a server, You can use an IP Address or a server name (without any http...) If you put this command to an display action you can set a period so that the command will automatically start every #period seconds a test. The result is the actual ping time in ms.

`Type`: `PING`

Parameter:

`name`: the URL to ping to. You can use the Internet address name (without the protocol) or a simple IP address
`period`: the period in seconds when the command should automatically be executed.

Example 1

```yaml
type: PING
name: ping_0
description: check ping with a url
parameters:
name: www.wk-music.de
period: 10
```

##### Page

Switch to another page.
Expand Down
12 changes: 11 additions & 1 deletion comment.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,14 @@ go install github.com/tc-hib/go-winres@latest


Öffnen, Start...
https://github.com/skratchdot/open-golang
https://github.com/skratchdot/open-golang

mp3 decoder....
https://github.com/tosone/minimp3

audio player
https://github.com/hajimehoshi/oto

Neue Commands


Binary file added general/assets/slot_machine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added general/assets/table_tennis_racket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added general/assets/word_count.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion service/api/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ var (
count = 0
)

var ClientUpdateCallback func(profileName string)

type Connection struct {
conn *websocket.Conn
Connected bool
Expand Down Expand Up @@ -146,7 +148,12 @@ func readMessage(conn *Connection) {
index = i
}
}
Connections[index].profile = myMessage.Profile
if Connections[index].profile != myMessage.Profile {
Connections[index].profile = myMessage.Profile
if ClientUpdateCallback != nil {
ClientUpdateCallback(myMessage.Profile)
}
}
}
}
clog.Logger.Infof("recv: %d %s", mt, message)
Expand Down
15 changes: 12 additions & 3 deletions service/cmd/Service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"wkla.no-ip.biz/remote-desk-service/logging"
"wkla.no-ip.biz/remote-desk-service/pkg/audio"
"wkla.no-ip.biz/remote-desk-service/pkg/osdependent"
"wkla.no-ip.biz/remote-desk-service/pkg/session"

config "wkla.no-ip.biz/remote-desk-service/config"

Expand Down Expand Up @@ -347,6 +348,7 @@ func onExit() {
sslsrv.Shutdown(ctx)
}

session.SessionCache.Destroy()
clog.Logger.Info("finished")

os.Exit(0)
Expand Down Expand Up @@ -385,17 +387,17 @@ func initConfig() {
var err error
serviceConfig.Profiles, err = config.ReplaceConfigdir(serviceConfig.Profiles)
if err != nil {
clog.Logger.Alertf("error starting os dependend worker: %s", err.Error())
clog.Logger.Alertf("error wrong profiles folder: %s", err.Error())
os.Exit(1)
}
serviceConfig.AdminClient, err = config.ReplaceConfigdir(serviceConfig.AdminClient)
if err != nil {
clog.Logger.Alertf("error starting os dependend worker: %s", err.Error())
clog.Logger.Alertf("error wrong admin client folder: %s", err.Error())
os.Exit(1)
}
serviceConfig.WebClient, err = config.ReplaceConfigdir(serviceConfig.WebClient)
if err != nil {
clog.Logger.Alertf("error starting os dependend worker: %s", err.Error())
clog.Logger.Alertf("error wrong web client folder: %s", err.Error())
os.Exit(1)
}

Expand All @@ -408,6 +410,13 @@ func initConfig() {
}

dto.InitCommand()

configDir, err := config.ReplaceConfigdir(serviceConfig.Sessions)
if err != nil {
clog.Logger.Alertf("error wrong sessions folder: %s", err.Error())
os.Exit(1)
}
session.Init(configDir)
}

func getApikey() string {
Expand Down
2 changes: 2 additions & 0 deletions service/config/Config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type Config struct {
HealthCheck HealthCheck `yaml:"healthcheck"`

Profiles string `yaml:"profiles"`
Sessions string `yaml:"sessions"`

ExternalConfig map[string]interface{} `yaml:"extconfig"`

Expand Down Expand Up @@ -58,6 +59,7 @@ var DefaulConfig = Config{
WebClient: "${configdir}/webclient",
AdminClient: "${configdir}/webadmin",
Icons: "${configdir}/webclient/assets",
Sessions: "${configdir}/sessions",
ExternalConfig: map[string]interface{}{
"openhardwaremonitor": map[string]interface{}{
"url": "http://127.0.0.1:12999/data.json",
Expand Down
1 change: 1 addition & 0 deletions service/configs/serviceLocal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ healthcheck:
period: 30

profiles: ./devdata/profiles
sessions: ./devdata/sessions

logging:
level: info
Expand Down
58 changes: 58 additions & 0 deletions service/devdata/oldprofiles/daysremain.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: aaa
description: This is the default configuration, just to have one starting point
pages:
- name: Media
description: clock
icon: clock.png
columns: 2
rows: 2
toolbar: ""
cells:
- daysremain_0
- daysremain_1
- ""
- daysremain_1
actions:
- type: SINGLE
name: daysremain_0
title: Days
icon: calendar_year.png
description: ""
fontsize: 30
fontcolor: '#000000'
outlined: true
runone: true
commands:
- id: DAYSREMAIN_0
type: DAYSREMAIN
name: daysremain_0
description: new Days remain command created by ActionWizard
icon: ""
title: ""
parameters:
date: "2021-03-09"
finished: ""
finnished: "53"
formattext: bis 53
formattitle: '%d'
actions: []
- type: DISPLAY
name: daysremain_1
title: tzu
icon: calendar_year.png
description: new DAYSREMAIN action created by ActionWizard
fontsize: 10
fontcolor: '#000000'
outlined: false
runone: true
commands:
- id: ""
type: DAYSREMAIN
name: daysremain_1
description: new DAYSREMAIN command created by ActionWizard
icon: ""
title: ""
parameters:
date: "2021-03-28T22:00:00.000Z"
finished: ttzu
actions: []
76 changes: 44 additions & 32 deletions service/devdata/profiles/aaa.yaml
Original file line number Diff line number Diff line change
@@ -1,58 +1,70 @@
name: aaa
description: This is the default configuration, just to have one starting point
pages:
- name: Media
description: clock
icon: clock.png
- name: default
description: defaul
icon:
columns: 2
rows: 2
toolbar: ""
cells:
- daysremain_0
- daysremain_1
- ""
- daysremain_1
- browser
- ping
- counterLocal
actions:
- type: SINGLE
name: daysremain_0
title: Days
icon: calendar_year.png
name: counterLocal
title: Counter local
icon: slot_machine.png
description: ""
fontsize: 30
fontsize: 20
fontcolor: '#000000'
outlined: true
runone: true
commands:
- id: DAYSREMAIN_0
type: DAYSREMAIN
name: daysremain_0
description: new Days remain command created by ActionWizard
- id: COUNTER_0
type: COUNTER
name: counter_0
description: count the clicks locally
parameters:
persist: true
actions: []
- type: SINGLE
name: browser
title: wk-music
icon: world.png
description: ""
fontsize: 20
fontcolor: '#000000'
outlined: true
runone: true
commands:
- id: BROWSE_0
type: BROWSE
name: browse_0
description: start a new browser windows with a url
icon: ""
title: ""
parameters:
date: "2021-03-09"
finished: ""
finnished: "53"
formattext: bis 53
formattitle: '%d'
url: https://www.wk-music.de
actions: []
- type: DISPLAY
name: daysremain_1
title: tzu
icon: calendar_year.png
description: new DAYSREMAIN action created by ActionWizard
fontsize: 10
name: ping
title: Ping
icon: world_shipping.png
description: ""
fontsize: 20
fontcolor: '#000000'
outlined: false
outlined: true
runone: true
commands:
- id: ""
type: DAYSREMAIN
name: daysremain_1
description: new DAYSREMAIN command created by ActionWizard
- id: PING_0
type: PING
name: ping_0
description: check ping with a url
icon: ""
title: ""
parameters:
date: "2021-03-28T22:00:00.000Z"
finished: ttzu
name: www.wk-music.de
period: 10
actions: []
Loading

0 comments on commit f68827d

Please sign in to comment.