Values editing (#17)

* Refactorings

* save

* REdesigning install dialog

* Display values editor

* Reconfigure flow

* Status handler and version

* error reporting
This commit is contained in:
Andrey Pokhilko
2022-10-07 17:01:19 +01:00
committed by GitHub
parent 3c4d73665e
commit d8afa3861d
13 changed files with 239 additions and 103 deletions

View File

@@ -2,6 +2,8 @@ package dashboard
import (
"errors"
"io/ioutil"
"os"
"strings"
)
@@ -14,4 +16,18 @@ func chartAndVersion(x string) (string, string, error) {
}
return x[:lastInd], x[lastInd+1:], nil
}
}
func tempFile(txt string) (string, func(), error) {
file, err := ioutil.TempFile("", "helm_vals_")
if err != nil {
return "", nil, err
}
err = ioutil.WriteFile(file.Name(), []byte(txt), 0600)
if err != nil {
return "", nil, err
}
return file.Name(), func() { os.Remove(file.Name()) }, nil
}