Skip to content

Commit

Permalink
Merge pull request #407 from aerospike/v7.6.0
Browse files Browse the repository at this point in the history
V7.6.0
  • Loading branch information
robertglonek authored Sep 10, 2024
2 parents 960998c + 7deb8b2 commit a7f8f77
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 9 deletions.
8 changes: 8 additions & 0 deletions src/cmdConfGenerator.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package main

import (
"fmt"
"os"

"github.com/aerospike/aerolab/confeditor"
"github.com/aerospike/aerolab/confeditor7"
flags "github.com/rglonek/jeddevdk-goflags"
Expand All @@ -17,6 +20,11 @@ func (c *confGeneratorCmd) Execute(args []string) error {
if earlyProcessV2(args, false) {
return nil
}
if _, err := os.Stat(string(c.Path)); err == nil {
fmt.Printf("WARNING!\nFile '%s' already exists. If you continue, aerolab will attempt to read and parse the file.\nNote that aerolab will not automatically recognise whether the config is for aerospike 7+ or older. The `--pre-7` flag must be provided for older versions.\n\nPress ENTER to continue or CTRL+C to abort.\n", c.Path)
var ignoreMe string
fmt.Scanln(&ignoreMe)
}
if c.Pre7 {
e := &confeditor.Editor{
Path: string(c.Path),
Expand Down
9 changes: 8 additions & 1 deletion src/cmdWeb.go
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,14 @@ func (c *webCmd) jobsAndCommands(w http.ResponseWriter, r *http.Request, jobType
nusr = "N/A"
}
nUser := getHeaderUserValue(r)
if r.FormValue("jobsAllUsers") != "true" {
jobsAllUsers := ""
if allUserCookie, err := r.Cookie("AEROLAB_SHOW_ALL_USERS"); err == nil && allUserCookie != nil {
jobsAllUsers = allUserCookie.Value
}
if r.FormValue("jobsAllUsers") != "" {
jobsAllUsers = r.FormValue("jobsAllUsers")
}
if jobsAllUsers != "true" {
if nUser != nusr && nusr != "N/A" {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion src/confeditor/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ func (e *Editor) ui(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) {
}
}
aeroConfig.Stanza("namespace test").NewStanza("storage-engine device")
aeroConfig.Stanza("namespace test").Stanza("storage-engine device").SetValue("file", "/opt/aerospike/data/bar.dat")
aeroConfig.Stanza("namespace test").Stanza("storage-engine device").SetValue("file", "/opt/aerospike/data/test.dat")
aeroConfig.Stanza("namespace test").Stanza("storage-engine device").SetValue("filesize", "1G")
} else {
for _, key := range aeroConfig.Stanza("namespace test").ListKeys() {
Expand Down
4 changes: 2 additions & 2 deletions src/confeditor7/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ func (e *Editor) ui(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) {
aeroConfig.Stanza("namespace test").Delete("storage-engine memory")
}
aeroConfig.Stanza("namespace test").NewStanza("storage-engine device")
aeroConfig.Stanza("namespace test").Stanza("storage-engine device").SetValue("file", "/opt/aerospike/data/bar.dat")
aeroConfig.Stanza("namespace test").Stanza("storage-engine device").SetValue("file", "/opt/aerospike/data/test.dat")
aeroConfig.Stanza("namespace test").Stanza("storage-engine device").SetValue("filesize", "4G")
} else {
for _, key := range aeroConfig.Stanza("namespace test").ListKeys() {
Expand All @@ -922,7 +922,7 @@ func (e *Editor) ui(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) {
if change.Selected {
aeroConfig.Stanza("namespace test").Delete("storage-engine device")
aeroConfig.Stanza("namespace test").NewStanza("storage-engine memory")
aeroConfig.Stanza("namespace test").Stanza("storage-engine memory").SetValue("file", "/opt/aerospike/data/bar.dat")
aeroConfig.Stanza("namespace test").Stanza("storage-engine memory").SetValue("file", "/opt/aerospike/data/test.dat")
aeroConfig.Stanza("namespace test").Stanza("storage-engine memory").SetValue("filesize", "4G")
aeroConfig.Stanza("namespace test").Stanza("storage-engine memory").Delete("data-size")
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/nwaples/rardecode v1.1.3
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/pkg/sftp v1.13.6
github.com/rglonek/aerospike-config-file-parser v1.0.3
github.com/rglonek/aerospike-config-file-parser v1.0.4
github.com/rglonek/envconfig v0.0.0-20230911195903-c4c689bf1744
github.com/rglonek/jeddevdk-goflags v2.0.0+incompatible
github.com/rglonek/sbs v1.0.1
Expand Down
4 changes: 2 additions & 2 deletions src/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Q
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/rglonek/aerospike-config-file-parser v1.0.3 h1:KMkyHToAhFfNph/BUx3a8Fh7PH9vF4EHb0W4rquzuNY=
github.com/rglonek/aerospike-config-file-parser v1.0.3/go.mod h1:MDD2s/4HAhTn8OcXUNcrppGBHpaW81INfNYeFHkS/eg=
github.com/rglonek/aerospike-config-file-parser v1.0.4 h1:o9NV5UFs8xOXBn389FebKZnJAW1HEHX14mq5AFGAhfw=
github.com/rglonek/aerospike-config-file-parser v1.0.4/go.mod h1:MDD2s/4HAhTn8OcXUNcrppGBHpaW81INfNYeFHkS/eg=
github.com/rglonek/envconfig v0.0.0-20230911195903-c4c689bf1744 h1:HyBW093bA2fLY2ZnoYf2mYaC9ATDBX90kj++W5I3mTs=
github.com/rglonek/envconfig v0.0.0-20230911195903-c4c689bf1744/go.mod h1:CS128EIeoFCR4HBOwZDqzicTdDDcwzAWSqPUof2r8vI=
github.com/rglonek/jeddevdk-goflags v2.0.0+incompatible h1:YetOOw5mSL6xmwbF5GMcmvMbpthp03tmGLx3U/ke/YA=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ github.com/pkg/browser
## explicit; go 1.15
github.com/pkg/sftp
github.com/pkg/sftp/internal/encoding/ssh/filexfer
# github.com/rglonek/aerospike-config-file-parser v1.0.3
# github.com/rglonek/aerospike-config-file-parser v1.0.4
## explicit; go 1.19
github.com/rglonek/aerospike-config-file-parser
# github.com/rglonek/envconfig v0.0.0-20230911195903-c4c689bf1744
Expand Down

0 comments on commit a7f8f77

Please sign in to comment.