Skip to content

Commit 10f6b1a

Browse files
authored
Merge pull request #27 from d3vilh/dev
v.0.9.1
2 parents d1f7090 + d9457a9 commit 10f6b1a

40 files changed

+621
-535
lines changed

build/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
FROM DEFINE-YOUR-ARCH
55
LABEL maintainer="Mr.Philipp <[email protected]>"
6-
LABEL version="0.9"
6+
LABEL version="0.9.1"
77
WORKDIR /opt
88
EXPOSE 8080/tcp
99

conf/easyrsa-vars.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ set_var EASYRSA_CA_EXPIRE {{ .EasyRSACaExpire }}
1111
set_var EASYRSA_CERT_EXPIRE {{ .EasyRSACertExpire }}
1212
set_var EASYRSA_CERT_RENEW {{ .EasyRSACertRenew }}
1313
set_var EASYRSA_CRL_DAYS {{ .EasyRSACrlDays }}
14-
# Auto generated by OpenVPN-UI v.0.9
14+
# Auto generated by OpenVPN-UI v.0.9.1

conf/openvpn-client-config.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ verb 3
2626
<tls-crypt>
2727
{{ .Ta }}
2828
</tls-crypt>
29-
# Auto generated by OpenVPN-UI v.0.9
29+
# Auto generated by OpenVPN-UI v.0.9.1

conf/openvpn-server-config.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ status-version {{ .OVConfigStatusLogVersion }}
5151
{{ .CustomOptTwo }}
5252
{{ .CustomOptThree }}
5353

54-
# Auto generated by OpenVPN-UI v.0.9
54+
# Auto generated by OpenVPN-UI v.0.9.1

controllers/certificates.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ func (c *CertificatesController) Post() {
112112
}
113113
}
114114
}
115+
cfg := models.EasyRSAConfig{Profile: "default"}
116+
_ = cfg.Read("Profile")
117+
c.Data["EasyRSA"] = &cfg
115118
c.showCerts()
116119
}
117120

@@ -168,7 +171,7 @@ func (c *CertificatesController) Renew() {
168171
//flash.Error(err.Error())
169172
//flash.Store(&c.Controller)
170173
} else {
171-
flash.Success("Success! Certificate for the name \"" + name + "\" and \"" + localip + "\" and \"" + serial + "\" has been renewed")
174+
flash.Success("Success! Certificate for the name \"" + name + "\" and IP \"" + localip + "\" and Serial \"" + serial + "\" has been renewed")
172175
flash.Store(&c.Controller)
173176
}
174177
c.showCerts()
-6.85 KB
Loading
8.67 KB
Loading

docs/images/OpenVPN-UI-Certs.png

-9.47 KB
Loading

docs/images/OpenVPN-UI-ClientConf.png

13.5 KB
Loading

docs/images/OpenVPN-UI-Config.png

2.67 KB
Loading
-18.5 KB
Loading
-2.95 KB
Loading

docs/images/OpenVPN-UI-Home.png

24.9 KB
Loading

docs/images/OpenVPN-UI-Logs.png

59.4 KB
Loading
-171 Bytes
Loading

docs/images/OpenVPN-UI-New_Client.png

8.44 KB
Loading

docs/images/OpenVPN-UI-Profile.png

-295 Bytes
Loading
-13.1 KB
Loading
-10.8 KB
Loading
3.24 KB
Loading
5.04 KB
Loading

lib/sysinfo.go

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
package lib
22

33
import (
4+
"fmt"
45
"runtime"
6+
"strconv"
57
"time"
68

79
sigar "github.com/cloudfoundry/gosigar"
810
)
911

10-
//SystemInfo contains basic information about system load
12+
// SystemInfo contains basic information about system load
1113
type SystemInfo struct {
1214
Memory sigar.Mem
1315
Swap sigar.Swap
@@ -20,7 +22,7 @@ type SystemInfo struct {
2022
CurrentTime time.Time
2123
}
2224

23-
//GetSystemInfo returns short info about system load
25+
// GetSystemInfo returns short info about system load
2426
func GetSystemInfo() SystemInfo {
2527
s := SystemInfo{}
2628

@@ -33,6 +35,9 @@ func GetSystemInfo() SystemInfo {
3335
avg := sigar.LoadAverage{}
3436
if err := avg.Get(); err == nil {
3537
s.LoadAvg = avg
38+
s.LoadAvg.One = formatFloat(s.LoadAvg.One)
39+
s.LoadAvg.Five = formatFloat(s.LoadAvg.Five)
40+
s.LoadAvg.Fifteen = formatFloat(s.LoadAvg.Fifteen)
3641
}
3742

3843
s.CurrentTime = time.Now()
@@ -57,3 +62,8 @@ func GetSystemInfo() SystemInfo {
5762

5863
return s
5964
}
65+
66+
func formatFloat(f float64) float64 {
67+
formatted, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", f), 64)
68+
return formatted
69+
}

static/img/openvpn-win.svg

+1
Loading

static/js/ace/theme-clouds_midnight.js

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/bootstrap.min.4.6.1.js

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)