Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d54ed26c71 | ||
|
|
5cf02ffae9 | ||
|
|
6afd0b16dc | ||
|
|
0b8af385f1 |
54
.github/workflows/jobs.yaml
vendored
54
.github/workflows/jobs.yaml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -112,7 +112,7 @@ jobs:
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
steps:
|
||||
# To build minio image, we need to clone the repository first
|
||||
- name: Clone github.com/minio/minio
|
||||
@@ -150,7 +150,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -189,7 +189,7 @@ jobs:
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -243,7 +243,7 @@ jobs:
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -296,7 +296,7 @@ jobs:
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -348,7 +348,7 @@ jobs:
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -400,7 +400,7 @@ jobs:
|
||||
timeout-minutes: 15
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -448,7 +448,7 @@ jobs:
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -496,7 +496,7 @@ jobs:
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -544,7 +544,7 @@ jobs:
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -595,7 +595,7 @@ jobs:
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -648,7 +648,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -683,7 +683,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -720,7 +720,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -817,7 +817,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -867,7 +867,7 @@ jobs:
|
||||
echo "replace github.com/minio/console => ../" >> go.mod
|
||||
|
||||
echo "updates to go.mod needed; to update it: go mod tidy"
|
||||
go mod tidy -compat=1.22
|
||||
go mod tidy -compat=1.23
|
||||
|
||||
echo "Get git version to build MinIO Image";
|
||||
VERSION=`git rev-parse HEAD`;
|
||||
@@ -901,7 +901,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -956,7 +956,7 @@ jobs:
|
||||
echo "download golang x tools"
|
||||
go mod download golang.org/x/tools
|
||||
echo "go mod tidy compat mode"
|
||||
go mod tidy -compat=1.22
|
||||
go mod tidy -compat=1.23
|
||||
echo "go build gocoverage.go"
|
||||
go build gocovmerge.go
|
||||
echo "put together the outs for final coverage resolution"
|
||||
@@ -1027,7 +1027,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -1069,7 +1069,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -1109,7 +1109,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -1137,7 +1137,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -1164,7 +1164,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -1192,7 +1192,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -1220,7 +1220,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
|
||||
4
.github/workflows/vulncheck.yaml
vendored
4
.github/workflows/vulncheck.yaml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.22
|
||||
go-version: 1.23.3
|
||||
check-latest: true
|
||||
- name: Get official govulncheck
|
||||
run: go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.22 ]
|
||||
go-version: [ 1.23.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## Release v1.7.5
|
||||
|
||||
Bug Fix:
|
||||
|
||||
- Fixed leaks during ZIP multiobject downloads
|
||||
- Allow spaces in Policy names
|
||||
|
||||
## Release v1.7.4
|
||||
|
||||
Deprecations:
|
||||
|
||||
14
README.md
14
README.md
@@ -25,21 +25,7 @@ A graphical user interface for [MinIO](https://github.com/minio/minio)
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
## Install
|
||||
|
||||
MinIO Console is a library that provides a management and browser UI overlay for the MinIO Server.
|
||||
The standalone binary installation path has been removed.
|
||||
|
||||
In case a Console standalone binary is needed, it can be generated by building this package from source as follows:
|
||||
|
||||
### Build from source
|
||||
|
||||
> You will need a working Go environment. Therefore, please follow [How to install Go](https://golang.org/doc/install).
|
||||
> Minimum version required is go1.22
|
||||
|
||||
```
|
||||
go install github.com/minio/console/cmd/console@latest
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
|
||||
@@ -550,9 +550,6 @@ func getAddPolicyResponse(session *models.Principal, params policyApi.AddPolicyP
|
||||
if params.Body == nil {
|
||||
return nil, ErrorWithContext(ctx, ErrPolicyBodyNotInRequest)
|
||||
}
|
||||
if strings.Contains(*params.Body.Name, " ") {
|
||||
return nil, ErrorWithContext(ctx, ErrPolicyNameContainsSpace)
|
||||
}
|
||||
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
|
||||
if err != nil {
|
||||
return nil, ErrorWithContext(ctx, err)
|
||||
|
||||
@@ -43,7 +43,6 @@ var (
|
||||
ErrGroupNameNotInRequest = errors.New("error group name not in request")
|
||||
ErrPolicyNameNotInRequest = errors.New("error policy name not in request")
|
||||
ErrPolicyBodyNotInRequest = errors.New("error policy body not in request")
|
||||
ErrPolicyNameContainsSpace = errors.New("error policy name cannot contain spaces")
|
||||
ErrInvalidEncryptionAlgorithm = errors.New("error invalid encryption algorithm")
|
||||
ErrSSENotConfigured = errors.New("error server side encryption configuration not found")
|
||||
ErrBucketLifeCycleNotConfigured = errors.New("error bucket life cycle configuration not found")
|
||||
@@ -161,10 +160,6 @@ func ErrorWithContext(ctx context.Context, err ...interface{}) *CodedAPIError {
|
||||
errorCode = 400
|
||||
errorMessage = ErrPolicyBodyNotInRequest.Error()
|
||||
}
|
||||
if errors.Is(err1, ErrPolicyNameContainsSpace) {
|
||||
errorCode = 400
|
||||
errorMessage = ErrPolicyNameContainsSpace.Error()
|
||||
}
|
||||
// console invalid session errors
|
||||
if errors.Is(err1, ErrInvalidSession) {
|
||||
errorCode = 401
|
||||
|
||||
@@ -550,10 +550,13 @@ func getDownloadFolderResponse(session *models.Principal, params objectApi.Downl
|
||||
Modified: modified,
|
||||
})
|
||||
if err != nil {
|
||||
object.Close()
|
||||
// Ignore errors, move to next
|
||||
continue
|
||||
}
|
||||
|
||||
_, err = io.Copy(f, object)
|
||||
object.Close()
|
||||
if err != nil {
|
||||
// We have a partial object, report error.
|
||||
pw.CloseWithError(err)
|
||||
@@ -650,14 +653,17 @@ func getMultipleFilesDownloadResponse(session *models.Principal, params objectAp
|
||||
// Ignore errors, move to next
|
||||
continue
|
||||
}
|
||||
modified, _ := time.Parse(time.RFC3339, obj.LastModified)
|
||||
|
||||
modified, _ := time.Parse(time.RFC3339, obj.LastModified)
|
||||
f, err := addToZip(name, modified)
|
||||
if err != nil {
|
||||
object.Close()
|
||||
// Ignore errors, move to next
|
||||
continue
|
||||
}
|
||||
|
||||
_, err = io.Copy(f, object)
|
||||
object.Close()
|
||||
if err != nil {
|
||||
// We have a partial object, report error.
|
||||
pw.CloseWithError(err)
|
||||
@@ -666,13 +672,14 @@ func getMultipleFilesDownloadResponse(session *models.Principal, params objectAp
|
||||
}
|
||||
|
||||
} else {
|
||||
// add selected individual object
|
||||
objectData, err := mClient.StatObject(ctx, params.BucketName, dObj, minio.StatObjectOptions{})
|
||||
object, err := mClient.GetObject(ctx, params.BucketName, dObj, minio.GetObjectOptions{})
|
||||
if err != nil {
|
||||
// Ignore errors, move to next
|
||||
continue
|
||||
}
|
||||
object, err := mClient.GetObject(ctx, params.BucketName, dObj, minio.GetObjectOptions{})
|
||||
|
||||
// add selected individual object
|
||||
objectData, err := object.Stat()
|
||||
if err != nil {
|
||||
// Ignore errors, move to next
|
||||
continue
|
||||
@@ -683,10 +690,13 @@ func getMultipleFilesDownloadResponse(session *models.Principal, params objectAp
|
||||
objectName := prefixes[len(prefixes)-1]
|
||||
f, err := addToZip(objectName, objectData.LastModified)
|
||||
if err != nil {
|
||||
object.Close()
|
||||
// Ignore errors, move to next
|
||||
continue
|
||||
}
|
||||
|
||||
_, err = io.Copy(f, object)
|
||||
object.Close()
|
||||
if err != nil {
|
||||
// We have a partial object, report error.
|
||||
pw.CloseWithError(err)
|
||||
|
||||
6
go.mod
6
go.mod
@@ -1,6 +1,6 @@
|
||||
module github.com/minio/console
|
||||
|
||||
go 1.22
|
||||
go 1.23
|
||||
|
||||
require (
|
||||
github.com/blang/semver/v4 v4.0.0
|
||||
@@ -24,6 +24,7 @@ require (
|
||||
github.com/minio/madmin-go/v3 v3.0.68
|
||||
github.com/minio/mc v0.0.0-20240815155011-479171e7be9c
|
||||
github.com/minio/minio-go/v7 v7.0.81-0.20241125171916-a563333c01ef
|
||||
github.com/minio/pkg/v3 v3.0.22
|
||||
github.com/minio/selfupdate v0.6.0
|
||||
github.com/minio/websocket v1.6.0
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
@@ -35,14 +36,13 @@ require (
|
||||
golang.org/x/crypto v0.28.0
|
||||
golang.org/x/net v0.30.0
|
||||
golang.org/x/oauth2 v0.22.0
|
||||
|
||||
// Added to include security fix for
|
||||
// https://github.com/golang/go/issues/56152
|
||||
golang.org/x/text v0.19.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
)
|
||||
|
||||
require github.com/minio/pkg/v3 v3.0.22
|
||||
|
||||
require (
|
||||
aead.dev/mem v0.2.0 // indirect
|
||||
aead.dev/minisign v0.3.0 // indirect
|
||||
|
||||
@@ -176,7 +176,7 @@ func Test_AddPolicyAPI(t *testing.T) {
|
||||
]
|
||||
}`),
|
||||
},
|
||||
expectedStatus: 400,
|
||||
expectedStatus: 201, // Changed the expected status from 400 to 201, as spaces are now allowed in policy names.
|
||||
expectedError: nil,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "./static/css/main.e60e4760.css",
|
||||
"main.js": "./static/js/main.578d0f97.js",
|
||||
"main.js": "./static/js/main.954ee255.js",
|
||||
"static/js/5301.79001158.chunk.js": "./static/js/5301.79001158.chunk.js",
|
||||
"static/js/9361.f4bfeb22.chunk.js": "./static/js/9361.f4bfeb22.chunk.js",
|
||||
"static/js/5711.6f5b125a.chunk.js": "./static/js/5711.6f5b125a.chunk.js",
|
||||
@@ -15,7 +15,7 @@
|
||||
"static/js/8715.08b2d38b.chunk.js": "./static/js/8715.08b2d38b.chunk.js",
|
||||
"static/js/7880.5e820de1.chunk.js": "./static/js/7880.5e820de1.chunk.js",
|
||||
"static/js/2209.3b0ca7fa.chunk.js": "./static/js/2209.3b0ca7fa.chunk.js",
|
||||
"static/js/7435.242efaf1.chunk.js": "./static/js/7435.242efaf1.chunk.js",
|
||||
"static/js/7435.279d39d5.chunk.js": "./static/js/7435.279d39d5.chunk.js",
|
||||
"static/js/2491.b81bd18c.chunk.js": "./static/js/2491.b81bd18c.chunk.js",
|
||||
"static/js/9269.80d85085.chunk.js": "./static/js/9269.80d85085.chunk.js",
|
||||
"static/js/6925.c3c29d15.chunk.js": "./static/js/6925.c3c29d15.chunk.js",
|
||||
@@ -100,7 +100,7 @@
|
||||
"static/media/placeholderimage.png": "./static/media/placeholderimage.077ea48bd1ef1f4a883f.png",
|
||||
"index.html": "./index.html",
|
||||
"main.e60e4760.css.map": "./static/css/main.e60e4760.css.map",
|
||||
"main.578d0f97.js.map": "./static/js/main.578d0f97.js.map",
|
||||
"main.954ee255.js.map": "./static/js/main.954ee255.js.map",
|
||||
"5301.79001158.chunk.js.map": "./static/js/5301.79001158.chunk.js.map",
|
||||
"9361.f4bfeb22.chunk.js.map": "./static/js/9361.f4bfeb22.chunk.js.map",
|
||||
"5711.6f5b125a.chunk.js.map": "./static/js/5711.6f5b125a.chunk.js.map",
|
||||
@@ -114,7 +114,7 @@
|
||||
"8715.08b2d38b.chunk.js.map": "./static/js/8715.08b2d38b.chunk.js.map",
|
||||
"7880.5e820de1.chunk.js.map": "./static/js/7880.5e820de1.chunk.js.map",
|
||||
"2209.3b0ca7fa.chunk.js.map": "./static/js/2209.3b0ca7fa.chunk.js.map",
|
||||
"7435.242efaf1.chunk.js.map": "./static/js/7435.242efaf1.chunk.js.map",
|
||||
"7435.279d39d5.chunk.js.map": "./static/js/7435.279d39d5.chunk.js.map",
|
||||
"2491.b81bd18c.chunk.js.map": "./static/js/2491.b81bd18c.chunk.js.map",
|
||||
"9269.80d85085.chunk.js.map": "./static/js/9269.80d85085.chunk.js.map",
|
||||
"6925.c3c29d15.chunk.js.map": "./static/js/6925.c3c29d15.chunk.js.map",
|
||||
@@ -179,6 +179,6 @@
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.e60e4760.css",
|
||||
"static/js/main.578d0f97.js"
|
||||
"static/js/main.954ee255.js"
|
||||
]
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="/"/><meta content="width=device-width,initial-scale=1" name="viewport"/><meta content="#081C42" media="(prefers-color-scheme: light)" name="theme-color"/><meta content="#081C42" media="(prefers-color-scheme: dark)" name="theme-color"/><meta content="MinIO Console" name="description"/><meta name="minio-license" content="agpl"/><link href="./styles/root-styles.css" rel="stylesheet"/><link href="./apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180"/><link href="./favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/><link href="./favicon-96x96.png" rel="icon" sizes="96x96" type="image/png"/><link href="./favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/><link href="./manifest.json" rel="manifest"/><link color="#3a4e54" href="./safari-pinned-tab.svg" rel="mask-icon"/><title>MinIO Console</title><script defer="defer" src="./static/js/main.578d0f97.js"></script><link href="./static/css/main.e60e4760.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="preload"><img src="./images/background.svg"/> <img src="./images/background-wave-orig2.svg"/></div><div id="loader-block"><img src="./Loader.svg"/></div></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="/"/><meta content="width=device-width,initial-scale=1" name="viewport"/><meta content="#081C42" media="(prefers-color-scheme: light)" name="theme-color"/><meta content="#081C42" media="(prefers-color-scheme: dark)" name="theme-color"/><meta content="MinIO Console" name="description"/><meta name="minio-license" content="agpl"/><link href="./styles/root-styles.css" rel="stylesheet"/><link href="./apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180"/><link href="./favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/><link href="./favicon-96x96.png" rel="icon" sizes="96x96" type="image/png"/><link href="./favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/><link href="./manifest.json" rel="manifest"/><link color="#3a4e54" href="./safari-pinned-tab.svg" rel="mask-icon"/><title>MinIO Console</title><script defer="defer" src="./static/js/main.954ee255.js"></script><link href="./static/css/main.e60e4760.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="preload"><img src="./images/background.svg"/> <img src="./images/background-wave-orig2.svg"/></div><div id="loader-block"><img src="./Loader.svg"/></div></div></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
web-app/build/static/js/7435.279d39d5.chunk.js
Normal file
2
web-app/build/static/js/7435.279d39d5.chunk.js
Normal file
File diff suppressed because one or more lines are too long
1
web-app/build/static/js/7435.279d39d5.chunk.js.map
Normal file
1
web-app/build/static/js/7435.279d39d5.chunk.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -20,7 +20,7 @@ jobs:
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -84,7 +84,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -129,7 +129,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.22.x]
|
||||
go-version: [1.23.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
|
||||
@@ -52,7 +52,7 @@ const AddPolicyScreen = () => {
|
||||
setAddLoading(true);
|
||||
api.policies
|
||||
.addPolicy({
|
||||
name: policyName,
|
||||
name: policyName.trim(),
|
||||
policy: policyDefinition,
|
||||
})
|
||||
.then((res) => {
|
||||
@@ -79,15 +79,12 @@ const AddPolicyScreen = () => {
|
||||
};
|
||||
|
||||
const validatePolicyname = (policyName: string) => {
|
||||
if (policyName.indexOf(" ") !== -1) {
|
||||
return "Policy name cannot contain spaces";
|
||||
if (policyName.trim() === "") {
|
||||
return "Policy name cannot be empty";
|
||||
} else return "";
|
||||
};
|
||||
|
||||
const validSave =
|
||||
policyName.trim() !== "" &&
|
||||
policyName.indexOf(" ") === -1 &&
|
||||
policyDefinition.trim() !== "";
|
||||
const validSave = policyName.trim() !== "" && policyDefinition.trim() !== "";
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(setHelpName("add_policy"));
|
||||
|
||||
Reference in New Issue
Block a user