Compare commits
133 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bc4efbac1 | ||
|
|
cc0164a67b | ||
|
|
b968cc25ad | ||
|
|
d116a35a6d | ||
|
|
49f856bdd5 | ||
|
|
0d628f589a | ||
|
|
4387b2149f | ||
|
|
8cc602434e | ||
|
|
6411dc9504 | ||
|
|
32c34b0a11 | ||
|
|
6e8f5e0fc2 | ||
|
|
3ce377dbd1 | ||
|
|
ad502b9f18 | ||
|
|
fde186a5a3 | ||
|
|
0823f623c8 | ||
|
|
6cec113304 | ||
|
|
cd42d77a46 | ||
|
|
35907beaca | ||
|
|
a062a59288 | ||
|
|
842c2decd0 | ||
|
|
d1069ed359 | ||
|
|
6d81a1b1f8 | ||
|
|
b2fe478dae | ||
|
|
02ed6a6e8b | ||
|
|
1b271ab467 | ||
|
|
bacb5f8901 | ||
|
|
ae7371da95 | ||
|
|
60f5eb603b | ||
|
|
420ed00f55 | ||
|
|
b975871e9d | ||
|
|
803ffe2960 | ||
|
|
c96c95924c | ||
|
|
f02786001c | ||
|
|
542b7192c3 | ||
|
|
b31aa10b52 | ||
|
|
1eba59954d | ||
|
|
b71d9f05c5 | ||
|
|
fc5e94d55f | ||
|
|
3875fb3eaa | ||
|
|
b3d4132fe6 | ||
|
|
21f20bb9ea | ||
|
|
df937467a0 | ||
|
|
d1ae271111 | ||
|
|
e7fb3e0e45 | ||
|
|
b7b0271ec7 | ||
|
|
9935b839b7 | ||
|
|
0e11098c31 | ||
|
|
c55e0a069b | ||
|
|
c3da876b04 | ||
|
|
643a9c6c7c | ||
|
|
0c3a94172d | ||
|
|
527eb16700 | ||
|
|
e3aec3f094 | ||
|
|
eac2734df4 | ||
|
|
a411e7c977 | ||
|
|
28c4abe2d0 | ||
|
|
a9ef6ebf5f | ||
|
|
c12415c12d | ||
|
|
1f481e690b | ||
|
|
58aad859e1 | ||
|
|
b9ebfe09ee | ||
|
|
864cf7af99 | ||
|
|
b76f460979 | ||
|
|
cbd2c4682d | ||
|
|
d49bdf7d49 | ||
|
|
559a7278a0 | ||
|
|
4a172fae97 | ||
|
|
fc4263e2f9 | ||
|
|
c1b9b4c81b | ||
|
|
aa9b73522e | ||
|
|
0904f83627 | ||
|
|
253053cc23 | ||
|
|
08a3ff65c7 | ||
|
|
ee8fac8be8 | ||
|
|
9fa49b40b3 | ||
|
|
de13119e02 | ||
|
|
bf9acd7691 | ||
|
|
a5066fecc8 | ||
|
|
6432681440 | ||
|
|
b3b6df9d82 | ||
|
|
fe7be4ef62 | ||
|
|
b4603547f6 | ||
|
|
b33b9315ea | ||
|
|
6ae03fa028 | ||
|
|
e1bb1e0472 | ||
|
|
411670e4f5 | ||
|
|
1c55932f84 | ||
|
|
5a77054d6b | ||
|
|
84c5fd58f9 | ||
|
|
98979911ee | ||
|
|
c0cf7358c7 | ||
|
|
9053e64dff | ||
|
|
57bfe97d08 | ||
|
|
028570279c | ||
|
|
bda1cd1f25 | ||
|
|
7a9b775b09 | ||
|
|
17e791afb9 | ||
|
|
920fc7d937 | ||
|
|
6e314a2fa5 | ||
|
|
dc90db6591 | ||
|
|
beed4895c1 | ||
|
|
629dd669c4 | ||
|
|
fc9319e55b | ||
|
|
58b64a5739 | ||
|
|
d93537261e | ||
|
|
22ec87d00e | ||
|
|
b87b4156e7 | ||
|
|
93f010b880 | ||
|
|
c5d4cdf1bc | ||
|
|
c117601e53 | ||
|
|
f78f838ed9 | ||
|
|
1583b69fb7 | ||
|
|
cde6d1b0e0 | ||
|
|
be60569a14 | ||
|
|
51226a74d0 | ||
|
|
e983473a54 | ||
|
|
211ab3fd9d | ||
|
|
90c8ea7f09 | ||
|
|
fb5193d896 | ||
|
|
f7a7f01d7d | ||
|
|
2c84a52937 | ||
|
|
6020590b2f | ||
|
|
1477def4fe | ||
|
|
8882f1da0e | ||
|
|
056d487f1c | ||
|
|
b8083215b3 | ||
|
|
61c864e748 | ||
|
|
0e0f5030da | ||
|
|
0dacc4d49e | ||
|
|
4d783c5e42 | ||
|
|
75b3a6bea4 | ||
|
|
29507cda7e | ||
|
|
81e0c82fee |
48
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
48
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: community, triage
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## NOTE
|
||||
If this case is urgent, please subscribe to [Subnet](https://min.io/pricing) so that our 24/7 support team may help you faster.
|
||||
|
||||
<!--- Provide a general summary of the issue in the title above -->
|
||||
|
||||
## Expected Behavior
|
||||
<!--- If you're describing a bug, tell us what should happen -->
|
||||
<!--- If you're suggesting a change/improvement, tell us how it should work -->
|
||||
|
||||
## Current Behavior
|
||||
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
|
||||
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
|
||||
|
||||
## Possible Solution
|
||||
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
|
||||
<!--- or ideas how to implement the addition or change -->
|
||||
|
||||
## Steps to Reproduce (for bugs)
|
||||
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
|
||||
<!--- reproduce this bug. Include code to reproduce, if relevant -->
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
4.
|
||||
|
||||
## Context
|
||||
<!--- How has this issue affected you? What are you trying to accomplish? -->
|
||||
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
||||
|
||||
## Regression
|
||||
<!-- Is this issue a regression? (Yes / No) -->
|
||||
<!-- If Yes, optionally please include the MinIO version or commit id or PR# that caused this regression, if you have these details. -->
|
||||
|
||||
## Your Environment
|
||||
<!--- Include as many relevant details about the environment you experienced the bug in -->
|
||||
* MinIO version used (`minio --version`):
|
||||
* Server setup and configuration:
|
||||
* Operating System and version (`uname -a`):
|
||||
166
.github/workflows/cross-compile.yaml
vendored
Normal file
166
.github/workflows/cross-compile.yaml
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
# @format
|
||||
|
||||
name: Cross Compile
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- go.sum
|
||||
|
||||
# This ensures that previous jobs for the PR are canceled when the PR is
|
||||
# updated.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
cross-compile-1:
|
||||
name: Cross compile
|
||||
needs:
|
||||
- lint-job
|
||||
- ui-assets
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
id: go
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make crosscompile arg1="'linux/ppc64le linux/mips64'"
|
||||
|
||||
cross-compile-2:
|
||||
name: Cross compile 2
|
||||
needs:
|
||||
- lint-job
|
||||
- ui-assets
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
id: go
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make crosscompile arg1="'linux/arm64 linux/s390x'"
|
||||
|
||||
cross-compile-3:
|
||||
name: Cross compile 3
|
||||
needs:
|
||||
- lint-job
|
||||
- ui-assets
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
id: go
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make crosscompile arg1="'darwin/amd64 freebsd/amd64'"
|
||||
|
||||
cross-compile-4:
|
||||
name: Cross compile 4
|
||||
needs:
|
||||
- lint-job
|
||||
- ui-assets
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
id: go
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make crosscompile arg1="'windows/amd64 linux/arm'"
|
||||
|
||||
cross-compile-5:
|
||||
name: Cross compile 5
|
||||
needs:
|
||||
- lint-job
|
||||
- ui-assets
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
id: go
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make crosscompile arg1="'linux/386 netbsd/amd64'"
|
||||
18
.github/workflows/issues.yaml
vendored
Normal file
18
.github/workflows/issues.yaml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# @format
|
||||
|
||||
name: Issue Workflow
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- opened
|
||||
|
||||
jobs:
|
||||
add-to-project:
|
||||
name: Add issue to project
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/add-to-project@v0.5.0
|
||||
with:
|
||||
project-url: https://github.com/orgs/miniohq/projects/2
|
||||
github-token: ${{ secrets.BOT_PAT }}
|
||||
515
.github/workflows/jobs.yaml
vendored
515
.github/workflows/jobs.yaml
vendored
@@ -1,3 +1,5 @@
|
||||
# @format
|
||||
|
||||
name: Workflow
|
||||
|
||||
on:
|
||||
@@ -15,15 +17,13 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
|
||||
lint-job:
|
||||
name: Checking Lint
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -42,32 +42,12 @@ jobs:
|
||||
run: |
|
||||
make verifiers
|
||||
|
||||
vulnerable-dependencies-checks:
|
||||
name: "Check for vulnerable dependencies"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
check-latest: true
|
||||
- name: Get govulncheck
|
||||
run: go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
shell: bash
|
||||
- name: Run govulncheck
|
||||
run: govulncheck ./...
|
||||
shell: bash
|
||||
semgrep-static-code-analysis:
|
||||
name: "semgrep checks"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out source code
|
||||
uses: actions/checkout@v3
|
||||
@@ -80,14 +60,13 @@ jobs:
|
||||
pip3 install semgrep
|
||||
semgrep --config semgrep.yaml $(pwd)/portal-ui --error
|
||||
|
||||
|
||||
ui-assets:
|
||||
name: "React Code Has No Warnings & Prettified"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -97,7 +76,7 @@ jobs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
cache: 'yarn'
|
||||
cache: "yarn"
|
||||
cache-dependency-path: portal-ui/yarn.lock
|
||||
- uses: actions/cache@v3
|
||||
id: assets-cache
|
||||
@@ -121,13 +100,18 @@ jobs:
|
||||
continue-on-error: false
|
||||
run: |
|
||||
./check-prettier.sh
|
||||
- name: Check for dead code
|
||||
working-directory: ./portal-ui
|
||||
continue-on-error: false
|
||||
run: |
|
||||
./check-deadcode.sh
|
||||
reuse-golang-dependencies:
|
||||
name: reuse golang dependencies
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -146,10 +130,10 @@ jobs:
|
||||
|
||||
latest-minio:
|
||||
name: Build latest MinIO
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
go-version: [1.20.x]
|
||||
steps:
|
||||
# To build minio image, we need to clone the repository first
|
||||
- name: Clone github.com/minio/minio
|
||||
@@ -184,8 +168,8 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -215,42 +199,17 @@ jobs:
|
||||
GOOS: linux
|
||||
run: |
|
||||
make console
|
||||
|
||||
|
||||
|
||||
react-code-known-vulnerabilities:
|
||||
name: "React Code Has No Known Vulnerable Deps"
|
||||
needs:
|
||||
- ui-assets
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
cache: 'yarn'
|
||||
cache-dependency-path: portal-ui/yarn.lock
|
||||
- name: Checks for known security issues with the installed packages
|
||||
working-directory: ./portal-ui
|
||||
continue-on-error: false
|
||||
run: |
|
||||
yarn audit
|
||||
|
||||
all-permissions-1:
|
||||
name: Permissions Tests Part 1
|
||||
needs:
|
||||
- compile-binary
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -279,10 +238,11 @@ jobs:
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
|
||||
- name: Install TestCafe
|
||||
run: npm install testcafe@3.0.0
|
||||
|
||||
- name: Run TestCafe Tests
|
||||
uses: DevExpress/testcafe-action@latest
|
||||
with:
|
||||
args: '"chrome --headless --no-sandbox" portal-ui/tests/permissions-1/ --skip-js-errors -c 3'
|
||||
run: npx testcafe "chrome:headless" portal-ui/tests/permissions-1/ -q --skip-js-errors -c 3
|
||||
|
||||
- name: Clean up users & policies
|
||||
run: |
|
||||
@@ -292,12 +252,12 @@ jobs:
|
||||
name: Permissions Tests Part 2
|
||||
needs:
|
||||
- compile-binary
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -325,10 +285,11 @@ jobs:
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
|
||||
- name: Install TestCafe
|
||||
run: npm install testcafe@3.0.0
|
||||
|
||||
- name: Run TestCafe Tests
|
||||
uses: DevExpress/testcafe-action@latest
|
||||
with:
|
||||
args: '"chrome --headless --no-sandbox" portal-ui/tests/permissions-2/ --skip-js-errors -c 3'
|
||||
run: npx testcafe "chrome:headless" portal-ui/tests/permissions-2/ -q --skip-js-errors -c 3
|
||||
|
||||
- name: Clean up users & policies
|
||||
run: |
|
||||
@@ -338,12 +299,12 @@ jobs:
|
||||
name: Permissions Tests Part 3
|
||||
needs:
|
||||
- compile-binary
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -371,26 +332,26 @@ jobs:
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
|
||||
- name: Install TestCafe
|
||||
run: npm install testcafe@3.0.0
|
||||
|
||||
- name: Run TestCafe Tests
|
||||
uses: DevExpress/testcafe-action@latest
|
||||
with:
|
||||
args: '"chrome --headless --no-sandbox" portal-ui/tests/permissions-3/ --skip-js-errors -c 3'
|
||||
run: npx testcafe "chrome:headless" portal-ui/tests/permissions-3/ -q --skip-js-errors -c 3
|
||||
|
||||
- name: Clean up users & policies
|
||||
run: |
|
||||
make cleanup-permissions
|
||||
|
||||
|
||||
all-permissions-4:
|
||||
name: Permissions Tests Part 4
|
||||
needs:
|
||||
- compile-binary
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
timeout-minutes: 15
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -417,20 +378,23 @@ jobs:
|
||||
- name: Start Console, front-end app and initialize users/policies
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
|
||||
- name: Install TestCafe
|
||||
run: npm install testcafe@3.0.0
|
||||
|
||||
- name: Run TestCafe Tests
|
||||
timeout-minutes: 10
|
||||
uses: DevExpress/testcafe-action@latest
|
||||
with:
|
||||
args: '"chrome --headless --no-sandbox" portal-ui/tests/permissions-4/ --skip-js-errors'
|
||||
run: npx testcafe "chrome:headless" portal-ui/tests/permissions-4/ --skip-js-errors
|
||||
|
||||
all-permissions-5:
|
||||
name: Permissions Tests Part 5
|
||||
needs:
|
||||
- compile-binary
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -457,20 +421,23 @@ jobs:
|
||||
- name: Start Console, front-end app and initialize users/policies
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
|
||||
- name: Install TestCafe
|
||||
run: npm install testcafe@3.0.0
|
||||
|
||||
- name: Run TestCafe Tests
|
||||
timeout-minutes: 5
|
||||
uses: DevExpress/testcafe-action@latest
|
||||
with:
|
||||
args: '"chrome --headless --no-sandbox" portal-ui/tests/permissions-5/ --skip-js-errors'
|
||||
run: npx testcafe "chrome:headless" portal-ui/tests/permissions-5/ --skip-js-errors
|
||||
|
||||
all-permissions-6:
|
||||
name: Permissions Tests Part 6
|
||||
needs:
|
||||
- compile-binary
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -497,20 +464,23 @@ jobs:
|
||||
- name: Start Console, front-end app and initialize users/policies
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
|
||||
- name: Install TestCafe
|
||||
run: npm install testcafe@3.0.0
|
||||
|
||||
- name: Run TestCafe Tests
|
||||
timeout-minutes: 5
|
||||
uses: DevExpress/testcafe-action@latest
|
||||
with:
|
||||
args: '"chrome --headless --no-sandbox" portal-ui/tests/permissions-6/ --skip-js-errors'
|
||||
run: npx testcafe "chrome:headless" portal-ui/tests/permissions-6/ --skip-js-errors
|
||||
|
||||
all-permissions-7:
|
||||
name: Permissions Tests Part 7
|
||||
needs:
|
||||
- compile-binary
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -537,20 +507,22 @@ jobs:
|
||||
- name: Start Console, front-end app and initialize users/policies
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
- name: Install TestCafe
|
||||
run: npm install testcafe@3.0.0
|
||||
|
||||
- name: Run TestCafe Tests
|
||||
timeout-minutes: 5
|
||||
uses: DevExpress/testcafe-action@latest
|
||||
with:
|
||||
args: '"chrome --headless --no-sandbox" portal-ui/tests/permissions-7/ --skip-js-errors'
|
||||
run: npx testcafe "chrome:headless" portal-ui/tests/permissions-7/ --skip-js-errors
|
||||
|
||||
all-permissions-8:
|
||||
name: Permissions Tests Part 8
|
||||
needs:
|
||||
- compile-binary
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -577,20 +549,23 @@ jobs:
|
||||
- name: Start Console, front-end app and initialize users/policies
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
|
||||
- name: Install TestCafe
|
||||
run: npm install testcafe@3.0.0
|
||||
|
||||
- name: Run TestCafe Tests
|
||||
timeout-minutes: 5
|
||||
uses: DevExpress/testcafe-action@latest
|
||||
with:
|
||||
args: '"chrome --headless --no-sandbox" portal-ui/tests/permissions-8/ --skip-js-errors'
|
||||
run: npx testcafe "chrome:headless" portal-ui/tests/permissions-8/ --skip-js-errors
|
||||
|
||||
all-permissions-9:
|
||||
name: Permissions Tests Part 9
|
||||
needs:
|
||||
- compile-binary
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -618,10 +593,11 @@ jobs:
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
|
||||
- name: Install TestCafe
|
||||
run: npm install testcafe@3.0.0
|
||||
|
||||
- name: Run TestCafe Tests
|
||||
uses: DevExpress/testcafe-action@latest
|
||||
with:
|
||||
args: '"chrome --headless --no-sandbox" portal-ui/tests/permissions-9/ --skip-js-errors -c 3'
|
||||
run: npx testcafe "chrome:headless" portal-ui/tests/permissions-9/ --skip-js-errors -c 3
|
||||
|
||||
- name: Clean up users & policies
|
||||
run: |
|
||||
@@ -631,11 +607,11 @@ jobs:
|
||||
name: Permissions Tests Part A
|
||||
needs:
|
||||
- compile-binary
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -663,10 +639,11 @@ jobs:
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
|
||||
- name: Install TestCafe
|
||||
run: npm install testcafe@3.0.0
|
||||
|
||||
- name: Run TestCafe Tests
|
||||
uses: DevExpress/testcafe-action@latest
|
||||
with:
|
||||
args: '"chrome --headless --no-sandbox" portal-ui/tests/permissions-A/ --skip-js-errors -c 3'
|
||||
run: npx testcafe "chrome:headless" portal-ui/tests/permissions-A/ --skip-js-errors -c 3
|
||||
|
||||
- name: Clean up users & policies
|
||||
run: |
|
||||
@@ -676,11 +653,11 @@ jobs:
|
||||
name: Permissions Tests Part B
|
||||
needs:
|
||||
- compile-binary
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -708,169 +685,16 @@ jobs:
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
|
||||
- name: Install TestCafe
|
||||
run: npm install testcafe@3.0.0
|
||||
|
||||
- name: Run TestCafe Tests
|
||||
uses: DevExpress/testcafe-action@latest
|
||||
with:
|
||||
args: '"chrome --headless --no-sandbox" portal-ui/tests/permissions-B/ --skip-js-errors -c 3'
|
||||
run: npx testcafe "chrome:headless" portal-ui/tests/permissions-B/ --skip-js-errors -c 3
|
||||
|
||||
- name: Clean up users & policies
|
||||
run: |
|
||||
make cleanup-permissions
|
||||
|
||||
cross-compile-1:
|
||||
name: Cross compile
|
||||
needs:
|
||||
- lint-job
|
||||
- ui-assets
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
id: go
|
||||
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make crosscompile arg1="'linux/ppc64le linux/mips64'"
|
||||
|
||||
cross-compile-2:
|
||||
name: Cross compile 2
|
||||
needs:
|
||||
- lint-job
|
||||
- ui-assets
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
id: go
|
||||
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make crosscompile arg1="'linux/arm64 linux/s390x'"
|
||||
|
||||
cross-compile-3:
|
||||
name: Cross compile 3
|
||||
needs:
|
||||
- lint-job
|
||||
- ui-assets
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
id: go
|
||||
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make crosscompile arg1="'darwin/amd64 freebsd/amd64'"
|
||||
|
||||
cross-compile-4:
|
||||
name: Cross compile 4
|
||||
needs:
|
||||
- lint-job
|
||||
- ui-assets
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
id: go
|
||||
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make crosscompile arg1="'windows/amd64 linux/arm'"
|
||||
|
||||
cross-compile-5:
|
||||
name: Cross compile 5
|
||||
needs:
|
||||
- lint-job
|
||||
- ui-assets
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
id: go
|
||||
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make crosscompile arg1="'linux/386 netbsd/amd64'"
|
||||
|
||||
test-pkg-on-go:
|
||||
name: Test Pkg on Go ${{ matrix.go-version }} and ${{ matrix.os }}
|
||||
needs:
|
||||
@@ -881,8 +705,8 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -918,8 +742,8 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -931,7 +755,6 @@ jobs:
|
||||
cache: true
|
||||
id: go
|
||||
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
@@ -958,7 +781,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
go-version: [1.20.x]
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -967,7 +790,7 @@ jobs:
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
repository: minio/minio
|
||||
path: 'minio_repository'
|
||||
path: "minio_repository"
|
||||
- uses: actions/cache@v3
|
||||
id: minio-latest-cache
|
||||
name: MinIO Latest Cache
|
||||
@@ -1003,7 +826,7 @@ jobs:
|
||||
echo "We are going to use the built image on test-integration";
|
||||
VERSION="minio/minio:$VERSION";
|
||||
echo $VERSION;
|
||||
|
||||
|
||||
echo "Create bucket for replication with versioning"
|
||||
echo "Download mc for Ubuntu"
|
||||
wget -q https://dl.min.io/client/mc/release/linux-amd64/mc
|
||||
@@ -1036,7 +859,6 @@ jobs:
|
||||
working-directory: ./portal-ui
|
||||
run: yarn test
|
||||
replication:
|
||||
|
||||
name: Site Replication Test
|
||||
needs:
|
||||
- lint-job
|
||||
@@ -1044,11 +866,11 @@ jobs:
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
- latest-minio
|
||||
runs-on: [ ubuntu-latest ]
|
||||
runs-on: [ubuntu-latest]
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
go-version: [1.20.x]
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -1065,7 +887,7 @@ jobs:
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
repository: minio/minio
|
||||
path: 'minio_repository'
|
||||
path: "minio_repository"
|
||||
- uses: actions/cache@v3
|
||||
id: minio-latest-cache
|
||||
name: MinIO Latest Cache
|
||||
@@ -1110,8 +932,8 @@ jobs:
|
||||
with:
|
||||
name: replication-artifact
|
||||
path: ./replication/coverage/replication.out
|
||||
if-no-files-found: error
|
||||
sso-integration:
|
||||
|
||||
name: SSO Integration Test
|
||||
needs:
|
||||
- lint-job
|
||||
@@ -1123,7 +945,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
go-version: [1.20.x]
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -1140,7 +962,7 @@ jobs:
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
repository: minio/minio
|
||||
path: 'minio_repository'
|
||||
path: "minio_repository"
|
||||
- uses: actions/cache@v3
|
||||
id: minio-latest-cache
|
||||
name: MinIO Latest Cache
|
||||
@@ -1194,8 +1016,8 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
@@ -1298,7 +1120,7 @@ jobs:
|
||||
go tool cover -func=all.out | grep total > tmp2
|
||||
result=`cat tmp2 | awk 'END {print $3}'`
|
||||
result=${result%\%}
|
||||
threshold=69.4
|
||||
threshold=71.4
|
||||
echo "Result:"
|
||||
echo "$result%"
|
||||
if (( $(echo "$result >= $threshold" |bc -l) )); then
|
||||
@@ -1308,9 +1130,87 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ui-assets-istanbul-coverage:
|
||||
name: "Assets with Istanbul Plugin for coverage"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
cache: "yarn"
|
||||
cache-dependency-path: portal-ui/yarn.lock
|
||||
- uses: actions/cache@v3
|
||||
id: assets-cache-istanbul-coverage
|
||||
name: Assets Cache Istanbul Coverage
|
||||
with:
|
||||
path: |
|
||||
./portal-ui/build/
|
||||
key: ${{ runner.os }}-assets-istanbul-coverage-${{ github.run_id }}
|
||||
- name: Install Dependencies
|
||||
working-directory: ./portal-ui
|
||||
continue-on-error: false
|
||||
run: |
|
||||
yarn install --frozen-lockfile --immutable
|
||||
- name: Check for Warnings in build output
|
||||
working-directory: ./portal-ui
|
||||
continue-on-error: false
|
||||
run: |
|
||||
./check-warnings-istanbul-coverage.sh
|
||||
|
||||
compile-binary-istanbul-coverage:
|
||||
name: "Compile Console Binary with Istanbul Plugin for Coverage"
|
||||
needs:
|
||||
- lint-job
|
||||
- ui-assets-istanbul-coverage
|
||||
- reuse-golang-dependencies
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.20.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache: true
|
||||
id: go
|
||||
- uses: actions/cache@v3
|
||||
name: Console Binary Cache Istanbul Coverage
|
||||
with:
|
||||
path: |
|
||||
./console
|
||||
key: ${{ runner.os }}-binary-istanbul-coverage-${{ github.run_id }}
|
||||
- uses: actions/cache@v3
|
||||
id: assets-cache-istanbul-coverage
|
||||
name: Assets Cache Istanbul Coverage
|
||||
with:
|
||||
path: |
|
||||
./portal-ui/build/
|
||||
key: ${{ runner.os }}-assets-istanbul-coverage-${{ github.run_id }}
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make console
|
||||
|
||||
playwright:
|
||||
needs:
|
||||
- compile-binary
|
||||
- compile-binary-istanbul-coverage
|
||||
timeout-minutes: 60
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -1328,8 +1228,8 @@ jobs:
|
||||
yarn add -D nyc
|
||||
yarn add -D react-app-rewired
|
||||
yarn add -D create-react-app
|
||||
yarn add -D @playwright/test
|
||||
yarn init -y
|
||||
yarn add --dev @playwright/test
|
||||
echo "yarn install"
|
||||
yarn install
|
||||
|
||||
@@ -1337,25 +1237,22 @@ jobs:
|
||||
run: npx playwright install --with-deps
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Console Binary Cache
|
||||
name: Console Binary Cache Istanbul Coverage
|
||||
with:
|
||||
path: |
|
||||
./console
|
||||
key: ${{ runner.os }}-binary-${{ github.run_id }}
|
||||
key: ${{ runner.os }}-binary-istanbul-coverage-${{ github.run_id }}
|
||||
|
||||
- name: Start Console, front-end app and initialize users/policies
|
||||
run: |
|
||||
(./console server) & (make initialize-permissions)
|
||||
|
||||
- name: Start Browser at port 5005
|
||||
run: |
|
||||
echo "yarn playwright"
|
||||
(cd $GITHUB_WORKSPACE/portal-ui; yarn playwright) & (sleep 120) # To start port 5005 with Istanbul Plugin Injected
|
||||
|
||||
- name: Run Playwright tests
|
||||
run: |
|
||||
echo "Run tests under playwright folder only"
|
||||
cd $GITHUB_WORKSPACE/portal-ui
|
||||
yarn remove playwright
|
||||
yarn add --dev @playwright/test
|
||||
echo "npx playwright test"
|
||||
npx playwright test # To run the tests
|
||||
echo "npx nyc report"
|
||||
|
||||
51
.github/workflows/vulncheck.yaml
vendored
Normal file
51
.github/workflows/vulncheck.yaml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Vulnerability Check
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
vulncheck:
|
||||
name: Analysis
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.20.x
|
||||
check-latest: true
|
||||
- name: Get official govulncheck
|
||||
run: go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
shell: bash
|
||||
- name: Run govulncheck
|
||||
run: govulncheck ./...
|
||||
shell: bash
|
||||
|
||||
react-code-known-vulnerabilities:
|
||||
name: "React Code Has No Known Vulnerable Deps"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.20.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
cache: "yarn"
|
||||
cache-dependency-path: portal-ui/yarn.lock
|
||||
- name: Checks for known security issues with the installed packages
|
||||
working-directory: ./portal-ui
|
||||
continue-on-error: false
|
||||
run: |
|
||||
yarn audit --groups dependencies
|
||||
@@ -23,8 +23,8 @@ linters:
|
||||
- gomodguard
|
||||
- gofmt
|
||||
- unused
|
||||
- staticcheck
|
||||
- unconvert
|
||||
- varcheck
|
||||
- gocritic
|
||||
- gofumpt
|
||||
- durationcheck
|
||||
|
||||
191
.goreleaser.yml
191
.goreleaser.yml
@@ -1,191 +0,0 @@
|
||||
# This is an example goreleaser.yaml file with some sane defaults.
|
||||
# Make sure to check the documentation at http://goreleaser.com
|
||||
project_name: console
|
||||
|
||||
release:
|
||||
name_template: "Release version {{.Tag}}"
|
||||
github:
|
||||
owner: minio
|
||||
name: console
|
||||
extra_files:
|
||||
- glob: "*.minisig"
|
||||
|
||||
before:
|
||||
hooks:
|
||||
# you may remove this if you don't use vgo
|
||||
- go mod tidy -compat=1.19
|
||||
|
||||
builds:
|
||||
- goos:
|
||||
- linux
|
||||
- darwin
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
- ppc64le
|
||||
- s390x
|
||||
- arm64
|
||||
ignore:
|
||||
- goos: darwin
|
||||
goarch: arm
|
||||
- goos: windows
|
||||
goarch: arm64
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
|
||||
main: ./cmd/console/
|
||||
|
||||
flags:
|
||||
- -trimpath
|
||||
- --tags=kqueue,operator
|
||||
|
||||
ldflags:
|
||||
- -s -w -X github.com/minio/console/pkg.ReleaseTag={{.Tag}} -X github.com/minio/console/pkg.CommitID={{.FullCommit}} -X github.com/minio/console/pkg.Version={{.Version}} -X github.com/minio/console/pkg.ShortCommitID={{.ShortCommit}} -X github.com/minio/console/pkg.ReleaseTime={{.Date}}
|
||||
|
||||
archives:
|
||||
- name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
|
||||
format: binary
|
||||
replacements:
|
||||
arm: arm
|
||||
|
||||
signs:
|
||||
- signature: "${artifact}.minisig"
|
||||
cmd: "sh"
|
||||
args:
|
||||
- '-c'
|
||||
- 'minisign -s /media/${USER}/minio/minisign.key -Sm ${artifact} < /media/${USER}/minio/minisign-passphrase'
|
||||
artifacts: all
|
||||
|
||||
snapshot:
|
||||
name_template: v0.0.0@{{.ShortCommit}}
|
||||
|
||||
changelog:
|
||||
sort: asc
|
||||
|
||||
nfpms:
|
||||
- vendor: MinIO, Inc.
|
||||
homepage: https://github.com/minio/console
|
||||
maintainer: MinIO Development <dev@min.io>
|
||||
description: MinIO Console Server
|
||||
license: GNU Affero General Public License v3.0
|
||||
formats:
|
||||
- deb
|
||||
- rpm
|
||||
contents:
|
||||
# Basic file that applies to all packagers
|
||||
- src: systemd/console.service
|
||||
dst: /etc/systemd/system/minio-console.service
|
||||
|
||||
dockers:
|
||||
- image_templates:
|
||||
- "minio/console:{{ .Tag }}-amd64"
|
||||
use: buildx
|
||||
goarch: amd64
|
||||
dockerfile: Dockerfile.release
|
||||
extra_files:
|
||||
- LICENSE
|
||||
- CREDITS
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64"
|
||||
- "--build-arg=TAG={{ .Tag }}"
|
||||
- image_templates:
|
||||
- "minio/console:{{ .Tag }}-ppc64le"
|
||||
use: buildx
|
||||
goarch: ppc64le
|
||||
dockerfile: Dockerfile.release
|
||||
extra_files:
|
||||
- LICENSE
|
||||
- CREDITS
|
||||
build_flag_templates:
|
||||
- "--platform=linux/ppc64le"
|
||||
- "--build-arg=TAG={{ .Tag }}"
|
||||
- image_templates:
|
||||
- "minio/console:{{ .Tag }}-s390x"
|
||||
use: buildx
|
||||
goarch: s390x
|
||||
dockerfile: Dockerfile.release
|
||||
extra_files:
|
||||
- LICENSE
|
||||
- CREDITS
|
||||
build_flag_templates:
|
||||
- "--platform=linux/s390x"
|
||||
- "--build-arg=TAG={{ .Tag }}"
|
||||
- image_templates:
|
||||
- "minio/console:{{ .Tag }}-arm64"
|
||||
use: buildx
|
||||
goarch: arm64
|
||||
goos: linux
|
||||
dockerfile: Dockerfile.release
|
||||
extra_files:
|
||||
- LICENSE
|
||||
- CREDITS
|
||||
build_flag_templates:
|
||||
- "--platform=linux/arm64"
|
||||
- "--build-arg=TAG={{ .Tag }}"
|
||||
- image_templates:
|
||||
- "quay.io/minio/console:{{ .Tag }}-amd64"
|
||||
use: buildx
|
||||
goarch: amd64
|
||||
dockerfile: Dockerfile.release
|
||||
extra_files:
|
||||
- LICENSE
|
||||
- CREDITS
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64"
|
||||
- "--build-arg=TAG={{ .Tag }}"
|
||||
- image_templates:
|
||||
- "quay.io/minio/console:{{ .Tag }}-ppc64le"
|
||||
use: buildx
|
||||
goarch: ppc64le
|
||||
dockerfile: Dockerfile.release
|
||||
extra_files:
|
||||
- LICENSE
|
||||
- CREDITS
|
||||
build_flag_templates:
|
||||
- "--platform=linux/ppc64le"
|
||||
- "--build-arg=TAG={{ .Tag }}"
|
||||
- image_templates:
|
||||
- "quay.io/minio/console:{{ .Tag }}-s390x"
|
||||
use: buildx
|
||||
goarch: s390x
|
||||
dockerfile: Dockerfile.release
|
||||
extra_files:
|
||||
- LICENSE
|
||||
- CREDITS
|
||||
build_flag_templates:
|
||||
- "--platform=linux/s390x"
|
||||
- "--build-arg=TAG={{ .Tag }}"
|
||||
- image_templates:
|
||||
- "quay.io/minio/console:{{ .Tag }}-arm64"
|
||||
use: buildx
|
||||
goarch: arm64
|
||||
goos: linux
|
||||
dockerfile: Dockerfile.release
|
||||
extra_files:
|
||||
- LICENSE
|
||||
- CREDITS
|
||||
build_flag_templates:
|
||||
- "--platform=linux/arm64"
|
||||
- "--build-arg=TAG={{ .Tag }}"
|
||||
docker_manifests:
|
||||
- name_template: minio/console:{{ .Tag }}
|
||||
image_templates:
|
||||
- minio/console:{{ .Tag }}-amd64
|
||||
- minio/console:{{ .Tag }}-arm64
|
||||
- minio/console:{{ .Tag }}-ppc64le
|
||||
- minio/console:{{ .Tag }}-s390x
|
||||
- name_template: quay.io/minio/console:{{ .Tag }}
|
||||
image_templates:
|
||||
- quay.io/minio/console:{{ .Tag }}-amd64
|
||||
- quay.io/minio/console:{{ .Tag }}-arm64
|
||||
- quay.io/minio/console:{{ .Tag }}-ppc64le
|
||||
- quay.io/minio/console:{{ .Tag }}-s390x
|
||||
- name_template: minio/console:latest
|
||||
image_templates:
|
||||
- minio/console:{{ .Tag }}-amd64
|
||||
- minio/console:{{ .Tag }}-arm64
|
||||
- minio/console:{{ .Tag }}-ppc64le
|
||||
- minio/console:{{ .Tag }}-s390x
|
||||
65
CHANGELOG.md
Normal file
65
CHANGELOG.md
Normal file
@@ -0,0 +1,65 @@
|
||||
<!-- @format -->
|
||||
|
||||
# Changelog
|
||||
|
||||
## Release v0.34.0
|
||||
Features:
|
||||
- Updated Buckets components
|
||||
|
||||
Bug Fix:
|
||||
|
||||
- Fixed SUBNET Health report upload
|
||||
- Updated Download Handler
|
||||
- Fixes issue with rewind
|
||||
- Avoid 1 hour expiration for IDP credentials
|
||||
---
|
||||
## Release v0.33.0
|
||||
Features:
|
||||
- Updated OpenID, LDAP components
|
||||
|
||||
Bug Fix:
|
||||
|
||||
- Fixed security issues
|
||||
- Fixed navigation issues in Object Browser
|
||||
- Fixed Dashboard metrics
|
||||
---
|
||||
## Release v0.32.0
|
||||
Features:
|
||||
- Updated Users and Groups components
|
||||
- Added placeholder image for Help Menu
|
||||
|
||||
Bug Fix:
|
||||
|
||||
- Fixed memory leak in WebSocket API for Object Browser
|
||||
---
|
||||
## Release v0.31.0
|
||||
|
||||
*Breaking Changes:*
|
||||
|
||||
- *Removed support for Standalone Deployments*
|
||||
|
||||
Features:
|
||||
|
||||
- Updated way files are displayed in uploading component
|
||||
- Updated Audit Logs and Policies components
|
||||
|
||||
Bug Fix:
|
||||
|
||||
- Fixed Download folders issue in Object Browser
|
||||
- Added missing Notification Events (ILM & REPLICA) in Events Notification Page
|
||||
- Fixed Security Vulnerability for `semver` dependency
|
||||
---
|
||||
## Release v0.30.0
|
||||
|
||||
Features:
|
||||
|
||||
- Added MinIO Console Help Menu
|
||||
- Updated UI Menu components
|
||||
|
||||
Bug Fix:
|
||||
|
||||
- Disable the Upload button on Object Browser if the user is not allowed
|
||||
- Fixed security vulnerability for `lestrrat-go/jwx` and `fast-xml-parser`
|
||||
- Fixed bug on sub-paths for Object Browser
|
||||
- Reduce the number of calls to `/session` API endpoint to improve performance
|
||||
- Rolled back the previous change for the Share File feature to no longer ask for Service Account access keys
|
||||
@@ -1,3 +1,27 @@
|
||||
# Developing MinIO Console
|
||||
|
||||
The MinIO Console requires the [MinIO Server](https://github.com/minio/minio). For development purposes, you also need to run both the MinIO Console web app and the MinIO Console server.
|
||||
|
||||
## Running MinIO Console server
|
||||
|
||||
Build the server in the main folder by running:
|
||||
```
|
||||
make
|
||||
```
|
||||
> Note: If it's the first time running the server, you might need to run `go mod tidy` to ensure you have all modules required.
|
||||
To start the server run:
|
||||
```
|
||||
CONSOLE_ACCESS_KEY=<your-access-key>
|
||||
CONSOLE_SECRET_KEY=<your-secret-key>
|
||||
CONSOLE_MINIO_SERVER=<minio-server-endpoint>
|
||||
CONSOLE_DEV_MODE=on
|
||||
./console server
|
||||
```
|
||||
|
||||
## Running MinIO Console web app
|
||||
Refer to `/portal-ui` [instructions](/portal-ui/README.md) to run the web app locally.
|
||||
|
||||
|
||||
# Building with MinIO
|
||||
|
||||
To test console in its shipping format, you need to build it from the MinIO repository, the following step will guide
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2021 MinIO, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package cluster
|
||||
|
||||
import (
|
||||
directpvclient "github.com/minio/directpv/pkg/client"
|
||||
operator "github.com/minio/operator/pkg/client/clientset/versioned"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/rest"
|
||||
certutil "k8s.io/client-go/util/cert"
|
||||
)
|
||||
|
||||
// getTLSClientConfig will return the right TLS configuration for the K8S client based on the configured TLS certificate
|
||||
func getTLSClientConfig() rest.TLSClientConfig {
|
||||
defaultRootCAFile := "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
|
||||
customRootCAFile := getK8sAPIServerTLSRootCA()
|
||||
tlsClientConfig := rest.TLSClientConfig{}
|
||||
// if console is running inside k8s by default he will have access to the CA Cert from the k8s local authority
|
||||
if _, err := certutil.NewPool(defaultRootCAFile); err == nil {
|
||||
tlsClientConfig.CAFile = defaultRootCAFile
|
||||
}
|
||||
// if the user explicitly define a custom CA certificate, instead, we will use that
|
||||
if customRootCAFile != "" {
|
||||
if _, err := certutil.NewPool(customRootCAFile); err == nil {
|
||||
tlsClientConfig.CAFile = customRootCAFile
|
||||
}
|
||||
}
|
||||
return tlsClientConfig
|
||||
}
|
||||
|
||||
// This operation will run only once at console startup
|
||||
var tlsClientConfig = getTLSClientConfig()
|
||||
|
||||
func GetK8sConfig(token string) *rest.Config {
|
||||
config := &rest.Config{
|
||||
Host: GetK8sAPIServer(),
|
||||
TLSClientConfig: tlsClientConfig,
|
||||
APIPath: "/",
|
||||
BearerToken: token,
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
||||
// OperatorClient returns an operator client using GetK8sConfig for its config
|
||||
func OperatorClient(token string) (*operator.Clientset, error) {
|
||||
return operator.NewForConfig(GetK8sConfig(token))
|
||||
}
|
||||
|
||||
// K8sClient returns kubernetes client using GetK8sConfig for its config
|
||||
func K8sClient(token string) (*kubernetes.Clientset, error) {
|
||||
return kubernetes.NewForConfig(GetK8sConfig(token))
|
||||
}
|
||||
|
||||
// DirectPV interfaces required to fetch information
|
||||
|
||||
func DirectPVDriveInterface(token string) (*directpvclient.DirectCSIDriveInterface, error) {
|
||||
return directpvclient.DirectCSIDriveInterfaceForConfig(GetK8sConfig(token))
|
||||
}
|
||||
|
||||
func DirectPVVolumeInterface(token string) (*directpvclient.DirectCSIVolumeInterface, error) {
|
||||
return directpvclient.DirectCSIVolumeInterfaceForConfig(GetK8sConfig(token))
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2021 MinIO, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package cluster
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
xhttp "github.com/minio/console/pkg/http"
|
||||
"github.com/minio/console/restapi"
|
||||
|
||||
"github.com/minio/console/pkg/utils"
|
||||
|
||||
"github.com/minio/pkg/env"
|
||||
)
|
||||
|
||||
func GetK8sAPIServer() string {
|
||||
// if console is running inside a k8s pod KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT will contain the k8s api server apiServerAddress
|
||||
// if console is not running inside k8s by default will look for the k8s api server on localhost:8001 (kubectl proxy)
|
||||
// NOTE: using kubectl proxy is for local development only, since every request send to localhost:8001 will bypass service account authentication
|
||||
// more info here: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#directly-accessing-the-rest-api
|
||||
// you can override this using CONSOLE_K8S_API_SERVER, ie use the k8s cluster from `kubectl config view`
|
||||
host, port := env.Get("KUBERNETES_SERVICE_HOST", ""), env.Get("KUBERNETES_SERVICE_PORT", "")
|
||||
apiServerAddress := "http://localhost:8001"
|
||||
if host != "" && port != "" {
|
||||
apiServerAddress = "https://" + net.JoinHostPort(host, port)
|
||||
}
|
||||
return env.Get(ConsoleK8sAPIServer, apiServerAddress)
|
||||
}
|
||||
|
||||
// If CONSOLE_K8S_API_SERVER_TLS_ROOT_CA is true console will load the certificate into the
|
||||
// http.client rootCAs pool, this is useful for testing an k8s ApiServer or when working with self-signed certificates
|
||||
func getK8sAPIServerTLSRootCA() string {
|
||||
return strings.TrimSpace(env.Get(ConsoleK8SAPIServerTLSRootCA, ""))
|
||||
}
|
||||
|
||||
// GetNsFromFile assumes console is running inside a k8s pod and extract the current namespace from the
|
||||
// /var/run/secrets/kubernetes.io/serviceaccount/namespace file
|
||||
func GetNsFromFile() string {
|
||||
dat, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace")
|
||||
if err != nil {
|
||||
return "default"
|
||||
}
|
||||
return string(dat)
|
||||
}
|
||||
|
||||
// GetMinioImage returns the image URL to be used when deploying a MinIO instance, if there is
|
||||
// a preferred image to be used (configured via ENVIRONMENT VARIABLES) GetMinioImage will return that
|
||||
// if not, GetMinioImage will try to obtain the image URL for the latest version of MinIO and return that
|
||||
func GetMinioImage() (*string, error) {
|
||||
image := strings.TrimSpace(env.Get(ConsoleMinioImage, ""))
|
||||
// if there is a preferred image configured by the user we'll always return that
|
||||
if image != "" {
|
||||
return &image, nil
|
||||
}
|
||||
client := restapi.GetConsoleHTTPClient("")
|
||||
client.Timeout = 5 * time.Second
|
||||
latestMinIOImage, errLatestMinIOImage := utils.GetLatestMinIOImage(
|
||||
&xhttp.Client{
|
||||
Client: client,
|
||||
})
|
||||
|
||||
if errLatestMinIOImage != nil {
|
||||
return nil, errLatestMinIOImage
|
||||
}
|
||||
return latestMinIOImage, nil
|
||||
}
|
||||
@@ -41,8 +41,9 @@ func StartServer(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
xctx := context.Background()
|
||||
transport := restapi.PrepareSTSClientTransport(false)
|
||||
if err := logger.InitializeLogger(xctx, transport); err != nil {
|
||||
|
||||
transport := restapi.PrepareSTSClientTransport(false, restapi.LocalAddress)
|
||||
if err := logger.InitializeLogger(xctx, transport.Transport); err != nil {
|
||||
fmt.Println("error InitializeLogger", err)
|
||||
logger.CriticalIf(xctx, err)
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
|
||||
@@ -163,7 +163,7 @@ func loadAllCerts(ctx *cli.Context) error {
|
||||
|
||||
// load ca cert from swagger server tls-ca flag
|
||||
if swaggerServerCACertificate != "" {
|
||||
caCert, caCertErr := ioutil.ReadFile(swaggerServerCACertificate)
|
||||
caCert, caCertErr := os.ReadFile(swaggerServerCACertificate)
|
||||
if caCertErr == nil {
|
||||
restapi.GlobalRootCAs.AppendCertsFromPEM(caCert)
|
||||
}
|
||||
|
||||
93
go.mod
93
go.mod
@@ -9,45 +9,41 @@ require (
|
||||
github.com/fatih/color v1.15.0
|
||||
github.com/go-openapi/errors v0.20.3
|
||||
github.com/go-openapi/loads v0.21.2
|
||||
github.com/go-openapi/runtime v0.25.0
|
||||
github.com/go-openapi/spec v0.20.8
|
||||
github.com/go-openapi/strfmt v0.21.5
|
||||
github.com/go-openapi/runtime v0.26.0
|
||||
github.com/go-openapi/spec v0.20.9
|
||||
github.com/go-openapi/strfmt v0.21.7
|
||||
github.com/go-openapi/swag v0.22.3
|
||||
github.com/go-openapi/validate v0.22.1
|
||||
github.com/golang-jwt/jwt/v4 v4.5.0
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/jessevdk/go-flags v1.5.0
|
||||
github.com/klauspost/compress v1.16.3
|
||||
github.com/klauspost/compress v1.16.5
|
||||
github.com/minio/cli v1.24.2
|
||||
github.com/minio/directpv v1.4.4-0.20220805090942-948ca4731651
|
||||
github.com/minio/highwayhash v1.0.2
|
||||
github.com/minio/kes v0.22.3
|
||||
github.com/minio/madmin-go/v2 v2.0.17
|
||||
github.com/minio/mc v0.0.0-20230323200304-81453d7c8fcc
|
||||
github.com/minio/minio-go/v7 v7.0.50
|
||||
github.com/minio/operator v0.0.0-20230228004026-ad024a9dffe5
|
||||
github.com/minio/pkg v1.6.5
|
||||
github.com/minio/madmin-go/v3 v3.0.2
|
||||
github.com/minio/mc v0.0.0-20230619193119-5f39522e6902
|
||||
github.com/minio/minio-go/v7 v7.0.58-0.20230622175401-7048a16cfbca
|
||||
github.com/minio/pkg v1.7.5
|
||||
github.com/minio/selfupdate v0.6.0
|
||||
github.com/minio/websocket v1.6.0
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/rs/xid v1.4.0
|
||||
github.com/rs/xid v1.5.0
|
||||
github.com/secure-io/sio-go v0.3.1
|
||||
github.com/stretchr/testify v1.8.2
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/tidwall/gjson v1.14.4
|
||||
github.com/unrolled/secure v1.13.0
|
||||
golang.org/x/crypto v0.7.0
|
||||
golang.org/x/net v0.8.0
|
||||
golang.org/x/oauth2 v0.6.0
|
||||
golang.org/x/crypto v0.9.0
|
||||
golang.org/x/net v0.10.0
|
||||
golang.org/x/oauth2 v0.7.0
|
||||
// Added to include security fix for
|
||||
// https://github.com/golang/go/issues/56152
|
||||
golang.org/x/text v0.8.0 // indirect
|
||||
golang.org/x/text v0.9.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
k8s.io/api v0.26.3 // indirect
|
||||
k8s.io/apimachinery v0.26.3 // indirect
|
||||
k8s.io/client-go v0.26.3
|
||||
k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 // indirect
|
||||
)
|
||||
|
||||
require github.com/mattn/go-ieproxy v0.0.1
|
||||
|
||||
require (
|
||||
aead.dev/mem v0.2.0 // indirect
|
||||
aead.dev/minisign v0.2.0 // indirect
|
||||
@@ -64,32 +60,21 @@ require (
|
||||
github.com/coreos/go-semver v0.3.1 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
|
||||
github.com/fatih/structs v1.1.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/gdamore/encoding v1.0.0 // indirect
|
||||
github.com/gdamore/tcell/v2 v2.6.0 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/go-openapi/analysis v0.21.4 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.6 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/goccy/go-json v0.10.2 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/google/gnostic v0.6.9 // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/imdario/mergo v0.3.15 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.6 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
@@ -100,24 +85,20 @@ require (
|
||||
github.com/lestrrat-go/blackmagic v1.0.1 // indirect
|
||||
github.com/lestrrat-go/httpcc v1.0.1 // indirect
|
||||
github.com/lestrrat-go/iter v1.0.2 // indirect
|
||||
github.com/lestrrat-go/jwx v1.2.25 // indirect
|
||||
github.com/lestrrat-go/jwx v1.2.26 // indirect
|
||||
github.com/lestrrat-go/option v1.0.1 // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||
github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a // indirect
|
||||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-ieproxy v0.0.1 // indirect
|
||||
github.com/mattn/go-isatty v0.0.18 // indirect
|
||||
github.com/mattn/go-localereader v0.0.1 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.14 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/mb0/glob v0.0.0-20160210091149-1eb79d2de6c4 // indirect
|
||||
github.com/miekg/dns v1.1.52 // indirect
|
||||
github.com/minio/colorjson v1.0.4 // indirect
|
||||
github.com/minio/colorjson v1.0.5 // indirect
|
||||
github.com/minio/filepath v1.0.0 // indirect
|
||||
github.com/minio/md5-simd v1.1.2 // indirect
|
||||
github.com/minio/sha256-simd v1.0.0 // indirect
|
||||
github.com/minio/sha256-simd v1.0.1 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
@@ -126,11 +107,9 @@ require (
|
||||
github.com/muesli/cancelreader v0.2.2 // indirect
|
||||
github.com/muesli/reflow v0.3.0 // indirect
|
||||
github.com/muesli/termenv v0.15.1 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/navidys/tvxwidgets v0.3.0 // indirect
|
||||
github.com/oklog/ulid v1.3.1 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
|
||||
github.com/philhofer/fwd v1.1.2 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pkg/xattr v0.4.9 // indirect
|
||||
@@ -142,17 +121,13 @@ require (
|
||||
github.com/prometheus/common v0.42.0 // indirect
|
||||
github.com/prometheus/procfs v0.9.0 // indirect
|
||||
github.com/prometheus/prom2json v1.3.2 // indirect
|
||||
github.com/rivo/tview v0.0.0-20230325211341-281d14d896d7 // indirect
|
||||
github.com/rivo/tview v0.0.0-20230406072732-e22ce9588bb4 // indirect
|
||||
github.com/rivo/uniseg v0.4.4 // indirect
|
||||
github.com/rjeczalik/notify v0.9.3 // indirect
|
||||
github.com/shirou/gopsutil/v3 v3.23.2 // indirect
|
||||
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||
github.com/spf13/afero v1.9.5 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.15.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.2 // indirect
|
||||
github.com/rogpeppe/go-internal v1.10.0 // indirect
|
||||
github.com/shirou/gopsutil/v3 v3.23.3 // indirect
|
||||
github.com/shoenig/go-m1cpu v0.1.5 // indirect
|
||||
github.com/sirupsen/logrus v1.9.2 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/pretty v1.2.1 // indirect
|
||||
github.com/tinylib/msgp v1.1.8 // indirect
|
||||
@@ -164,26 +139,16 @@ require (
|
||||
go.etcd.io/etcd/client/v3 v3.5.7 // indirect
|
||||
go.mongodb.org/mongo-driver v1.11.3 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
go.uber.org/multierr v1.10.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.24.0 // indirect
|
||||
golang.org/x/mod v0.9.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
golang.org/x/term v0.6.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
golang.org/x/tools v0.7.0 // indirect
|
||||
golang.org/x/sys v0.8.0 // indirect
|
||||
golang.org/x/term v0.8.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230327152035-dc694ad2151e // indirect
|
||||
google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd // indirect
|
||||
google.golang.org/grpc v1.54.0 // indirect
|
||||
google.golang.org/protobuf v1.30.0 // indirect
|
||||
gopkg.in/h2non/filetype.v1 v1.0.5 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.26.3 // indirect
|
||||
k8s.io/klog/v2 v2.90.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20230327201221-f5883ff37f0c // indirect
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
|
||||
@@ -31,7 +31,7 @@ import (
|
||||
func Test_AddAccessRuleAPI(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
AddBucket("testaccessruleadd", false, false, nil, nil)
|
||||
AddBucket("testaccessruleadd", false, nil, nil, nil)
|
||||
|
||||
type args struct {
|
||||
bucket string
|
||||
@@ -111,7 +111,7 @@ func Test_AddAccessRuleAPI(t *testing.T) {
|
||||
func Test_GetAccessRulesAPI(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
AddBucket("testaccessruleget", false, false, nil, nil)
|
||||
AddBucket("testaccessruleget", false, nil, nil, nil)
|
||||
|
||||
type args struct {
|
||||
bucket string
|
||||
@@ -161,7 +161,7 @@ func Test_GetAccessRulesAPI(t *testing.T) {
|
||||
func Test_DeleteAccessRuleAPI(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
AddBucket("testaccessruledelete", false, false, nil, nil)
|
||||
AddBucket("testaccessruledelete", false, nil, nil, nil)
|
||||
|
||||
type args struct {
|
||||
prefix string
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"testing"
|
||||
@@ -56,7 +56,7 @@ func TestLoginStrategy(t *testing.T) {
|
||||
}
|
||||
|
||||
if response != nil {
|
||||
bodyBytes, _ := ioutil.ReadAll(response.Body)
|
||||
bodyBytes, _ := io.ReadAll(response.Body)
|
||||
|
||||
loginDetails := models.LoginDetails{}
|
||||
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"math/rand"
|
||||
@@ -194,3 +196,86 @@ func TestObjectGet(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func downloadMultipleFiles(bucketName string, objects []string) (*http.Response, error) {
|
||||
requestURL := fmt.Sprintf("http://localhost:9090/api/v1/buckets/%s/objects/download-multiple", bucketName)
|
||||
|
||||
postReqParams, _ := json.Marshal(objects)
|
||||
reqBody := bytes.NewReader(postReqParams)
|
||||
|
||||
request, err := http.NewRequest(
|
||||
"POST", requestURL, reqBody)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
|
||||
request.Header.Add("Content-Type", "application/json")
|
||||
client := &http.Client{
|
||||
Timeout: 2 * time.Second,
|
||||
}
|
||||
response, err := client.Do(request)
|
||||
return response, err
|
||||
}
|
||||
|
||||
func TestDownloadMultipleFiles(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
type args struct {
|
||||
bucketName string
|
||||
objectLis []string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
expectedStatus int
|
||||
expectedError bool
|
||||
}{
|
||||
{
|
||||
name: "Test empty Bucket",
|
||||
args: args{
|
||||
bucketName: "",
|
||||
},
|
||||
expectedStatus: 400,
|
||||
expectedError: true,
|
||||
},
|
||||
{
|
||||
name: "Test empty object list",
|
||||
args: args{
|
||||
bucketName: "test-bucket",
|
||||
},
|
||||
expectedStatus: 400,
|
||||
expectedError: true,
|
||||
},
|
||||
{
|
||||
name: "Test with bucket and object list",
|
||||
args: args{
|
||||
bucketName: "test-bucket",
|
||||
objectLis: []string{
|
||||
"my-object.txt",
|
||||
"test-prefix/",
|
||||
"test-prefix/nested-prefix/",
|
||||
"test-prefix/nested-prefix/deep-nested/",
|
||||
},
|
||||
},
|
||||
expectedStatus: 200,
|
||||
expectedError: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
resp, err := downloadMultipleFiles(tt.args.bucketName, tt.args.objectLis)
|
||||
if tt.expectedError {
|
||||
assert.Nil(err)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
if resp != nil {
|
||||
assert.NotNil(resp)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"testing"
|
||||
@@ -630,7 +630,7 @@ func Test_PolicyListUsersAPI(t *testing.T) {
|
||||
return
|
||||
}
|
||||
if response != nil {
|
||||
bodyBytes, _ := ioutil.ReadAll(response.Body)
|
||||
bodyBytes, _ := io.ReadAll(response.Body)
|
||||
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
|
||||
if response.StatusCode == 200 {
|
||||
assert.Equal("[\"policyuser4\"]\n", string(bodyBytes))
|
||||
@@ -709,7 +709,7 @@ func Test_PolicyListGroupsAPI(t *testing.T) {
|
||||
return
|
||||
}
|
||||
if response != nil {
|
||||
bodyBytes, _ := ioutil.ReadAll(response.Body)
|
||||
bodyBytes, _ := io.ReadAll(response.Body)
|
||||
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
|
||||
if response.StatusCode == 200 {
|
||||
assert.Equal("[\"testgroup12345\"]\n", string(bodyBytes))
|
||||
|
||||
@@ -25,7 +25,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -43,14 +42,14 @@ import (
|
||||
type AddBucketOps struct {
|
||||
Name string
|
||||
Locking bool
|
||||
Versioning bool
|
||||
Versioning map[string]interface{}
|
||||
Quota map[string]interface{}
|
||||
Retention map[string]interface{}
|
||||
Endpoint *string
|
||||
UseToken *string
|
||||
}
|
||||
|
||||
func AddBucket(name string, locking, versioning bool, quota, retention map[string]interface{}) (*http.Response, error) {
|
||||
func AddBucket(name string, locking bool, versioning, quota, retention map[string]interface{}) (*http.Response, error) {
|
||||
return AddBucketWithOpts(&AddBucketOps{
|
||||
Name: name,
|
||||
Locking: locking,
|
||||
@@ -143,11 +142,11 @@ func getTokenForEndpoint(endpoint string) string {
|
||||
return loginToken
|
||||
}
|
||||
|
||||
func setupBucket(name string, locking, versioning bool, quota, retention map[string]interface{}, assert *assert.Assertions, expected int) bool {
|
||||
func setupBucket(name string, locking bool, versioning, quota, retention map[string]interface{}, assert *assert.Assertions, expected int) bool {
|
||||
return setupBucketForEndpoint(name, locking, versioning, quota, retention, assert, expected, nil, nil)
|
||||
}
|
||||
|
||||
func setupBucketForEndpoint(name string, locking, versioning bool, quota, retention map[string]interface{}, assert *assert.Assertions, expected int, endpoint, endpointToken *string) bool {
|
||||
func setupBucketForEndpoint(name string, locking bool, versioning, quota, retention map[string]interface{}, assert *assert.Assertions, expected int, endpoint, endpointToken *string) bool {
|
||||
/*
|
||||
The intention of this function is to return either true or false to
|
||||
reduce the code by performing the verification in one place only.
|
||||
@@ -752,7 +751,7 @@ func TestPutObjectsLegalholdStatus(t *testing.T) {
|
||||
status := "enabled"
|
||||
|
||||
// 1. Create bucket
|
||||
if !setupBucket(bucketName, true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -777,7 +776,7 @@ func TestPutObjectsLegalholdStatus(t *testing.T) {
|
||||
|
||||
// Get versionID
|
||||
listResponse, _ := ListObjects(bucketName, prefix, "true")
|
||||
bodyBytes, _ := ioutil.ReadAll(listResponse.Body)
|
||||
bodyBytes, _ := io.ReadAll(listResponse.Body)
|
||||
listObjs := models.ListObjectsResponse{}
|
||||
err := json.Unmarshal(bodyBytes, &listObjs)
|
||||
if err != nil {
|
||||
@@ -839,7 +838,7 @@ func TestGetBucketQuota(t *testing.T) {
|
||||
validBucket := "testgetbucketquota"
|
||||
|
||||
// 1. Create bucket
|
||||
if !setupBucket(validBucket, true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket(validBucket, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -916,7 +915,7 @@ func TestPutBucketQuota(t *testing.T) {
|
||||
validBucket := "testputbucketquota"
|
||||
|
||||
// 1. Create bucket
|
||||
if !setupBucket(validBucket, true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket(validBucket, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -975,7 +974,7 @@ func TestListBucketEvents(t *testing.T) {
|
||||
validBucket := "testlistbucketevents"
|
||||
|
||||
// 1. Create bucket
|
||||
if !setupBucket(validBucket, true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket(validBucket, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1033,7 +1032,7 @@ func TestDeleteObjectsRetentionStatus(t *testing.T) {
|
||||
validPrefix := encodeBase64(fileName)
|
||||
|
||||
// 1. Create bucket
|
||||
if !setupBucket(bucketName, true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1058,7 +1057,7 @@ func TestDeleteObjectsRetentionStatus(t *testing.T) {
|
||||
|
||||
// Get versionID
|
||||
listResponse, _ := ListObjects(bucketName, validPrefix, "true")
|
||||
bodyBytes, _ := ioutil.ReadAll(listResponse.Body)
|
||||
bodyBytes, _ := io.ReadAll(listResponse.Body)
|
||||
listObjs := models.ListObjectsResponse{}
|
||||
err := json.Unmarshal(bodyBytes, &listObjs)
|
||||
if err != nil {
|
||||
@@ -1140,7 +1139,7 @@ func TestBucketSetPolicy(t *testing.T) {
|
||||
validBucketName := "testbucketsetpolicy"
|
||||
|
||||
// 1. Create bucket
|
||||
if !setupBucket(validBucketName, true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket(validBucketName, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1201,7 +1200,7 @@ func TestRestoreObjectToASelectedVersion(t *testing.T) {
|
||||
validPrefix := encodeBase64(fileName)
|
||||
|
||||
// 1. Create bucket
|
||||
if !setupBucket(bucketName, true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1226,7 +1225,7 @@ func TestRestoreObjectToASelectedVersion(t *testing.T) {
|
||||
|
||||
// 3. Get versionID
|
||||
listResponse, _ := ListObjects(bucketName, validPrefix, "true")
|
||||
bodyBytes, _ := ioutil.ReadAll(listResponse.Body)
|
||||
bodyBytes, _ := io.ReadAll(listResponse.Body)
|
||||
listObjs := models.ListObjectsResponse{}
|
||||
err := json.Unmarshal(bodyBytes, &listObjs)
|
||||
if err != nil {
|
||||
@@ -1289,7 +1288,7 @@ func TestPutBucketsTags(t *testing.T) {
|
||||
// 1. Create the bucket
|
||||
assert := assert.New(t)
|
||||
validBucketName := "testputbuckettags1"
|
||||
if !setupBucket(validBucketName, false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket(validBucketName, false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1347,7 +1346,7 @@ func TestGetsTheMetadataOfAnObject(t *testing.T) {
|
||||
tags["tag"] = "testputobjecttagbucketonetagone"
|
||||
|
||||
// 1. Create the bucket
|
||||
if !setupBucket(bucketName, false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1418,7 +1417,7 @@ func TestPutObjectsRetentionStatus(t *testing.T) {
|
||||
prefix := encodeBase64(fileName)
|
||||
|
||||
// 1. Create bucket
|
||||
if !setupBucket(bucketName, true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1443,7 +1442,7 @@ func TestPutObjectsRetentionStatus(t *testing.T) {
|
||||
|
||||
// Get versionID
|
||||
listResponse, _ := ListObjects(bucketName, prefix, "true")
|
||||
bodyBytes, _ := ioutil.ReadAll(listResponse.Body)
|
||||
bodyBytes, _ := io.ReadAll(listResponse.Body)
|
||||
listObjs := models.ListObjectsResponse{}
|
||||
err := json.Unmarshal(bodyBytes, &listObjs)
|
||||
if err != nil {
|
||||
@@ -1516,7 +1515,7 @@ func TestShareObjectOnURL(t *testing.T) {
|
||||
versionID := "null"
|
||||
|
||||
// 1. Create the bucket
|
||||
if !setupBucket(bucketName, false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1590,7 +1589,7 @@ func TestListObjects(t *testing.T) {
|
||||
fileName := "testlistobjecttobucket1.txt"
|
||||
|
||||
// 1. Create the bucket
|
||||
if !setupBucket(bucketName, false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1638,7 +1637,7 @@ func TestDeleteObject(t *testing.T) {
|
||||
numberOfFiles := 2
|
||||
|
||||
// 1. Create bucket
|
||||
if !setupBucket(bucketName, true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1704,7 +1703,7 @@ func TestUploadObjectToBucket(t *testing.T) {
|
||||
fileName := "sample.txt"
|
||||
|
||||
// 1. Create the bucket
|
||||
if !setupBucket(bucketName, false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1739,7 +1738,7 @@ func TestDownloadObject(t *testing.T) {
|
||||
}
|
||||
|
||||
// 1. Create the bucket
|
||||
if !setupBucket(bucketName, true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1776,7 +1775,7 @@ func TestDownloadObject(t *testing.T) {
|
||||
}
|
||||
|
||||
// 4. Verify the file was downloaded
|
||||
files, err := ioutil.ReadDir(workingDirectory)
|
||||
files, err := os.ReadDir(workingDirectory)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
@@ -1801,7 +1800,7 @@ func TestDeleteMultipleObjects(t *testing.T) {
|
||||
fileName := "testdeletemultipleobjs"
|
||||
|
||||
// 1. Create a bucket for this particular test
|
||||
if !setupBucket(bucketName, false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1878,7 +1877,7 @@ func TestPutObjectTag(t *testing.T) {
|
||||
versionID := "null"
|
||||
|
||||
// 1. Create the bucket
|
||||
if !setupBucket(bucketName, false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1952,7 +1951,7 @@ func TestBucketRetention(t *testing.T) {
|
||||
retention["mode"] = "compliance"
|
||||
retention["unit"] = "years"
|
||||
retention["validity"] = 2
|
||||
if !setupBucket("setbucketretention1", true, true, nil, retention, assert, 200) {
|
||||
if !setupBucket("setbucketretention1", true, map[string]interface{}{"enabled": true}, nil, retention, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -2003,7 +2002,7 @@ func TestBucketInformationGenericErrorResponse(t *testing.T) {
|
||||
|
||||
// 1. Create the bucket
|
||||
assert := assert.New(t)
|
||||
if !setupBucket("bucketinformation2", false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket("bucketinformation2", false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -2048,7 +2047,7 @@ func TestBucketInformationSuccessfulResponse(t *testing.T) {
|
||||
|
||||
// 1. Create the bucket
|
||||
assert := assert.New(t)
|
||||
if !setupBucket("bucketinformation1", false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket("bucketinformation1", false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -2161,7 +2160,7 @@ func TestListBuckets(t *testing.T) {
|
||||
// 1. Create buckets
|
||||
numberOfBuckets := 3
|
||||
for i := 1; i <= numberOfBuckets; i++ {
|
||||
if !setupBucket("testlistbuckets"+strconv.Itoa(i), false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket("testlistbuckets"+strconv.Itoa(i), false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -2169,21 +2168,12 @@ func TestListBuckets(t *testing.T) {
|
||||
// 2. List buckets
|
||||
listBucketsResponse, listBucketsError := ListBuckets()
|
||||
assert.Nil(listBucketsError)
|
||||
if listBucketsError != nil {
|
||||
log.Println(listBucketsError)
|
||||
assert.Fail("Error listing the buckets")
|
||||
return
|
||||
}
|
||||
|
||||
assert.NotNil(listBucketsResponse)
|
||||
assert.NotNil(listBucketsResponse.Body)
|
||||
// 3. Verify list of buckets
|
||||
b, err := io.ReadAll(listBucketsResponse.Body)
|
||||
if listBucketsResponse != nil {
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
assert.Equal(200, listBucketsResponse.StatusCode,
|
||||
"Status Code is incorrect: "+string(b))
|
||||
}
|
||||
b, _ := io.ReadAll(listBucketsResponse.Body)
|
||||
assert.Equal(200, listBucketsResponse.StatusCode,
|
||||
"Status Code is incorrect: "+string(b))
|
||||
for i := 1; i <= numberOfBuckets; i++ {
|
||||
assert.True(strings.Contains(string(b),
|
||||
"testlistbuckets"+strconv.Itoa(i)))
|
||||
@@ -2215,7 +2205,7 @@ func TestBucketsGet(t *testing.T) {
|
||||
|
||||
if response != nil {
|
||||
assert.Equal(200, response.StatusCode, "Status Code is incorrect")
|
||||
bodyBytes, _ := ioutil.ReadAll(response.Body)
|
||||
bodyBytes, _ := io.ReadAll(response.Body)
|
||||
|
||||
listBuckets := models.ListBucketsResponse{}
|
||||
err = json.Unmarshal(bodyBytes, &listBuckets)
|
||||
@@ -2255,7 +2245,7 @@ func TestBucketVersioning(t *testing.T) {
|
||||
|
||||
if response != nil {
|
||||
|
||||
bodyBytes, _ := ioutil.ReadAll(response.Body)
|
||||
bodyBytes, _ := io.ReadAll(response.Body)
|
||||
|
||||
sessionResponse := models.SessionResponse{}
|
||||
err = json.Unmarshal(bodyBytes, &sessionResponse)
|
||||
@@ -2277,7 +2267,7 @@ func TestBucketVersioning(t *testing.T) {
|
||||
|
||||
requestDataBody := bytes.NewReader(requestDataJSON)
|
||||
|
||||
if !setupBucket("test2", true, false, nil, nil, assert, 200) {
|
||||
if !setupBucket("test2", true, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -2292,7 +2282,7 @@ func TestBucketVersioning(t *testing.T) {
|
||||
assert.Equal(
|
||||
200, getVersioningResult.StatusCode, "Status Code is incorrect")
|
||||
}
|
||||
bodyBytes, _ := ioutil.ReadAll(getVersioningResult.Body)
|
||||
bodyBytes, _ := io.ReadAll(getVersioningResult.Body)
|
||||
structBucketRepl := models.BucketVersioningResponse{
|
||||
ExcludeFolders: false,
|
||||
ExcludedPrefixes: nil,
|
||||
@@ -2345,7 +2335,7 @@ func TestSetBucketTags(t *testing.T) {
|
||||
}
|
||||
|
||||
// put bucket
|
||||
if !setupBucket("test4", false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket("test4", false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -2369,7 +2359,7 @@ func TestSetBucketTags(t *testing.T) {
|
||||
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
|
||||
request.Header.Add("Content-Type", "application/json")
|
||||
|
||||
response, err := client.Do(request)
|
||||
_, err = client.Do(request)
|
||||
assert.Nil(err)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
@@ -2387,14 +2377,14 @@ func TestSetBucketTags(t *testing.T) {
|
||||
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
|
||||
request.Header.Add("Content-Type", "application/json")
|
||||
|
||||
response, err = client.Do(request)
|
||||
response, err := client.Do(request)
|
||||
assert.Nil(err)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
|
||||
bodyBytes, _ := ioutil.ReadAll(response.Body)
|
||||
bodyBytes, _ := io.ReadAll(response.Body)
|
||||
|
||||
bucket := models.Bucket{}
|
||||
err = json.Unmarshal(bodyBytes, &bucket)
|
||||
@@ -2412,7 +2402,7 @@ func TestGetBucket(t *testing.T) {
|
||||
Timeout: 2 * time.Second,
|
||||
}
|
||||
|
||||
if !setupBucket("test3", false, false, nil, nil, assert, 200) {
|
||||
if !setupBucket("test3", false, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -2465,7 +2455,7 @@ func TestAddBucket(t *testing.T) {
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if !setupBucket(tt.args.bucketName, false, false, nil, nil, assert, tt.expectedStatus) {
|
||||
if !setupBucket(tt.args.bucketName, false, nil, nil, nil, assert, tt.expectedStatus) {
|
||||
return
|
||||
}
|
||||
})
|
||||
@@ -2847,7 +2837,7 @@ func TestReplication(t *testing.T) {
|
||||
}
|
||||
|
||||
// 3. Get rule ID and status from response's body
|
||||
bodyBytes, _ := ioutil.ReadAll(response.Body)
|
||||
bodyBytes, _ := io.ReadAll(response.Body)
|
||||
structBucketRepl := models.BucketReplicationResponse{}
|
||||
err = json.Unmarshal(bodyBytes, &structBucketRepl)
|
||||
if err != nil {
|
||||
@@ -2929,7 +2919,7 @@ func TestReplication(t *testing.T) {
|
||||
}
|
||||
|
||||
// 9. Get rule ID and status from response's body
|
||||
bodyBytes, _ = ioutil.ReadAll(response.Body)
|
||||
bodyBytes, _ = io.ReadAll(response.Body)
|
||||
structBucketRepl = models.BucketReplicationResponse{}
|
||||
err = json.Unmarshal(bodyBytes, &structBucketRepl)
|
||||
if err != nil {
|
||||
@@ -2996,7 +2986,7 @@ func TestReturnsTheStatusOfObjectLockingSupportOnTheBucket(t *testing.T) {
|
||||
}
|
||||
|
||||
// 2. Verify the status to be enabled for this bucket
|
||||
bodyBytes, _ := ioutil.ReadAll(response.Body)
|
||||
bodyBytes, _ := io.ReadAll(response.Body)
|
||||
structBucketLocking := models.BucketObLockingResponse{}
|
||||
err = json.Unmarshal(bodyBytes, &structBucketLocking)
|
||||
if err != nil {
|
||||
@@ -3010,7 +3000,7 @@ func TestReturnsTheStatusOfObjectLockingSupportOnTheBucket(t *testing.T) {
|
||||
)
|
||||
}
|
||||
|
||||
func SetBucketVersioning(bucketName string, versioning bool, endpoint, useToken *string) (*http.Response, error) {
|
||||
func SetBucketVersioning(bucketName string, versioning map[string]interface{}, endpoint, useToken *string) (*http.Response, error) {
|
||||
/*
|
||||
Helper function to set Bucket Versioning
|
||||
*/
|
||||
@@ -3047,7 +3037,7 @@ func TestSetBucketVersioning(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
bucket := "test-set-bucket-versioning"
|
||||
locking := false
|
||||
versioning := true
|
||||
versioning := map[string]interface{}{"enabled": true}
|
||||
|
||||
// 1. Create bucket with versioning as true and locking as false
|
||||
if !setupBucket(bucket, locking, versioning, nil, nil, assert, 200) {
|
||||
@@ -3055,7 +3045,7 @@ func TestSetBucketVersioning(t *testing.T) {
|
||||
}
|
||||
|
||||
// 2. Set versioning as False i.e Suspend versioning
|
||||
response, err := SetBucketVersioning(bucket, false, nil, nil)
|
||||
response, err := SetBucketVersioning(bucket, map[string]interface{}{"enabled": false}, nil, nil)
|
||||
assert.Nil(err)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
@@ -3077,7 +3067,7 @@ func TestSetBucketVersioning(t *testing.T) {
|
||||
assert.Equal(
|
||||
200, getVersioningResult.StatusCode, "Status Code is incorrect")
|
||||
}
|
||||
bodyBytes, _ := ioutil.ReadAll(getVersioningResult.Body)
|
||||
bodyBytes, _ := io.ReadAll(getVersioningResult.Body)
|
||||
result := models.BucketVersioningResponse{
|
||||
ExcludeFolders: false,
|
||||
ExcludedPrefixes: nil,
|
||||
@@ -3128,12 +3118,11 @@ func TestEnableBucketEncryption(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
bucketName := "test-enable-bucket-encryption"
|
||||
locking := false
|
||||
versioning := false
|
||||
encType := "sse-s3"
|
||||
kmsKeyID := ""
|
||||
|
||||
// 1. Add bucket
|
||||
if !setupBucket(bucketName, locking, versioning, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, locking, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -3160,7 +3149,7 @@ func TestEnableBucketEncryption(t *testing.T) {
|
||||
assert.Equal(
|
||||
200, resp.StatusCode, "Status Code is incorrect")
|
||||
}
|
||||
bodyBytes, _ := ioutil.ReadAll(resp.Body)
|
||||
bodyBytes, _ := io.ReadAll(resp.Body)
|
||||
result := models.BucketEncryptionInfo{}
|
||||
err = json.Unmarshal(bodyBytes, &result)
|
||||
if err != nil {
|
||||
@@ -3192,7 +3181,7 @@ func TestEnableBucketEncryption(t *testing.T) {
|
||||
assert.Equal(
|
||||
404, resp.StatusCode, "Status Code is incorrect")
|
||||
}
|
||||
bodyBytes, _ = ioutil.ReadAll(resp.Body)
|
||||
bodyBytes, _ = io.ReadAll(resp.Body)
|
||||
result2 := models.Error{}
|
||||
err = json.Unmarshal(bodyBytes, &result2)
|
||||
if err != nil {
|
||||
@@ -3391,7 +3380,6 @@ func TestBucketLifeCycle(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
bucketName := "test-bucket-life-cycle"
|
||||
locking := false
|
||||
versioning := false
|
||||
ltype := "expiry"
|
||||
prefix := ""
|
||||
tags := ""
|
||||
@@ -3402,7 +3390,7 @@ func TestBucketLifeCycle(t *testing.T) {
|
||||
var noncurrentversionExpirationDays int64
|
||||
|
||||
// 1. Add bucket
|
||||
if !setupBucket(bucketName, locking, versioning, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, locking, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -3437,7 +3425,7 @@ func TestBucketLifeCycle(t *testing.T) {
|
||||
assert.Equal(
|
||||
200, resp.StatusCode, "Status Code is incorrect")
|
||||
}
|
||||
bodyBytes, _ := ioutil.ReadAll(resp.Body)
|
||||
bodyBytes, _ := io.ReadAll(resp.Body)
|
||||
result := models.BucketLifecycleResponse{}
|
||||
err = json.Unmarshal(bodyBytes, &result)
|
||||
if err != nil {
|
||||
@@ -3483,7 +3471,7 @@ func TestBucketLifeCycle(t *testing.T) {
|
||||
assert.Equal(
|
||||
200, resp.StatusCode, "Status Code is incorrect")
|
||||
}
|
||||
bodyBytes, _ = ioutil.ReadAll(resp.Body)
|
||||
bodyBytes, _ = io.ReadAll(resp.Body)
|
||||
result = models.BucketLifecycleResponse{}
|
||||
err = json.Unmarshal(bodyBytes, &result)
|
||||
if err != nil {
|
||||
@@ -3607,12 +3595,11 @@ func TestAccessRule(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
bucketName := "test-access-rule-bucket"
|
||||
locking := false
|
||||
versioning := false
|
||||
prefix := "prefix"
|
||||
access := "readonly"
|
||||
|
||||
// 1. Add bucket
|
||||
if !setupBucket(bucketName, locking, versioning, nil, nil, assert, 200) {
|
||||
if !setupBucket(bucketName, locking, nil, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -3643,7 +3630,7 @@ func TestAccessRule(t *testing.T) {
|
||||
assert.Equal(
|
||||
200, resp.StatusCode, "Status Code is incorrect")
|
||||
}
|
||||
bodyBytes, _ := ioutil.ReadAll(resp.Body)
|
||||
bodyBytes, _ := io.ReadAll(resp.Body)
|
||||
result := models.ListAccessRulesResponse{}
|
||||
err = json.Unmarshal(bodyBytes, &result)
|
||||
if err != nil {
|
||||
@@ -3681,7 +3668,7 @@ func TestAccessRule(t *testing.T) {
|
||||
assert.Equal(
|
||||
200, resp.StatusCode, "Status Code is incorrect")
|
||||
}
|
||||
bodyBytes, _ = ioutil.ReadAll(resp.Body)
|
||||
bodyBytes, _ = io.ReadAll(resp.Body)
|
||||
result = models.ListAccessRulesResponse{}
|
||||
err = json.Unmarshal(bodyBytes, &result)
|
||||
if err != nil {
|
||||
@@ -3856,16 +3843,16 @@ func TestAddRemoteBucket(t *testing.T) {
|
||||
fmt.Println("targetBucket: ", targetBucket)
|
||||
|
||||
// 1. Create bucket
|
||||
if !setupBucket("source", true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket("source", true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
// 1.1. Create target bucket
|
||||
targetEndpoint := "http://localhost:9092"
|
||||
targetToken := getTokenForEndpoint(targetEndpoint)
|
||||
if !setupBucketForEndpoint(targetBucket, true, true, nil, nil, assert, 200, &targetEndpoint, &targetToken) {
|
||||
if !setupBucketForEndpoint(targetBucket, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200, &targetEndpoint, &targetToken) {
|
||||
log.Println("bucket already exists")
|
||||
}
|
||||
_, err := SetBucketVersioning(targetBucket, false, &targetURL, &targetToken)
|
||||
_, err := SetBucketVersioning(targetBucket, map[string]interface{}{"enabled": false}, &targetURL, &targetToken)
|
||||
if err != nil {
|
||||
log.Println("bucket already has versioning")
|
||||
}
|
||||
@@ -3915,16 +3902,16 @@ func TestDeleteRemoteBucket(t *testing.T) {
|
||||
fmt.Println("targetBucket: ", targetBucket)
|
||||
|
||||
// 1. Create bucket
|
||||
if !setupBucket("deletesource", true, true, nil, nil, assert, 200) {
|
||||
if !setupBucket("deletesource", true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200) {
|
||||
return
|
||||
}
|
||||
// 1.1. Create target bucket
|
||||
targetEndpoint := "http://localhost:9092"
|
||||
targetToken := getTokenForEndpoint(targetEndpoint)
|
||||
if !setupBucketForEndpoint(targetBucket, true, true, nil, nil, assert, 200, &targetEndpoint, &targetToken) {
|
||||
if !setupBucketForEndpoint(targetBucket, true, map[string]interface{}{"enabled": true}, nil, nil, assert, 200, &targetEndpoint, &targetToken) {
|
||||
log.Println("bucket already exists")
|
||||
}
|
||||
_, err := SetBucketVersioning(targetBucket, false, &targetURL, &targetToken)
|
||||
_, err := SetBucketVersioning(targetBucket, map[string]interface{}{"enabled": false}, &targetURL, &targetToken)
|
||||
if err != nil {
|
||||
log.Println("bucket already has versioning")
|
||||
}
|
||||
@@ -3950,21 +3937,13 @@ func TestDeleteRemoteBucket(t *testing.T) {
|
||||
// 3. Get ARN
|
||||
resp, err = GetRemoteBucketARN(sourceBucket)
|
||||
assert.Nil(err)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
bodyBytes, _ := ioutil.ReadAll(resp.Body)
|
||||
assert.NotNil(resp)
|
||||
assert.NotNil(resp.Body)
|
||||
bodyBytes, _ := io.ReadAll(resp.Body)
|
||||
remoteBucket := models.RemoteBucket{}
|
||||
err = json.Unmarshal(bodyBytes, &remoteBucket)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
assert.Nil(err)
|
||||
}
|
||||
if resp != nil {
|
||||
assert.Equal(
|
||||
200, resp.StatusCode, inspectHTTPResponse(resp))
|
||||
}
|
||||
assert.Nil(err)
|
||||
assert.Equal(200, resp.StatusCode, inspectHTTPResponse(resp))
|
||||
|
||||
// 4. Delete Remote Bucket
|
||||
if remoteBucket.RemoteARN != nil {
|
||||
|
||||
@@ -36,17 +36,17 @@ import (
|
||||
// swagger:model bucketVersioningResponse
|
||||
type BucketVersioningResponse struct {
|
||||
|
||||
// exclude folders
|
||||
ExcludeFolders bool `json:"ExcludeFolders,omitempty"`
|
||||
|
||||
// excluded prefixes
|
||||
ExcludedPrefixes []*BucketVersioningResponseExcludedPrefixesItems0 `json:"ExcludedPrefixes"`
|
||||
|
||||
// m f a delete
|
||||
MFADelete string `json:"MFADelete,omitempty"`
|
||||
|
||||
// exclude folders
|
||||
ExcludeFolders bool `json:"excludeFolders,omitempty"`
|
||||
|
||||
// excluded prefixes
|
||||
ExcludedPrefixes []*BucketVersioningResponseExcludedPrefixesItems0 `json:"excludedPrefixes"`
|
||||
|
||||
// status
|
||||
Status string `json:"Status,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this bucket versioning response
|
||||
@@ -76,9 +76,9 @@ func (m *BucketVersioningResponse) validateExcludedPrefixes(formats strfmt.Regis
|
||||
if m.ExcludedPrefixes[i] != nil {
|
||||
if err := m.ExcludedPrefixes[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("ExcludedPrefixes" + "." + strconv.Itoa(i))
|
||||
return ve.ValidateName("excludedPrefixes" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("ExcludedPrefixes" + "." + strconv.Itoa(i))
|
||||
return ce.ValidateName("excludedPrefixes" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -110,9 +110,9 @@ func (m *BucketVersioningResponse) contextValidateExcludedPrefixes(ctx context.C
|
||||
if m.ExcludedPrefixes[i] != nil {
|
||||
if err := m.ExcludedPrefixes[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("ExcludedPrefixes" + "." + strconv.Itoa(i))
|
||||
return ve.ValidateName("excludedPrefixes" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("ExcludedPrefixes" + "." + strconv.Itoa(i))
|
||||
return ce.ValidateName("excludedPrefixes" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -147,7 +147,7 @@ func (m *BucketVersioningResponse) UnmarshalBinary(b []byte) error {
|
||||
type BucketVersioningResponseExcludedPrefixesItems0 struct {
|
||||
|
||||
// prefix
|
||||
Prefix string `json:"Prefix,omitempty"`
|
||||
Prefix string `json:"prefix,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this bucket versioning response excluded prefixes items0
|
||||
|
||||
@@ -38,8 +38,8 @@ import (
|
||||
// swagger:model loginDetails
|
||||
type LoginDetails struct {
|
||||
|
||||
// is direct p v
|
||||
IsDirectPV bool `json:"isDirectPV,omitempty"`
|
||||
// animated login
|
||||
AnimatedLogin bool `json:"animatedLogin,omitempty"`
|
||||
|
||||
// is k8 s
|
||||
IsK8S bool `json:"isK8S,omitempty"`
|
||||
|
||||
@@ -50,7 +50,7 @@ type MakeBucketRequest struct {
|
||||
Retention *PutBucketRetentionRequest `json:"retention,omitempty"`
|
||||
|
||||
// versioning
|
||||
Versioning bool `json:"versioning,omitempty"`
|
||||
Versioning *SetBucketVersioning `json:"versioning,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this make bucket request
|
||||
@@ -69,6 +69,10 @@ func (m *MakeBucketRequest) Validate(formats strfmt.Registry) error {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateVersioning(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
@@ -122,6 +126,25 @@ func (m *MakeBucketRequest) validateRetention(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MakeBucketRequest) validateVersioning(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Versioning) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Versioning != nil {
|
||||
if err := m.Versioning.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("versioning")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("versioning")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this make bucket request based on the context it is used
|
||||
func (m *MakeBucketRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
@@ -134,6 +157,10 @@ func (m *MakeBucketRequest) ContextValidate(ctx context.Context, formats strfmt.
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateVersioning(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
@@ -172,6 +199,22 @@ func (m *MakeBucketRequest) contextValidateRetention(ctx context.Context, format
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MakeBucketRequest) contextValidateVersioning(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Versioning != nil {
|
||||
if err := m.Versioning.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("versioning")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("versioning")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *MakeBucketRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
|
||||
@@ -55,6 +55,12 @@ const (
|
||||
|
||||
// NotificationEventTypeGet captures enum value "get"
|
||||
NotificationEventTypeGet NotificationEventType = "get"
|
||||
|
||||
// NotificationEventTypeReplica captures enum value "replica"
|
||||
NotificationEventTypeReplica NotificationEventType = "replica"
|
||||
|
||||
// NotificationEventTypeIlm captures enum value "ilm"
|
||||
NotificationEventTypeIlm NotificationEventType = "ilm"
|
||||
)
|
||||
|
||||
// for schema
|
||||
@@ -62,7 +68,7 @@ var notificationEventTypeEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []NotificationEventType
|
||||
if err := json.Unmarshal([]byte(`["put","delete","get"]`), &res); err != nil {
|
||||
if err := json.Unmarshal([]byte(`["put","delete","get","replica","ilm"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
|
||||
@@ -34,8 +34,14 @@ import (
|
||||
// swagger:model setBucketVersioning
|
||||
type SetBucketVersioning struct {
|
||||
|
||||
// versioning
|
||||
Versioning bool `json:"versioning,omitempty"`
|
||||
// enabled
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
|
||||
// exclude folders
|
||||
ExcludeFolders bool `json:"excludeFolders,omitempty"`
|
||||
|
||||
// exclude prefixes
|
||||
ExcludePrefixes []string `json:"excludePrefixes"`
|
||||
}
|
||||
|
||||
// Validate validates this set bucket versioning
|
||||
|
||||
@@ -20,7 +20,9 @@ package oauth2
|
||||
|
||||
import (
|
||||
"crypto/sha1"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/minio/console/pkg/auth/token"
|
||||
"github.com/minio/pkg/env"
|
||||
@@ -105,7 +107,14 @@ func getIDPScopes() string {
|
||||
return env.Get(ConsoleIDPScopes, "openid,profile,email")
|
||||
}
|
||||
|
||||
// getIDPTokenExpiration return default token expiration for access token (in seconds)
|
||||
func getIDPTokenExpiration() string {
|
||||
return env.Get(ConsoleIDPTokenExpiration, "3600")
|
||||
// getIDPTokenExpiration return default token expiration for access token
|
||||
func getIDPTokenExpiration() time.Duration {
|
||||
expiration := 12 * 3600
|
||||
if expStr := env.Get(ConsoleIDPTokenExpiration, ""); expStr != "" {
|
||||
if exp, err := strconv.Atoi(expStr); err == nil {
|
||||
expiration = exp
|
||||
}
|
||||
}
|
||||
|
||||
return time.Duration(expiration) * time.Second
|
||||
}
|
||||
|
||||
@@ -25,13 +25,13 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/minio/minio-go/v7/pkg/credentials"
|
||||
"github.com/minio/minio-go/v7/pkg/set"
|
||||
|
||||
"github.com/minio/console/pkg/auth/token"
|
||||
"github.com/minio/console/pkg/auth/utils"
|
||||
"golang.org/x/crypto/pbkdf2"
|
||||
"golang.org/x/oauth2"
|
||||
@@ -69,23 +69,23 @@ type DiscoveryDoc struct {
|
||||
}
|
||||
|
||||
func (ac Config) Exchange(ctx context.Context, code string, opts ...xoauth2.AuthCodeOption) (*xoauth2.Token, error) {
|
||||
return ac.Exchange(ctx, code, opts...)
|
||||
return ac.Config.Exchange(ctx, code, opts...)
|
||||
}
|
||||
|
||||
func (ac Config) AuthCodeURL(state string, opts ...xoauth2.AuthCodeOption) string {
|
||||
return ac.AuthCodeURL(state, opts...)
|
||||
return ac.Config.AuthCodeURL(state, opts...)
|
||||
}
|
||||
|
||||
func (ac Config) PasswordCredentialsToken(ctx context.Context, username, password string) (*xoauth2.Token, error) {
|
||||
return ac.PasswordCredentialsToken(ctx, username, password)
|
||||
return ac.Config.PasswordCredentialsToken(ctx, username, password)
|
||||
}
|
||||
|
||||
func (ac Config) Client(ctx context.Context, t *xoauth2.Token) *http.Client {
|
||||
return ac.Client(ctx, t)
|
||||
return ac.Config.Client(ctx, t)
|
||||
}
|
||||
|
||||
func (ac Config) TokenSource(ctx context.Context, t *xoauth2.Token) xoauth2.TokenSource {
|
||||
return ac.TokenSource(ctx, t)
|
||||
return ac.Config.TokenSource(ctx, t)
|
||||
}
|
||||
|
||||
// Provider is a wrapper of the oauth2 configuration and the oidc provider
|
||||
@@ -331,22 +331,23 @@ func (client *Provider) VerifyIdentity(ctx context.Context, code, state, roleARN
|
||||
return nil, errors.New("invalid token")
|
||||
}
|
||||
|
||||
// expiration configured in the token itself
|
||||
expiration := int(oauth2Token.Expiry.Sub(time.Now().UTC()).Seconds())
|
||||
|
||||
// check if user configured a hardcoded expiration for console via env variables
|
||||
// and override the incoming expiration
|
||||
userConfiguredExpiration := getIDPTokenExpiration()
|
||||
if userConfiguredExpiration != "" {
|
||||
expiration, _ = strconv.Atoi(userConfiguredExpiration)
|
||||
expiration := token.GetConsoleSTSDuration()
|
||||
if exp := getIDPTokenExpiration(); exp > 0 {
|
||||
expiration = exp
|
||||
}
|
||||
|
||||
// Use the expiration configured in the token itself if it is closer than the configured value
|
||||
if exp := oauth2Token.Expiry.Sub(time.Now().UTC()); exp < expiration {
|
||||
expiration = exp
|
||||
}
|
||||
|
||||
idToken := oauth2Token.Extra("id_token")
|
||||
if idToken == nil {
|
||||
return nil, errors.New("missing id_token")
|
||||
}
|
||||
token := &credentials.WebIdentityToken{
|
||||
Token: idToken.(string),
|
||||
Expiry: expiration,
|
||||
Expiry: int(expiration.Seconds()),
|
||||
}
|
||||
if client.UserInfo { // look for access_token only if userinfo is requested.
|
||||
accessToken := oauth2Token.Extra("access_token")
|
||||
|
||||
@@ -28,7 +28,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -295,7 +294,7 @@ func decrypt(ciphertext, associatedData []byte) ([]byte, error) {
|
||||
return nil, fmt.Errorf("invalid nonce size %d, expected %d", len(nonce), aead.NonceSize())
|
||||
}
|
||||
|
||||
sealedBytes, err := ioutil.ReadAll(r)
|
||||
sealedBytes, err := io.ReadAll(r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
// GetConsoleSTSDuration returns the default session duration for the STS requested tokens (defaults to 12h)
|
||||
func GetConsoleSTSDuration() time.Duration {
|
||||
duration, err := time.ParseDuration(env.Get(ConsoleSTSDuration, "12h"))
|
||||
if err != nil {
|
||||
if err != nil || duration <= 0 {
|
||||
duration = 12 * time.Hour
|
||||
}
|
||||
return duration
|
||||
|
||||
@@ -24,7 +24,6 @@ import (
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -85,7 +84,7 @@ var (
|
||||
func ParsePublicCertFile(certFile string) (x509Certs []*x509.Certificate, err error) {
|
||||
// Read certificate file.
|
||||
var data []byte
|
||||
if data, err = ioutil.ReadFile(certFile); err != nil {
|
||||
if data, err = os.ReadFile(certFile); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -188,11 +187,11 @@ const EnvCertPassword = "CONSOLE_CERT_PASSWD"
|
||||
// from the provided paths. The private key may be encrypted and is
|
||||
// decrypted using the ENV_VAR: MINIO_CERT_PASSWD.
|
||||
func LoadX509KeyPair(certFile, keyFile string) (tls.Certificate, error) {
|
||||
certPEMBlock, err := ioutil.ReadFile(certFile)
|
||||
certPEMBlock, err := os.ReadFile(certFile)
|
||||
if err != nil {
|
||||
return tls.Certificate{}, err
|
||||
}
|
||||
keyPEMBlock, err := ioutil.ReadFile(keyFile)
|
||||
keyPEMBlock, err := os.ReadFile(keyFile)
|
||||
if err != nil {
|
||||
return tls.Certificate{}, err
|
||||
}
|
||||
@@ -200,11 +199,13 @@ func LoadX509KeyPair(certFile, keyFile string) (tls.Certificate, error) {
|
||||
if len(rest) > 0 {
|
||||
return tls.Certificate{}, errors.New("the private key contains additional data")
|
||||
}
|
||||
// nolint:staticcheck // ignore SA1019
|
||||
if x509.IsEncryptedPEMBlock(key) {
|
||||
password := env.Get(EnvCertPassword, "")
|
||||
if len(password) == 0 {
|
||||
return tls.Certificate{}, errors.New("no password")
|
||||
}
|
||||
// nolint:staticcheck // ignore SA1019
|
||||
decryptedKey, decErr := x509.DecryptPEMBlock(key, []byte(password))
|
||||
if decErr != nil {
|
||||
return tls.Certificate{}, decErr
|
||||
|
||||
@@ -18,7 +18,6 @@ package http
|
||||
|
||||
import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -69,6 +68,6 @@ func DrainBody(respBody io.ReadCloser) {
|
||||
// the same connection for future uses.
|
||||
// - http://stackoverflow.com/a/17961593/4465767
|
||||
defer respBody.Close()
|
||||
io.Copy(ioutil.Discard, respBody)
|
||||
io.Copy(io.Discard, respBody)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/minio/madmin-go/v2"
|
||||
"github.com/minio/madmin-go/v3"
|
||||
)
|
||||
|
||||
// Default keys
|
||||
|
||||
@@ -173,8 +173,8 @@ func (h *Target) logEntry(entry interface{}) {
|
||||
func (h *Target) startHTTPLogger() {
|
||||
// Create a routine which sends json logs received
|
||||
// from an internal channel.
|
||||
h.wg.Add(1)
|
||||
go func() {
|
||||
h.wg.Add(1)
|
||||
defer h.wg.Done()
|
||||
for entry := range h.logCh {
|
||||
h.logEntry(entry)
|
||||
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
"github.com/minio/pkg/licverifier"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
"github.com/minio/madmin-go/v2"
|
||||
"github.com/minio/madmin-go/v3"
|
||||
mc "github.com/minio/mc/cmd"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
@@ -19,17 +19,22 @@ package subnet
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"crypto/tls"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mime/multipart"
|
||||
"net"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/mattn/go-ieproxy"
|
||||
xhttp "github.com/minio/console/pkg/http"
|
||||
"github.com/tidwall/gjson"
|
||||
|
||||
"github.com/minio/madmin-go/v2"
|
||||
"github.com/minio/madmin-go/v3"
|
||||
mc "github.com/minio/mc/cmd"
|
||||
"github.com/minio/pkg/env"
|
||||
)
|
||||
@@ -74,8 +79,15 @@ func UploadAuthHeaders(apiKey string) map[string]string {
|
||||
return map[string]string{"x-subnet-api-key": apiKey}
|
||||
}
|
||||
|
||||
func UploadFileToSubnet(info interface{}, client *xhttp.Client, filename string, reqURL string, headers map[string]string) (string, error) {
|
||||
req, e := subnetUploadReq(info, reqURL, filename)
|
||||
func ProcessUploadInfo(info interface{}, uploadType string, filename string) ([]byte, string, error) {
|
||||
if uploadType == "health" {
|
||||
return processHealthReport(info, filename)
|
||||
}
|
||||
return nil, "", errors.New("invalid Subnet upload type")
|
||||
}
|
||||
|
||||
func UploadFileToSubnet(info []byte, client *xhttp.Client, reqURL string, headers map[string]string, formDataType string) (string, error) {
|
||||
req, e := subnetUploadReq(info, reqURL, formDataType)
|
||||
if e != nil {
|
||||
return "", e
|
||||
}
|
||||
@@ -83,7 +95,7 @@ func UploadFileToSubnet(info interface{}, client *xhttp.Client, filename string,
|
||||
return resp, e
|
||||
}
|
||||
|
||||
func subnetUploadReq(info interface{}, url string, filename string) (*http.Request, error) {
|
||||
func processHealthReport(info interface{}, filename string) ([]byte, string, error) {
|
||||
var body bytes.Buffer
|
||||
writer := multipart.NewWriter(&body)
|
||||
zipWriter := gzip.NewWriter(&body)
|
||||
@@ -95,29 +107,33 @@ func subnetUploadReq(info interface{}, url string, filename string) (*http.Reque
|
||||
}{Version: version}
|
||||
|
||||
if e := enc.Encode(header); e != nil {
|
||||
return nil, e
|
||||
return nil, "", e
|
||||
}
|
||||
|
||||
if e := enc.Encode(info); e != nil {
|
||||
return nil, e
|
||||
return nil, "", e
|
||||
}
|
||||
zipWriter.Close()
|
||||
temp := body
|
||||
part, e := writer.CreateFormFile("file", filename)
|
||||
if e != nil {
|
||||
return nil, e
|
||||
return nil, "", e
|
||||
}
|
||||
if _, e = io.Copy(part, &temp); e != nil {
|
||||
return nil, e
|
||||
return nil, "", e
|
||||
}
|
||||
|
||||
writer.Close()
|
||||
return body.Bytes(), writer.FormDataContentType(), nil
|
||||
}
|
||||
|
||||
r, e := http.NewRequest(http.MethodPost, url, &body)
|
||||
func subnetUploadReq(body []byte, url string, formDataType string) (*http.Request, error) {
|
||||
uploadDataBody := bytes.NewReader(body)
|
||||
r, e := http.NewRequest(http.MethodPost, url, uploadDataBody)
|
||||
if e != nil {
|
||||
return nil, e
|
||||
}
|
||||
r.Header.Add("Content-Type", writer.FormDataContentType())
|
||||
r.Header.Add("Content-Type", formDataType)
|
||||
|
||||
return r, nil
|
||||
}
|
||||
@@ -155,7 +171,7 @@ func subnetReqDo(client xhttp.ClientI, r *http.Request, headers map[string]strin
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
respBytes, e := ioutil.ReadAll(io.LimitReader(resp.Body, subnetRespBodyLimit))
|
||||
respBytes, e := io.ReadAll(io.LimitReader(resp.Body, subnetRespBodyLimit))
|
||||
if e != nil {
|
||||
return "", e
|
||||
}
|
||||
@@ -227,3 +243,93 @@ func getDriveSpaceInfo(admInfo madmin.InfoMessage) (uint64, uint64) {
|
||||
}
|
||||
return total, used
|
||||
}
|
||||
|
||||
func GetSubnetAPIKeyUsingLicense(lic string) (string, error) {
|
||||
return getSubnetAPIKeyUsingAuthHeaders(subnetLicenseAuthHeaders(lic))
|
||||
}
|
||||
|
||||
func getSubnetAPIKeyUsingAuthHeaders(authHeaders map[string]string) (string, error) {
|
||||
resp, e := subnetGetReqMC(subnetAPIKeyURL(), authHeaders)
|
||||
if e != nil {
|
||||
return "", e
|
||||
}
|
||||
return extractSubnetCred("api_key", gjson.Parse(resp))
|
||||
}
|
||||
|
||||
func extractSubnetCred(key string, resp gjson.Result) (string, error) {
|
||||
result := resp.Get(key)
|
||||
if result.Index == 0 {
|
||||
return "", fmt.Errorf("Couldn't extract %s from SUBNET response: %s", key, resp)
|
||||
}
|
||||
return result.String(), nil
|
||||
}
|
||||
|
||||
func subnetLicenseAuthHeaders(lic string) map[string]string {
|
||||
return map[string]string{"x-subnet-license": lic}
|
||||
}
|
||||
|
||||
func subnetGetReqMC(reqURL string, headers map[string]string) (string, error) {
|
||||
r, e := http.NewRequest(http.MethodGet, reqURL, nil)
|
||||
if e != nil {
|
||||
return "", e
|
||||
}
|
||||
return subnetReqDoMC(r, headers)
|
||||
}
|
||||
|
||||
func subnetReqDoMC(r *http.Request, headers map[string]string) (string, error) {
|
||||
for k, v := range headers {
|
||||
r.Header.Add(k, v)
|
||||
}
|
||||
|
||||
ct := r.Header.Get("Content-Type")
|
||||
if len(ct) == 0 {
|
||||
r.Header.Add("Content-Type", "application/json")
|
||||
}
|
||||
|
||||
resp, e := subnetHTTPDo(r)
|
||||
if e != nil {
|
||||
return "", e
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
respBytes, e := io.ReadAll(io.LimitReader(resp.Body, subnetRespBodyLimit))
|
||||
if e != nil {
|
||||
return "", e
|
||||
}
|
||||
respStr := string(respBytes)
|
||||
|
||||
if resp.StatusCode == http.StatusOK {
|
||||
return respStr, nil
|
||||
}
|
||||
return respStr, fmt.Errorf("Request failed with code %d with error: %s", resp.StatusCode, respStr)
|
||||
}
|
||||
|
||||
func subnetHTTPDo(req *http.Request) (*http.Response, error) {
|
||||
return getSubnetClient().Do(req)
|
||||
}
|
||||
|
||||
func getSubnetClient() *http.Client {
|
||||
client := httpClientSubnet(0)
|
||||
return client
|
||||
}
|
||||
|
||||
func httpClientSubnet(reqTimeout time.Duration) *http.Client {
|
||||
return &http.Client{
|
||||
Timeout: reqTimeout,
|
||||
Transport: &http.Transport{
|
||||
DialContext: (&net.Dialer{
|
||||
Timeout: 10 * time.Second,
|
||||
}).DialContext,
|
||||
Proxy: ieproxy.GetProxyFunc(),
|
||||
TLSClientConfig: &tls.Config{
|
||||
// Can't use SSLv3 because of POODLE and BEAST
|
||||
// Can't use TLSv1.0 because of POODLE and BEAST using CBC cipher
|
||||
// Can't use TLSv1.1 because of RC4 cipher usage
|
||||
MinVersion: tls.VersionTLS12,
|
||||
},
|
||||
IdleConnTimeout: 90 * time.Second,
|
||||
TLSHandshakeTimeout: 10 * time.Second,
|
||||
ExpectContinueTimeout: 10 * time.Second,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
|
||||
"github.com/google/uuid"
|
||||
@@ -51,4 +52,15 @@ const (
|
||||
ContextRequestHost = key("request-host")
|
||||
ContextRequestRemoteAddr = key("request-remote-addr")
|
||||
ContextAuditKey = key("request-audit-entry")
|
||||
ContextClientIP = key("client-ip")
|
||||
)
|
||||
|
||||
// ClientIPFromContext attempts to get the Client IP from a context, if it's not present, it returns
|
||||
// 127.0.0.1
|
||||
func ClientIPFromContext(ctx context.Context) string {
|
||||
val := ctx.Value(ContextClientIP)
|
||||
if val != nil {
|
||||
return val.(string)
|
||||
}
|
||||
return "127.0.0.1"
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ package utils
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"regexp"
|
||||
|
||||
"github.com/minio/console/pkg/http"
|
||||
@@ -35,7 +35,7 @@ func GetLatestMinIOImage(client http.ClientI) (*string, error) {
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -5,12 +5,20 @@ build-static:
|
||||
@if [ -f "${NVM_DIR}/nvm.sh" ]; then \. "${NVM_DIR}/nvm.sh" && nvm install && nvm use; fi && \
|
||||
NODE_OPTIONS=--openssl-legacy-provider yarn build
|
||||
|
||||
build-static-istanbul-coverage:
|
||||
@echo "Building frontend static assets to 'build'"
|
||||
@if [ -f "${NVM_DIR}/nvm.sh" ]; then \. "${NVM_DIR}/nvm.sh" && nvm install && nvm use; fi && \
|
||||
NODE_OPTIONS=--openssl-legacy-provider yarn buildistanbulcoverage
|
||||
|
||||
test-warnings:
|
||||
./check-warnings.sh
|
||||
|
||||
test-prettier:
|
||||
./check-prettier.sh
|
||||
|
||||
find-deadcode:
|
||||
./check-deadcode.sh
|
||||
|
||||
prettify:
|
||||
yarn prettier --write . --loglevel warn
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||
|
||||
Requirements: `yarn` and [node](https://nodejs.org/en/download)
|
||||
|
||||
## Available Scripts
|
||||
|
||||
In the project directory, you can run:
|
||||
In the `/portal-ui` directory, you can run:
|
||||
|
||||
### `yarn start`
|
||||
|
||||
@@ -12,6 +14,8 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||
The page will reload if you make edits.<br />
|
||||
You will also see any lint errors in the console.
|
||||
|
||||
> Note: If it's the first time running `yarn`, you might need to run `yarn install` before the `start` command.
|
||||
|
||||
### `yarn test`
|
||||
|
||||
Launches the test runner in the interactive watch mode.<br />
|
||||
|
||||
@@ -1,123 +1,124 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "./static/css/main.57e739f5.css",
|
||||
"main.js": "./static/js/main.ebbcb389.js",
|
||||
"main.css": "./static/css/main.02c1b6fd.css",
|
||||
"main.js": "./static/js/main.72f8505e.js",
|
||||
"static/js/1260.a025e586.chunk.js": "./static/js/1260.a025e586.chunk.js",
|
||||
"static/js/6914.8835970e.chunk.js": "./static/js/6914.8835970e.chunk.js",
|
||||
"static/js/9121.4999947f.chunk.js": "./static/js/9121.4999947f.chunk.js",
|
||||
"static/js/1829.4291766b.chunk.js": "./static/js/1829.4291766b.chunk.js",
|
||||
"static/js/6272.11d7337f.chunk.js": "./static/js/6272.11d7337f.chunk.js",
|
||||
"static/js/5088.00beec7c.chunk.js": "./static/js/5088.00beec7c.chunk.js",
|
||||
"static/js/6122.e4ffcf6b.chunk.js": "./static/js/6122.e4ffcf6b.chunk.js",
|
||||
"static/js/628.0ae012b8.chunk.js": "./static/js/628.0ae012b8.chunk.js",
|
||||
"static/js/1380.f9c018ec.chunk.js": "./static/js/1380.f9c018ec.chunk.js",
|
||||
"static/js/9635.4c87b735.chunk.js": "./static/js/9635.4c87b735.chunk.js",
|
||||
"static/js/2338.53498b12.chunk.js": "./static/js/2338.53498b12.chunk.js",
|
||||
"static/js/4335.edd9cf5e.chunk.js": "./static/js/4335.edd9cf5e.chunk.js",
|
||||
"static/js/8521.5c1c6d31.chunk.js": "./static/js/8521.5c1c6d31.chunk.js",
|
||||
"static/js/3543.03eba0f5.chunk.js": "./static/js/3543.03eba0f5.chunk.js",
|
||||
"static/js/4061.1db80a47.chunk.js": "./static/js/4061.1db80a47.chunk.js",
|
||||
"static/js/3067.9e44162a.chunk.js": "./static/js/3067.9e44162a.chunk.js",
|
||||
"static/js/2637.eab4cad8.chunk.js": "./static/js/2637.eab4cad8.chunk.js",
|
||||
"static/css/5370.3279acb8.chunk.css": "./static/css/5370.3279acb8.chunk.css",
|
||||
"static/js/5370.9576aa21.chunk.js": "./static/js/5370.9576aa21.chunk.js",
|
||||
"static/js/701.ab3ceba2.chunk.js": "./static/js/701.ab3ceba2.chunk.js",
|
||||
"static/js/7821.5a87cfb0.chunk.js": "./static/js/7821.5a87cfb0.chunk.js",
|
||||
"static/css/284.3279acb8.chunk.css": "./static/css/284.3279acb8.chunk.css",
|
||||
"static/js/284.f9dbc9d8.chunk.js": "./static/js/284.f9dbc9d8.chunk.js",
|
||||
"static/js/8388.fd34271e.chunk.js": "./static/js/8388.fd34271e.chunk.js",
|
||||
"static/css/6593.3279acb8.chunk.css": "./static/css/6593.3279acb8.chunk.css",
|
||||
"static/js/6593.f09d945f.chunk.js": "./static/js/6593.f09d945f.chunk.js",
|
||||
"static/css/2433.3279acb8.chunk.css": "./static/css/2433.3279acb8.chunk.css",
|
||||
"static/js/2433.cd24fabf.chunk.js": "./static/js/2433.cd24fabf.chunk.js",
|
||||
"static/css/1195.3279acb8.chunk.css": "./static/css/1195.3279acb8.chunk.css",
|
||||
"static/js/1195.8483f929.chunk.js": "./static/js/1195.8483f929.chunk.js",
|
||||
"static/js/191.b50b4104.chunk.js": "./static/js/191.b50b4104.chunk.js",
|
||||
"static/js/1329.98d80e22.chunk.js": "./static/js/1329.98d80e22.chunk.js",
|
||||
"static/js/7614.527036f5.chunk.js": "./static/js/7614.527036f5.chunk.js",
|
||||
"static/js/1690.4e6b342c.chunk.js": "./static/js/1690.4e6b342c.chunk.js",
|
||||
"static/js/6491.83aa26f7.chunk.js": "./static/js/6491.83aa26f7.chunk.js",
|
||||
"static/js/4902.f064f175.chunk.js": "./static/js/4902.f064f175.chunk.js",
|
||||
"static/js/1432.c59f4621.chunk.js": "./static/js/1432.c59f4621.chunk.js",
|
||||
"static/js/3171.6750e8c7.chunk.js": "./static/js/3171.6750e8c7.chunk.js",
|
||||
"static/js/8360.bb4fd800.chunk.js": "./static/js/8360.bb4fd800.chunk.js",
|
||||
"static/js/6577.4b3c8b41.chunk.js": "./static/js/6577.4b3c8b41.chunk.js",
|
||||
"static/js/3875.5db2c08f.chunk.js": "./static/js/3875.5db2c08f.chunk.js",
|
||||
"static/js/3115.da3a98f3.chunk.js": "./static/js/3115.da3a98f3.chunk.js",
|
||||
"static/js/5522.9c77c391.chunk.js": "./static/js/5522.9c77c391.chunk.js",
|
||||
"static/js/977.4c29a863.chunk.js": "./static/js/977.4c29a863.chunk.js",
|
||||
"static/js/6686.ede27280.chunk.js": "./static/js/6686.ede27280.chunk.js",
|
||||
"static/js/9059.155bb503.chunk.js": "./static/js/9059.155bb503.chunk.js",
|
||||
"static/js/3819.5ec91bdd.chunk.js": "./static/js/3819.5ec91bdd.chunk.js",
|
||||
"static/js/6247.af0fb000.chunk.js": "./static/js/6247.af0fb000.chunk.js",
|
||||
"static/js/4414.ff5f95b9.chunk.js": "./static/js/4414.ff5f95b9.chunk.js",
|
||||
"static/js/8833.4ba5da15.chunk.js": "./static/js/8833.4ba5da15.chunk.js",
|
||||
"static/js/1516.d1e7e873.chunk.js": "./static/js/1516.d1e7e873.chunk.js",
|
||||
"static/js/483.b039dcc0.chunk.js": "./static/js/483.b039dcc0.chunk.js",
|
||||
"static/js/4114.9ce1a962.chunk.js": "./static/js/4114.9ce1a962.chunk.js",
|
||||
"static/js/6895.143165e2.chunk.js": "./static/js/6895.143165e2.chunk.js",
|
||||
"static/js/4874.41a5c449.chunk.js": "./static/js/4874.41a5c449.chunk.js",
|
||||
"static/css/2050.3279acb8.chunk.css": "./static/css/2050.3279acb8.chunk.css",
|
||||
"static/js/2050.b9acf1f9.chunk.js": "./static/js/2050.b9acf1f9.chunk.js",
|
||||
"static/js/3956.9207ef85.chunk.js": "./static/js/3956.9207ef85.chunk.js",
|
||||
"static/js/9221.983fd268.chunk.js": "./static/js/9221.983fd268.chunk.js",
|
||||
"static/js/8896.ff4564b8.chunk.js": "./static/js/8896.ff4564b8.chunk.js",
|
||||
"static/js/9134.9753fc42.chunk.js": "./static/js/9134.9753fc42.chunk.js",
|
||||
"static/js/5223.650cfa3e.chunk.js": "./static/js/5223.650cfa3e.chunk.js",
|
||||
"static/js/5661.7b56bafe.chunk.js": "./static/js/5661.7b56bafe.chunk.js",
|
||||
"static/js/7134.6765e5b6.chunk.js": "./static/js/7134.6765e5b6.chunk.js",
|
||||
"static/js/3034.d036146c.chunk.js": "./static/js/3034.d036146c.chunk.js",
|
||||
"static/css/8925.3279acb8.chunk.css": "./static/css/8925.3279acb8.chunk.css",
|
||||
"static/js/8925.e3d0dd77.chunk.js": "./static/js/8925.e3d0dd77.chunk.js",
|
||||
"static/js/711.a5499cb1.chunk.js": "./static/js/711.a5499cb1.chunk.js",
|
||||
"static/js/6901.79047196.chunk.js": "./static/js/6901.79047196.chunk.js",
|
||||
"static/js/2185.4db0ed3d.chunk.js": "./static/js/2185.4db0ed3d.chunk.js",
|
||||
"static/js/9968.e06e8995.chunk.js": "./static/js/9968.e06e8995.chunk.js",
|
||||
"static/js/7494.3579143d.chunk.js": "./static/js/7494.3579143d.chunk.js",
|
||||
"static/js/4738.9e3d5260.chunk.js": "./static/js/4738.9e3d5260.chunk.js",
|
||||
"static/js/9918.7eee2adc.chunk.js": "./static/js/9918.7eee2adc.chunk.js",
|
||||
"static/js/5702.fa73d842.chunk.js": "./static/js/5702.fa73d842.chunk.js",
|
||||
"static/js/2512.f29a3687.chunk.js": "./static/js/2512.f29a3687.chunk.js",
|
||||
"static/js/51.b4820ff4.chunk.js": "./static/js/51.b4820ff4.chunk.js",
|
||||
"static/js/312.71a85ec1.chunk.js": "./static/js/312.71a85ec1.chunk.js",
|
||||
"static/js/2032.d32831e1.chunk.js": "./static/js/2032.d32831e1.chunk.js",
|
||||
"static/js/4619.000c3900.chunk.js": "./static/js/4619.000c3900.chunk.js",
|
||||
"static/js/8990.d6246293.chunk.js": "./static/js/8990.d6246293.chunk.js",
|
||||
"static/js/8455.de8a804d.chunk.js": "./static/js/8455.de8a804d.chunk.js",
|
||||
"static/css/7233.3279acb8.chunk.css": "./static/css/7233.3279acb8.chunk.css",
|
||||
"static/js/7233.38b9bfcf.chunk.js": "./static/js/7233.38b9bfcf.chunk.js",
|
||||
"static/js/1604.8a9dcedd.chunk.js": "./static/js/1604.8a9dcedd.chunk.js",
|
||||
"static/js/9952.dc18fe46.chunk.js": "./static/js/9952.dc18fe46.chunk.js",
|
||||
"static/js/402.4bb1d687.chunk.js": "./static/js/402.4bb1d687.chunk.js",
|
||||
"static/js/1705.27697aac.chunk.js": "./static/js/1705.27697aac.chunk.js",
|
||||
"static/js/1581.e0b40512.chunk.js": "./static/js/1581.e0b40512.chunk.js",
|
||||
"static/js/455.12104f9c.chunk.js": "./static/js/455.12104f9c.chunk.js",
|
||||
"static/js/2921.f2282e66.chunk.js": "./static/js/2921.f2282e66.chunk.js",
|
||||
"static/js/889.7aba45d8.chunk.js": "./static/js/889.7aba45d8.chunk.js",
|
||||
"static/js/9088.e68839ae.chunk.js": "./static/js/9088.e68839ae.chunk.js",
|
||||
"static/js/247.5fb5050b.chunk.js": "./static/js/247.5fb5050b.chunk.js",
|
||||
"static/js/2763.a0e53c20.chunk.js": "./static/js/2763.a0e53c20.chunk.js",
|
||||
"static/js/3691.cec964f8.chunk.js": "./static/js/3691.cec964f8.chunk.js",
|
||||
"static/js/6481.c1e3d223.chunk.js": "./static/js/6481.c1e3d223.chunk.js",
|
||||
"static/js/1520.6ee7f5c9.chunk.js": "./static/js/1520.6ee7f5c9.chunk.js",
|
||||
"static/js/3682.3b92900e.chunk.js": "./static/js/3682.3b92900e.chunk.js",
|
||||
"static/js/1918.b61ed655.chunk.js": "./static/js/1918.b61ed655.chunk.js",
|
||||
"static/js/9683.1e217b9a.chunk.js": "./static/js/9683.1e217b9a.chunk.js",
|
||||
"static/js/6914.9ab32297.chunk.js": "./static/js/6914.9ab32297.chunk.js",
|
||||
"static/js/9121.0c08c03c.chunk.js": "./static/js/9121.0c08c03c.chunk.js",
|
||||
"static/js/1829.0e821c64.chunk.js": "./static/js/1829.0e821c64.chunk.js",
|
||||
"static/js/6272.3c9cfd32.chunk.js": "./static/js/6272.3c9cfd32.chunk.js",
|
||||
"static/js/5088.8ed4fd39.chunk.js": "./static/js/5088.8ed4fd39.chunk.js",
|
||||
"static/js/6122.8195a695.chunk.js": "./static/js/6122.8195a695.chunk.js",
|
||||
"static/js/808.0827cf07.chunk.js": "./static/js/808.0827cf07.chunk.js",
|
||||
"static/js/8060.060ad94e.chunk.js": "./static/js/8060.060ad94e.chunk.js",
|
||||
"static/js/9635.de2db92c.chunk.js": "./static/js/9635.de2db92c.chunk.js",
|
||||
"static/js/2338.f2a282fa.chunk.js": "./static/js/2338.f2a282fa.chunk.js",
|
||||
"static/js/4335.1ddacb73.chunk.js": "./static/js/4335.1ddacb73.chunk.js",
|
||||
"static/js/9390.ea2a39c3.chunk.js": "./static/js/9390.ea2a39c3.chunk.js",
|
||||
"static/js/3543.be1d6ea8.chunk.js": "./static/js/3543.be1d6ea8.chunk.js",
|
||||
"static/js/2074.7e79443f.chunk.js": "./static/js/2074.7e79443f.chunk.js",
|
||||
"static/js/3067.56476c2f.chunk.js": "./static/js/3067.56476c2f.chunk.js",
|
||||
"static/js/2637.be6faba9.chunk.js": "./static/js/2637.be6faba9.chunk.js",
|
||||
"static/js/5962.5aaa4901.chunk.js": "./static/js/5962.5aaa4901.chunk.js",
|
||||
"static/js/701.13e798d1.chunk.js": "./static/js/701.13e798d1.chunk.js",
|
||||
"static/js/7821.12244c04.chunk.js": "./static/js/7821.12244c04.chunk.js",
|
||||
"static/js/2545.ffac2fbb.chunk.js": "./static/js/2545.ffac2fbb.chunk.js",
|
||||
"static/js/4131.8f58d53d.chunk.js": "./static/js/4131.8f58d53d.chunk.js",
|
||||
"static/js/4065.506dd294.chunk.js": "./static/js/4065.506dd294.chunk.js",
|
||||
"static/js/5935.edc7edfc.chunk.js": "./static/js/5935.edc7edfc.chunk.js",
|
||||
"static/js/4563.121b75a9.chunk.js": "./static/js/4563.121b75a9.chunk.js",
|
||||
"static/js/191.fd21cdcc.chunk.js": "./static/js/191.fd21cdcc.chunk.js",
|
||||
"static/js/1329.79996c21.chunk.js": "./static/js/1329.79996c21.chunk.js",
|
||||
"static/js/7614.ec6383d7.chunk.js": "./static/js/7614.ec6383d7.chunk.js",
|
||||
"static/js/1690.fa631de9.chunk.js": "./static/js/1690.fa631de9.chunk.js",
|
||||
"static/js/6491.de57d3e6.chunk.js": "./static/js/6491.de57d3e6.chunk.js",
|
||||
"static/js/4902.ded1f1f5.chunk.js": "./static/js/4902.ded1f1f5.chunk.js",
|
||||
"static/js/841.31434f9c.chunk.js": "./static/js/841.31434f9c.chunk.js",
|
||||
"static/js/3171.5a1ef12c.chunk.js": "./static/js/3171.5a1ef12c.chunk.js",
|
||||
"static/js/8360.965868c4.chunk.js": "./static/js/8360.965868c4.chunk.js",
|
||||
"static/js/6577.d4559543.chunk.js": "./static/js/6577.d4559543.chunk.js",
|
||||
"static/js/3875.b530d1e3.chunk.js": "./static/js/3875.b530d1e3.chunk.js",
|
||||
"static/js/3115.f9b2e7fc.chunk.js": "./static/js/3115.f9b2e7fc.chunk.js",
|
||||
"static/js/2603.19110315.chunk.js": "./static/js/2603.19110315.chunk.js",
|
||||
"static/js/977.7dc10141.chunk.js": "./static/js/977.7dc10141.chunk.js",
|
||||
"static/js/6686.0c756aaf.chunk.js": "./static/js/6686.0c756aaf.chunk.js",
|
||||
"static/js/6158.62f2536c.chunk.js": "./static/js/6158.62f2536c.chunk.js",
|
||||
"static/js/738.eed2fa45.chunk.js": "./static/js/738.eed2fa45.chunk.js",
|
||||
"static/js/8305.b35690ca.chunk.js": "./static/js/8305.b35690ca.chunk.js",
|
||||
"static/js/4414.930d89fc.chunk.js": "./static/js/4414.930d89fc.chunk.js",
|
||||
"static/js/8833.27a34b4e.chunk.js": "./static/js/8833.27a34b4e.chunk.js",
|
||||
"static/js/1516.67512c50.chunk.js": "./static/js/1516.67512c50.chunk.js",
|
||||
"static/js/483.f00aef93.chunk.js": "./static/js/483.f00aef93.chunk.js",
|
||||
"static/js/8045.40b15543.chunk.js": "./static/js/8045.40b15543.chunk.js",
|
||||
"static/js/6895.26443f5f.chunk.js": "./static/js/6895.26443f5f.chunk.js",
|
||||
"static/js/4874.157a2b95.chunk.js": "./static/js/4874.157a2b95.chunk.js",
|
||||
"static/js/1191.6a8f1e3d.chunk.js": "./static/js/1191.6a8f1e3d.chunk.js",
|
||||
"static/js/3956.27299d66.chunk.js": "./static/js/3956.27299d66.chunk.js",
|
||||
"static/js/9221.ef026a1e.chunk.js": "./static/js/9221.ef026a1e.chunk.js",
|
||||
"static/js/8896.ef691d94.chunk.js": "./static/js/8896.ef691d94.chunk.js",
|
||||
"static/js/9134.a8ccdcdb.chunk.js": "./static/js/9134.a8ccdcdb.chunk.js",
|
||||
"static/js/5223.d053b523.chunk.js": "./static/js/5223.d053b523.chunk.js",
|
||||
"static/js/6171.621123fe.chunk.js": "./static/js/6171.621123fe.chunk.js",
|
||||
"static/js/7134.5516568a.chunk.js": "./static/js/7134.5516568a.chunk.js",
|
||||
"static/js/3034.18978581.chunk.js": "./static/js/3034.18978581.chunk.js",
|
||||
"static/js/3138.36694643.chunk.js": "./static/js/3138.36694643.chunk.js",
|
||||
"static/js/711.aec34a54.chunk.js": "./static/js/711.aec34a54.chunk.js",
|
||||
"static/js/6901.ec452642.chunk.js": "./static/js/6901.ec452642.chunk.js",
|
||||
"static/js/2185.1940263e.chunk.js": "./static/js/2185.1940263e.chunk.js",
|
||||
"static/js/9968.741ebf65.chunk.js": "./static/js/9968.741ebf65.chunk.js",
|
||||
"static/js/7494.bad4da61.chunk.js": "./static/js/7494.bad4da61.chunk.js",
|
||||
"static/js/4738.0bbac05c.chunk.js": "./static/js/4738.0bbac05c.chunk.js",
|
||||
"static/js/3989.d6c1eb51.chunk.js": "./static/js/3989.d6c1eb51.chunk.js",
|
||||
"static/js/5702.6a08188b.chunk.js": "./static/js/5702.6a08188b.chunk.js",
|
||||
"static/js/5759.47541c57.chunk.js": "./static/js/5759.47541c57.chunk.js",
|
||||
"static/js/51.8430c021.chunk.js": "./static/js/51.8430c021.chunk.js",
|
||||
"static/js/312.04cab7e8.chunk.js": "./static/js/312.04cab7e8.chunk.js",
|
||||
"static/js/2032.54dedb37.chunk.js": "./static/js/2032.54dedb37.chunk.js",
|
||||
"static/js/4619.1535ff32.chunk.js": "./static/js/4619.1535ff32.chunk.js",
|
||||
"static/js/8990.17dc8411.chunk.js": "./static/js/8990.17dc8411.chunk.js",
|
||||
"static/js/8455.97773e2f.chunk.js": "./static/js/8455.97773e2f.chunk.js",
|
||||
"static/js/3690.b6d7d3b6.chunk.js": "./static/js/3690.b6d7d3b6.chunk.js",
|
||||
"static/js/1604.2dfa540d.chunk.js": "./static/js/1604.2dfa540d.chunk.js",
|
||||
"static/js/9952.e9660829.chunk.js": "./static/js/9952.e9660829.chunk.js",
|
||||
"static/js/402.b31b43fa.chunk.js": "./static/js/402.b31b43fa.chunk.js",
|
||||
"static/js/1705.a54c5659.chunk.js": "./static/js/1705.a54c5659.chunk.js",
|
||||
"static/js/1581.a911ee27.chunk.js": "./static/js/1581.a911ee27.chunk.js",
|
||||
"static/js/455.3198900d.chunk.js": "./static/js/455.3198900d.chunk.js",
|
||||
"static/js/2661.7ae2f0e2.chunk.js": "./static/js/2661.7ae2f0e2.chunk.js",
|
||||
"static/js/3509.f3bae3cd.chunk.js": "./static/js/3509.f3bae3cd.chunk.js",
|
||||
"static/js/889.c7eff573.chunk.js": "./static/js/889.c7eff573.chunk.js",
|
||||
"static/js/9088.9dd285c2.chunk.js": "./static/js/9088.9dd285c2.chunk.js",
|
||||
"static/js/247.2a7f8e21.chunk.js": "./static/js/247.2a7f8e21.chunk.js",
|
||||
"static/js/2763.8a8f4e01.chunk.js": "./static/js/2763.8a8f4e01.chunk.js",
|
||||
"static/js/5473.5690bac9.chunk.js": "./static/js/5473.5690bac9.chunk.js",
|
||||
"static/js/1715.b85c256f.chunk.js": "./static/js/1715.b85c256f.chunk.js",
|
||||
"static/js/5994.6d90bd33.chunk.js": "./static/js/5994.6d90bd33.chunk.js",
|
||||
"static/js/7391.c53687b2.chunk.js": "./static/js/7391.c53687b2.chunk.js",
|
||||
"static/js/7564.37011454.chunk.js": "./static/js/7564.37011454.chunk.js",
|
||||
"static/js/9518.d8f8ed8b.chunk.js": "./static/js/9518.d8f8ed8b.chunk.js",
|
||||
"static/js/7847.234cbf0e.chunk.js": "./static/js/7847.234cbf0e.chunk.js",
|
||||
"static/js/225.a62217d0.chunk.js": "./static/js/225.a62217d0.chunk.js",
|
||||
"static/js/9897.6cbb5c3f.chunk.js": "./static/js/9897.6cbb5c3f.chunk.js",
|
||||
"static/js/601.0071eb88.chunk.js": "./static/js/601.0071eb88.chunk.js",
|
||||
"static/js/5739.ccea8dc9.chunk.js": "./static/js/5739.ccea8dc9.chunk.js",
|
||||
"static/js/4884.a13f2bb5.chunk.js": "./static/js/4884.a13f2bb5.chunk.js",
|
||||
"static/js/4882.9c5a4b90.chunk.js": "./static/js/4882.9c5a4b90.chunk.js",
|
||||
"static/js/134.117c7fbe.chunk.js": "./static/js/134.117c7fbe.chunk.js",
|
||||
"static/js/3801.e125737d.chunk.js": "./static/js/3801.e125737d.chunk.js",
|
||||
"static/js/601.6e9a5467.chunk.js": "./static/js/601.6e9a5467.chunk.js",
|
||||
"static/js/9414.12ffc9ac.chunk.js": "./static/js/9414.12ffc9ac.chunk.js",
|
||||
"static/js/8265.a7f4cd6e.chunk.js": "./static/js/8265.a7f4cd6e.chunk.js",
|
||||
"static/js/5284.fba0c13b.chunk.js": "./static/js/5284.fba0c13b.chunk.js",
|
||||
"static/js/6315.3238dd2e.chunk.js": "./static/js/6315.3238dd2e.chunk.js",
|
||||
"static/js/8766.5d6104c6.chunk.js": "./static/js/8766.5d6104c6.chunk.js",
|
||||
"static/js/6503.67a16b55.chunk.js": "./static/js/6503.67a16b55.chunk.js",
|
||||
"static/js/6169.e0c2c6d2.chunk.js": "./static/js/6169.e0c2c6d2.chunk.js",
|
||||
"static/js/8968.3926ed4d.chunk.js": "./static/js/8968.3926ed4d.chunk.js",
|
||||
"static/js/7986.faa0de32.chunk.js": "./static/js/7986.faa0de32.chunk.js",
|
||||
"static/js/1803.10c741c8.chunk.js": "./static/js/1803.10c741c8.chunk.js",
|
||||
"static/js/6662.34c547c9.chunk.js": "./static/js/6662.34c547c9.chunk.js",
|
||||
"static/js/91.66e7e796.chunk.js": "./static/js/91.66e7e796.chunk.js",
|
||||
"static/js/6037.b6c7485d.chunk.js": "./static/js/6037.b6c7485d.chunk.js",
|
||||
"static/js/5515.a73ad9ea.chunk.js": "./static/js/5515.a73ad9ea.chunk.js",
|
||||
"static/js/9062.9dba9f0e.chunk.js": "./static/js/9062.9dba9f0e.chunk.js",
|
||||
"static/js/6624.237b6430.chunk.js": "./static/js/6624.237b6430.chunk.js",
|
||||
"static/js/8098.86babd6f.chunk.js": "./static/js/8098.86babd6f.chunk.js",
|
||||
"static/js/2791.a64fa77e.chunk.js": "./static/js/2791.a64fa77e.chunk.js",
|
||||
"static/js/7981.b08cd322.chunk.js": "./static/js/7981.b08cd322.chunk.js",
|
||||
"static/js/9581.35e0c780.chunk.js": "./static/js/9581.35e0c780.chunk.js",
|
||||
"static/js/9817.d6ea67be.chunk.js": "./static/js/9817.d6ea67be.chunk.js",
|
||||
"static/js/8831.4150b126.chunk.js": "./static/js/8831.4150b126.chunk.js",
|
||||
"static/js/3203.d42c8f43.chunk.js": "./static/js/3203.d42c8f43.chunk.js",
|
||||
"static/js/5442.657ff257.chunk.js": "./static/js/5442.657ff257.chunk.js",
|
||||
"static/js/3554.597b92f6.chunk.js": "./static/js/3554.597b92f6.chunk.js",
|
||||
"static/js/2983.24d52eba.chunk.js": "./static/js/2983.24d52eba.chunk.js",
|
||||
"static/js/8308.24f46a88.chunk.js": "./static/js/8308.24f46a88.chunk.js",
|
||||
"static/media/videoBG.mp4": "./static/media/videoBG.17363418b3c2246a0e27.mp4",
|
||||
"static/media/loginAnimationPoster.png": "./static/media/loginAnimationPoster.9aa924bfe619e71d5d29.png",
|
||||
"static/media/Inter-BoldItalic.woff": "./static/media/Inter-BoldItalic.b376885042f6c961a541.woff",
|
||||
@@ -138,128 +139,130 @@
|
||||
"static/media/Inter-Black.woff2": "./static/media/Inter-Black.15ca31c0a2a68f76d2d1.woff2",
|
||||
"static/media/Inter-Thin.woff2": "./static/media/Inter-Thin.fff2a096db014f6239d4.woff2",
|
||||
"static/media/Inter-Regular.woff2": "./static/media/Inter-Regular.c8ba52b05a9ef10f4758.woff2",
|
||||
"static/media/placeholderimage.png": "./static/media/placeholderimage.077ea48bd1ef1f4a883f.png",
|
||||
"index.html": "./index.html",
|
||||
"main.57e739f5.css.map": "./static/css/main.57e739f5.css.map",
|
||||
"main.ebbcb389.js.map": "./static/js/main.ebbcb389.js.map",
|
||||
"main.02c1b6fd.css.map": "./static/css/main.02c1b6fd.css.map",
|
||||
"main.72f8505e.js.map": "./static/js/main.72f8505e.js.map",
|
||||
"1260.a025e586.chunk.js.map": "./static/js/1260.a025e586.chunk.js.map",
|
||||
"6914.8835970e.chunk.js.map": "./static/js/6914.8835970e.chunk.js.map",
|
||||
"9121.4999947f.chunk.js.map": "./static/js/9121.4999947f.chunk.js.map",
|
||||
"1829.4291766b.chunk.js.map": "./static/js/1829.4291766b.chunk.js.map",
|
||||
"6272.11d7337f.chunk.js.map": "./static/js/6272.11d7337f.chunk.js.map",
|
||||
"5088.00beec7c.chunk.js.map": "./static/js/5088.00beec7c.chunk.js.map",
|
||||
"6122.e4ffcf6b.chunk.js.map": "./static/js/6122.e4ffcf6b.chunk.js.map",
|
||||
"628.0ae012b8.chunk.js.map": "./static/js/628.0ae012b8.chunk.js.map",
|
||||
"1380.f9c018ec.chunk.js.map": "./static/js/1380.f9c018ec.chunk.js.map",
|
||||
"9635.4c87b735.chunk.js.map": "./static/js/9635.4c87b735.chunk.js.map",
|
||||
"2338.53498b12.chunk.js.map": "./static/js/2338.53498b12.chunk.js.map",
|
||||
"4335.edd9cf5e.chunk.js.map": "./static/js/4335.edd9cf5e.chunk.js.map",
|
||||
"8521.5c1c6d31.chunk.js.map": "./static/js/8521.5c1c6d31.chunk.js.map",
|
||||
"3543.03eba0f5.chunk.js.map": "./static/js/3543.03eba0f5.chunk.js.map",
|
||||
"4061.1db80a47.chunk.js.map": "./static/js/4061.1db80a47.chunk.js.map",
|
||||
"3067.9e44162a.chunk.js.map": "./static/js/3067.9e44162a.chunk.js.map",
|
||||
"2637.eab4cad8.chunk.js.map": "./static/js/2637.eab4cad8.chunk.js.map",
|
||||
"5370.3279acb8.chunk.css.map": "./static/css/5370.3279acb8.chunk.css.map",
|
||||
"5370.9576aa21.chunk.js.map": "./static/js/5370.9576aa21.chunk.js.map",
|
||||
"701.ab3ceba2.chunk.js.map": "./static/js/701.ab3ceba2.chunk.js.map",
|
||||
"7821.5a87cfb0.chunk.js.map": "./static/js/7821.5a87cfb0.chunk.js.map",
|
||||
"284.3279acb8.chunk.css.map": "./static/css/284.3279acb8.chunk.css.map",
|
||||
"284.f9dbc9d8.chunk.js.map": "./static/js/284.f9dbc9d8.chunk.js.map",
|
||||
"8388.fd34271e.chunk.js.map": "./static/js/8388.fd34271e.chunk.js.map",
|
||||
"6593.3279acb8.chunk.css.map": "./static/css/6593.3279acb8.chunk.css.map",
|
||||
"6593.f09d945f.chunk.js.map": "./static/js/6593.f09d945f.chunk.js.map",
|
||||
"2433.3279acb8.chunk.css.map": "./static/css/2433.3279acb8.chunk.css.map",
|
||||
"2433.cd24fabf.chunk.js.map": "./static/js/2433.cd24fabf.chunk.js.map",
|
||||
"1195.3279acb8.chunk.css.map": "./static/css/1195.3279acb8.chunk.css.map",
|
||||
"1195.8483f929.chunk.js.map": "./static/js/1195.8483f929.chunk.js.map",
|
||||
"191.b50b4104.chunk.js.map": "./static/js/191.b50b4104.chunk.js.map",
|
||||
"1329.98d80e22.chunk.js.map": "./static/js/1329.98d80e22.chunk.js.map",
|
||||
"7614.527036f5.chunk.js.map": "./static/js/7614.527036f5.chunk.js.map",
|
||||
"1690.4e6b342c.chunk.js.map": "./static/js/1690.4e6b342c.chunk.js.map",
|
||||
"6491.83aa26f7.chunk.js.map": "./static/js/6491.83aa26f7.chunk.js.map",
|
||||
"4902.f064f175.chunk.js.map": "./static/js/4902.f064f175.chunk.js.map",
|
||||
"1432.c59f4621.chunk.js.map": "./static/js/1432.c59f4621.chunk.js.map",
|
||||
"3171.6750e8c7.chunk.js.map": "./static/js/3171.6750e8c7.chunk.js.map",
|
||||
"8360.bb4fd800.chunk.js.map": "./static/js/8360.bb4fd800.chunk.js.map",
|
||||
"6577.4b3c8b41.chunk.js.map": "./static/js/6577.4b3c8b41.chunk.js.map",
|
||||
"3875.5db2c08f.chunk.js.map": "./static/js/3875.5db2c08f.chunk.js.map",
|
||||
"3115.da3a98f3.chunk.js.map": "./static/js/3115.da3a98f3.chunk.js.map",
|
||||
"5522.9c77c391.chunk.js.map": "./static/js/5522.9c77c391.chunk.js.map",
|
||||
"977.4c29a863.chunk.js.map": "./static/js/977.4c29a863.chunk.js.map",
|
||||
"6686.ede27280.chunk.js.map": "./static/js/6686.ede27280.chunk.js.map",
|
||||
"9059.155bb503.chunk.js.map": "./static/js/9059.155bb503.chunk.js.map",
|
||||
"3819.5ec91bdd.chunk.js.map": "./static/js/3819.5ec91bdd.chunk.js.map",
|
||||
"6247.af0fb000.chunk.js.map": "./static/js/6247.af0fb000.chunk.js.map",
|
||||
"4414.ff5f95b9.chunk.js.map": "./static/js/4414.ff5f95b9.chunk.js.map",
|
||||
"8833.4ba5da15.chunk.js.map": "./static/js/8833.4ba5da15.chunk.js.map",
|
||||
"1516.d1e7e873.chunk.js.map": "./static/js/1516.d1e7e873.chunk.js.map",
|
||||
"483.b039dcc0.chunk.js.map": "./static/js/483.b039dcc0.chunk.js.map",
|
||||
"4114.9ce1a962.chunk.js.map": "./static/js/4114.9ce1a962.chunk.js.map",
|
||||
"6895.143165e2.chunk.js.map": "./static/js/6895.143165e2.chunk.js.map",
|
||||
"4874.41a5c449.chunk.js.map": "./static/js/4874.41a5c449.chunk.js.map",
|
||||
"2050.3279acb8.chunk.css.map": "./static/css/2050.3279acb8.chunk.css.map",
|
||||
"2050.b9acf1f9.chunk.js.map": "./static/js/2050.b9acf1f9.chunk.js.map",
|
||||
"3956.9207ef85.chunk.js.map": "./static/js/3956.9207ef85.chunk.js.map",
|
||||
"9221.983fd268.chunk.js.map": "./static/js/9221.983fd268.chunk.js.map",
|
||||
"8896.ff4564b8.chunk.js.map": "./static/js/8896.ff4564b8.chunk.js.map",
|
||||
"9134.9753fc42.chunk.js.map": "./static/js/9134.9753fc42.chunk.js.map",
|
||||
"5223.650cfa3e.chunk.js.map": "./static/js/5223.650cfa3e.chunk.js.map",
|
||||
"5661.7b56bafe.chunk.js.map": "./static/js/5661.7b56bafe.chunk.js.map",
|
||||
"7134.6765e5b6.chunk.js.map": "./static/js/7134.6765e5b6.chunk.js.map",
|
||||
"3034.d036146c.chunk.js.map": "./static/js/3034.d036146c.chunk.js.map",
|
||||
"8925.3279acb8.chunk.css.map": "./static/css/8925.3279acb8.chunk.css.map",
|
||||
"8925.e3d0dd77.chunk.js.map": "./static/js/8925.e3d0dd77.chunk.js.map",
|
||||
"711.a5499cb1.chunk.js.map": "./static/js/711.a5499cb1.chunk.js.map",
|
||||
"6901.79047196.chunk.js.map": "./static/js/6901.79047196.chunk.js.map",
|
||||
"2185.4db0ed3d.chunk.js.map": "./static/js/2185.4db0ed3d.chunk.js.map",
|
||||
"9968.e06e8995.chunk.js.map": "./static/js/9968.e06e8995.chunk.js.map",
|
||||
"7494.3579143d.chunk.js.map": "./static/js/7494.3579143d.chunk.js.map",
|
||||
"4738.9e3d5260.chunk.js.map": "./static/js/4738.9e3d5260.chunk.js.map",
|
||||
"9918.7eee2adc.chunk.js.map": "./static/js/9918.7eee2adc.chunk.js.map",
|
||||
"5702.fa73d842.chunk.js.map": "./static/js/5702.fa73d842.chunk.js.map",
|
||||
"2512.f29a3687.chunk.js.map": "./static/js/2512.f29a3687.chunk.js.map",
|
||||
"51.b4820ff4.chunk.js.map": "./static/js/51.b4820ff4.chunk.js.map",
|
||||
"312.71a85ec1.chunk.js.map": "./static/js/312.71a85ec1.chunk.js.map",
|
||||
"2032.d32831e1.chunk.js.map": "./static/js/2032.d32831e1.chunk.js.map",
|
||||
"4619.000c3900.chunk.js.map": "./static/js/4619.000c3900.chunk.js.map",
|
||||
"8990.d6246293.chunk.js.map": "./static/js/8990.d6246293.chunk.js.map",
|
||||
"8455.de8a804d.chunk.js.map": "./static/js/8455.de8a804d.chunk.js.map",
|
||||
"7233.3279acb8.chunk.css.map": "./static/css/7233.3279acb8.chunk.css.map",
|
||||
"7233.38b9bfcf.chunk.js.map": "./static/js/7233.38b9bfcf.chunk.js.map",
|
||||
"1604.8a9dcedd.chunk.js.map": "./static/js/1604.8a9dcedd.chunk.js.map",
|
||||
"9952.dc18fe46.chunk.js.map": "./static/js/9952.dc18fe46.chunk.js.map",
|
||||
"402.4bb1d687.chunk.js.map": "./static/js/402.4bb1d687.chunk.js.map",
|
||||
"1705.27697aac.chunk.js.map": "./static/js/1705.27697aac.chunk.js.map",
|
||||
"1581.e0b40512.chunk.js.map": "./static/js/1581.e0b40512.chunk.js.map",
|
||||
"455.12104f9c.chunk.js.map": "./static/js/455.12104f9c.chunk.js.map",
|
||||
"2921.f2282e66.chunk.js.map": "./static/js/2921.f2282e66.chunk.js.map",
|
||||
"889.7aba45d8.chunk.js.map": "./static/js/889.7aba45d8.chunk.js.map",
|
||||
"9088.e68839ae.chunk.js.map": "./static/js/9088.e68839ae.chunk.js.map",
|
||||
"247.5fb5050b.chunk.js.map": "./static/js/247.5fb5050b.chunk.js.map",
|
||||
"2763.a0e53c20.chunk.js.map": "./static/js/2763.a0e53c20.chunk.js.map",
|
||||
"3691.cec964f8.chunk.js.map": "./static/js/3691.cec964f8.chunk.js.map",
|
||||
"6481.c1e3d223.chunk.js.map": "./static/js/6481.c1e3d223.chunk.js.map",
|
||||
"1520.6ee7f5c9.chunk.js.map": "./static/js/1520.6ee7f5c9.chunk.js.map",
|
||||
"3682.3b92900e.chunk.js.map": "./static/js/3682.3b92900e.chunk.js.map",
|
||||
"1918.b61ed655.chunk.js.map": "./static/js/1918.b61ed655.chunk.js.map",
|
||||
"9683.1e217b9a.chunk.js.map": "./static/js/9683.1e217b9a.chunk.js.map",
|
||||
"6914.9ab32297.chunk.js.map": "./static/js/6914.9ab32297.chunk.js.map",
|
||||
"9121.0c08c03c.chunk.js.map": "./static/js/9121.0c08c03c.chunk.js.map",
|
||||
"1829.0e821c64.chunk.js.map": "./static/js/1829.0e821c64.chunk.js.map",
|
||||
"6272.3c9cfd32.chunk.js.map": "./static/js/6272.3c9cfd32.chunk.js.map",
|
||||
"5088.8ed4fd39.chunk.js.map": "./static/js/5088.8ed4fd39.chunk.js.map",
|
||||
"6122.8195a695.chunk.js.map": "./static/js/6122.8195a695.chunk.js.map",
|
||||
"808.0827cf07.chunk.js.map": "./static/js/808.0827cf07.chunk.js.map",
|
||||
"8060.060ad94e.chunk.js.map": "./static/js/8060.060ad94e.chunk.js.map",
|
||||
"9635.de2db92c.chunk.js.map": "./static/js/9635.de2db92c.chunk.js.map",
|
||||
"2338.f2a282fa.chunk.js.map": "./static/js/2338.f2a282fa.chunk.js.map",
|
||||
"4335.1ddacb73.chunk.js.map": "./static/js/4335.1ddacb73.chunk.js.map",
|
||||
"9390.ea2a39c3.chunk.js.map": "./static/js/9390.ea2a39c3.chunk.js.map",
|
||||
"3543.be1d6ea8.chunk.js.map": "./static/js/3543.be1d6ea8.chunk.js.map",
|
||||
"2074.7e79443f.chunk.js.map": "./static/js/2074.7e79443f.chunk.js.map",
|
||||
"3067.56476c2f.chunk.js.map": "./static/js/3067.56476c2f.chunk.js.map",
|
||||
"2637.be6faba9.chunk.js.map": "./static/js/2637.be6faba9.chunk.js.map",
|
||||
"5962.5aaa4901.chunk.js.map": "./static/js/5962.5aaa4901.chunk.js.map",
|
||||
"701.13e798d1.chunk.js.map": "./static/js/701.13e798d1.chunk.js.map",
|
||||
"7821.12244c04.chunk.js.map": "./static/js/7821.12244c04.chunk.js.map",
|
||||
"2545.ffac2fbb.chunk.js.map": "./static/js/2545.ffac2fbb.chunk.js.map",
|
||||
"4131.8f58d53d.chunk.js.map": "./static/js/4131.8f58d53d.chunk.js.map",
|
||||
"4065.506dd294.chunk.js.map": "./static/js/4065.506dd294.chunk.js.map",
|
||||
"5935.edc7edfc.chunk.js.map": "./static/js/5935.edc7edfc.chunk.js.map",
|
||||
"4563.121b75a9.chunk.js.map": "./static/js/4563.121b75a9.chunk.js.map",
|
||||
"191.fd21cdcc.chunk.js.map": "./static/js/191.fd21cdcc.chunk.js.map",
|
||||
"1329.79996c21.chunk.js.map": "./static/js/1329.79996c21.chunk.js.map",
|
||||
"7614.ec6383d7.chunk.js.map": "./static/js/7614.ec6383d7.chunk.js.map",
|
||||
"1690.fa631de9.chunk.js.map": "./static/js/1690.fa631de9.chunk.js.map",
|
||||
"6491.de57d3e6.chunk.js.map": "./static/js/6491.de57d3e6.chunk.js.map",
|
||||
"4902.ded1f1f5.chunk.js.map": "./static/js/4902.ded1f1f5.chunk.js.map",
|
||||
"841.31434f9c.chunk.js.map": "./static/js/841.31434f9c.chunk.js.map",
|
||||
"3171.5a1ef12c.chunk.js.map": "./static/js/3171.5a1ef12c.chunk.js.map",
|
||||
"8360.965868c4.chunk.js.map": "./static/js/8360.965868c4.chunk.js.map",
|
||||
"6577.d4559543.chunk.js.map": "./static/js/6577.d4559543.chunk.js.map",
|
||||
"3875.b530d1e3.chunk.js.map": "./static/js/3875.b530d1e3.chunk.js.map",
|
||||
"3115.f9b2e7fc.chunk.js.map": "./static/js/3115.f9b2e7fc.chunk.js.map",
|
||||
"2603.19110315.chunk.js.map": "./static/js/2603.19110315.chunk.js.map",
|
||||
"977.7dc10141.chunk.js.map": "./static/js/977.7dc10141.chunk.js.map",
|
||||
"6686.0c756aaf.chunk.js.map": "./static/js/6686.0c756aaf.chunk.js.map",
|
||||
"6158.62f2536c.chunk.js.map": "./static/js/6158.62f2536c.chunk.js.map",
|
||||
"738.eed2fa45.chunk.js.map": "./static/js/738.eed2fa45.chunk.js.map",
|
||||
"8305.b35690ca.chunk.js.map": "./static/js/8305.b35690ca.chunk.js.map",
|
||||
"4414.930d89fc.chunk.js.map": "./static/js/4414.930d89fc.chunk.js.map",
|
||||
"8833.27a34b4e.chunk.js.map": "./static/js/8833.27a34b4e.chunk.js.map",
|
||||
"1516.67512c50.chunk.js.map": "./static/js/1516.67512c50.chunk.js.map",
|
||||
"483.f00aef93.chunk.js.map": "./static/js/483.f00aef93.chunk.js.map",
|
||||
"8045.40b15543.chunk.js.map": "./static/js/8045.40b15543.chunk.js.map",
|
||||
"6895.26443f5f.chunk.js.map": "./static/js/6895.26443f5f.chunk.js.map",
|
||||
"4874.157a2b95.chunk.js.map": "./static/js/4874.157a2b95.chunk.js.map",
|
||||
"1191.6a8f1e3d.chunk.js.map": "./static/js/1191.6a8f1e3d.chunk.js.map",
|
||||
"3956.27299d66.chunk.js.map": "./static/js/3956.27299d66.chunk.js.map",
|
||||
"9221.ef026a1e.chunk.js.map": "./static/js/9221.ef026a1e.chunk.js.map",
|
||||
"8896.ef691d94.chunk.js.map": "./static/js/8896.ef691d94.chunk.js.map",
|
||||
"9134.a8ccdcdb.chunk.js.map": "./static/js/9134.a8ccdcdb.chunk.js.map",
|
||||
"5223.d053b523.chunk.js.map": "./static/js/5223.d053b523.chunk.js.map",
|
||||
"6171.621123fe.chunk.js.map": "./static/js/6171.621123fe.chunk.js.map",
|
||||
"7134.5516568a.chunk.js.map": "./static/js/7134.5516568a.chunk.js.map",
|
||||
"3034.18978581.chunk.js.map": "./static/js/3034.18978581.chunk.js.map",
|
||||
"3138.36694643.chunk.js.map": "./static/js/3138.36694643.chunk.js.map",
|
||||
"711.aec34a54.chunk.js.map": "./static/js/711.aec34a54.chunk.js.map",
|
||||
"6901.ec452642.chunk.js.map": "./static/js/6901.ec452642.chunk.js.map",
|
||||
"2185.1940263e.chunk.js.map": "./static/js/2185.1940263e.chunk.js.map",
|
||||
"9968.741ebf65.chunk.js.map": "./static/js/9968.741ebf65.chunk.js.map",
|
||||
"7494.bad4da61.chunk.js.map": "./static/js/7494.bad4da61.chunk.js.map",
|
||||
"4738.0bbac05c.chunk.js.map": "./static/js/4738.0bbac05c.chunk.js.map",
|
||||
"3989.d6c1eb51.chunk.js.map": "./static/js/3989.d6c1eb51.chunk.js.map",
|
||||
"5702.6a08188b.chunk.js.map": "./static/js/5702.6a08188b.chunk.js.map",
|
||||
"5759.47541c57.chunk.js.map": "./static/js/5759.47541c57.chunk.js.map",
|
||||
"51.8430c021.chunk.js.map": "./static/js/51.8430c021.chunk.js.map",
|
||||
"312.04cab7e8.chunk.js.map": "./static/js/312.04cab7e8.chunk.js.map",
|
||||
"2032.54dedb37.chunk.js.map": "./static/js/2032.54dedb37.chunk.js.map",
|
||||
"4619.1535ff32.chunk.js.map": "./static/js/4619.1535ff32.chunk.js.map",
|
||||
"8990.17dc8411.chunk.js.map": "./static/js/8990.17dc8411.chunk.js.map",
|
||||
"8455.97773e2f.chunk.js.map": "./static/js/8455.97773e2f.chunk.js.map",
|
||||
"3690.b6d7d3b6.chunk.js.map": "./static/js/3690.b6d7d3b6.chunk.js.map",
|
||||
"1604.2dfa540d.chunk.js.map": "./static/js/1604.2dfa540d.chunk.js.map",
|
||||
"9952.e9660829.chunk.js.map": "./static/js/9952.e9660829.chunk.js.map",
|
||||
"402.b31b43fa.chunk.js.map": "./static/js/402.b31b43fa.chunk.js.map",
|
||||
"1705.a54c5659.chunk.js.map": "./static/js/1705.a54c5659.chunk.js.map",
|
||||
"1581.a911ee27.chunk.js.map": "./static/js/1581.a911ee27.chunk.js.map",
|
||||
"455.3198900d.chunk.js.map": "./static/js/455.3198900d.chunk.js.map",
|
||||
"2661.7ae2f0e2.chunk.js.map": "./static/js/2661.7ae2f0e2.chunk.js.map",
|
||||
"3509.f3bae3cd.chunk.js.map": "./static/js/3509.f3bae3cd.chunk.js.map",
|
||||
"889.c7eff573.chunk.js.map": "./static/js/889.c7eff573.chunk.js.map",
|
||||
"9088.9dd285c2.chunk.js.map": "./static/js/9088.9dd285c2.chunk.js.map",
|
||||
"247.2a7f8e21.chunk.js.map": "./static/js/247.2a7f8e21.chunk.js.map",
|
||||
"2763.8a8f4e01.chunk.js.map": "./static/js/2763.8a8f4e01.chunk.js.map",
|
||||
"5473.5690bac9.chunk.js.map": "./static/js/5473.5690bac9.chunk.js.map",
|
||||
"1715.b85c256f.chunk.js.map": "./static/js/1715.b85c256f.chunk.js.map",
|
||||
"5994.6d90bd33.chunk.js.map": "./static/js/5994.6d90bd33.chunk.js.map",
|
||||
"7391.c53687b2.chunk.js.map": "./static/js/7391.c53687b2.chunk.js.map",
|
||||
"7564.37011454.chunk.js.map": "./static/js/7564.37011454.chunk.js.map",
|
||||
"9518.d8f8ed8b.chunk.js.map": "./static/js/9518.d8f8ed8b.chunk.js.map",
|
||||
"7847.234cbf0e.chunk.js.map": "./static/js/7847.234cbf0e.chunk.js.map",
|
||||
"225.a62217d0.chunk.js.map": "./static/js/225.a62217d0.chunk.js.map",
|
||||
"9897.6cbb5c3f.chunk.js.map": "./static/js/9897.6cbb5c3f.chunk.js.map",
|
||||
"601.0071eb88.chunk.js.map": "./static/js/601.0071eb88.chunk.js.map",
|
||||
"5739.ccea8dc9.chunk.js.map": "./static/js/5739.ccea8dc9.chunk.js.map",
|
||||
"4884.a13f2bb5.chunk.js.map": "./static/js/4884.a13f2bb5.chunk.js.map",
|
||||
"4882.9c5a4b90.chunk.js.map": "./static/js/4882.9c5a4b90.chunk.js.map",
|
||||
"134.117c7fbe.chunk.js.map": "./static/js/134.117c7fbe.chunk.js.map",
|
||||
"3801.e125737d.chunk.js.map": "./static/js/3801.e125737d.chunk.js.map",
|
||||
"601.6e9a5467.chunk.js.map": "./static/js/601.6e9a5467.chunk.js.map",
|
||||
"9414.12ffc9ac.chunk.js.map": "./static/js/9414.12ffc9ac.chunk.js.map",
|
||||
"8265.a7f4cd6e.chunk.js.map": "./static/js/8265.a7f4cd6e.chunk.js.map",
|
||||
"5284.fba0c13b.chunk.js.map": "./static/js/5284.fba0c13b.chunk.js.map",
|
||||
"6315.3238dd2e.chunk.js.map": "./static/js/6315.3238dd2e.chunk.js.map",
|
||||
"8766.5d6104c6.chunk.js.map": "./static/js/8766.5d6104c6.chunk.js.map",
|
||||
"6503.67a16b55.chunk.js.map": "./static/js/6503.67a16b55.chunk.js.map",
|
||||
"6169.e0c2c6d2.chunk.js.map": "./static/js/6169.e0c2c6d2.chunk.js.map",
|
||||
"8968.3926ed4d.chunk.js.map": "./static/js/8968.3926ed4d.chunk.js.map",
|
||||
"7986.faa0de32.chunk.js.map": "./static/js/7986.faa0de32.chunk.js.map",
|
||||
"1803.10c741c8.chunk.js.map": "./static/js/1803.10c741c8.chunk.js.map",
|
||||
"6662.34c547c9.chunk.js.map": "./static/js/6662.34c547c9.chunk.js.map",
|
||||
"91.66e7e796.chunk.js.map": "./static/js/91.66e7e796.chunk.js.map",
|
||||
"6037.b6c7485d.chunk.js.map": "./static/js/6037.b6c7485d.chunk.js.map"
|
||||
"5515.a73ad9ea.chunk.js.map": "./static/js/5515.a73ad9ea.chunk.js.map",
|
||||
"9062.9dba9f0e.chunk.js.map": "./static/js/9062.9dba9f0e.chunk.js.map",
|
||||
"6624.237b6430.chunk.js.map": "./static/js/6624.237b6430.chunk.js.map",
|
||||
"8098.86babd6f.chunk.js.map": "./static/js/8098.86babd6f.chunk.js.map",
|
||||
"2791.a64fa77e.chunk.js.map": "./static/js/2791.a64fa77e.chunk.js.map",
|
||||
"7981.b08cd322.chunk.js.map": "./static/js/7981.b08cd322.chunk.js.map",
|
||||
"9581.35e0c780.chunk.js.map": "./static/js/9581.35e0c780.chunk.js.map",
|
||||
"9817.d6ea67be.chunk.js.map": "./static/js/9817.d6ea67be.chunk.js.map",
|
||||
"8831.4150b126.chunk.js.map": "./static/js/8831.4150b126.chunk.js.map",
|
||||
"3203.d42c8f43.chunk.js.map": "./static/js/3203.d42c8f43.chunk.js.map",
|
||||
"5442.657ff257.chunk.js.map": "./static/js/5442.657ff257.chunk.js.map",
|
||||
"3554.597b92f6.chunk.js.map": "./static/js/3554.597b92f6.chunk.js.map",
|
||||
"2983.24d52eba.chunk.js.map": "./static/js/2983.24d52eba.chunk.js.map",
|
||||
"8308.24f46a88.chunk.js.map": "./static/js/8308.24f46a88.chunk.js.map"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.57e739f5.css",
|
||||
"static/js/main.ebbcb389.js"
|
||||
"static/css/main.02c1b6fd.css",
|
||||
"static/js/main.72f8505e.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="apgl"/><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.ebbcb389.js"></script><link href="./static/css/main.57e739f5.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="apgl"/><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.72f8505e.js"></script><link href="./static/css/main.02c1b6fd.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
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
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
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
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
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
File diff suppressed because one or more lines are too long
2
portal-ui/build/static/js/1191.6a8f1e3d.chunk.js
Normal file
2
portal-ui/build/static/js/1191.6a8f1e3d.chunk.js
Normal file
File diff suppressed because one or more lines are too long
1
portal-ui/build/static/js/1191.6a8f1e3d.chunk.js.map
Normal file
1
portal-ui/build/static/js/1191.6a8f1e3d.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
@@ -1 +1 @@
|
||||
{"version":3,"file":"static/js/1260.a025e586.chunk.js","mappings":"yNAuDA,UA7BmB,WACjB,IAAMA,GAAWC,EAAAA,EAAAA,MACXC,GAAWC,EAAAA,EAAAA,MAwBjB,OAvBAC,EAAAA,EAAAA,YAAU,YACO,WACb,IAAMC,EAAgB,YACpBC,EAAAA,EAAAA,MACAN,GAASO,EAAAA,EAAAA,KAAW,IACpBC,aAAaC,QAAQ,eAAgB,IACrCD,aAAaC,QAAQ,gBAAiB,IACtCT,GAASU,EAAAA,EAAAA,OACTR,EAAS,SACX,EACMS,EAAQH,aAAaI,QAAQ,cACnCC,EAAAA,EAAAA,OACU,OAAO,iBAAmB,CAAEF,MAAAA,IACnCG,MAAK,WACJT,GACF,IACCU,OAAM,SAACC,GACNC,QAAQC,IAAIF,GACZX,GACF,GACJ,CACAc,EACF,GAAG,CAACnB,EAAUE,KACPkB,EAAAA,EAAAA,KAACC,EAAAA,EAAgB,GAC1B,C","sources":["screens/LogoutPage/LogoutPage.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see <http://www.gnu.org/licenses/>.\n\nimport React, { useEffect } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useAppDispatch } from \"../../store\";\nimport { ErrorResponseHandler } from \"../../common/types\";\nimport { clearSession } from \"../../common/utils\";\nimport { userLogged } from \"../../systemSlice\";\nimport { resetSession } from \"../Console/consoleSlice\";\nimport api from \"../../common/api\";\nimport LoadingComponent from \"../../common/LoadingComponent\";\n\nconst LogoutPage = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n useEffect(() => {\n const logout = () => {\n const deleteSession = () => {\n clearSession();\n dispatch(userLogged(false));\n localStorage.setItem(\"userLoggedIn\", \"\");\n localStorage.setItem(\"redirect-path\", \"\");\n dispatch(resetSession());\n navigate(`/login`);\n };\n const state = localStorage.getItem(\"auth-state\");\n api\n .invoke(\"POST\", `/api/v1/logout`, { state })\n .then(() => {\n deleteSession();\n })\n .catch((err: ErrorResponseHandler) => {\n console.log(err);\n deleteSession();\n });\n };\n logout();\n }, [dispatch, navigate]);\n return <LoadingComponent />;\n};\n\nexport default LogoutPage;\n"],"names":["dispatch","useAppDispatch","navigate","useNavigate","useEffect","deleteSession","clearSession","userLogged","localStorage","setItem","resetSession","state","getItem","api","then","catch","err","console","log","logout","_jsx","LoadingComponent"],"sourceRoot":""}
|
||||
{"version":3,"file":"static/js/1260.a025e586.chunk.js","mappings":"yNAuDA,UA7BmB,WACjB,IAAMA,GAAWC,EAAAA,EAAAA,MACXC,GAAWC,EAAAA,EAAAA,MAwBjB,OAvBAC,EAAAA,EAAAA,YAAU,YACO,WACb,IAAMC,EAAgB,YACpBC,EAAAA,EAAAA,MACAN,GAASO,EAAAA,EAAAA,KAAW,IACpBC,aAAaC,QAAQ,eAAgB,IACrCD,aAAaC,QAAQ,gBAAiB,IACtCT,GAASU,EAAAA,EAAAA,OACTR,EAAS,SACX,EACMS,EAAQH,aAAaI,QAAQ,cACnCC,EAAAA,EACGC,OAAO,OAAO,iBAAmB,CAAEH,MAAAA,IACnCI,MAAK,WACJV,GACF,IACCW,OAAM,SAACC,GACNC,QAAQC,IAAIF,GACZZ,GACF,GACJ,CACAe,EACF,GAAG,CAACpB,EAAUE,KACPmB,EAAAA,EAAAA,KAACC,EAAAA,EAAgB,GAC1B,C","sources":["screens/LogoutPage/LogoutPage.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see <http://www.gnu.org/licenses/>.\n\nimport React, { useEffect } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useAppDispatch } from \"../../store\";\nimport { ErrorResponseHandler } from \"../../common/types\";\nimport { clearSession } from \"../../common/utils\";\nimport { userLogged } from \"../../systemSlice\";\nimport { resetSession } from \"../Console/consoleSlice\";\nimport api from \"../../common/api\";\nimport LoadingComponent from \"../../common/LoadingComponent\";\n\nconst LogoutPage = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n useEffect(() => {\n const logout = () => {\n const deleteSession = () => {\n clearSession();\n dispatch(userLogged(false));\n localStorage.setItem(\"userLoggedIn\", \"\");\n localStorage.setItem(\"redirect-path\", \"\");\n dispatch(resetSession());\n navigate(`/login`);\n };\n const state = localStorage.getItem(\"auth-state\");\n api\n .invoke(\"POST\", `/api/v1/logout`, { state })\n .then(() => {\n deleteSession();\n })\n .catch((err: ErrorResponseHandler) => {\n console.log(err);\n deleteSession();\n });\n };\n logout();\n }, [dispatch, navigate]);\n return <LoadingComponent />;\n};\n\nexport default LogoutPage;\n"],"names":["dispatch","useAppDispatch","navigate","useNavigate","useEffect","deleteSession","clearSession","userLogged","localStorage","setItem","resetSession","state","getItem","api","invoke","then","catch","err","console","log","logout","_jsx","LoadingComponent"],"sourceRoot":""}
|
||||
2
portal-ui/build/static/js/1329.79996c21.chunk.js
Normal file
2
portal-ui/build/static/js/1329.79996c21.chunk.js
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1329],{51270:function(e,n,t){var i=t(29439),r=t(72791),o=t(29945),s=t(87995),c=t(81551),a=t(9505),u=t(23508),l=t(80184);n.Z=function(e){var n=e.closeDeleteModalAndRefresh,t=e.deleteOpen,d=e.idp,f=e.idpType,p=(0,c.TL)(),x=(0,a.Z)((function(e){n(!0),p((0,s.cN)(!0===e.restart))}),(function(e){return p((0,s.Ih)(e))})),j=(0,i.Z)(x,2),C=j[0],h=j[1];if(!d)return null;var D="_"===d?"Default":d;return(0,l.jsx)(u.Z,{title:"Delete ".concat(D),confirmText:"Delete",isOpen:t,titleIcon:(0,l.jsx)(o.NvT,{}),isLoading:C,onConfirm:function(){h("DELETE","/api/v1/idp/".concat(f,"/").concat(d))},onClose:function(){return n(!1)},confirmButtonProps:{disabled:C},confirmationContent:(0,l.jsxs)(r.Fragment,{children:["Are you sure you want to delete IDP ",(0,l.jsx)("b",{children:D})," ","configuration? ",(0,l.jsx)("br",{})]})})}},31329:function(e,n,t){t.r(n),t.d(n,{default:function(){return Z}});var i=t(72791),r=t(1413),o=t(74165),s=t(15861),c=t(29439),a=t(29945),u=t(57689),l=t(31776),d=t(82342),f=t(81551),p=t(56087),x=t(38442),j=t(87995),C=t(23814),h=t(27454),D=t(51270),m=t(47974),y=t(99670),b=t(80184),F=function(e){var n=e.idpType,t=(0,f.TL)(),F=(0,u.s0)(),Z=(0,i.useState)(!1),_=(0,c.Z)(Z,2),A=_[0],I=_[1],T=(0,i.useState)(""),g=(0,c.Z)(T,2),N=g[0],v=g[1],E=(0,i.useState)(!1),k=(0,c.Z)(E,2),P=k[0],O=k[1],M=(0,i.useState)([]),w=(0,c.Z)(M,2),U=w[0],G=w[1],K=(0,x.F)(p.C3,[p.Ft.ADMIN_CONFIG_UPDATE]),L=(0,x.F)(p.C3,[p.Ft.ADMIN_CONFIG_UPDATE]),S=(0,x.F)(p.C3,[p.Ft.ADMIN_CONFIG_UPDATE]);(0,i.useEffect)((function(){R()}),[]),(0,i.useEffect)((function(){P&&(S?l.h.idp.listConfigurations(n).then((function(e){O(!1),e.data.results&&G(e.data.results.map((function(e){return e.name="_"===e.name?"Default":e.name,e.enabled=!0===e.enabled?"Enabled":"Disabled",e})))})).catch((function(e){O(!1),t((0,j.Ih)((0,d.g)(e.error)))})):O(!1))}),[P,O,G,t,S,n]);var R=function(){O(!0)},B=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:I(!1),n&&R();case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),z=[{type:"view",onClick:function(e){var t="Default"===e.name?"_":e.name;F("/identity/idp/".concat(n,"/configurations/").concat(t))},disableButtonFunction:function(){return!L}},{type:"delete",onClick:function(e){I(!0),v(e="Default"===e?"_":e)},sendOnlyId:!0,disableButtonFunction:function(e){return!K||"Default"===e}}];return(0,i.useEffect)((function(){t((0,j.Sc)("idp_configs"))}),[]),(0,b.jsxs)(i.Fragment,{children:[A&&(0,b.jsx)(D.Z,{deleteOpen:A,idp:N,idpType:n,closeDeleteModalAndRefresh:B}),(0,b.jsx)(m.Z,{label:"".concat(n.toUpperCase()," Configurations"),actions:(0,b.jsx)(y.Z,{})}),(0,b.jsx)(a.Xgh,{children:(0,b.jsxs)(a.rjZ,{container:!0,children:[(0,b.jsxs)(a.rjZ,{item:!0,xs:12,sx:(0,r.Z)((0,r.Z)({},C.OR.actionsTray),{},{justifyContent:"flex-end",gap:8}),children:[(0,b.jsx)(x.s,{scopes:[p.Ft.ADMIN_CONFIG_UPDATE],resource:p.C3,errorProps:{disabled:!0},children:(0,b.jsx)(h.Z,{tooltip:"Refresh",children:(0,b.jsx)(a.zxk,{id:"refresh-keys",variant:"regular",icon:(0,b.jsx)(a.DuK,{}),onClick:function(){return O(!0)}})})}),(0,b.jsx)(x.s,{scopes:[p.Ft.ADMIN_CONFIG_UPDATE],resource:p.C3,errorProps:{disabled:!0},children:(0,b.jsx)(h.Z,{tooltip:"Create ".concat(n," configuration"),children:(0,b.jsx)(a.zxk,{id:"create-idp",label:"Create Configuration",variant:"callAction",icon:(0,b.jsx)(a.dtP,{}),onClick:function(){return F("/identity/idp/".concat(n,"/configurations/add-idp"))}})})})]}),(0,b.jsx)(a.rjZ,{item:!0,xs:12,children:(0,b.jsx)(x.s,{scopes:[p.Ft.ADMIN_CONFIG_UPDATE],resource:p.C3,errorProps:{disabled:!0},children:(0,b.jsx)(a.wQF,{itemActions:z,columns:[{label:"Name",elementKey:"name"},{label:"Type",elementKey:"type"},{label:"Enabled",elementKey:"enabled"}],isLoading:P,records:U,entityName:"Keys",idField:"name"})})})]})})]})},Z=function(){return(0,b.jsx)(F,{idpType:"openid"})}}}]);
|
||||
//# sourceMappingURL=1329.79996c21.chunk.js.map
|
||||
1
portal-ui/build/static/js/1329.79996c21.chunk.js.map
Normal file
1
portal-ui/build/static/js/1329.79996c21.chunk.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1329],{51270:function(e,n,t){var i=t(29439),r=(t(72791),t(51691)),o=t(9505),c=t(23508),s=t(75952),a=t(87995),l=t(81551),u=t(80184);n.Z=function(e){var n=e.closeDeleteModalAndRefresh,t=e.deleteOpen,d=e.idp,f=e.idpType,p=(0,l.TL)(),x=(0,o.Z)((function(e){n(!0),p((0,a.cN)(!0===e.restart))}),(function(e){return p((0,a.Ih)(e))})),C=(0,i.Z)(x,2),m=C[0],h=C[1];if(!d)return null;var D="_"===d?"Default":d;return(0,u.jsx)(c.Z,{title:"Delete ".concat(D),confirmText:"Delete",isOpen:t,titleIcon:(0,u.jsx)(s.NvT,{}),isLoading:m,onConfirm:function(){h("DELETE","/api/v1/idp/".concat(f,"/").concat(d))},onClose:function(){return n(!1)},confirmButtonProps:{disabled:m},confirmationContent:(0,u.jsxs)(r.Z,{children:["Are you sure you want to delete IDP ",(0,u.jsx)("b",{children:D})," ","configuration? ",(0,u.jsx)("br",{})]})})}},31329:function(e,n,t){t.r(n),t.d(n,{default:function(){return _}});var i=t(72791),r=t(74165),o=t(15861),c=t(29439),s=t(1413),a=t(11135),l=t(25787),u=t(81551),d=t(57689),f=t(56087),p=t(38442),x=t(81207),C=t(87995),m=t(74794),h=t(23814),D=t(61889),Z=t(27454),j=t(75952),b=t(92983),y=t(51270),F=t(47974),I=t(80184),N=(0,l.Z)((function(e){return(0,a.Z)((0,s.Z)({},h.Bz))}))((function(e){var n=e.classes,t=e.idpType,s=(0,u.TL)(),a=(0,d.s0)(),l=(0,i.useState)(!1),h=(0,c.Z)(l,2),N=h[0],_=h[1],A=(0,i.useState)(""),T=(0,c.Z)(A,2),v=T[0],P=T[1],g=(0,i.useState)(!1),k=(0,c.Z)(g,2),E=k[0],O=k[1],M=(0,i.useState)([]),G=(0,c.Z)(M,2),U=G[0],w=G[1],L=(0,p.F)(f.C3,[f.Ft.ADMIN_CONFIG_UPDATE]),B=(0,p.F)(f.C3,[f.Ft.ADMIN_CONFIG_UPDATE]),K=(0,p.F)(f.C3,[f.Ft.ADMIN_CONFIG_UPDATE]);(0,i.useEffect)((function(){S()}),[]),(0,i.useEffect)((function(){E&&(K?x.Z.invoke("GET","/api/v1/idp/".concat(t)).then((function(e){O(!1),w(e.results.map((function(e){return e.name="_"===e.name?"Default":e.name,e.enabled=!0===e.enabled?"Enabled":"Disabled",e})))})).catch((function(e){O(!1),s((0,C.Ih)(e))})):O(!1))}),[E,O,w,s,K,t]);var S=function(){O(!0)},z=function(){var e=(0,o.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_(!1),n&&S();case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=[{type:"view",onClick:function(e){var n="Default"===e.name?"_":e.name;a("/identity/idp/".concat(t,"/configurations/").concat(n))},disableButtonFunction:function(){return!B}},{type:"delete",onClick:function(e){_(!0),P(e="Default"===e?"_":e)},sendOnlyId:!0,disableButtonFunction:function(e){return!L||"Default"===e}}];return(0,I.jsxs)(i.Fragment,{children:[N&&(0,I.jsx)(y.Z,{deleteOpen:N,idp:v,idpType:t,closeDeleteModalAndRefresh:z}),(0,I.jsx)(F.Z,{label:"".concat(t.toUpperCase()," Configurations")}),(0,I.jsx)(m.Z,{className:n.pageContainer,children:(0,I.jsxs)(D.ZP,{container:!0,spacing:1,children:[(0,I.jsxs)(D.ZP,{item:!0,xs:12,display:"flex",alignItems:"center",justifyContent:"flex-end",sx:{"& button":{marginLeft:"8px"}},children:[(0,I.jsx)(p.s,{scopes:[f.Ft.ADMIN_CONFIG_UPDATE],resource:f.C3,errorProps:{disabled:!0},children:(0,I.jsx)(Z.Z,{tooltip:"Refresh",children:(0,I.jsx)(j.zxk,{id:"refresh-keys",variant:"regular",icon:(0,I.jsx)(j.DuK,{}),onClick:function(){return O(!0)}})})}),(0,I.jsx)(p.s,{scopes:[f.Ft.ADMIN_CONFIG_UPDATE],resource:f.C3,errorProps:{disabled:!0},children:(0,I.jsx)(Z.Z,{tooltip:"Create ".concat(t," configuration"),children:(0,I.jsx)(j.zxk,{id:"create-idp",label:"Create Configuration",variant:"callAction",icon:(0,I.jsx)(j.dtP,{}),onClick:function(){return a("/identity/idp/".concat(t,"/configurations/add-idp"))}})})})]}),(0,I.jsx)(D.ZP,{item:!0,xs:12,className:n.tableBlock,children:(0,I.jsx)(p.s,{scopes:[f.Ft.ADMIN_CONFIG_UPDATE],resource:f.C3,errorProps:{disabled:!0},children:(0,I.jsx)(b.Z,{itemActions:R,columns:[{label:"Name",elementKey:"name"},{label:"Type",elementKey:"type"},{label:"Enabled",elementKey:"enabled"}],isLoading:E,records:U,entityName:"Keys",idField:"name"})})})]})})]})})),_=function(){return(0,I.jsx)(N,{idpType:"openid"})}}}]);
|
||||
//# sourceMappingURL=1329.98d80e22.chunk.js.map
|
||||
File diff suppressed because one or more lines are too long
2
portal-ui/build/static/js/134.117c7fbe.chunk.js
Normal file
2
portal-ui/build/static/js/134.117c7fbe.chunk.js
Normal file
File diff suppressed because one or more lines are too long
1
portal-ui/build/static/js/134.117c7fbe.chunk.js.map
Normal file
1
portal-ui/build/static/js/134.117c7fbe.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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
portal-ui/build/static/js/1516.67512c50.chunk.js
Normal file
2
portal-ui/build/static/js/1516.67512c50.chunk.js
Normal file
File diff suppressed because one or more lines are too long
1
portal-ui/build/static/js/1516.67512c50.chunk.js.map
Normal file
1
portal-ui/build/static/js/1516.67512c50.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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
portal-ui/build/static/js/1581.a911ee27.chunk.js
Normal file
2
portal-ui/build/static/js/1581.a911ee27.chunk.js
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1581],{1581:function(t,e,n){n.r(e);var a=n(29439),o=n(72791),i=n(29945),u=n(45248),r=n(23814),l=n(56028),c=n(84741),s=n(87995),d=n(81551),f=n(31776),b=n(82342),h=n(40986),v=n(80184);e.default=function(t){var e=t.open,n=t.enabled,x=t.cfg,g=t.selectedBucket,p=t.closeModalAndRefresh,m=(0,d.TL)(),j=(0,o.useState)(!1),k=(0,a.Z)(j,2),Z=k[0],C=k[1],S=(0,o.useState)(!1),q=(0,a.Z)(S,2),z=q[0],_=q[1],y=(0,o.useState)("1"),B=(0,a.Z)(y,2),w=B[0],E=B[1],T=(0,o.useState)("Ti"),F=(0,a.Z)(T,2),O=F[0],Q=F[1],A=(0,o.useState)(!1),I=(0,a.Z)(A,2),L=I[0],P=I[1];(0,o.useEffect)((function(){if(n&&(_(!0),x)){var t=(0,u.Am)(x.quota||0,!0,!1,!0);E(t.total.toString()),Q(t.unit),P(!0)}}),[n,x]),(0,o.useEffect)((function(){P(!z||/^\d*(?:\.\d{1,2})?$/.test(w))}),[z,w]);return(0,v.jsx)(l.Z,{modalOpen:e,onClose:function(){p()},title:"Enable Bucket Quota",titleIcon:(0,v.jsx)(i.Wqw,{}),children:(0,v.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(t){t.preventDefault(),!Z&&L&&f.h.buckets.setBucketQuota(g,{enabled:z,amount:parseInt((0,u.Pw)(w,O,!0)),quota_type:"hard"}).then((function(){C(!1),p()})).catch((function(t){C(!1),m((0,s.zb)((0,b.g)(t.error)))}))},children:(0,v.jsxs)(i.ltY,{withBorders:!1,containerPadding:!1,children:[(0,v.jsx)(i.rsf,{value:"bucket_quota",id:"bucket_quota",name:"bucket_quota",checked:z,onChange:function(t){_(t.target.checked)},label:"Enabled"}),z&&(0,v.jsx)(i.Wzg,{id:"quota_size",name:"quota_size",onChange:function(t){E(t.target.value),t.target.validity.valid?P(!0):P(!1)},label:"Quota",value:w,required:!0,min:"1",overlayObject:(0,v.jsx)(c.Z,{id:"quota_unit",onUnitChange:function(t){Q(t)},unitSelected:O,unitsList:(0,u.zQ)(["Ki"]),disabled:!1}),error:L?"":"Please enter a valid quota"}),(0,v.jsxs)(i.rjZ,{item:!0,xs:12,sx:r.ID.modalButtonBar,children:[(0,v.jsx)(i.zxk,{id:"cancel",type:"button",variant:"regular",disabled:Z,onClick:function(){p()},label:"Cancel"}),(0,v.jsx)(i.zxk,{id:"save",type:"submit",variant:"callAction",disabled:Z||!L,label:"Save"})]}),Z&&(0,v.jsx)(i.rjZ,{item:!0,xs:12,children:(0,v.jsx)(h.Z,{})})]})})})}},84741:function(t,e,n){var a=n(29439),o=n(72791),i=n(11135),u=n(25787),r=n(71715),l=n(77865),c=n(80184);e.Z=(0,u.Z)((function(t){return(0,i.Z)({buttonTrigger:{border:"#F0F2F2 1px solid",borderRadius:3,color:"#838383",backgroundColor:"#fff",fontSize:12}})}))((function(t){var e=t.classes,n=t.id,i=t.unitSelected,u=t.unitsList,s=t.disabled,d=void 0!==s&&s,f=t.onUnitChange,b=o.useState(null),h=(0,a.Z)(b,2),v=h[0],x=h[1],g=Boolean(v),p=function(t){x(null),""!==t&&f&&f(t)};return(0,c.jsxs)(o.Fragment,{children:[(0,c.jsx)("button",{id:"".concat(n,"-button"),"aria-controls":"".concat(n,"-menu"),"aria-haspopup":"true","aria-expanded":g?"true":void 0,onClick:function(t){x(t.currentTarget)},className:e.buttonTrigger,disabled:d,type:"button",children:i}),(0,c.jsx)(r.Z,{id:"".concat(n,"-menu"),"aria-labelledby":"".concat(n,"-button"),anchorEl:v,open:g,onClose:function(){p("")},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:u.map((function(t){return(0,c.jsx)(l.Z,{onClick:function(){return p(t.value)},children:t.label},"itemUnit-".concat(t.value,"-").concat(t.label))}))})]})}))}}]);
|
||||
//# sourceMappingURL=1581.a911ee27.chunk.js.map
|
||||
1
portal-ui/build/static/js/1581.a911ee27.chunk.js.map
Normal file
1
portal-ui/build/static/js/1581.a911ee27.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
2
portal-ui/build/static/js/1604.2dfa540d.chunk.js
Normal file
2
portal-ui/build/static/js/1604.2dfa540d.chunk.js
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1604],{1604:function(e,t,n){n.r(t);var a=n(29439),i=n(72791),o=n(29945),l=n(31776),u=n(66315),r=n(82342),s=n(40986),c=n(23814),d=n(87995),f=n(81551),m=n(56028),b=n(80184);t.default=function(e){var t=e.open,n=e.bucketName,h=e.closeModalAndRefresh,p=(0,f.TL)(),v=(0,i.useState)(!1),g=(0,a.Z)(v,2),x=g[0],y=g[1],C=(0,i.useState)(!0),j=(0,a.Z)(C,2),k=j[0],S=j[1],Z=(0,i.useState)(u.oO.Compliance),R=(0,a.Z)(Z,2),_=R[0],z=R[1],N=(0,i.useState)(u.zR.Days),w=(0,a.Z)(N,2),B=w[0],D=w[1],O=(0,i.useState)(1),E=(0,a.Z)(O,2),V=E[0],A=E[1],M=(0,i.useState)(!1),Y=(0,a.Z)(M,2),q=Y[0],G=Y[1];return(0,i.useEffect)((function(){Number.isNaN(V)||(V||1)<1?G(!1):G(!0)}),[V]),(0,i.useEffect)((function(){k&&l.h.buckets.getBucketRetentionConfig(n).then((function(e){S(!1),z(e.data.mode),A(e.data.validity),D(e.data.unit)})).catch((function(){S(!1)}))}),[k,n]),(0,b.jsx)(m.Z,{title:"Set Retention Configuration",modalOpen:t,onClose:function(){h()},children:k?(0,b.jsx)(o.aNw,{style:{width:16,height:16}}):(0,b.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),x||(y(!0),l.h.buckets.setBucketRetentionConfig(n,{mode:_||u.oO.Compliance,unit:B||u.zR.Days,validity:V||1}).then((function(){y(!1),h()})).catch((function(e){y(!1),p((0,d.zb)((0,r.g)(e.error)))})))},children:(0,b.jsxs)(o.ltY,{containerPadding:!1,withBorders:!1,children:[(0,b.jsx)(o.Eep,{currentValue:_,id:"retention_mode",name:"retention_mode",label:"Retention Mode",onChange:function(e){z(e.target.value)},selectorOptions:[{value:"compliance",label:"Compliance"},{value:"governance",label:"Governance"}]}),(0,b.jsx)(o.Eep,{currentValue:B,id:"retention_unit",name:"retention_unit",label:"Retention Unit",onChange:function(e){D(e.target.value)},selectorOptions:[{value:"days",label:"Days"},{value:"years",label:"Years"}]}),(0,b.jsx)(o.Wzg,{type:"number",id:"retention_validity",name:"retention_validity",onChange:function(e){A(e.target.valueAsNumber)},label:"Retention Validity",value:String(V),required:!0,min:"1"}),(0,b.jsxs)(o.rjZ,{item:!0,xs:12,sx:c.ID.modalButtonBar,children:[(0,b.jsx)(o.zxk,{id:"cancel",type:"button",variant:"regular",disabled:x,onClick:function(){h()},label:"Cancel"}),(0,b.jsx)(o.zxk,{id:"set",type:"submit",variant:"callAction",color:"primary",disabled:x||!q,label:"Set"})]}),x&&(0,b.jsx)(o.rjZ,{item:!0,xs:12,children:(0,b.jsx)(s.Z,{})})]})})})}}}]);
|
||||
//# sourceMappingURL=1604.2dfa540d.chunk.js.map
|
||||
1
portal-ui/build/static/js/1604.2dfa540d.chunk.js.map
Normal file
1
portal-ui/build/static/js/1604.2dfa540d.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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
portal-ui/build/static/js/1690.fa631de9.chunk.js
Normal file
2
portal-ui/build/static/js/1690.fa631de9.chunk.js
Normal file
File diff suppressed because one or more lines are too long
1
portal-ui/build/static/js/1690.fa631de9.chunk.js.map
Normal file
1
portal-ui/build/static/js/1690.fa631de9.chunk.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1705],{71705:function(e,n,t){t.r(n);var l=t(29439),s=t(72791),o=t(9505),i=t(64554),a=t(56087),c=t(38442),u=t(26181),r=t.n(u),d=t(81918),h=t(29823),f=t(42419),p=t(75578),v=t(75952),T=t(87995),x=t(81551),Z=t(80184),_=(0,p.Z)(s.lazy((function(){return t.e(247).then(t.bind(t,40247))}))),j=(0,p.Z)(s.lazy((function(){return t.e(2763).then(t.bind(t,22763))})));n.default=function(e){var n=e.bucketName,t=(0,x.TL)(),u=(0,s.useState)(null),p=(0,l.Z)(u,2),m=p[0],S=p[1],b=(0,s.useState)(!1),k=(0,l.Z)(b,2),C=k[0],G=k[1],g=(0,s.useState)([]),A=(0,l.Z)(g,2),N=A[0],y=A[1],I=(0,s.useState)(["",""]),U=(0,l.Z)(I,2),E=U[0],F=U[1],O=(0,s.useState)(!1),P=(0,l.Z)(O,2),w=P[0],z=P[1],B=(0,o.Z)((function(e){var n,t;null!=e&&null!=(null===e||void 0===e?void 0:e.details)&&"tags"in(null===e||void 0===e?void 0:e.details)&&(S(null===e||void 0===e||null===(n=e.details)||void 0===n?void 0:n.tags),y(Object.keys(null===e||void 0===e||null===(t=e.details)||void 0===t?void 0:t.tags)))}),(function(e){t((0,T.Ih)(e))})),K=(0,l.Z)(B,2),D=K[0],H=K[1],L=function(){H("GET","/api/v1/buckets/".concat(n))};return(0,s.useEffect)((function(){L()}),[n]),(0,Z.jsxs)(i.Z,{children:[D?(0,Z.jsx)(v.aNw,{style:{width:16,height:16}}):null,(0,Z.jsx)(c.s,{scopes:[a.Ft.S3_GET_BUCKET_TAGGING,a.Ft.S3_GET_ACTIONS],resource:n,children:(0,Z.jsxs)(i.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,Z.jsx)(i.Z,{children:N&&N.map((function(e,t){var l=r()(m,"".concat(e),"");return""!==l?(0,Z.jsx)(c.s,{scopes:[a.Ft.S3_PUT_BUCKET_TAGGING,a.Ft.S3_PUT_ACTIONS],resource:n,matchAll:!0,errorProps:{deleteIcon:null,onDelete:null},children:(0,Z.jsx)(d.Z,{style:{textTransform:"none",marginRight:"5px"},size:"small",label:"".concat(e," : ").concat(l),color:"primary",deleteIcon:(0,Z.jsx)(h.Z,{}),onDelete:function(){!function(e,n){F([e,n]),z(!0)}(e,l)}})},"chip-".concat(t)):null}))}),(0,Z.jsx)(c.s,{scopes:[a.Ft.S3_PUT_BUCKET_TAGGING,a.Ft.S3_PUT_ACTIONS],resource:n,errorProps:{disabled:!0,onClick:null},children:(0,Z.jsx)(d.Z,{style:{maxWidth:80,marginTop:"10px"},icon:(0,Z.jsx)(f.Z,{}),clickable:!0,size:"small",label:"Add tag",color:"primary",variant:"outlined",onClick:function(){G(!0)}})})]})}),C&&(0,Z.jsx)(_,{modalOpen:C,currentTags:m,bucketName:n,onCloseAndUpdate:function(e){G(!1),e&&L()}}),w&&(0,Z.jsx)(j,{deleteOpen:w,currentTags:m,bucketName:n,onCloseAndUpdate:function(e){z(!1),e&&L()},selectedTag:E})]})}},42419:function(e,n,t){var l=t(64836);n.Z=void 0;var s=l(t(45649)),o=t(80184),i=(0,s.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");n.Z=i}}]);
|
||||
//# sourceMappingURL=1705.27697aac.chunk.js.map
|
||||
File diff suppressed because one or more lines are too long
2
portal-ui/build/static/js/1705.a54c5659.chunk.js
Normal file
2
portal-ui/build/static/js/1705.a54c5659.chunk.js
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1705],{71705:function(e,n,t){t.r(n);var l=t(29439),s=t(72791),c=t(26181),a=t.n(c),o=t(29945),u=t(56087),i=t(38442),r=t(87995),d=t(81551),p=t(9505),f=t(75578),x=t(80184),T=(0,f.Z)(s.lazy((function(){return Promise.all([t.e(5473),t.e(1715),t.e(5994),t.e(7391),t.e(247)]).then(t.bind(t,40247))}))),h=(0,f.Z)(s.lazy((function(){return t.e(2763).then(t.bind(t,22763))})));n.default=function(e){var n=e.bucketName,t=(0,d.TL)(),c=(0,s.useState)(null),f=(0,l.Z)(c,2),v=f[0],_=f[1],S=(0,s.useState)(!1),j=(0,l.Z)(S,2),b=j[0],g=j[1],C=(0,s.useState)([]),G=(0,l.Z)(C,2),k=G[0],m=G[1],A=(0,s.useState)(["",""]),N=(0,l.Z)(A,2),U=N[0],Z=N[1],I=(0,s.useState)(!1),P=(0,l.Z)(I,2),E=P[0],F=P[1],w=(0,p.Z)((function(e){if(e&&null!=(null===e||void 0===e?void 0:e.details)){var n,t;if(e.details.tags)return _(null===e||void 0===e||null===(n=e.details)||void 0===n?void 0:n.tags),void m(Object.keys(null===e||void 0===e||null===(t=e.details)||void 0===t?void 0:t.tags));_([]),m([])}}),(function(e){t((0,r.Ih)(e))})),y=(0,l.Z)(w,2),O=y[0],B=y[1],K=function(){B("GET","/api/v1/buckets/".concat(n))};return(0,s.useEffect)((function(){K()}),[n]),(0,x.jsxs)(o.xuv,{children:[O?(0,x.jsx)(o.aNw,{style:{width:16,height:16}}):null,(0,x.jsx)(i.s,{scopes:[u.Ft.S3_GET_BUCKET_TAGGING,u.Ft.S3_GET_ACTIONS],resource:n,children:(0,x.jsx)(o.xuv,{sx:{display:"flex",flexFlow:"column",marginTop:5},children:(0,x.jsxs)(o.xuv,{sx:{display:"flex",gap:8,flexWrap:"wrap"},children:[k&&k.map((function(e,t){var l=a()(v,"".concat(e),"");return""!==l?(0,x.jsx)(i.s,{scopes:[u.Ft.S3_PUT_BUCKET_TAGGING,u.Ft.S3_PUT_ACTIONS],resource:n,matchAll:!0,errorProps:{deleteIcon:null,onDelete:null},children:(0,x.jsx)(o.Vp9,{label:"".concat(e," : ").concat(l),id:"tag-".concat(e,"-").concat(l),onDelete:function(){!function(e,n){Z([e,n]),F(!0)}(e,l)}})},"chip-".concat(t)):null})),(0,x.jsx)(i.s,{scopes:[u.Ft.S3_PUT_BUCKET_TAGGING,u.Ft.S3_PUT_ACTIONS],resource:n,errorProps:{disabled:!0,onClick:null},children:(0,x.jsx)(o.Vp9,{label:"Add tag",icon:(0,x.jsx)(o.dtP,{}),id:"create-tag",variant:"outlined",onClick:function(){g(!0)},sx:{cursor:"pointer",maxWidth:90}})})]})})}),b&&(0,x.jsx)(T,{modalOpen:b,currentTags:v,bucketName:n,onCloseAndUpdate:function(e){g(!1),e&&K()}}),E&&(0,x.jsx)(h,{deleteOpen:E,currentTags:v,bucketName:n,onCloseAndUpdate:function(e){F(!1),e&&K()},selectedTag:U})]})}}}]);
|
||||
//# sourceMappingURL=1705.a54c5659.chunk.js.map
|
||||
1
portal-ui/build/static/js/1705.a54c5659.chunk.js.map
Normal file
1
portal-ui/build/static/js/1705.a54c5659.chunk.js.map
Normal file
File diff suppressed because one or more lines are too long
2
portal-ui/build/static/js/1715.b85c256f.chunk.js
Normal file
2
portal-ui/build/static/js/1715.b85c256f.chunk.js
Normal file
File diff suppressed because one or more lines are too long
1
portal-ui/build/static/js/1715.b85c256f.chunk.js.map
Normal file
1
portal-ui/build/static/js/1715.b85c256f.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
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user