Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2857b8c586 | ||
|
|
b1788c29db | ||
|
|
2e1401f013 | ||
|
|
1e1c11b13c | ||
|
|
25c1c854b1 | ||
|
|
5be2cc1965 | ||
|
|
4aa3f40792 | ||
|
|
3f41a82fd3 | ||
|
|
1b641b4222 | ||
|
|
85aabebbb4 | ||
|
|
919232261d | ||
|
|
ddd25a20eb | ||
|
|
84b8f9d6fa | ||
|
|
46af0ff74c | ||
|
|
b3651ed0a3 | ||
|
|
78c4fa393a | ||
|
|
84c4159062 | ||
|
|
ac2888fc4e | ||
|
|
c311847dcf | ||
|
|
cb6cda7265 | ||
|
|
16fd5470db | ||
|
|
ea0cac2a92 | ||
|
|
33b041ef34 | ||
|
|
b692ea693f | ||
|
|
fd39e50c08 | ||
|
|
ad4b9c050a | ||
|
|
1deb6371ed | ||
|
|
3b11556f4b | ||
|
|
25f719b0e2 | ||
|
|
231b63f1b0 | ||
|
|
e73370cc8c | ||
|
|
5d25dd4c06 | ||
|
|
51a8bacc18 |
176
.github/workflows/jobs.yaml
vendored
176
.github/workflows/jobs.yaml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -168,7 +168,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
|
||||
steps:
|
||||
|
||||
@@ -193,7 +193,7 @@ jobs:
|
||||
curl -sLO "https://dl.k8s.io/release/v1.23.1/bin/linux/amd64/kubectl" -o kubectl
|
||||
chmod +x kubectl
|
||||
mv kubectl /usr/local/bin
|
||||
"${GITHUB_WORKSPACE}/.github/workflows/deploy-tenant.sh"
|
||||
"${GITHUB_WORKSPACE}/tests/deploy-tenant.sh"
|
||||
echo "start ---> make test-operator-integration";
|
||||
make test-operator-integration;
|
||||
|
||||
@@ -210,7 +210,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -234,7 +234,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -281,7 +281,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -289,12 +289,18 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '17'
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
@@ -341,7 +347,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -379,7 +385,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -387,12 +393,18 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
@@ -458,7 +470,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -466,12 +478,18 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
@@ -537,7 +555,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -545,12 +563,18 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
@@ -618,7 +642,7 @@ jobs:
|
||||
timeout-minutes: 5
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -626,11 +650,14 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
@@ -687,7 +714,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -695,11 +722,14 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
@@ -756,7 +786,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -764,11 +794,14 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
@@ -825,7 +858,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -833,11 +866,14 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
@@ -894,7 +930,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -902,11 +938,14 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
@@ -963,7 +1002,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -971,12 +1010,18 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
@@ -1042,7 +1087,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -1050,11 +1095,18 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Read .nvmrc
|
||||
id: node_version
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NVMRC }}
|
||||
|
||||
- uses: actions/cache@v2
|
||||
name: Go Mod Cache
|
||||
with:
|
||||
@@ -1116,7 +1168,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -1154,7 +1206,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -1192,7 +1244,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -1230,7 +1282,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -1268,7 +1320,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -1306,7 +1358,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -1344,7 +1396,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -1382,7 +1434,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -1428,7 +1480,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -1475,7 +1527,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
@@ -1587,7 +1639,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.18.x ]
|
||||
go-version: [ 1.18.x, 1.19.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
|
||||
@@ -4,6 +4,12 @@ linters-settings:
|
||||
|
||||
misspell:
|
||||
locale: US
|
||||
|
||||
goheader:
|
||||
values:
|
||||
regexp:
|
||||
copyright-holder: Copyright \(c\) (20\d\d\-20\d\d)|2021|({{year}})
|
||||
template-path: .license.tmpl
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
@@ -28,13 +34,6 @@ linters:
|
||||
- tenv
|
||||
- durationcheck
|
||||
|
||||
linters-settings:
|
||||
goheader:
|
||||
values:
|
||||
regexp:
|
||||
copyright-holder: Copyright \(c\) (20\d\d\-20\d\d)|2021|({{year}})
|
||||
template-path: .license.tmpl
|
||||
|
||||
service:
|
||||
golangci-lint-version: 1.43.0 # use the fixed version to not introduce new linters unexpectedly
|
||||
|
||||
@@ -52,3 +51,4 @@ run:
|
||||
skip-dirs:
|
||||
- pkg/clientgen
|
||||
- pkg/apis/networking.gke.io
|
||||
- restapi/operations
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
FROM node:17 as uilayer
|
||||
ARG NODE_VERSION
|
||||
FROM node:$NODE_VERSION as uilayer
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
FROM node:17 as uilayer
|
||||
ARG NODE_VERSION
|
||||
FROM node:$NODE_VERSION as uilayer
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
10
Makefile
10
Makefile
@@ -6,6 +6,7 @@ BUILD_TIME:=$(shell date 2>/dev/null)
|
||||
TAG ?= "minio/console:$(BUILD_VERSION)-dev"
|
||||
MINIO_VERSION ?= "quay.io/minio/minio:latest"
|
||||
TARGET_BUCKET ?= "target"
|
||||
NODE_VERSION := $(shell cat .nvmrc)
|
||||
|
||||
default: console
|
||||
|
||||
@@ -15,13 +16,13 @@ console:
|
||||
@(GO111MODULE=on CGO_ENABLED=0 go build -trimpath --tags=kqueue,operator --ldflags "-s -w" -o console ./cmd/console)
|
||||
|
||||
k8sdev:
|
||||
@docker build -t $(TAG) --build-arg build_version=$(BUILD_VERSION) --build-arg build_time='$(BUILD_TIME)' .
|
||||
@docker build -t $(TAG) --build-arg build_version=$(BUILD_VERSION) --build-arg build_time='$(BUILD_TIME)' --build-arg NODE_VERSION='$(NODE_VERSION)' .
|
||||
@kind load docker-image $(TAG)
|
||||
@echo "Done, now restart your console deployment"
|
||||
|
||||
getdeps:
|
||||
@mkdir -p ${GOPATH}/bin
|
||||
@echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.45.2
|
||||
@echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin
|
||||
|
||||
verifiers: getdeps fmt lint
|
||||
|
||||
@@ -63,7 +64,8 @@ swagger-operator:
|
||||
@swagger generate server -A operator --main-package=operator --server-package=operatorapi --exclude-main -P models.Principal -f ./swagger-operator.yml -r NOTICE
|
||||
|
||||
assets:
|
||||
@(cd portal-ui; yarn install --prefer-offline; make build-static; yarn prettier --write . --loglevel warn; cd ..)
|
||||
@(if [ -f "${NVM_DIR}/nvm.sh" ]; then \. "${NVM_DIR}/nvm.sh" && nvm install && nvm use && npm install -g yarn ; fi &&\
|
||||
cd portal-ui; yarn install --prefer-offline; make build-static; yarn prettier --write . --loglevel warn; cd ..)
|
||||
|
||||
test-integration:
|
||||
@(docker stop pgsqlcontainer || true)
|
||||
@@ -261,7 +263,7 @@ clean:
|
||||
@rm -vf console
|
||||
|
||||
docker:
|
||||
@docker buildx build --output=type=docker --platform linux/amd64 -t $(TAG) --build-arg build_version=$(BUILD_VERSION) --build-arg build_time='$(BUILD_TIME)' .
|
||||
@docker buildx build --output=type=docker --platform linux/amd64 -t $(TAG) --build-arg build_version=$(BUILD_VERSION) --build-arg build_time='$(BUILD_TIME)' --build-arg NODE_VERSION='$(NODE_VERSION)' .
|
||||
|
||||
release: swagger-gen
|
||||
@echo "Generating Release: $(RELEASE)"
|
||||
|
||||
@@ -98,7 +98,7 @@ func buildServer() (*restapi.Server, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
api := operations.NewConsoleAPI(swaggerSpec, nil)
|
||||
api := operations.NewConsoleAPI(swaggerSpec)
|
||||
api.Logger = restapi.LogInfo
|
||||
server := restapi.NewServer(api)
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ func initConsoleServer() (*restapi.Server, error) {
|
||||
restapi.LogInfo = noLog
|
||||
restapi.LogError = noLog
|
||||
|
||||
api := operations.NewConsoleAPI(swaggerSpec, nil)
|
||||
api := operations.NewConsoleAPI(swaggerSpec)
|
||||
api.Logger = noLog
|
||||
|
||||
server := restapi.NewServer(api)
|
||||
|
||||
@@ -20,18 +20,16 @@ import (
|
||||
"archive/zip"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestStartProfiling(t *testing.T) {
|
||||
testAsser := assert.New(t)
|
||||
testAssert := assert.New(t)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -58,53 +56,28 @@ func TestStartProfiling(t *testing.T) {
|
||||
"profile-127.0.0.1:9000-mutex-before.pprof": false,
|
||||
}
|
||||
|
||||
client := &http.Client{
|
||||
Timeout: 3 * time.Second,
|
||||
}
|
||||
wsDestination := "/ws/profile?types=cpu,mem,block,mutex,trace,threads,goroutines"
|
||||
wsFinalURL := fmt.Sprintf("ws://localhost:9090%s", wsDestination)
|
||||
|
||||
destination := "/api/v1/profiling/start"
|
||||
finalURL := fmt.Sprintf("http://localhost:9090%s", destination)
|
||||
request, err := http.NewRequest("POST", finalURL, strings.NewReader("{\"type\":\"cpu,mem,block,mutex,trace,threads,goroutines\"}"))
|
||||
ws, _, err := websocket.DefaultDialer.Dial(wsFinalURL, nil)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
defer ws.Close()
|
||||
|
||||
_, zipFileBytes, err := ws.ReadMessage()
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
|
||||
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
|
||||
request.Header.Add("Content-Type", "application/json")
|
||||
|
||||
response, err := client.Do(request)
|
||||
|
||||
testAsser.Nil(err, fmt.Sprintf("%s returned an error: %v", tt.name, err))
|
||||
testAsser.Equal(201, response.StatusCode)
|
||||
|
||||
time.Sleep(5 * time.Second)
|
||||
|
||||
destination = "/api/v1/profiling/stop"
|
||||
finalURL = fmt.Sprintf("http://localhost:9090%s", destination)
|
||||
request, err = http.NewRequest("POST", finalURL, nil)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
|
||||
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
|
||||
request.Header.Add("Content-Type", "application/json")
|
||||
|
||||
response, err = client.Do(request)
|
||||
|
||||
testAsser.Nil(err, fmt.Sprintf("%s returned an error: %v", tt.name, err))
|
||||
testAsser.Equal(200, response.StatusCode)
|
||||
zipFileBytes, err := io.ReadAll(response.Body)
|
||||
if err != nil {
|
||||
testAsser.Nil(err, fmt.Sprintf("%s returned an error: %v", tt.name, err))
|
||||
}
|
||||
filetype := http.DetectContentType(zipFileBytes)
|
||||
testAsser.Equal("application/zip", filetype)
|
||||
testAssert.Equal("application/zip", filetype)
|
||||
|
||||
zipReader, err := zip.NewReader(bytes.NewReader(zipFileBytes), int64(len(zipFileBytes)))
|
||||
if err != nil {
|
||||
testAsser.Nil(err, fmt.Sprintf("%s returned an error: %v", tt.name, err))
|
||||
testAssert.Nil(err, fmt.Sprintf("%s returned an error: %v", tt.name, err))
|
||||
}
|
||||
|
||||
// Read all the files from zip archive
|
||||
@@ -113,7 +86,7 @@ func TestStartProfiling(t *testing.T) {
|
||||
}
|
||||
|
||||
for k, v := range files {
|
||||
testAsser.Equal(true, v, fmt.Sprintf("%s : compressed file expected to have %v file inside", tt.name, k))
|
||||
testAssert.Equal(true, v, fmt.Sprintf("%s : compressed file expected to have %v file inside", tt.name, k))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ spec:
|
||||
serviceAccountName: console-sa
|
||||
containers:
|
||||
- name: console
|
||||
image: 'minio/console:v0.19.3'
|
||||
image: 'minio/console:v0.19.5'
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
env:
|
||||
- name: CONSOLE_OPERATOR_MODE
|
||||
|
||||
@@ -32,7 +32,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: console
|
||||
image: 'minio/console:v0.19.3'
|
||||
image: 'minio/console:v0.19.5'
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
env:
|
||||
- name: CONSOLE_MINIO_SERVER
|
||||
|
||||
@@ -37,6 +37,9 @@ import (
|
||||
// swagger:model loginDetails
|
||||
type LoginDetails struct {
|
||||
|
||||
// is direct p v
|
||||
IsDirectPV bool `json:"isDirectPV,omitempty"`
|
||||
|
||||
// login strategy
|
||||
// Enum: [form redirect service-account redirect-service-account]
|
||||
LoginStrategy string `json:"loginStrategy,omitempty"`
|
||||
|
||||
@@ -37,6 +37,9 @@ import (
|
||||
// swagger:model operatorSessionResponse
|
||||
type OperatorSessionResponse struct {
|
||||
|
||||
// direct p v
|
||||
DirectPV bool `json:"directPV,omitempty"`
|
||||
|
||||
// features
|
||||
Features []string `json:"features"`
|
||||
|
||||
|
||||
67
models/operator_subnet_api_key.go
Normal file
67
models/operator_subnet_api_key.go
Normal file
@@ -0,0 +1,67 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// OperatorSubnetAPIKey operator subnet API key
|
||||
//
|
||||
// swagger:model operatorSubnetAPIKey
|
||||
type OperatorSubnetAPIKey struct {
|
||||
|
||||
// api key
|
||||
APIKey string `json:"apiKey,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this operator subnet API key
|
||||
func (m *OperatorSubnetAPIKey) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this operator subnet API key based on context it is used
|
||||
func (m *OperatorSubnetAPIKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *OperatorSubnetAPIKey) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *OperatorSubnetAPIKey) UnmarshalBinary(b []byte) error {
|
||||
var res OperatorSubnetAPIKey
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
122
models/operator_subnet_login_m_f_a_request.go
Normal file
122
models/operator_subnet_login_m_f_a_request.go
Normal file
@@ -0,0 +1,122 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// OperatorSubnetLoginMFARequest operator subnet login m f a request
|
||||
//
|
||||
// swagger:model operatorSubnetLoginMFARequest
|
||||
type OperatorSubnetLoginMFARequest struct {
|
||||
|
||||
// mfa token
|
||||
// Required: true
|
||||
MfaToken *string `json:"mfa_token"`
|
||||
|
||||
// otp
|
||||
// Required: true
|
||||
Otp *string `json:"otp"`
|
||||
|
||||
// username
|
||||
// Required: true
|
||||
Username *string `json:"username"`
|
||||
}
|
||||
|
||||
// Validate validates this operator subnet login m f a request
|
||||
func (m *OperatorSubnetLoginMFARequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateMfaToken(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateOtp(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateUsername(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *OperatorSubnetLoginMFARequest) validateMfaToken(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("mfa_token", "body", m.MfaToken); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *OperatorSubnetLoginMFARequest) validateOtp(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("otp", "body", m.Otp); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *OperatorSubnetLoginMFARequest) validateUsername(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("username", "body", m.Username); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this operator subnet login m f a request based on context it is used
|
||||
func (m *OperatorSubnetLoginMFARequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *OperatorSubnetLoginMFARequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *OperatorSubnetLoginMFARequest) UnmarshalBinary(b []byte) error {
|
||||
var res OperatorSubnetLoginMFARequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
70
models/operator_subnet_login_request.go
Normal file
70
models/operator_subnet_login_request.go
Normal file
@@ -0,0 +1,70 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// OperatorSubnetLoginRequest operator subnet login request
|
||||
//
|
||||
// swagger:model operatorSubnetLoginRequest
|
||||
type OperatorSubnetLoginRequest struct {
|
||||
|
||||
// password
|
||||
Password string `json:"password,omitempty"`
|
||||
|
||||
// username
|
||||
Username string `json:"username,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this operator subnet login request
|
||||
func (m *OperatorSubnetLoginRequest) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this operator subnet login request based on context it is used
|
||||
func (m *OperatorSubnetLoginRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *OperatorSubnetLoginRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *OperatorSubnetLoginRequest) UnmarshalBinary(b []byte) error {
|
||||
var res OperatorSubnetLoginRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
70
models/operator_subnet_login_response.go
Normal file
70
models/operator_subnet_login_response.go
Normal file
@@ -0,0 +1,70 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// OperatorSubnetLoginResponse operator subnet login response
|
||||
//
|
||||
// swagger:model operatorSubnetLoginResponse
|
||||
type OperatorSubnetLoginResponse struct {
|
||||
|
||||
// access token
|
||||
AccessToken string `json:"access_token,omitempty"`
|
||||
|
||||
// mfa token
|
||||
MfaToken string `json:"mfa_token,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this operator subnet login response
|
||||
func (m *OperatorSubnetLoginResponse) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this operator subnet login response based on context it is used
|
||||
func (m *OperatorSubnetLoginResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *OperatorSubnetLoginResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *OperatorSubnetLoginResponse) UnmarshalBinary(b []byte) error {
|
||||
var res OperatorSubnetLoginResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
67
models/operator_subnet_register_api_key.go
Normal file
67
models/operator_subnet_register_api_key.go
Normal file
@@ -0,0 +1,67 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// OperatorSubnetRegisterAPIKey operator subnet register API key
|
||||
//
|
||||
// swagger:model operatorSubnetRegisterAPIKey
|
||||
type OperatorSubnetRegisterAPIKey struct {
|
||||
|
||||
// registered
|
||||
Registered bool `json:"registered,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this operator subnet register API key
|
||||
func (m *OperatorSubnetRegisterAPIKey) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this operator subnet register API key based on context it is used
|
||||
func (m *OperatorSubnetRegisterAPIKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *OperatorSubnetRegisterAPIKey) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *OperatorSubnetRegisterAPIKey) UnmarshalBinary(b []byte) error {
|
||||
var res OperatorSubnetRegisterAPIKey
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
67
models/operator_subnet_register_api_key_response.go
Normal file
67
models/operator_subnet_register_api_key_response.go
Normal file
@@ -0,0 +1,67 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// OperatorSubnetRegisterAPIKeyResponse operator subnet register API key response
|
||||
//
|
||||
// swagger:model operatorSubnetRegisterAPIKeyResponse
|
||||
type OperatorSubnetRegisterAPIKeyResponse struct {
|
||||
|
||||
// registered
|
||||
Registered bool `json:"registered,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this operator subnet register API key response
|
||||
func (m *OperatorSubnetRegisterAPIKeyResponse) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this operator subnet register API key response based on context it is used
|
||||
func (m *OperatorSubnetRegisterAPIKeyResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *OperatorSubnetRegisterAPIKeyResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *OperatorSubnetRegisterAPIKeyResponse) UnmarshalBinary(b []byte) error {
|
||||
var res OperatorSubnetRegisterAPIKeyResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
@@ -37,8 +37,10 @@ import (
|
||||
type SecurityContext struct {
|
||||
|
||||
// fs group
|
||||
// Required: true
|
||||
FsGroup *string `json:"fsGroup"`
|
||||
FsGroup string `json:"fsGroup,omitempty"`
|
||||
|
||||
// fs group change policy
|
||||
FsGroupChangePolicy string `json:"fsGroupChangePolicy,omitempty"`
|
||||
|
||||
// run as group
|
||||
// Required: true
|
||||
@@ -57,10 +59,6 @@ type SecurityContext struct {
|
||||
func (m *SecurityContext) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateFsGroup(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateRunAsGroup(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
@@ -79,15 +77,6 @@ func (m *SecurityContext) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SecurityContext) validateFsGroup(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("fsGroup", "body", m.FsGroup); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SecurityContext) validateRunAsGroup(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("runAsGroup", "body", m.RunAsGroup); err != nil {
|
||||
|
||||
@@ -69,3 +69,10 @@ func getK8sSAToken() string {
|
||||
func getMarketplace() string {
|
||||
return env.Get(ConsoleMarketplace, "")
|
||||
}
|
||||
|
||||
// Get DirectPVMode
|
||||
func getDirectPVEnabled() bool {
|
||||
currentMode := env.Get(DirectPVMode, "off")
|
||||
|
||||
return currentMode == "on"
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ func configureAPI(api *operations.OperatorAPI) http.Handler {
|
||||
// Namespaces handlers
|
||||
registerNamespaceHandlers(api)
|
||||
registerMarketplaceHandlers(api)
|
||||
registerOperatorSubnetHandlers(api)
|
||||
|
||||
api.PreServerShutdown = func() {}
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ const (
|
||||
prometheusPath = "prometheus.io/path"
|
||||
prometheusPort = "prometheus.io/port"
|
||||
prometheusScrape = "prometheus.io/scrape"
|
||||
|
||||
// Constants for DirectPV
|
||||
DirectPVMode = "DIRECTPV_MODE"
|
||||
)
|
||||
|
||||
// Image versions
|
||||
|
||||
@@ -1906,6 +1906,159 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subnet/apikey": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"OperatorAPI"
|
||||
],
|
||||
"summary": "Subnet api key",
|
||||
"operationId": "OperatorSubnetApiKey",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "token",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetAPIKey"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subnet/apikey/info": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"OperatorAPI"
|
||||
],
|
||||
"summary": "Subnet API key info",
|
||||
"operationId": "OperatorSubnetAPIKeyInfo",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetRegisterAPIKeyResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subnet/apikey/register": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"OperatorAPI"
|
||||
],
|
||||
"summary": "Register Operator with Subnet",
|
||||
"operationId": "OperatorSubnetRegisterAPIKey",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetAPIKey"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetRegisterAPIKeyResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subnet/login": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"OperatorAPI"
|
||||
],
|
||||
"summary": "Login to subnet",
|
||||
"operationId": "OperatorSubnetLogin",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetLoginRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetLoginResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subnet/login/mfa": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"OperatorAPI"
|
||||
],
|
||||
"summary": "Login to subnet using mfa",
|
||||
"operationId": "OperatorSubnetLoginMFA",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetLoginMFARequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetLoginResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subscription/info": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -3288,6 +3441,9 @@ func init() {
|
||||
"loginDetails": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"isDirectPV": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"loginStrategy": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -3521,6 +3677,9 @@ func init() {
|
||||
"operatorSessionResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"directPV": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"features": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -3547,6 +3706,63 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"operatorSubnetAPIKey": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"apiKey": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operatorSubnetLoginMFARequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"username",
|
||||
"otp",
|
||||
"mfa_token"
|
||||
],
|
||||
"properties": {
|
||||
"mfa_token": {
|
||||
"type": "string"
|
||||
},
|
||||
"otp": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operatorSubnetLoginRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operatorSubnetLoginResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"access_token": {
|
||||
"type": "string"
|
||||
},
|
||||
"mfa_token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operatorSubnetRegisterAPIKeyResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"registered": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parityResponse": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -4021,13 +4237,15 @@ func init() {
|
||||
"required": [
|
||||
"runAsUser",
|
||||
"runAsGroup",
|
||||
"runAsNonRoot",
|
||||
"fsGroup"
|
||||
"runAsNonRoot"
|
||||
],
|
||||
"properties": {
|
||||
"fsGroup": {
|
||||
"type": "string"
|
||||
},
|
||||
"fsGroupChangePolicy": {
|
||||
"type": "string"
|
||||
},
|
||||
"runAsGroup": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -6658,6 +6876,159 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subnet/apikey": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"OperatorAPI"
|
||||
],
|
||||
"summary": "Subnet api key",
|
||||
"operationId": "OperatorSubnetApiKey",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "token",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetAPIKey"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subnet/apikey/info": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"OperatorAPI"
|
||||
],
|
||||
"summary": "Subnet API key info",
|
||||
"operationId": "OperatorSubnetAPIKeyInfo",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetRegisterAPIKeyResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subnet/apikey/register": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"OperatorAPI"
|
||||
],
|
||||
"summary": "Register Operator with Subnet",
|
||||
"operationId": "OperatorSubnetRegisterAPIKey",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetAPIKey"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetRegisterAPIKeyResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subnet/login": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"OperatorAPI"
|
||||
],
|
||||
"summary": "Login to subnet",
|
||||
"operationId": "OperatorSubnetLogin",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetLoginRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetLoginResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subnet/login/mfa": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"OperatorAPI"
|
||||
],
|
||||
"summary": "Login to subnet using mfa",
|
||||
"operationId": "OperatorSubnetLoginMFA",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetLoginMFARequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/operatorSubnetLoginResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/subscription/info": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -8871,6 +9242,9 @@ func init() {
|
||||
"loginDetails": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"isDirectPV": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"loginStrategy": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -9060,6 +9434,9 @@ func init() {
|
||||
"operatorSessionResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"directPV": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"features": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -9086,6 +9463,63 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"operatorSubnetAPIKey": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"apiKey": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operatorSubnetLoginMFARequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"username",
|
||||
"otp",
|
||||
"mfa_token"
|
||||
],
|
||||
"properties": {
|
||||
"mfa_token": {
|
||||
"type": "string"
|
||||
},
|
||||
"otp": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operatorSubnetLoginRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operatorSubnetLoginResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"access_token": {
|
||||
"type": "string"
|
||||
},
|
||||
"mfa_token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operatorSubnetRegisterAPIKeyResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"registered": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parityResponse": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -9469,13 +9903,15 @@ func init() {
|
||||
"required": [
|
||||
"runAsUser",
|
||||
"runAsGroup",
|
||||
"runAsNonRoot",
|
||||
"fsGroup"
|
||||
"runAsNonRoot"
|
||||
],
|
||||
"properties": {
|
||||
"fsGroup": {
|
||||
"type": "string"
|
||||
},
|
||||
"fsGroupChangePolicy": {
|
||||
"type": "string"
|
||||
},
|
||||
"runAsGroup": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -118,6 +118,7 @@ func getLoginDetailsResponse(params authApi.LoginDetailParams) (*models.LoginDet
|
||||
loginDetails := &models.LoginDetails{
|
||||
LoginStrategy: loginStrategy,
|
||||
Redirect: redirectURL,
|
||||
IsDirectPV: getDirectPVEnabled(),
|
||||
}
|
||||
return loginDetails, nil
|
||||
}
|
||||
|
||||
@@ -19,7 +19,9 @@ package operatorapi
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
@@ -34,6 +36,7 @@ import (
|
||||
|
||||
var (
|
||||
testWithError = false
|
||||
testServerWithError = false
|
||||
errMock = errors.New("mock error")
|
||||
k8sClientGetConfigMapMock func(ctx context.Context, namespace, configMap string, opts metav1.GetOptions) (*corev1.ConfigMap, error)
|
||||
k8sClientCreateConfigMapMock func(ctx context.Context, namespace string, cm *corev1.ConfigMap, opts metav1.CreateOptions) (*corev1.ConfigMap, error)
|
||||
@@ -43,9 +46,10 @@ var (
|
||||
|
||||
type MarketplaceTestSuite struct {
|
||||
suite.Suite
|
||||
assert *assert.Assertions
|
||||
kClient k8sClientMock
|
||||
namespace string
|
||||
assert *assert.Assertions
|
||||
kClient k8sClientMock
|
||||
namespace string
|
||||
postServer *httptest.Server
|
||||
}
|
||||
|
||||
func (c k8sClientMock) getConfigMap(ctx context.Context, namespace, configMap string, opts metav1.GetOptions) (*corev1.ConfigMap, error) {
|
||||
@@ -72,6 +76,17 @@ func (suite *MarketplaceTestSuite) SetupSuite() {
|
||||
k8sClientUpdateConfigMapMock = suite.updateConfigMapMock
|
||||
k8sClientDeleteConfigMapMock = suite.deleteConfigMapMock
|
||||
os.Setenv(mpConfigMapKey, "mp-mock-config")
|
||||
suite.postServer = httptest.NewServer(http.HandlerFunc(suite.postHandler))
|
||||
}
|
||||
|
||||
func (suite *MarketplaceTestSuite) postHandler(
|
||||
w http.ResponseWriter, r *http.Request,
|
||||
) {
|
||||
if testServerWithError {
|
||||
w.WriteHeader(400)
|
||||
} else {
|
||||
fmt.Fprintf(w, `{"post": "Post response"}`)
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *MarketplaceTestSuite) TearDownSuite() {
|
||||
@@ -173,14 +188,26 @@ func (suite *MarketplaceTestSuite) TestSetMPIntegrationWithError() {
|
||||
os.Unsetenv(mpHostEnvVar)
|
||||
}
|
||||
|
||||
// TODO: Add mock server for testing microservice
|
||||
// func (suite *MarketplaceTestSuite) TestSetMPIntegrationNoError() {
|
||||
// testWithError = false
|
||||
// ctx, cancel := context.WithCancel(context.Background())
|
||||
// defer cancel()
|
||||
// err := setMPIntegration(ctx, "mock@mock.com", "token", &suite.kClient)
|
||||
// suite.assert.Nil(err)
|
||||
// }
|
||||
func (suite *MarketplaceTestSuite) TestSetMPIntegrationNoError() {
|
||||
testWithError = false
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
os.Setenv(mpHostEnvVar, suite.postServer.URL)
|
||||
err := setMPIntegration(ctx, "mock@mock.com", false, &suite.kClient)
|
||||
suite.assert.Nil(err)
|
||||
os.Unsetenv(mpHostEnvVar)
|
||||
}
|
||||
|
||||
func (suite *MarketplaceTestSuite) TestSetMPIntegrationWithRequestError() {
|
||||
testWithError = false
|
||||
testServerWithError = true
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
os.Setenv(mpHostEnvVar, suite.postServer.URL)
|
||||
err := setMPIntegration(ctx, "mock@mock.com", false, &suite.kClient)
|
||||
suite.assert.NotNil(err)
|
||||
os.Unsetenv(mpHostEnvVar)
|
||||
}
|
||||
|
||||
func TestMarketplace(t *testing.T) {
|
||||
suite.Run(t, new(MarketplaceTestSuite))
|
||||
|
||||
@@ -166,6 +166,21 @@ func NewOperatorAPI(spec *loads.Document) *OperatorAPI {
|
||||
AuthLogoutHandler: auth.LogoutHandlerFunc(func(params auth.LogoutParams, principal *models.Principal) middleware.Responder {
|
||||
return middleware.NotImplemented("operation auth.Logout has not yet been implemented")
|
||||
}),
|
||||
OperatorAPIOperatorSubnetAPIKeyInfoHandler: operator_api.OperatorSubnetAPIKeyInfoHandlerFunc(func(params operator_api.OperatorSubnetAPIKeyInfoParams, principal *models.Principal) middleware.Responder {
|
||||
return middleware.NotImplemented("operation operator_api.OperatorSubnetAPIKeyInfo has not yet been implemented")
|
||||
}),
|
||||
OperatorAPIOperatorSubnetAPIKeyHandler: operator_api.OperatorSubnetAPIKeyHandlerFunc(func(params operator_api.OperatorSubnetAPIKeyParams, principal *models.Principal) middleware.Responder {
|
||||
return middleware.NotImplemented("operation operator_api.OperatorSubnetAPIKey has not yet been implemented")
|
||||
}),
|
||||
OperatorAPIOperatorSubnetLoginHandler: operator_api.OperatorSubnetLoginHandlerFunc(func(params operator_api.OperatorSubnetLoginParams, principal *models.Principal) middleware.Responder {
|
||||
return middleware.NotImplemented("operation operator_api.OperatorSubnetLogin has not yet been implemented")
|
||||
}),
|
||||
OperatorAPIOperatorSubnetLoginMFAHandler: operator_api.OperatorSubnetLoginMFAHandlerFunc(func(params operator_api.OperatorSubnetLoginMFAParams, principal *models.Principal) middleware.Responder {
|
||||
return middleware.NotImplemented("operation operator_api.OperatorSubnetLoginMFA has not yet been implemented")
|
||||
}),
|
||||
OperatorAPIOperatorSubnetRegisterAPIKeyHandler: operator_api.OperatorSubnetRegisterAPIKeyHandlerFunc(func(params operator_api.OperatorSubnetRegisterAPIKeyParams, principal *models.Principal) middleware.Responder {
|
||||
return middleware.NotImplemented("operation operator_api.OperatorSubnetRegisterAPIKey has not yet been implemented")
|
||||
}),
|
||||
OperatorAPIPostMPIntegrationHandler: operator_api.PostMPIntegrationHandlerFunc(func(params operator_api.PostMPIntegrationParams, principal *models.Principal) middleware.Responder {
|
||||
return middleware.NotImplemented("operation operator_api.PostMPIntegration has not yet been implemented")
|
||||
}),
|
||||
@@ -352,6 +367,16 @@ type OperatorAPI struct {
|
||||
AuthLoginOperatorHandler auth.LoginOperatorHandler
|
||||
// AuthLogoutHandler sets the operation handler for the logout operation
|
||||
AuthLogoutHandler auth.LogoutHandler
|
||||
// OperatorAPIOperatorSubnetAPIKeyInfoHandler sets the operation handler for the operator subnet API key info operation
|
||||
OperatorAPIOperatorSubnetAPIKeyInfoHandler operator_api.OperatorSubnetAPIKeyInfoHandler
|
||||
// OperatorAPIOperatorSubnetAPIKeyHandler sets the operation handler for the operator subnet Api key operation
|
||||
OperatorAPIOperatorSubnetAPIKeyHandler operator_api.OperatorSubnetAPIKeyHandler
|
||||
// OperatorAPIOperatorSubnetLoginHandler sets the operation handler for the operator subnet login operation
|
||||
OperatorAPIOperatorSubnetLoginHandler operator_api.OperatorSubnetLoginHandler
|
||||
// OperatorAPIOperatorSubnetLoginMFAHandler sets the operation handler for the operator subnet login m f a operation
|
||||
OperatorAPIOperatorSubnetLoginMFAHandler operator_api.OperatorSubnetLoginMFAHandler
|
||||
// OperatorAPIOperatorSubnetRegisterAPIKeyHandler sets the operation handler for the operator subnet register API key operation
|
||||
OperatorAPIOperatorSubnetRegisterAPIKeyHandler operator_api.OperatorSubnetRegisterAPIKeyHandler
|
||||
// OperatorAPIPostMPIntegrationHandler sets the operation handler for the post m p integration operation
|
||||
OperatorAPIPostMPIntegrationHandler operator_api.PostMPIntegrationHandler
|
||||
// OperatorAPIPutTenantYAMLHandler sets the operation handler for the put tenant y a m l operation
|
||||
@@ -581,6 +606,21 @@ func (o *OperatorAPI) Validate() error {
|
||||
if o.AuthLogoutHandler == nil {
|
||||
unregistered = append(unregistered, "auth.LogoutHandler")
|
||||
}
|
||||
if o.OperatorAPIOperatorSubnetAPIKeyInfoHandler == nil {
|
||||
unregistered = append(unregistered, "operator_api.OperatorSubnetAPIKeyInfoHandler")
|
||||
}
|
||||
if o.OperatorAPIOperatorSubnetAPIKeyHandler == nil {
|
||||
unregistered = append(unregistered, "operator_api.OperatorSubnetAPIKeyHandler")
|
||||
}
|
||||
if o.OperatorAPIOperatorSubnetLoginHandler == nil {
|
||||
unregistered = append(unregistered, "operator_api.OperatorSubnetLoginHandler")
|
||||
}
|
||||
if o.OperatorAPIOperatorSubnetLoginMFAHandler == nil {
|
||||
unregistered = append(unregistered, "operator_api.OperatorSubnetLoginMFAHandler")
|
||||
}
|
||||
if o.OperatorAPIOperatorSubnetRegisterAPIKeyHandler == nil {
|
||||
unregistered = append(unregistered, "operator_api.OperatorSubnetRegisterAPIKeyHandler")
|
||||
}
|
||||
if o.OperatorAPIPostMPIntegrationHandler == nil {
|
||||
unregistered = append(unregistered, "operator_api.PostMPIntegrationHandler")
|
||||
}
|
||||
@@ -884,6 +924,26 @@ func (o *OperatorAPI) initHandlerCache() {
|
||||
o.handlers["POST"] = make(map[string]http.Handler)
|
||||
}
|
||||
o.handlers["POST"]["/logout"] = auth.NewLogout(o.context, o.AuthLogoutHandler)
|
||||
if o.handlers["GET"] == nil {
|
||||
o.handlers["GET"] = make(map[string]http.Handler)
|
||||
}
|
||||
o.handlers["GET"]["/subnet/apikey/info"] = operator_api.NewOperatorSubnetAPIKeyInfo(o.context, o.OperatorAPIOperatorSubnetAPIKeyInfoHandler)
|
||||
if o.handlers["GET"] == nil {
|
||||
o.handlers["GET"] = make(map[string]http.Handler)
|
||||
}
|
||||
o.handlers["GET"]["/subnet/apikey"] = operator_api.NewOperatorSubnetAPIKey(o.context, o.OperatorAPIOperatorSubnetAPIKeyHandler)
|
||||
if o.handlers["POST"] == nil {
|
||||
o.handlers["POST"] = make(map[string]http.Handler)
|
||||
}
|
||||
o.handlers["POST"]["/subnet/login"] = operator_api.NewOperatorSubnetLogin(o.context, o.OperatorAPIOperatorSubnetLoginHandler)
|
||||
if o.handlers["POST"] == nil {
|
||||
o.handlers["POST"] = make(map[string]http.Handler)
|
||||
}
|
||||
o.handlers["POST"]["/subnet/login/mfa"] = operator_api.NewOperatorSubnetLoginMFA(o.context, o.OperatorAPIOperatorSubnetLoginMFAHandler)
|
||||
if o.handlers["POST"] == nil {
|
||||
o.handlers["POST"] = make(map[string]http.Handler)
|
||||
}
|
||||
o.handlers["POST"]["/subnet/apikey/register"] = operator_api.NewOperatorSubnetRegisterAPIKey(o.context, o.OperatorAPIOperatorSubnetRegisterAPIKeyHandler)
|
||||
if o.handlers["POST"] == nil {
|
||||
o.handlers["POST"] = make(map[string]http.Handler)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// OperatorSubnetAPIKeyHandlerFunc turns a function with the right signature into a operator subnet Api key handler
|
||||
type OperatorSubnetAPIKeyHandlerFunc func(OperatorSubnetAPIKeyParams, *models.Principal) middleware.Responder
|
||||
|
||||
// Handle executing the request and returning a response
|
||||
func (fn OperatorSubnetAPIKeyHandlerFunc) Handle(params OperatorSubnetAPIKeyParams, principal *models.Principal) middleware.Responder {
|
||||
return fn(params, principal)
|
||||
}
|
||||
|
||||
// OperatorSubnetAPIKeyHandler interface for that can handle valid operator subnet Api key params
|
||||
type OperatorSubnetAPIKeyHandler interface {
|
||||
Handle(OperatorSubnetAPIKeyParams, *models.Principal) middleware.Responder
|
||||
}
|
||||
|
||||
// NewOperatorSubnetAPIKey creates a new http.Handler for the operator subnet Api key operation
|
||||
func NewOperatorSubnetAPIKey(ctx *middleware.Context, handler OperatorSubnetAPIKeyHandler) *OperatorSubnetAPIKey {
|
||||
return &OperatorSubnetAPIKey{Context: ctx, Handler: handler}
|
||||
}
|
||||
|
||||
/* OperatorSubnetAPIKey swagger:route GET /subnet/apikey OperatorAPI operatorSubnetApiKey
|
||||
|
||||
Subnet api key
|
||||
|
||||
*/
|
||||
type OperatorSubnetAPIKey struct {
|
||||
Context *middleware.Context
|
||||
Handler OperatorSubnetAPIKeyHandler
|
||||
}
|
||||
|
||||
func (o *OperatorSubnetAPIKey) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
||||
if rCtx != nil {
|
||||
*r = *rCtx
|
||||
}
|
||||
var Params = NewOperatorSubnetAPIKeyParams()
|
||||
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
||||
if err != nil {
|
||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||
return
|
||||
}
|
||||
if aCtx != nil {
|
||||
*r = *aCtx
|
||||
}
|
||||
var principal *models.Principal
|
||||
if uprinc != nil {
|
||||
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
|
||||
}
|
||||
|
||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||
return
|
||||
}
|
||||
|
||||
res := o.Handler.Handle(Params, principal) // actually handle the request
|
||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// OperatorSubnetAPIKeyInfoHandlerFunc turns a function with the right signature into a operator subnet API key info handler
|
||||
type OperatorSubnetAPIKeyInfoHandlerFunc func(OperatorSubnetAPIKeyInfoParams, *models.Principal) middleware.Responder
|
||||
|
||||
// Handle executing the request and returning a response
|
||||
func (fn OperatorSubnetAPIKeyInfoHandlerFunc) Handle(params OperatorSubnetAPIKeyInfoParams, principal *models.Principal) middleware.Responder {
|
||||
return fn(params, principal)
|
||||
}
|
||||
|
||||
// OperatorSubnetAPIKeyInfoHandler interface for that can handle valid operator subnet API key info params
|
||||
type OperatorSubnetAPIKeyInfoHandler interface {
|
||||
Handle(OperatorSubnetAPIKeyInfoParams, *models.Principal) middleware.Responder
|
||||
}
|
||||
|
||||
// NewOperatorSubnetAPIKeyInfo creates a new http.Handler for the operator subnet API key info operation
|
||||
func NewOperatorSubnetAPIKeyInfo(ctx *middleware.Context, handler OperatorSubnetAPIKeyInfoHandler) *OperatorSubnetAPIKeyInfo {
|
||||
return &OperatorSubnetAPIKeyInfo{Context: ctx, Handler: handler}
|
||||
}
|
||||
|
||||
/* OperatorSubnetAPIKeyInfo swagger:route GET /subnet/apikey/info OperatorAPI operatorSubnetApiKeyInfo
|
||||
|
||||
Subnet API key info
|
||||
|
||||
*/
|
||||
type OperatorSubnetAPIKeyInfo struct {
|
||||
Context *middleware.Context
|
||||
Handler OperatorSubnetAPIKeyInfoHandler
|
||||
}
|
||||
|
||||
func (o *OperatorSubnetAPIKeyInfo) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
||||
if rCtx != nil {
|
||||
*r = *rCtx
|
||||
}
|
||||
var Params = NewOperatorSubnetAPIKeyInfoParams()
|
||||
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
||||
if err != nil {
|
||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||
return
|
||||
}
|
||||
if aCtx != nil {
|
||||
*r = *aCtx
|
||||
}
|
||||
var principal *models.Principal
|
||||
if uprinc != nil {
|
||||
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
|
||||
}
|
||||
|
||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||
return
|
||||
}
|
||||
|
||||
res := o.Handler.Handle(Params, principal) // actually handle the request
|
||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
)
|
||||
|
||||
// NewOperatorSubnetAPIKeyInfoParams creates a new OperatorSubnetAPIKeyInfoParams object
|
||||
//
|
||||
// There are no default values defined in the spec.
|
||||
func NewOperatorSubnetAPIKeyInfoParams() OperatorSubnetAPIKeyInfoParams {
|
||||
|
||||
return OperatorSubnetAPIKeyInfoParams{}
|
||||
}
|
||||
|
||||
// OperatorSubnetAPIKeyInfoParams contains all the bound params for the operator subnet API key info operation
|
||||
// typically these are obtained from a http.Request
|
||||
//
|
||||
// swagger:parameters OperatorSubnetAPIKeyInfo
|
||||
type OperatorSubnetAPIKeyInfoParams struct {
|
||||
|
||||
// HTTP Request Object
|
||||
HTTPRequest *http.Request `json:"-"`
|
||||
}
|
||||
|
||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
||||
// for simple values it will use straight method calls.
|
||||
//
|
||||
// To ensure default values, the struct must have been initialized with NewOperatorSubnetAPIKeyInfoParams() beforehand.
|
||||
func (o *OperatorSubnetAPIKeyInfoParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
||||
var res []error
|
||||
|
||||
o.HTTPRequest = r
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// OperatorSubnetAPIKeyInfoOKCode is the HTTP code returned for type OperatorSubnetAPIKeyInfoOK
|
||||
const OperatorSubnetAPIKeyInfoOKCode int = 200
|
||||
|
||||
/*OperatorSubnetAPIKeyInfoOK A successful response.
|
||||
|
||||
swagger:response operatorSubnetApiKeyInfoOK
|
||||
*/
|
||||
type OperatorSubnetAPIKeyInfoOK struct {
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *models.OperatorSubnetRegisterAPIKeyResponse `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewOperatorSubnetAPIKeyInfoOK creates OperatorSubnetAPIKeyInfoOK with default headers values
|
||||
func NewOperatorSubnetAPIKeyInfoOK() *OperatorSubnetAPIKeyInfoOK {
|
||||
|
||||
return &OperatorSubnetAPIKeyInfoOK{}
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the operator subnet Api key info o k response
|
||||
func (o *OperatorSubnetAPIKeyInfoOK) WithPayload(payload *models.OperatorSubnetRegisterAPIKeyResponse) *OperatorSubnetAPIKeyInfoOK {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the operator subnet Api key info o k response
|
||||
func (o *OperatorSubnetAPIKeyInfoOK) SetPayload(payload *models.OperatorSubnetRegisterAPIKeyResponse) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *OperatorSubnetAPIKeyInfoOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(200)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*OperatorSubnetAPIKeyInfoDefault Generic error response.
|
||||
|
||||
swagger:response operatorSubnetApiKeyInfoDefault
|
||||
*/
|
||||
type OperatorSubnetAPIKeyInfoDefault struct {
|
||||
_statusCode int
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *models.Error `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewOperatorSubnetAPIKeyInfoDefault creates OperatorSubnetAPIKeyInfoDefault with default headers values
|
||||
func NewOperatorSubnetAPIKeyInfoDefault(code int) *OperatorSubnetAPIKeyInfoDefault {
|
||||
if code <= 0 {
|
||||
code = 500
|
||||
}
|
||||
|
||||
return &OperatorSubnetAPIKeyInfoDefault{
|
||||
_statusCode: code,
|
||||
}
|
||||
}
|
||||
|
||||
// WithStatusCode adds the status to the operator subnet API key info default response
|
||||
func (o *OperatorSubnetAPIKeyInfoDefault) WithStatusCode(code int) *OperatorSubnetAPIKeyInfoDefault {
|
||||
o._statusCode = code
|
||||
return o
|
||||
}
|
||||
|
||||
// SetStatusCode sets the status to the operator subnet API key info default response
|
||||
func (o *OperatorSubnetAPIKeyInfoDefault) SetStatusCode(code int) {
|
||||
o._statusCode = code
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the operator subnet API key info default response
|
||||
func (o *OperatorSubnetAPIKeyInfoDefault) WithPayload(payload *models.Error) *OperatorSubnetAPIKeyInfoDefault {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the operator subnet API key info default response
|
||||
func (o *OperatorSubnetAPIKeyInfoDefault) SetPayload(payload *models.Error) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *OperatorSubnetAPIKeyInfoDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(o._statusCode)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the generate command
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/url"
|
||||
golangswaggerpaths "path"
|
||||
)
|
||||
|
||||
// OperatorSubnetAPIKeyInfoURL generates an URL for the operator subnet API key info operation
|
||||
type OperatorSubnetAPIKeyInfoURL struct {
|
||||
_basePath string
|
||||
}
|
||||
|
||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
||||
// base path specified in the swagger spec.
|
||||
// When the value of the base path is an empty string
|
||||
func (o *OperatorSubnetAPIKeyInfoURL) WithBasePath(bp string) *OperatorSubnetAPIKeyInfoURL {
|
||||
o.SetBasePath(bp)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
||||
// base path specified in the swagger spec.
|
||||
// When the value of the base path is an empty string
|
||||
func (o *OperatorSubnetAPIKeyInfoURL) SetBasePath(bp string) {
|
||||
o._basePath = bp
|
||||
}
|
||||
|
||||
// Build a url path and query string
|
||||
func (o *OperatorSubnetAPIKeyInfoURL) Build() (*url.URL, error) {
|
||||
var _result url.URL
|
||||
|
||||
var _path = "/subnet/apikey/info"
|
||||
|
||||
_basePath := o._basePath
|
||||
if _basePath == "" {
|
||||
_basePath = "/api/v1"
|
||||
}
|
||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
||||
|
||||
return &_result, nil
|
||||
}
|
||||
|
||||
// Must is a helper function to panic when the url builder returns an error
|
||||
func (o *OperatorSubnetAPIKeyInfoURL) Must(u *url.URL, err error) *url.URL {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if u == nil {
|
||||
panic("url can't be nil")
|
||||
}
|
||||
return u
|
||||
}
|
||||
|
||||
// String returns the string representation of the path with query string
|
||||
func (o *OperatorSubnetAPIKeyInfoURL) String() string {
|
||||
return o.Must(o.Build()).String()
|
||||
}
|
||||
|
||||
// BuildFull builds a full url with scheme, host, path and query string
|
||||
func (o *OperatorSubnetAPIKeyInfoURL) BuildFull(scheme, host string) (*url.URL, error) {
|
||||
if scheme == "" {
|
||||
return nil, errors.New("scheme is required for a full url on OperatorSubnetAPIKeyInfoURL")
|
||||
}
|
||||
if host == "" {
|
||||
return nil, errors.New("host is required for a full url on OperatorSubnetAPIKeyInfoURL")
|
||||
}
|
||||
|
||||
base, err := o.Build()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
base.Scheme = scheme
|
||||
base.Host = host
|
||||
return base, nil
|
||||
}
|
||||
|
||||
// StringFull returns the string representation of a complete url
|
||||
func (o *OperatorSubnetAPIKeyInfoURL) StringFull(scheme, host string) string {
|
||||
return o.Must(o.BuildFull(scheme, host)).String()
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// NewOperatorSubnetAPIKeyParams creates a new OperatorSubnetAPIKeyParams object
|
||||
//
|
||||
// There are no default values defined in the spec.
|
||||
func NewOperatorSubnetAPIKeyParams() OperatorSubnetAPIKeyParams {
|
||||
|
||||
return OperatorSubnetAPIKeyParams{}
|
||||
}
|
||||
|
||||
// OperatorSubnetAPIKeyParams contains all the bound params for the operator subnet Api key operation
|
||||
// typically these are obtained from a http.Request
|
||||
//
|
||||
// swagger:parameters OperatorSubnetApiKey
|
||||
type OperatorSubnetAPIKeyParams struct {
|
||||
|
||||
// HTTP Request Object
|
||||
HTTPRequest *http.Request `json:"-"`
|
||||
|
||||
/*
|
||||
Required: true
|
||||
In: query
|
||||
*/
|
||||
Token string
|
||||
}
|
||||
|
||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
||||
// for simple values it will use straight method calls.
|
||||
//
|
||||
// To ensure default values, the struct must have been initialized with NewOperatorSubnetAPIKeyParams() beforehand.
|
||||
func (o *OperatorSubnetAPIKeyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
||||
var res []error
|
||||
|
||||
o.HTTPRequest = r
|
||||
|
||||
qs := runtime.Values(r.URL.Query())
|
||||
|
||||
qToken, qhkToken, _ := qs.GetOK("token")
|
||||
if err := o.bindToken(qToken, qhkToken, route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// bindToken binds and validates parameter Token from query.
|
||||
func (o *OperatorSubnetAPIKeyParams) bindToken(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
||||
if !hasKey {
|
||||
return errors.Required("token", "query", rawData)
|
||||
}
|
||||
var raw string
|
||||
if len(rawData) > 0 {
|
||||
raw = rawData[len(rawData)-1]
|
||||
}
|
||||
|
||||
// Required: true
|
||||
// AllowEmptyValue: false
|
||||
|
||||
if err := validate.RequiredString("token", "query", raw); err != nil {
|
||||
return err
|
||||
}
|
||||
o.Token = raw
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// OperatorSubnetAPIKeyOKCode is the HTTP code returned for type OperatorSubnetAPIKeyOK
|
||||
const OperatorSubnetAPIKeyOKCode int = 200
|
||||
|
||||
/*OperatorSubnetAPIKeyOK A successful response.
|
||||
|
||||
swagger:response operatorSubnetApiKeyOK
|
||||
*/
|
||||
type OperatorSubnetAPIKeyOK struct {
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *models.OperatorSubnetAPIKey `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewOperatorSubnetAPIKeyOK creates OperatorSubnetAPIKeyOK with default headers values
|
||||
func NewOperatorSubnetAPIKeyOK() *OperatorSubnetAPIKeyOK {
|
||||
|
||||
return &OperatorSubnetAPIKeyOK{}
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the operator subnet Api key o k response
|
||||
func (o *OperatorSubnetAPIKeyOK) WithPayload(payload *models.OperatorSubnetAPIKey) *OperatorSubnetAPIKeyOK {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the operator subnet Api key o k response
|
||||
func (o *OperatorSubnetAPIKeyOK) SetPayload(payload *models.OperatorSubnetAPIKey) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *OperatorSubnetAPIKeyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(200)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*OperatorSubnetAPIKeyDefault Generic error response.
|
||||
|
||||
swagger:response operatorSubnetApiKeyDefault
|
||||
*/
|
||||
type OperatorSubnetAPIKeyDefault struct {
|
||||
_statusCode int
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *models.Error `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewOperatorSubnetAPIKeyDefault creates OperatorSubnetAPIKeyDefault with default headers values
|
||||
func NewOperatorSubnetAPIKeyDefault(code int) *OperatorSubnetAPIKeyDefault {
|
||||
if code <= 0 {
|
||||
code = 500
|
||||
}
|
||||
|
||||
return &OperatorSubnetAPIKeyDefault{
|
||||
_statusCode: code,
|
||||
}
|
||||
}
|
||||
|
||||
// WithStatusCode adds the status to the operator subnet Api key default response
|
||||
func (o *OperatorSubnetAPIKeyDefault) WithStatusCode(code int) *OperatorSubnetAPIKeyDefault {
|
||||
o._statusCode = code
|
||||
return o
|
||||
}
|
||||
|
||||
// SetStatusCode sets the status to the operator subnet Api key default response
|
||||
func (o *OperatorSubnetAPIKeyDefault) SetStatusCode(code int) {
|
||||
o._statusCode = code
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the operator subnet Api key default response
|
||||
func (o *OperatorSubnetAPIKeyDefault) WithPayload(payload *models.Error) *OperatorSubnetAPIKeyDefault {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the operator subnet Api key default response
|
||||
func (o *OperatorSubnetAPIKeyDefault) SetPayload(payload *models.Error) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *OperatorSubnetAPIKeyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(o._statusCode)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the generate command
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/url"
|
||||
golangswaggerpaths "path"
|
||||
)
|
||||
|
||||
// OperatorSubnetAPIKeyURL generates an URL for the operator subnet Api key operation
|
||||
type OperatorSubnetAPIKeyURL struct {
|
||||
Token string
|
||||
|
||||
_basePath string
|
||||
// avoid unkeyed usage
|
||||
_ struct{}
|
||||
}
|
||||
|
||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
||||
// base path specified in the swagger spec.
|
||||
// When the value of the base path is an empty string
|
||||
func (o *OperatorSubnetAPIKeyURL) WithBasePath(bp string) *OperatorSubnetAPIKeyURL {
|
||||
o.SetBasePath(bp)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
||||
// base path specified in the swagger spec.
|
||||
// When the value of the base path is an empty string
|
||||
func (o *OperatorSubnetAPIKeyURL) SetBasePath(bp string) {
|
||||
o._basePath = bp
|
||||
}
|
||||
|
||||
// Build a url path and query string
|
||||
func (o *OperatorSubnetAPIKeyURL) Build() (*url.URL, error) {
|
||||
var _result url.URL
|
||||
|
||||
var _path = "/subnet/apikey"
|
||||
|
||||
_basePath := o._basePath
|
||||
if _basePath == "" {
|
||||
_basePath = "/api/v1"
|
||||
}
|
||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
||||
|
||||
qs := make(url.Values)
|
||||
|
||||
tokenQ := o.Token
|
||||
if tokenQ != "" {
|
||||
qs.Set("token", tokenQ)
|
||||
}
|
||||
|
||||
_result.RawQuery = qs.Encode()
|
||||
|
||||
return &_result, nil
|
||||
}
|
||||
|
||||
// Must is a helper function to panic when the url builder returns an error
|
||||
func (o *OperatorSubnetAPIKeyURL) Must(u *url.URL, err error) *url.URL {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if u == nil {
|
||||
panic("url can't be nil")
|
||||
}
|
||||
return u
|
||||
}
|
||||
|
||||
// String returns the string representation of the path with query string
|
||||
func (o *OperatorSubnetAPIKeyURL) String() string {
|
||||
return o.Must(o.Build()).String()
|
||||
}
|
||||
|
||||
// BuildFull builds a full url with scheme, host, path and query string
|
||||
func (o *OperatorSubnetAPIKeyURL) BuildFull(scheme, host string) (*url.URL, error) {
|
||||
if scheme == "" {
|
||||
return nil, errors.New("scheme is required for a full url on OperatorSubnetAPIKeyURL")
|
||||
}
|
||||
if host == "" {
|
||||
return nil, errors.New("host is required for a full url on OperatorSubnetAPIKeyURL")
|
||||
}
|
||||
|
||||
base, err := o.Build()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
base.Scheme = scheme
|
||||
base.Host = host
|
||||
return base, nil
|
||||
}
|
||||
|
||||
// StringFull returns the string representation of a complete url
|
||||
func (o *OperatorSubnetAPIKeyURL) StringFull(scheme, host string) string {
|
||||
return o.Must(o.BuildFull(scheme, host)).String()
|
||||
}
|
||||
88
operatorapi/operations/operator_api/operator_subnet_login.go
Normal file
88
operatorapi/operations/operator_api/operator_subnet_login.go
Normal file
@@ -0,0 +1,88 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// OperatorSubnetLoginHandlerFunc turns a function with the right signature into a operator subnet login handler
|
||||
type OperatorSubnetLoginHandlerFunc func(OperatorSubnetLoginParams, *models.Principal) middleware.Responder
|
||||
|
||||
// Handle executing the request and returning a response
|
||||
func (fn OperatorSubnetLoginHandlerFunc) Handle(params OperatorSubnetLoginParams, principal *models.Principal) middleware.Responder {
|
||||
return fn(params, principal)
|
||||
}
|
||||
|
||||
// OperatorSubnetLoginHandler interface for that can handle valid operator subnet login params
|
||||
type OperatorSubnetLoginHandler interface {
|
||||
Handle(OperatorSubnetLoginParams, *models.Principal) middleware.Responder
|
||||
}
|
||||
|
||||
// NewOperatorSubnetLogin creates a new http.Handler for the operator subnet login operation
|
||||
func NewOperatorSubnetLogin(ctx *middleware.Context, handler OperatorSubnetLoginHandler) *OperatorSubnetLogin {
|
||||
return &OperatorSubnetLogin{Context: ctx, Handler: handler}
|
||||
}
|
||||
|
||||
/* OperatorSubnetLogin swagger:route POST /subnet/login OperatorAPI operatorSubnetLogin
|
||||
|
||||
Login to subnet
|
||||
|
||||
*/
|
||||
type OperatorSubnetLogin struct {
|
||||
Context *middleware.Context
|
||||
Handler OperatorSubnetLoginHandler
|
||||
}
|
||||
|
||||
func (o *OperatorSubnetLogin) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
||||
if rCtx != nil {
|
||||
*r = *rCtx
|
||||
}
|
||||
var Params = NewOperatorSubnetLoginParams()
|
||||
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
||||
if err != nil {
|
||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||
return
|
||||
}
|
||||
if aCtx != nil {
|
||||
*r = *aCtx
|
||||
}
|
||||
var principal *models.Principal
|
||||
if uprinc != nil {
|
||||
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
|
||||
}
|
||||
|
||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||
return
|
||||
}
|
||||
|
||||
res := o.Handler.Handle(Params, principal) // actually handle the request
|
||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// OperatorSubnetLoginMFAHandlerFunc turns a function with the right signature into a operator subnet login m f a handler
|
||||
type OperatorSubnetLoginMFAHandlerFunc func(OperatorSubnetLoginMFAParams, *models.Principal) middleware.Responder
|
||||
|
||||
// Handle executing the request and returning a response
|
||||
func (fn OperatorSubnetLoginMFAHandlerFunc) Handle(params OperatorSubnetLoginMFAParams, principal *models.Principal) middleware.Responder {
|
||||
return fn(params, principal)
|
||||
}
|
||||
|
||||
// OperatorSubnetLoginMFAHandler interface for that can handle valid operator subnet login m f a params
|
||||
type OperatorSubnetLoginMFAHandler interface {
|
||||
Handle(OperatorSubnetLoginMFAParams, *models.Principal) middleware.Responder
|
||||
}
|
||||
|
||||
// NewOperatorSubnetLoginMFA creates a new http.Handler for the operator subnet login m f a operation
|
||||
func NewOperatorSubnetLoginMFA(ctx *middleware.Context, handler OperatorSubnetLoginMFAHandler) *OperatorSubnetLoginMFA {
|
||||
return &OperatorSubnetLoginMFA{Context: ctx, Handler: handler}
|
||||
}
|
||||
|
||||
/* OperatorSubnetLoginMFA swagger:route POST /subnet/login/mfa OperatorAPI operatorSubnetLoginMFA
|
||||
|
||||
Login to subnet using mfa
|
||||
|
||||
*/
|
||||
type OperatorSubnetLoginMFA struct {
|
||||
Context *middleware.Context
|
||||
Handler OperatorSubnetLoginMFAHandler
|
||||
}
|
||||
|
||||
func (o *OperatorSubnetLoginMFA) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
||||
if rCtx != nil {
|
||||
*r = *rCtx
|
||||
}
|
||||
var Params = NewOperatorSubnetLoginMFAParams()
|
||||
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
||||
if err != nil {
|
||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||
return
|
||||
}
|
||||
if aCtx != nil {
|
||||
*r = *aCtx
|
||||
}
|
||||
var principal *models.Principal
|
||||
if uprinc != nil {
|
||||
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
|
||||
}
|
||||
|
||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||
return
|
||||
}
|
||||
|
||||
res := o.Handler.Handle(Params, principal) // actually handle the request
|
||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/go-openapi/validate"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// NewOperatorSubnetLoginMFAParams creates a new OperatorSubnetLoginMFAParams object
|
||||
//
|
||||
// There are no default values defined in the spec.
|
||||
func NewOperatorSubnetLoginMFAParams() OperatorSubnetLoginMFAParams {
|
||||
|
||||
return OperatorSubnetLoginMFAParams{}
|
||||
}
|
||||
|
||||
// OperatorSubnetLoginMFAParams contains all the bound params for the operator subnet login m f a operation
|
||||
// typically these are obtained from a http.Request
|
||||
//
|
||||
// swagger:parameters OperatorSubnetLoginMFA
|
||||
type OperatorSubnetLoginMFAParams struct {
|
||||
|
||||
// HTTP Request Object
|
||||
HTTPRequest *http.Request `json:"-"`
|
||||
|
||||
/*
|
||||
Required: true
|
||||
In: body
|
||||
*/
|
||||
Body *models.OperatorSubnetLoginMFARequest
|
||||
}
|
||||
|
||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
||||
// for simple values it will use straight method calls.
|
||||
//
|
||||
// To ensure default values, the struct must have been initialized with NewOperatorSubnetLoginMFAParams() beforehand.
|
||||
func (o *OperatorSubnetLoginMFAParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
||||
var res []error
|
||||
|
||||
o.HTTPRequest = r
|
||||
|
||||
if runtime.HasBody(r) {
|
||||
defer r.Body.Close()
|
||||
var body models.OperatorSubnetLoginMFARequest
|
||||
if err := route.Consumer.Consume(r.Body, &body); err != nil {
|
||||
if err == io.EOF {
|
||||
res = append(res, errors.Required("body", "body", ""))
|
||||
} else {
|
||||
res = append(res, errors.NewParseError("body", "body", "", err))
|
||||
}
|
||||
} else {
|
||||
// validate body object
|
||||
if err := body.Validate(route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
ctx := validate.WithOperationRequest(context.Background())
|
||||
if err := body.ContextValidate(ctx, route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) == 0 {
|
||||
o.Body = &body
|
||||
}
|
||||
}
|
||||
} else {
|
||||
res = append(res, errors.Required("body", "body", ""))
|
||||
}
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// OperatorSubnetLoginMFAOKCode is the HTTP code returned for type OperatorSubnetLoginMFAOK
|
||||
const OperatorSubnetLoginMFAOKCode int = 200
|
||||
|
||||
/*OperatorSubnetLoginMFAOK A successful response.
|
||||
|
||||
swagger:response operatorSubnetLoginMFAOK
|
||||
*/
|
||||
type OperatorSubnetLoginMFAOK struct {
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *models.OperatorSubnetLoginResponse `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewOperatorSubnetLoginMFAOK creates OperatorSubnetLoginMFAOK with default headers values
|
||||
func NewOperatorSubnetLoginMFAOK() *OperatorSubnetLoginMFAOK {
|
||||
|
||||
return &OperatorSubnetLoginMFAOK{}
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the operator subnet login m f a o k response
|
||||
func (o *OperatorSubnetLoginMFAOK) WithPayload(payload *models.OperatorSubnetLoginResponse) *OperatorSubnetLoginMFAOK {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the operator subnet login m f a o k response
|
||||
func (o *OperatorSubnetLoginMFAOK) SetPayload(payload *models.OperatorSubnetLoginResponse) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *OperatorSubnetLoginMFAOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(200)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*OperatorSubnetLoginMFADefault Generic error response.
|
||||
|
||||
swagger:response operatorSubnetLoginMFADefault
|
||||
*/
|
||||
type OperatorSubnetLoginMFADefault struct {
|
||||
_statusCode int
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *models.Error `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewOperatorSubnetLoginMFADefault creates OperatorSubnetLoginMFADefault with default headers values
|
||||
func NewOperatorSubnetLoginMFADefault(code int) *OperatorSubnetLoginMFADefault {
|
||||
if code <= 0 {
|
||||
code = 500
|
||||
}
|
||||
|
||||
return &OperatorSubnetLoginMFADefault{
|
||||
_statusCode: code,
|
||||
}
|
||||
}
|
||||
|
||||
// WithStatusCode adds the status to the operator subnet login m f a default response
|
||||
func (o *OperatorSubnetLoginMFADefault) WithStatusCode(code int) *OperatorSubnetLoginMFADefault {
|
||||
o._statusCode = code
|
||||
return o
|
||||
}
|
||||
|
||||
// SetStatusCode sets the status to the operator subnet login m f a default response
|
||||
func (o *OperatorSubnetLoginMFADefault) SetStatusCode(code int) {
|
||||
o._statusCode = code
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the operator subnet login m f a default response
|
||||
func (o *OperatorSubnetLoginMFADefault) WithPayload(payload *models.Error) *OperatorSubnetLoginMFADefault {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the operator subnet login m f a default response
|
||||
func (o *OperatorSubnetLoginMFADefault) SetPayload(payload *models.Error) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *OperatorSubnetLoginMFADefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(o._statusCode)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the generate command
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/url"
|
||||
golangswaggerpaths "path"
|
||||
)
|
||||
|
||||
// OperatorSubnetLoginMFAURL generates an URL for the operator subnet login m f a operation
|
||||
type OperatorSubnetLoginMFAURL struct {
|
||||
_basePath string
|
||||
}
|
||||
|
||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
||||
// base path specified in the swagger spec.
|
||||
// When the value of the base path is an empty string
|
||||
func (o *OperatorSubnetLoginMFAURL) WithBasePath(bp string) *OperatorSubnetLoginMFAURL {
|
||||
o.SetBasePath(bp)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
||||
// base path specified in the swagger spec.
|
||||
// When the value of the base path is an empty string
|
||||
func (o *OperatorSubnetLoginMFAURL) SetBasePath(bp string) {
|
||||
o._basePath = bp
|
||||
}
|
||||
|
||||
// Build a url path and query string
|
||||
func (o *OperatorSubnetLoginMFAURL) Build() (*url.URL, error) {
|
||||
var _result url.URL
|
||||
|
||||
var _path = "/subnet/login/mfa"
|
||||
|
||||
_basePath := o._basePath
|
||||
if _basePath == "" {
|
||||
_basePath = "/api/v1"
|
||||
}
|
||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
||||
|
||||
return &_result, nil
|
||||
}
|
||||
|
||||
// Must is a helper function to panic when the url builder returns an error
|
||||
func (o *OperatorSubnetLoginMFAURL) Must(u *url.URL, err error) *url.URL {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if u == nil {
|
||||
panic("url can't be nil")
|
||||
}
|
||||
return u
|
||||
}
|
||||
|
||||
// String returns the string representation of the path with query string
|
||||
func (o *OperatorSubnetLoginMFAURL) String() string {
|
||||
return o.Must(o.Build()).String()
|
||||
}
|
||||
|
||||
// BuildFull builds a full url with scheme, host, path and query string
|
||||
func (o *OperatorSubnetLoginMFAURL) BuildFull(scheme, host string) (*url.URL, error) {
|
||||
if scheme == "" {
|
||||
return nil, errors.New("scheme is required for a full url on OperatorSubnetLoginMFAURL")
|
||||
}
|
||||
if host == "" {
|
||||
return nil, errors.New("host is required for a full url on OperatorSubnetLoginMFAURL")
|
||||
}
|
||||
|
||||
base, err := o.Build()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
base.Scheme = scheme
|
||||
base.Host = host
|
||||
return base, nil
|
||||
}
|
||||
|
||||
// StringFull returns the string representation of a complete url
|
||||
func (o *OperatorSubnetLoginMFAURL) StringFull(scheme, host string) string {
|
||||
return o.Must(o.BuildFull(scheme, host)).String()
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/go-openapi/validate"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// NewOperatorSubnetLoginParams creates a new OperatorSubnetLoginParams object
|
||||
//
|
||||
// There are no default values defined in the spec.
|
||||
func NewOperatorSubnetLoginParams() OperatorSubnetLoginParams {
|
||||
|
||||
return OperatorSubnetLoginParams{}
|
||||
}
|
||||
|
||||
// OperatorSubnetLoginParams contains all the bound params for the operator subnet login operation
|
||||
// typically these are obtained from a http.Request
|
||||
//
|
||||
// swagger:parameters OperatorSubnetLogin
|
||||
type OperatorSubnetLoginParams struct {
|
||||
|
||||
// HTTP Request Object
|
||||
HTTPRequest *http.Request `json:"-"`
|
||||
|
||||
/*
|
||||
Required: true
|
||||
In: body
|
||||
*/
|
||||
Body *models.OperatorSubnetLoginRequest
|
||||
}
|
||||
|
||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
||||
// for simple values it will use straight method calls.
|
||||
//
|
||||
// To ensure default values, the struct must have been initialized with NewOperatorSubnetLoginParams() beforehand.
|
||||
func (o *OperatorSubnetLoginParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
||||
var res []error
|
||||
|
||||
o.HTTPRequest = r
|
||||
|
||||
if runtime.HasBody(r) {
|
||||
defer r.Body.Close()
|
||||
var body models.OperatorSubnetLoginRequest
|
||||
if err := route.Consumer.Consume(r.Body, &body); err != nil {
|
||||
if err == io.EOF {
|
||||
res = append(res, errors.Required("body", "body", ""))
|
||||
} else {
|
||||
res = append(res, errors.NewParseError("body", "body", "", err))
|
||||
}
|
||||
} else {
|
||||
// validate body object
|
||||
if err := body.Validate(route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
ctx := validate.WithOperationRequest(context.Background())
|
||||
if err := body.ContextValidate(ctx, route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) == 0 {
|
||||
o.Body = &body
|
||||
}
|
||||
}
|
||||
} else {
|
||||
res = append(res, errors.Required("body", "body", ""))
|
||||
}
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// OperatorSubnetLoginOKCode is the HTTP code returned for type OperatorSubnetLoginOK
|
||||
const OperatorSubnetLoginOKCode int = 200
|
||||
|
||||
/*OperatorSubnetLoginOK A successful response.
|
||||
|
||||
swagger:response operatorSubnetLoginOK
|
||||
*/
|
||||
type OperatorSubnetLoginOK struct {
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *models.OperatorSubnetLoginResponse `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewOperatorSubnetLoginOK creates OperatorSubnetLoginOK with default headers values
|
||||
func NewOperatorSubnetLoginOK() *OperatorSubnetLoginOK {
|
||||
|
||||
return &OperatorSubnetLoginOK{}
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the operator subnet login o k response
|
||||
func (o *OperatorSubnetLoginOK) WithPayload(payload *models.OperatorSubnetLoginResponse) *OperatorSubnetLoginOK {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the operator subnet login o k response
|
||||
func (o *OperatorSubnetLoginOK) SetPayload(payload *models.OperatorSubnetLoginResponse) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *OperatorSubnetLoginOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(200)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*OperatorSubnetLoginDefault Generic error response.
|
||||
|
||||
swagger:response operatorSubnetLoginDefault
|
||||
*/
|
||||
type OperatorSubnetLoginDefault struct {
|
||||
_statusCode int
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *models.Error `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewOperatorSubnetLoginDefault creates OperatorSubnetLoginDefault with default headers values
|
||||
func NewOperatorSubnetLoginDefault(code int) *OperatorSubnetLoginDefault {
|
||||
if code <= 0 {
|
||||
code = 500
|
||||
}
|
||||
|
||||
return &OperatorSubnetLoginDefault{
|
||||
_statusCode: code,
|
||||
}
|
||||
}
|
||||
|
||||
// WithStatusCode adds the status to the operator subnet login default response
|
||||
func (o *OperatorSubnetLoginDefault) WithStatusCode(code int) *OperatorSubnetLoginDefault {
|
||||
o._statusCode = code
|
||||
return o
|
||||
}
|
||||
|
||||
// SetStatusCode sets the status to the operator subnet login default response
|
||||
func (o *OperatorSubnetLoginDefault) SetStatusCode(code int) {
|
||||
o._statusCode = code
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the operator subnet login default response
|
||||
func (o *OperatorSubnetLoginDefault) WithPayload(payload *models.Error) *OperatorSubnetLoginDefault {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the operator subnet login default response
|
||||
func (o *OperatorSubnetLoginDefault) SetPayload(payload *models.Error) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *OperatorSubnetLoginDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(o._statusCode)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the generate command
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/url"
|
||||
golangswaggerpaths "path"
|
||||
)
|
||||
|
||||
// OperatorSubnetLoginURL generates an URL for the operator subnet login operation
|
||||
type OperatorSubnetLoginURL struct {
|
||||
_basePath string
|
||||
}
|
||||
|
||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
||||
// base path specified in the swagger spec.
|
||||
// When the value of the base path is an empty string
|
||||
func (o *OperatorSubnetLoginURL) WithBasePath(bp string) *OperatorSubnetLoginURL {
|
||||
o.SetBasePath(bp)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
||||
// base path specified in the swagger spec.
|
||||
// When the value of the base path is an empty string
|
||||
func (o *OperatorSubnetLoginURL) SetBasePath(bp string) {
|
||||
o._basePath = bp
|
||||
}
|
||||
|
||||
// Build a url path and query string
|
||||
func (o *OperatorSubnetLoginURL) Build() (*url.URL, error) {
|
||||
var _result url.URL
|
||||
|
||||
var _path = "/subnet/login"
|
||||
|
||||
_basePath := o._basePath
|
||||
if _basePath == "" {
|
||||
_basePath = "/api/v1"
|
||||
}
|
||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
||||
|
||||
return &_result, nil
|
||||
}
|
||||
|
||||
// Must is a helper function to panic when the url builder returns an error
|
||||
func (o *OperatorSubnetLoginURL) Must(u *url.URL, err error) *url.URL {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if u == nil {
|
||||
panic("url can't be nil")
|
||||
}
|
||||
return u
|
||||
}
|
||||
|
||||
// String returns the string representation of the path with query string
|
||||
func (o *OperatorSubnetLoginURL) String() string {
|
||||
return o.Must(o.Build()).String()
|
||||
}
|
||||
|
||||
// BuildFull builds a full url with scheme, host, path and query string
|
||||
func (o *OperatorSubnetLoginURL) BuildFull(scheme, host string) (*url.URL, error) {
|
||||
if scheme == "" {
|
||||
return nil, errors.New("scheme is required for a full url on OperatorSubnetLoginURL")
|
||||
}
|
||||
if host == "" {
|
||||
return nil, errors.New("host is required for a full url on OperatorSubnetLoginURL")
|
||||
}
|
||||
|
||||
base, err := o.Build()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
base.Scheme = scheme
|
||||
base.Host = host
|
||||
return base, nil
|
||||
}
|
||||
|
||||
// StringFull returns the string representation of a complete url
|
||||
func (o *OperatorSubnetLoginURL) StringFull(scheme, host string) string {
|
||||
return o.Must(o.BuildFull(scheme, host)).String()
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// OperatorSubnetRegisterAPIKeyHandlerFunc turns a function with the right signature into a operator subnet register API key handler
|
||||
type OperatorSubnetRegisterAPIKeyHandlerFunc func(OperatorSubnetRegisterAPIKeyParams, *models.Principal) middleware.Responder
|
||||
|
||||
// Handle executing the request and returning a response
|
||||
func (fn OperatorSubnetRegisterAPIKeyHandlerFunc) Handle(params OperatorSubnetRegisterAPIKeyParams, principal *models.Principal) middleware.Responder {
|
||||
return fn(params, principal)
|
||||
}
|
||||
|
||||
// OperatorSubnetRegisterAPIKeyHandler interface for that can handle valid operator subnet register API key params
|
||||
type OperatorSubnetRegisterAPIKeyHandler interface {
|
||||
Handle(OperatorSubnetRegisterAPIKeyParams, *models.Principal) middleware.Responder
|
||||
}
|
||||
|
||||
// NewOperatorSubnetRegisterAPIKey creates a new http.Handler for the operator subnet register API key operation
|
||||
func NewOperatorSubnetRegisterAPIKey(ctx *middleware.Context, handler OperatorSubnetRegisterAPIKeyHandler) *OperatorSubnetRegisterAPIKey {
|
||||
return &OperatorSubnetRegisterAPIKey{Context: ctx, Handler: handler}
|
||||
}
|
||||
|
||||
/* OperatorSubnetRegisterAPIKey swagger:route POST /subnet/apikey/register OperatorAPI operatorSubnetRegisterApiKey
|
||||
|
||||
Register Operator with Subnet
|
||||
|
||||
*/
|
||||
type OperatorSubnetRegisterAPIKey struct {
|
||||
Context *middleware.Context
|
||||
Handler OperatorSubnetRegisterAPIKeyHandler
|
||||
}
|
||||
|
||||
func (o *OperatorSubnetRegisterAPIKey) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
||||
if rCtx != nil {
|
||||
*r = *rCtx
|
||||
}
|
||||
var Params = NewOperatorSubnetRegisterAPIKeyParams()
|
||||
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
||||
if err != nil {
|
||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||
return
|
||||
}
|
||||
if aCtx != nil {
|
||||
*r = *aCtx
|
||||
}
|
||||
var principal *models.Principal
|
||||
if uprinc != nil {
|
||||
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
|
||||
}
|
||||
|
||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||
return
|
||||
}
|
||||
|
||||
res := o.Handler.Handle(Params, principal) // actually handle the request
|
||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/go-openapi/validate"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// NewOperatorSubnetRegisterAPIKeyParams creates a new OperatorSubnetRegisterAPIKeyParams object
|
||||
//
|
||||
// There are no default values defined in the spec.
|
||||
func NewOperatorSubnetRegisterAPIKeyParams() OperatorSubnetRegisterAPIKeyParams {
|
||||
|
||||
return OperatorSubnetRegisterAPIKeyParams{}
|
||||
}
|
||||
|
||||
// OperatorSubnetRegisterAPIKeyParams contains all the bound params for the operator subnet register API key operation
|
||||
// typically these are obtained from a http.Request
|
||||
//
|
||||
// swagger:parameters OperatorSubnetRegisterAPIKey
|
||||
type OperatorSubnetRegisterAPIKeyParams struct {
|
||||
|
||||
// HTTP Request Object
|
||||
HTTPRequest *http.Request `json:"-"`
|
||||
|
||||
/*
|
||||
Required: true
|
||||
In: body
|
||||
*/
|
||||
Body *models.OperatorSubnetAPIKey
|
||||
}
|
||||
|
||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
||||
// for simple values it will use straight method calls.
|
||||
//
|
||||
// To ensure default values, the struct must have been initialized with NewOperatorSubnetRegisterAPIKeyParams() beforehand.
|
||||
func (o *OperatorSubnetRegisterAPIKeyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
||||
var res []error
|
||||
|
||||
o.HTTPRequest = r
|
||||
|
||||
if runtime.HasBody(r) {
|
||||
defer r.Body.Close()
|
||||
var body models.OperatorSubnetAPIKey
|
||||
if err := route.Consumer.Consume(r.Body, &body); err != nil {
|
||||
if err == io.EOF {
|
||||
res = append(res, errors.Required("body", "body", ""))
|
||||
} else {
|
||||
res = append(res, errors.NewParseError("body", "body", "", err))
|
||||
}
|
||||
} else {
|
||||
// validate body object
|
||||
if err := body.Validate(route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
ctx := validate.WithOperationRequest(context.Background())
|
||||
if err := body.ContextValidate(ctx, route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) == 0 {
|
||||
o.Body = &body
|
||||
}
|
||||
}
|
||||
} else {
|
||||
res = append(res, errors.Required("body", "body", ""))
|
||||
}
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
)
|
||||
|
||||
// OperatorSubnetRegisterAPIKeyOKCode is the HTTP code returned for type OperatorSubnetRegisterAPIKeyOK
|
||||
const OperatorSubnetRegisterAPIKeyOKCode int = 200
|
||||
|
||||
/*OperatorSubnetRegisterAPIKeyOK A successful response.
|
||||
|
||||
swagger:response operatorSubnetRegisterApiKeyOK
|
||||
*/
|
||||
type OperatorSubnetRegisterAPIKeyOK struct {
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *models.OperatorSubnetRegisterAPIKeyResponse `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewOperatorSubnetRegisterAPIKeyOK creates OperatorSubnetRegisterAPIKeyOK with default headers values
|
||||
func NewOperatorSubnetRegisterAPIKeyOK() *OperatorSubnetRegisterAPIKeyOK {
|
||||
|
||||
return &OperatorSubnetRegisterAPIKeyOK{}
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the operator subnet register Api key o k response
|
||||
func (o *OperatorSubnetRegisterAPIKeyOK) WithPayload(payload *models.OperatorSubnetRegisterAPIKeyResponse) *OperatorSubnetRegisterAPIKeyOK {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the operator subnet register Api key o k response
|
||||
func (o *OperatorSubnetRegisterAPIKeyOK) SetPayload(payload *models.OperatorSubnetRegisterAPIKeyResponse) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *OperatorSubnetRegisterAPIKeyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(200)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*OperatorSubnetRegisterAPIKeyDefault Generic error response.
|
||||
|
||||
swagger:response operatorSubnetRegisterApiKeyDefault
|
||||
*/
|
||||
type OperatorSubnetRegisterAPIKeyDefault struct {
|
||||
_statusCode int
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *models.Error `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewOperatorSubnetRegisterAPIKeyDefault creates OperatorSubnetRegisterAPIKeyDefault with default headers values
|
||||
func NewOperatorSubnetRegisterAPIKeyDefault(code int) *OperatorSubnetRegisterAPIKeyDefault {
|
||||
if code <= 0 {
|
||||
code = 500
|
||||
}
|
||||
|
||||
return &OperatorSubnetRegisterAPIKeyDefault{
|
||||
_statusCode: code,
|
||||
}
|
||||
}
|
||||
|
||||
// WithStatusCode adds the status to the operator subnet register API key default response
|
||||
func (o *OperatorSubnetRegisterAPIKeyDefault) WithStatusCode(code int) *OperatorSubnetRegisterAPIKeyDefault {
|
||||
o._statusCode = code
|
||||
return o
|
||||
}
|
||||
|
||||
// SetStatusCode sets the status to the operator subnet register API key default response
|
||||
func (o *OperatorSubnetRegisterAPIKeyDefault) SetStatusCode(code int) {
|
||||
o._statusCode = code
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the operator subnet register API key default response
|
||||
func (o *OperatorSubnetRegisterAPIKeyDefault) WithPayload(payload *models.Error) *OperatorSubnetRegisterAPIKeyDefault {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the operator subnet register API key default response
|
||||
func (o *OperatorSubnetRegisterAPIKeyDefault) SetPayload(payload *models.Error) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *OperatorSubnetRegisterAPIKeyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(o._statusCode)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operator_api
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the generate command
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/url"
|
||||
golangswaggerpaths "path"
|
||||
)
|
||||
|
||||
// OperatorSubnetRegisterAPIKeyURL generates an URL for the operator subnet register API key operation
|
||||
type OperatorSubnetRegisterAPIKeyURL struct {
|
||||
_basePath string
|
||||
}
|
||||
|
||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
||||
// base path specified in the swagger spec.
|
||||
// When the value of the base path is an empty string
|
||||
func (o *OperatorSubnetRegisterAPIKeyURL) WithBasePath(bp string) *OperatorSubnetRegisterAPIKeyURL {
|
||||
o.SetBasePath(bp)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
||||
// base path specified in the swagger spec.
|
||||
// When the value of the base path is an empty string
|
||||
func (o *OperatorSubnetRegisterAPIKeyURL) SetBasePath(bp string) {
|
||||
o._basePath = bp
|
||||
}
|
||||
|
||||
// Build a url path and query string
|
||||
func (o *OperatorSubnetRegisterAPIKeyURL) Build() (*url.URL, error) {
|
||||
var _result url.URL
|
||||
|
||||
var _path = "/subnet/apikey/register"
|
||||
|
||||
_basePath := o._basePath
|
||||
if _basePath == "" {
|
||||
_basePath = "/api/v1"
|
||||
}
|
||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
||||
|
||||
return &_result, nil
|
||||
}
|
||||
|
||||
// Must is a helper function to panic when the url builder returns an error
|
||||
func (o *OperatorSubnetRegisterAPIKeyURL) Must(u *url.URL, err error) *url.URL {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if u == nil {
|
||||
panic("url can't be nil")
|
||||
}
|
||||
return u
|
||||
}
|
||||
|
||||
// String returns the string representation of the path with query string
|
||||
func (o *OperatorSubnetRegisterAPIKeyURL) String() string {
|
||||
return o.Must(o.Build()).String()
|
||||
}
|
||||
|
||||
// BuildFull builds a full url with scheme, host, path and query string
|
||||
func (o *OperatorSubnetRegisterAPIKeyURL) BuildFull(scheme, host string) (*url.URL, error) {
|
||||
if scheme == "" {
|
||||
return nil, errors.New("scheme is required for a full url on OperatorSubnetRegisterAPIKeyURL")
|
||||
}
|
||||
if host == "" {
|
||||
return nil, errors.New("host is required for a full url on OperatorSubnetRegisterAPIKeyURL")
|
||||
}
|
||||
|
||||
base, err := o.Build()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
base.Scheme = scheme
|
||||
base.Host = host
|
||||
return base, nil
|
||||
}
|
||||
|
||||
// StringFull returns the string representation of a complete url
|
||||
func (o *OperatorSubnetRegisterAPIKeyURL) StringFull(scheme, host string) string {
|
||||
return o.Must(o.BuildFull(scheme, host)).String()
|
||||
}
|
||||
203
operatorapi/operator_subnet.go
Normal file
203
operatorapi/operator_subnet.go
Normal file
@@ -0,0 +1,203 @@
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operatorapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"os"
|
||||
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/minio/console/cluster"
|
||||
"github.com/minio/console/models"
|
||||
"github.com/minio/console/operatorapi/operations"
|
||||
"github.com/minio/console/operatorapi/operations/operator_api"
|
||||
xhttp "github.com/minio/console/pkg/http"
|
||||
"github.com/minio/console/pkg/subnet"
|
||||
"github.com/minio/console/restapi"
|
||||
v2 "github.com/minio/operator/pkg/apis/minio.min.io/v2"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
var (
|
||||
apiKeySecretDefault = "operator-subnet"
|
||||
apiKeySecretEnvVar = "API_KEY_SECRET_NAME"
|
||||
)
|
||||
|
||||
func registerOperatorSubnetHandlers(api *operations.OperatorAPI) {
|
||||
api.OperatorAPIOperatorSubnetLoginHandler = operator_api.OperatorSubnetLoginHandlerFunc(func(params operator_api.OperatorSubnetLoginParams, session *models.Principal) middleware.Responder {
|
||||
res, err := getOperatorSubnetLoginResponse(session, params)
|
||||
if err != nil {
|
||||
return operator_api.NewOperatorSubnetLoginDefault(int(err.Code)).WithPayload(err)
|
||||
}
|
||||
return operator_api.NewOperatorSubnetLoginOK().WithPayload(res)
|
||||
})
|
||||
|
||||
api.OperatorAPIOperatorSubnetLoginMFAHandler = operator_api.OperatorSubnetLoginMFAHandlerFunc(func(params operator_api.OperatorSubnetLoginMFAParams, session *models.Principal) middleware.Responder {
|
||||
res, err := getOperatorSubnetLoginMFAResponse(session, params)
|
||||
if err != nil {
|
||||
return operator_api.NewOperatorSubnetLoginMFADefault(int(err.Code)).WithPayload(err)
|
||||
}
|
||||
return operator_api.NewOperatorSubnetLoginMFAOK().WithPayload(res)
|
||||
})
|
||||
|
||||
api.OperatorAPIOperatorSubnetAPIKeyHandler = operator_api.OperatorSubnetAPIKeyHandlerFunc(func(params operator_api.OperatorSubnetAPIKeyParams, session *models.Principal) middleware.Responder {
|
||||
res, err := getOperatorSubnetAPIKeyResponse(session, params)
|
||||
if err != nil {
|
||||
return operator_api.NewOperatorSubnetAPIKeyDefault(int(err.Code)).WithPayload(err)
|
||||
}
|
||||
return operator_api.NewOperatorSubnetAPIKeyOK().WithPayload(res)
|
||||
})
|
||||
|
||||
api.OperatorAPIOperatorSubnetRegisterAPIKeyHandler = operator_api.OperatorSubnetRegisterAPIKeyHandlerFunc(func(params operator_api.OperatorSubnetRegisterAPIKeyParams, session *models.Principal) middleware.Responder {
|
||||
res, err := getOperatorSubnetRegisterAPIKeyResponse(session, params)
|
||||
if err != nil {
|
||||
return operator_api.NewOperatorSubnetRegisterAPIKeyDefault(int(err.Code)).WithPayload(err)
|
||||
}
|
||||
return operator_api.NewOperatorSubnetRegisterAPIKeyOK().WithPayload(res)
|
||||
})
|
||||
api.OperatorAPIOperatorSubnetAPIKeyInfoHandler = operator_api.OperatorSubnetAPIKeyInfoHandlerFunc(func(params operator_api.OperatorSubnetAPIKeyInfoParams, session *models.Principal) middleware.Responder {
|
||||
res, err := getOperatorSubnetAPIKeyInfoResponse(session, params)
|
||||
if err != nil {
|
||||
return operator_api.NewOperatorSubnetAPIKeyInfoDefault(int(err.Code)).WithPayload(err)
|
||||
}
|
||||
return operator_api.NewOperatorSubnetAPIKeyInfoOK().WithPayload(res)
|
||||
})
|
||||
}
|
||||
|
||||
func getOperatorSubnetLoginResponse(session *models.Principal, params operator_api.OperatorSubnetLoginParams) (*models.OperatorSubnetLoginResponse, *models.Error) {
|
||||
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
|
||||
defer cancel()
|
||||
username := params.Body.Username
|
||||
password := params.Body.Password
|
||||
if username == "" || password == "" {
|
||||
return nil, restapi.ErrorWithContext(ctx, errors.New("empty credentials"))
|
||||
}
|
||||
subnetHTTPClient := &xhttp.Client{Client: restapi.GetConsoleHTTPClient()}
|
||||
token, mfa, err := restapi.SubnetLogin(subnetHTTPClient, username, password)
|
||||
if err != nil {
|
||||
return nil, restapi.ErrorWithContext(ctx, err)
|
||||
}
|
||||
return &models.OperatorSubnetLoginResponse{
|
||||
AccessToken: token,
|
||||
MfaToken: mfa,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func getOperatorSubnetLoginMFAResponse(session *models.Principal, params operator_api.OperatorSubnetLoginMFAParams) (*models.OperatorSubnetLoginResponse, *models.Error) {
|
||||
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
|
||||
defer cancel()
|
||||
subnetHTTPClient := &xhttp.Client{Client: restapi.GetConsoleHTTPClient()}
|
||||
res, err := subnet.LoginWithMFA(subnetHTTPClient, *params.Body.Username, *params.Body.MfaToken, *params.Body.Otp)
|
||||
if err != nil {
|
||||
return nil, restapi.ErrorWithContext(ctx, err)
|
||||
}
|
||||
return &models.OperatorSubnetLoginResponse{
|
||||
AccessToken: res.AccessToken,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func getOperatorSubnetAPIKeyResponse(session *models.Principal, params operator_api.OperatorSubnetAPIKeyParams) (*models.OperatorSubnetAPIKey, *models.Error) {
|
||||
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
|
||||
defer cancel()
|
||||
subnetHTTPClient := &xhttp.Client{Client: restapi.GetConsoleHTTPClient()}
|
||||
token := params.HTTPRequest.URL.Query().Get("token")
|
||||
apiKey, err := subnet.GetAPIKey(subnetHTTPClient, token)
|
||||
if err != nil {
|
||||
return nil, restapi.ErrorWithContext(ctx, err)
|
||||
}
|
||||
return &models.OperatorSubnetAPIKey{APIKey: apiKey}, nil
|
||||
}
|
||||
|
||||
func getOperatorSubnetRegisterAPIKeyResponse(session *models.Principal, params operator_api.OperatorSubnetRegisterAPIKeyParams) (*models.OperatorSubnetRegisterAPIKeyResponse, *models.Error) {
|
||||
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
|
||||
defer cancel()
|
||||
clientSet, err := cluster.K8sClient(session.STSSessionToken)
|
||||
if err != nil {
|
||||
return nil, restapi.ErrorWithContext(ctx, err)
|
||||
}
|
||||
tenants, err := getTenantsToRegister(ctx, session)
|
||||
if err != nil {
|
||||
return nil, restapi.ErrorWithContext(ctx, err)
|
||||
}
|
||||
k8sClient := &k8sClient{client: clientSet}
|
||||
return registerTenants(ctx, tenants.Items, params.Body.APIKey, k8sClient)
|
||||
}
|
||||
|
||||
func getTenantsToRegister(ctx context.Context, session *models.Principal) (*v2.TenantList, error) {
|
||||
opClientClientSet, err := cluster.OperatorClient(session.STSSessionToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
opClient := &operatorClient{client: opClientClientSet}
|
||||
return opClient.TenantList(ctx, "", metav1.ListOptions{})
|
||||
}
|
||||
|
||||
func registerTenants(ctx context.Context, tenants []v2.Tenant, apiKey string, k8sClient K8sClientI) (*models.OperatorSubnetRegisterAPIKeyResponse, *models.Error) {
|
||||
for _, tenant := range tenants {
|
||||
if err := registerTenant(ctx, tenant, apiKey, k8sClient); err != nil {
|
||||
return nil, restapi.ErrorWithContext(ctx, err)
|
||||
}
|
||||
}
|
||||
if err := createSubnetAPIKeySecret(ctx, apiKey, k8sClient); err != nil {
|
||||
return nil, restapi.ErrorWithContext(ctx, err)
|
||||
}
|
||||
return &models.OperatorSubnetRegisterAPIKeyResponse{Registered: true}, nil
|
||||
}
|
||||
|
||||
func registerTenant(ctx context.Context, tenant v2.Tenant, apiKey string, k8sClient K8sClientI) error {
|
||||
svcURL := tenant.GetTenantServiceURL()
|
||||
mAdmin, err := getTenantAdminClient(ctx, k8sClient, &tenant, svcURL)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
adminClient := restapi.AdminClient{Client: mAdmin}
|
||||
_, err = restapi.SubnetRegisterWithAPIKey(ctx, adminClient, apiKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func createSubnetAPIKeySecret(ctx context.Context, apiKey string, k8sClient K8sClientI) error {
|
||||
apiKeySecret := &corev1.Secret{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: getAPIKeySecretName()},
|
||||
Type: corev1.SecretTypeOpaque,
|
||||
Data: map[string][]byte{"api-key": []byte(apiKey)},
|
||||
}
|
||||
_, err := k8sClient.createSecret(ctx, "default", apiKeySecret, metav1.CreateOptions{})
|
||||
return err
|
||||
}
|
||||
|
||||
func getOperatorSubnetAPIKeyInfoResponse(session *models.Principal, params operator_api.OperatorSubnetAPIKeyInfoParams) (*models.OperatorSubnetRegisterAPIKeyResponse, *models.Error) {
|
||||
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
|
||||
defer cancel()
|
||||
clientSet, err := cluster.K8sClient(session.STSSessionToken)
|
||||
if err != nil {
|
||||
return nil, restapi.ErrorWithContext(ctx, err)
|
||||
}
|
||||
k8sClient := &k8sClient{client: clientSet}
|
||||
if _, err := k8sClient.getSecret(ctx, "default", getAPIKeySecretName(), metav1.GetOptions{}); err != nil {
|
||||
return nil, restapi.ErrorWithContext(ctx, err)
|
||||
}
|
||||
return &models.OperatorSubnetRegisterAPIKeyResponse{Registered: true}, nil
|
||||
}
|
||||
|
||||
func getAPIKeySecretName() string {
|
||||
if s := os.Getenv(apiKeySecretEnvVar); s != "" {
|
||||
return s
|
||||
}
|
||||
return apiKeySecretDefault
|
||||
}
|
||||
304
operatorapi/operator_subnet_test.go
Normal file
304
operatorapi/operator_subnet_test.go
Normal file
@@ -0,0 +1,304 @@
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2022 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 operatorapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/minio/console/models"
|
||||
"github.com/minio/console/operatorapi/operations"
|
||||
"github.com/minio/console/operatorapi/operations/operator_api"
|
||||
"github.com/minio/console/pkg/subnet"
|
||||
v2 "github.com/minio/operator/pkg/apis/minio.min.io/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type OperatorSubnetTestSuite struct {
|
||||
suite.Suite
|
||||
assert *assert.Assertions
|
||||
loginServer *httptest.Server
|
||||
loginWithError bool
|
||||
loginMFAServer *httptest.Server
|
||||
loginMFAWithError bool
|
||||
getAPIKeyServer *httptest.Server
|
||||
getAPIKeyWithError bool
|
||||
registerAPIKeyServer *httptest.Server
|
||||
registerAPIKeyWithError bool
|
||||
k8sClient k8sClientMock
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) SetupSuite() {
|
||||
suite.assert = assert.New(suite.T())
|
||||
suite.loginServer = httptest.NewServer(http.HandlerFunc(suite.loginHandler))
|
||||
suite.loginMFAServer = httptest.NewServer(http.HandlerFunc(suite.loginMFAHandler))
|
||||
suite.getAPIKeyServer = httptest.NewServer(http.HandlerFunc(suite.getAPIKeyHandler))
|
||||
suite.registerAPIKeyServer = httptest.NewServer(http.HandlerFunc(suite.registerAPIKeyHandler))
|
||||
suite.k8sClient = k8sClientMock{}
|
||||
CreateSecretMock = func(ctx context.Context, namespace string, secret *v1.Secret, opts metav1.CreateOptions) (*v1.Secret, error) {
|
||||
return &corev1.Secret{}, nil
|
||||
}
|
||||
k8sclientGetSecretMock = func(ctx context.Context, namespace, secretName string, opts metav1.GetOptions) (*corev1.Secret, error) {
|
||||
data := make(map[string][]byte)
|
||||
data["secretkey"] = []byte("secret")
|
||||
data["accesskey"] = []byte("access")
|
||||
sec := &corev1.Secret{
|
||||
Data: data,
|
||||
}
|
||||
return sec, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) loginHandler(
|
||||
w http.ResponseWriter, r *http.Request,
|
||||
) {
|
||||
if suite.loginWithError {
|
||||
w.WriteHeader(400)
|
||||
} else {
|
||||
fmt.Fprintf(w, `{"mfa_required": true, "mfa_token": "mockToken"}`)
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) loginMFAHandler(
|
||||
w http.ResponseWriter, r *http.Request,
|
||||
) {
|
||||
if suite.loginMFAWithError {
|
||||
w.WriteHeader(400)
|
||||
} else {
|
||||
fmt.Fprintf(w, `{"token_info": {"access_token": "mockToken"}}`)
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) getAPIKeyHandler(
|
||||
w http.ResponseWriter, r *http.Request,
|
||||
) {
|
||||
if suite.getAPIKeyWithError {
|
||||
w.WriteHeader(400)
|
||||
} else {
|
||||
fmt.Fprintf(w, `{"api_key": "mockAPIKey"}`)
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) registerAPIKeyHandler(
|
||||
w http.ResponseWriter, r *http.Request,
|
||||
) {
|
||||
if suite.registerAPIKeyWithError {
|
||||
w.WriteHeader(400)
|
||||
} else {
|
||||
fmt.Fprintf(w, `{"api_key": "mockAPIKey"}`)
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TearDownSuite() {
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TestRegisterOperatorSubnetHanlders() {
|
||||
api := &operations.OperatorAPI{}
|
||||
suite.assert.Nil(api.OperatorAPIOperatorSubnetLoginHandler)
|
||||
suite.assert.Nil(api.OperatorAPIOperatorSubnetLoginMFAHandler)
|
||||
suite.assert.Nil(api.OperatorAPIOperatorSubnetAPIKeyHandler)
|
||||
suite.assert.Nil(api.OperatorAPIOperatorSubnetRegisterAPIKeyHandler)
|
||||
registerOperatorSubnetHandlers(api)
|
||||
suite.assert.NotNil(api.OperatorAPIOperatorSubnetLoginHandler)
|
||||
suite.assert.NotNil(api.OperatorAPIOperatorSubnetLoginMFAHandler)
|
||||
suite.assert.NotNil(api.OperatorAPIOperatorSubnetAPIKeyHandler)
|
||||
suite.assert.NotNil(api.OperatorAPIOperatorSubnetRegisterAPIKeyHandler)
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TestOperatorSubnetLoginHandlerWithEmptyCredentials() {
|
||||
params, api := suite.initSubnetLoginRequest("", "")
|
||||
response := api.OperatorAPIOperatorSubnetLoginHandler.Handle(params, &models.Principal{})
|
||||
_, ok := response.(*operator_api.OperatorSubnetLoginDefault)
|
||||
suite.assert.True(ok)
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TestOperatorSubnetLoginHandlerWithServerError() {
|
||||
params, api := suite.initSubnetLoginRequest("mockusername", "mockpassword")
|
||||
suite.loginWithError = true
|
||||
os.Setenv(subnet.ConsoleSubnetURL, suite.loginServer.URL)
|
||||
response := api.OperatorAPIOperatorSubnetLoginHandler.Handle(params, &models.Principal{})
|
||||
_, ok := response.(*operator_api.OperatorSubnetLoginDefault)
|
||||
suite.assert.True(ok)
|
||||
os.Unsetenv(subnet.ConsoleSubnetURL)
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TestOperatorSubnetLoginHandlerWithoutError() {
|
||||
params, api := suite.initSubnetLoginRequest("mockusername", "mockpassword")
|
||||
suite.loginWithError = false
|
||||
os.Setenv(subnet.ConsoleSubnetURL, suite.loginServer.URL)
|
||||
response := api.OperatorAPIOperatorSubnetLoginHandler.Handle(params, &models.Principal{})
|
||||
_, ok := response.(*operator_api.OperatorSubnetLoginOK)
|
||||
suite.assert.True(ok)
|
||||
os.Unsetenv(subnet.ConsoleSubnetURL)
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) initSubnetLoginRequest(username, password string) (params operator_api.OperatorSubnetLoginParams, api operations.OperatorAPI) {
|
||||
registerOperatorSubnetHandlers(&api)
|
||||
params.Body = &models.OperatorSubnetLoginRequest{Username: username, Password: password}
|
||||
params.HTTPRequest = &http.Request{}
|
||||
return params, api
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TestOperatorSubnetLoginMFAHandlerWithServerError() {
|
||||
params, api := suite.initSubnetLoginMFARequest("mockusername", "mockMFA", "mockOTP")
|
||||
suite.loginMFAWithError = true
|
||||
os.Setenv(subnet.ConsoleSubnetURL, suite.loginMFAServer.URL)
|
||||
response := api.OperatorAPIOperatorSubnetLoginMFAHandler.Handle(params, &models.Principal{})
|
||||
_, ok := response.(*operator_api.OperatorSubnetLoginMFADefault)
|
||||
suite.assert.True(ok)
|
||||
os.Unsetenv(subnet.ConsoleSubnetURL)
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TestOperatorSubnetLoginMFAHandlerWithoutError() {
|
||||
params, api := suite.initSubnetLoginMFARequest("mockusername", "mockMFA", "mockOTP")
|
||||
suite.loginMFAWithError = false
|
||||
os.Setenv(subnet.ConsoleSubnetURL, suite.loginMFAServer.URL)
|
||||
response := api.OperatorAPIOperatorSubnetLoginMFAHandler.Handle(params, &models.Principal{})
|
||||
_, ok := response.(*operator_api.OperatorSubnetLoginMFAOK)
|
||||
suite.assert.True(ok)
|
||||
os.Unsetenv(subnet.ConsoleSubnetURL)
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) initSubnetLoginMFARequest(username, mfa, otp string) (params operator_api.OperatorSubnetLoginMFAParams, api operations.OperatorAPI) {
|
||||
registerOperatorSubnetHandlers(&api)
|
||||
params.Body = &models.OperatorSubnetLoginMFARequest{Username: &username, MfaToken: &mfa, Otp: &otp}
|
||||
params.HTTPRequest = &http.Request{}
|
||||
return params, api
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TestOperatorSubnetAPIKeyHandlerWithServerError() {
|
||||
params, api := suite.initSubnetAPIKeyRequest()
|
||||
suite.getAPIKeyWithError = true
|
||||
os.Setenv(subnet.ConsoleSubnetURL, suite.getAPIKeyServer.URL)
|
||||
response := api.OperatorAPIOperatorSubnetAPIKeyHandler.Handle(params, &models.Principal{})
|
||||
_, ok := response.(*operator_api.OperatorSubnetAPIKeyDefault)
|
||||
suite.assert.True(ok)
|
||||
os.Unsetenv(subnet.ConsoleSubnetURL)
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TestOperatorSubnetAPIKeyHandlerWithoutError() {
|
||||
params, api := suite.initSubnetAPIKeyRequest()
|
||||
suite.getAPIKeyWithError = false
|
||||
os.Setenv(subnet.ConsoleSubnetURL, suite.getAPIKeyServer.URL)
|
||||
response := api.OperatorAPIOperatorSubnetAPIKeyHandler.Handle(params, &models.Principal{})
|
||||
_, ok := response.(*operator_api.OperatorSubnetAPIKeyOK)
|
||||
suite.assert.True(ok)
|
||||
os.Unsetenv(subnet.ConsoleSubnetURL)
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) initSubnetAPIKeyRequest() (params operator_api.OperatorSubnetAPIKeyParams, api operations.OperatorAPI) {
|
||||
registerOperatorSubnetHandlers(&api)
|
||||
params.HTTPRequest = &http.Request{URL: &url.URL{}}
|
||||
return params, api
|
||||
}
|
||||
|
||||
// TODO: Improve register tests (make code more testable)
|
||||
// func (suite *OperatorSubnetTestSuite) TestOperatorSubnetRegisterAPIKeyHandlerWithServerError() {
|
||||
// params, api := suite.initSubnetRegisterAPIKeyRequest()
|
||||
// suite.registerAPIKeyWithError = true
|
||||
// os.Setenv(subnet.ConsoleSubnetURL, suite.registerAPIKeyServer.URL)
|
||||
// response := api.OperatorAPIOperatorSubnetRegisterAPIKeyHandler.Handle(params, &models.Principal{})
|
||||
// _, ok := response.(*operator_api.OperatorSubnetRegisterAPIKeyDefault)
|
||||
// suite.assert.True(ok)
|
||||
// os.Unsetenv(subnet.ConsoleSubnetURL)
|
||||
// }
|
||||
|
||||
// func (suite *OperatorSubnetTestSuite) TestOperatorSubnetRegisterAPIKeyHandlerWithError() {
|
||||
// ctx := context.Background()
|
||||
// suite.registerAPIKeyWithError = false
|
||||
// os.Setenv(subnet.ConsoleSubnetURL, suite.registerAPIKeyServer.URL)
|
||||
// res, err := registerTenants([]v2.Tenant{{
|
||||
// Spec: v2.TenantSpec{CredsSecret: &corev1.LocalObjectReference{Name: "secret-name"}},
|
||||
// }}, "mockAPIKey", ctx, suite.k8sClient)
|
||||
// suite.assert.Nil(res)
|
||||
// suite.assert.NotNil(err)
|
||||
// os.Unsetenv(subnet.ConsoleSubnetURL)
|
||||
// }
|
||||
|
||||
// func (suite *OperatorSubnetTestSuite) TestOperatorSubnetRegisterAPIKeyHandlerGetTenants() {
|
||||
// ctx := context.Background()
|
||||
// res, err := getTenantsToRegister(ctx, &models.Principal{})
|
||||
// suite.assert.NotNil(res)
|
||||
// suite.assert.Nil(err)
|
||||
// }
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TestOperatorSubnetRegisterAPIKeyHandlerWithUnreachableTenant() {
|
||||
ctx := context.Background()
|
||||
res, err := registerTenants(ctx, []v2.Tenant{{
|
||||
Spec: v2.TenantSpec{CredsSecret: &corev1.LocalObjectReference{Name: "secret-name"}},
|
||||
}}, "mockAPIKey", suite.k8sClient)
|
||||
suite.assert.Nil(res)
|
||||
suite.assert.NotNil(err)
|
||||
}
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TestOperatorSubnetRegisterAPIKeyHandlerZeroTenants() {
|
||||
ctx := context.Background()
|
||||
res, err := registerTenants(ctx, []v2.Tenant{}, "mockAPIKey", suite.k8sClient)
|
||||
suite.assert.NotNil(res)
|
||||
suite.assert.Nil(err)
|
||||
}
|
||||
|
||||
// func (suite *OperatorSubnetTestSuite) initSubnetRegisterAPIKeyRequest() (params operator_api.OperatorSubnetRegisterAPIKeyParams, api operations.OperatorAPI) {
|
||||
// registerOperatorSubnetHandlers(&api)
|
||||
// params.Body = &models.OperatorSubnetAPIKey{APIKey: "mockAPIKey"}
|
||||
// params.HTTPRequest = &http.Request{}
|
||||
// return params, api
|
||||
// }
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) TestOperatorSubnetAPIKeyInfoHandlerWithNoSecret() {
|
||||
params, api := suite.initSubnetAPIKeyInfoRequest()
|
||||
os.Setenv(apiKeySecretEnvVar, "mock-operator-subnet")
|
||||
response := api.OperatorAPIOperatorSubnetAPIKeyInfoHandler.Handle(params, &models.Principal{})
|
||||
_, ok := response.(*operator_api.OperatorSubnetAPIKeyInfoDefault)
|
||||
suite.assert.True(ok)
|
||||
os.Unsetenv(apiKeySecretEnvVar)
|
||||
}
|
||||
|
||||
// func (suite *OperatorSubnetTestSuite) TestOperatorSubnetAPIKeyInfoHandlerWithSecret() {
|
||||
// params, api := suite.initSubnetAPIKeyInfoRequest()
|
||||
// os.Setenv(apiKeySecretEnvVar, "mock-operator-subnet")
|
||||
// session := &models.Principal{}
|
||||
// clientSet, _ := cluster.K8sClient(session.STSSessionToken)
|
||||
// k8sClient := &k8sClient{client: clientSet}
|
||||
// ctx := context.Background()
|
||||
// secret := &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: getAPIKeySecretName()}}
|
||||
// k8sClient.createSecret(ctx, "default", secret, metav1.CreateOptions{})
|
||||
// response := api.OperatorAPIOperatorSubnetAPIKeyInfoHandler.Handle(params, session)
|
||||
// _, ok := response.(*operator_api.OperatorSubnetAPIKeyInfoOK)
|
||||
// suite.assert.True(ok)
|
||||
// k8sClient.deleteSecret(ctx, "default", getAPIKeySecretName(), metav1.DeleteOptions{})
|
||||
// os.Unsetenv(apiKeySecretEnvVar)
|
||||
// }
|
||||
|
||||
func (suite *OperatorSubnetTestSuite) initSubnetAPIKeyInfoRequest() (params operator_api.OperatorSubnetAPIKeyInfoParams, api operations.OperatorAPI) {
|
||||
registerOperatorSubnetHandlers(&api)
|
||||
params.HTTPRequest = &http.Request{}
|
||||
return params, api
|
||||
}
|
||||
|
||||
func TestOperatorSubnet(t *testing.T) {
|
||||
suite.Run(t, new(OperatorSubnetTestSuite))
|
||||
}
|
||||
@@ -52,6 +52,7 @@ func getSessionResponse(session *models.Principal, params authApi.SessionCheckPa
|
||||
Operator: true,
|
||||
Permissions: map[string][]string{},
|
||||
Features: getListOfOperatorFeatures(),
|
||||
DirectPV: getDirectPVEnabled(),
|
||||
}
|
||||
return sessionResp, nil
|
||||
}
|
||||
|
||||
@@ -1541,7 +1541,6 @@ func getTenantLogsResponse(session *models.Principal, params operator_api.GetTen
|
||||
func setTenantLogsResponse(session *models.Principal, params operator_api.SetTenantLogsParams) (bool, *models.Error) {
|
||||
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
|
||||
defer cancel()
|
||||
|
||||
opClientClientSet, err := cluster.OperatorClient(session.STSSessionToken)
|
||||
if err != nil {
|
||||
return false, restapi.ErrorWithContext(ctx, err, restapi.ErrUnableToGetTenantUsage)
|
||||
@@ -1725,6 +1724,7 @@ func setTenantLogsResponse(session *models.Principal, params operator_api.SetTen
|
||||
minTenant.Spec.Log.Db.Annotations = dbAnnotations
|
||||
minTenant.Spec.Log.Db.NodeSelector = dbNodeSelector
|
||||
minTenant.Spec.Log.Db.Image = params.Data.DbImage
|
||||
minTenant.Spec.Log.Db.InitImage = params.Data.DbInitImage
|
||||
minTenant.Spec.Log.Db.ServiceAccountName = params.Data.DbServiceAccountName
|
||||
minTenant.Spec.Log.Db.SecurityContext, err = convertModelSCToK8sSC(params.Data.DbSecurityContext)
|
||||
if err != nil {
|
||||
@@ -2762,15 +2762,28 @@ func parseTenantPool(pool *miniov2.Pool) *models.Pool {
|
||||
var securityContext models.SecurityContext
|
||||
|
||||
if pool.SecurityContext != nil {
|
||||
fsGroup := strconv.Itoa(int(*pool.SecurityContext.FSGroup))
|
||||
runAsGroup := strconv.Itoa(int(*pool.SecurityContext.RunAsGroup))
|
||||
runAsUser := strconv.Itoa(int(*pool.SecurityContext.RunAsUser))
|
||||
|
||||
var fsGroup string
|
||||
var runAsGroup string
|
||||
var runAsUser string
|
||||
var fsGroupChangePolicy string
|
||||
if pool.SecurityContext.FSGroup != nil {
|
||||
fsGroup = strconv.Itoa(int(*pool.SecurityContext.FSGroup))
|
||||
}
|
||||
if pool.SecurityContext.RunAsGroup != nil {
|
||||
runAsGroup = strconv.Itoa(int(*pool.SecurityContext.RunAsGroup))
|
||||
}
|
||||
if pool.SecurityContext.RunAsUser != nil {
|
||||
runAsUser = strconv.Itoa(int(*pool.SecurityContext.RunAsUser))
|
||||
}
|
||||
if pool.SecurityContext.FSGroupChangePolicy != nil {
|
||||
fsGroupChangePolicy = string(*pool.SecurityContext.FSGroupChangePolicy)
|
||||
}
|
||||
securityContext = models.SecurityContext{
|
||||
FsGroup: &fsGroup,
|
||||
RunAsGroup: &runAsGroup,
|
||||
RunAsNonRoot: pool.SecurityContext.RunAsNonRoot,
|
||||
RunAsUser: &runAsUser,
|
||||
FsGroup: fsGroup,
|
||||
RunAsGroup: &runAsGroup,
|
||||
RunAsNonRoot: pool.SecurityContext.RunAsNonRoot,
|
||||
RunAsUser: &runAsUser,
|
||||
FsGroupChangePolicy: fsGroupChangePolicy,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,32 +50,42 @@ func convertModelSCToK8sSC(sc *models.SecurityContext) (*corev1.PodSecurityConte
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
RunAsGroup, err := strconv.ParseInt(*sc.RunAsGroup, 10, 64)
|
||||
runAsGroup, err := strconv.ParseInt(*sc.RunAsGroup, 10, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
FsGroup, err := strconv.ParseInt(*sc.FsGroup, 10, 64)
|
||||
fsGroup, err := strconv.ParseInt(sc.FsGroup, 10, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
FSGroupChangePolicy := corev1.PodFSGroupChangePolicy(sc.FsGroupChangePolicy)
|
||||
|
||||
return &corev1.PodSecurityContext{
|
||||
RunAsUser: &runAsUser,
|
||||
RunAsGroup: &RunAsGroup,
|
||||
RunAsNonRoot: sc.RunAsNonRoot,
|
||||
FSGroup: &FsGroup,
|
||||
RunAsUser: &runAsUser,
|
||||
RunAsGroup: &runAsGroup,
|
||||
RunAsNonRoot: sc.RunAsNonRoot,
|
||||
FSGroup: &fsGroup,
|
||||
FSGroupChangePolicy: &FSGroupChangePolicy,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// convertK8sSCToModelSC validates and converts from corev1.PodSecurityContext to models.SecurityContext
|
||||
func convertK8sSCToModelSC(sc *corev1.PodSecurityContext) *models.SecurityContext {
|
||||
runAsUser := strconv.FormatInt(*sc.RunAsUser, 10)
|
||||
RunAsGroup := strconv.FormatInt(*sc.RunAsGroup, 10)
|
||||
FsGroup := strconv.FormatInt(*sc.FSGroup, 10)
|
||||
runAsGroup := strconv.FormatInt(*sc.RunAsGroup, 10)
|
||||
fsGroup := strconv.FormatInt(*sc.FSGroup, 10)
|
||||
fsGroupPolicy := ""
|
||||
|
||||
if sc.FSGroupChangePolicy != nil {
|
||||
fsGroupPolicy = string(*sc.FSGroupChangePolicy)
|
||||
}
|
||||
|
||||
return &models.SecurityContext{
|
||||
RunAsUser: &runAsUser,
|
||||
RunAsGroup: &RunAsGroup,
|
||||
RunAsNonRoot: sc.RunAsNonRoot,
|
||||
FsGroup: &FsGroup,
|
||||
RunAsUser: &runAsUser,
|
||||
RunAsGroup: &runAsGroup,
|
||||
RunAsNonRoot: sc.RunAsNonRoot,
|
||||
FsGroup: fsGroup,
|
||||
FsGroupChangePolicy: fsGroupPolicy,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -180,8 +180,9 @@ const (
|
||||
// or data key provided as plaintext.
|
||||
//
|
||||
// The returned ciphertext data consists of:
|
||||
// AEAD ID | iv | nonce | encrypted data
|
||||
// 1 16 12 ~ len(data)
|
||||
//
|
||||
// AEAD ID | iv | nonce | encrypted data
|
||||
// 1 16 12 ~ len(data)
|
||||
func encrypt(plaintext, associatedData []byte) ([]byte, error) {
|
||||
iv, err := sioutil.Random(16) // 16 bytes IV
|
||||
if err != nil {
|
||||
|
||||
@@ -19,8 +19,6 @@ package certs
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto"
|
||||
"crypto/ecdsa"
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"encoding/pem"
|
||||
@@ -213,24 +211,7 @@ func LoadX509KeyPair(certFile, keyFile string) (tls.Certificate, error) {
|
||||
}
|
||||
keyPEMBlock = pem.EncodeToMemory(&pem.Block{Type: key.Type, Bytes: decryptedKey})
|
||||
}
|
||||
cert, err := tls.X509KeyPair(certPEMBlock, keyPEMBlock)
|
||||
if err != nil {
|
||||
return tls.Certificate{}, err
|
||||
}
|
||||
// Ensure that the private key is not a P-384 or P-521 EC key.
|
||||
// The Go TLS stack does not provide constant-time implementations of P-384 and P-521.
|
||||
if priv, ok := cert.PrivateKey.(crypto.Signer); ok {
|
||||
if pub, ok := priv.Public().(*ecdsa.PublicKey); ok {
|
||||
switch pub.Params().Name {
|
||||
case "P-384":
|
||||
fallthrough
|
||||
case "P-521":
|
||||
// unfortunately there is no cleaner way to check
|
||||
return tls.Certificate{}, fmt.Errorf("tls: the ECDSA curve '%s' is not supported", pub.Params().Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
return cert, nil
|
||||
return tls.X509KeyPair(certPEMBlock, keyPEMBlock)
|
||||
}
|
||||
|
||||
func GetTLSConfig() (x509Certs []*x509.Certificate, manager *xcerts.Manager, err error) {
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
|
||||
// Target is the entity that we will receive
|
||||
// a single log entry and Send it to the log target
|
||||
// e.g. Send the log to a http server
|
||||
// e.g. Send the log to a http server
|
||||
type Target interface {
|
||||
String() string
|
||||
Endpoint() string
|
||||
|
||||
@@ -2,7 +2,8 @@ default: build-static
|
||||
|
||||
build-static:
|
||||
@echo "Building frontend static assets to 'build'"
|
||||
NODE_OPTIONS=--openssl-legacy-provider yarn build
|
||||
@if [ -f "${NVM_DIR}/nvm.sh" ]; then \. "${NVM_DIR}/nvm.sh" && nvm install && nvm use; fi && \
|
||||
NODE_OPTIONS=--openssl-legacy-provider yarn build
|
||||
|
||||
test-warnings:
|
||||
./check-warnings.sh
|
||||
|
||||
@@ -1,123 +1,129 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "./static/css/main.90d417ae.css",
|
||||
"main.js": "./static/js/main.44b939e3.js",
|
||||
"main.js": "./static/js/main.85f28419.js",
|
||||
"static/js/6914.ed2f1662.chunk.js": "./static/js/6914.ed2f1662.chunk.js",
|
||||
"static/js/4209.05b25520.chunk.js": "./static/js/4209.05b25520.chunk.js",
|
||||
"static/js/1829.223fb198.chunk.js": "./static/js/1829.223fb198.chunk.js",
|
||||
"static/js/4455.596f5a0d.chunk.js": "./static/js/4455.596f5a0d.chunk.js",
|
||||
"static/js/5088.7692271b.chunk.js": "./static/js/5088.7692271b.chunk.js",
|
||||
"static/js/4209.2f923e7c.chunk.js": "./static/js/4209.2f923e7c.chunk.js",
|
||||
"static/js/1829.51f89ce7.chunk.js": "./static/js/1829.51f89ce7.chunk.js",
|
||||
"static/js/4455.0e61928a.chunk.js": "./static/js/4455.0e61928a.chunk.js",
|
||||
"static/js/5088.37366b7d.chunk.js": "./static/js/5088.37366b7d.chunk.js",
|
||||
"static/js/5140.b1dd0e23.chunk.js": "./static/js/5140.b1dd0e23.chunk.js",
|
||||
"static/js/5997.59dab43a.chunk.js": "./static/js/5997.59dab43a.chunk.js",
|
||||
"static/js/2527.65ee9c60.chunk.js": "./static/js/2527.65ee9c60.chunk.js",
|
||||
"static/js/1260.add10538.chunk.js": "./static/js/1260.add10538.chunk.js",
|
||||
"static/js/3176.121f3468.chunk.js": "./static/js/3176.121f3468.chunk.js",
|
||||
"static/js/6137.2c486126.chunk.js": "./static/js/6137.2c486126.chunk.js",
|
||||
"static/js/6137.ebbd233b.chunk.js": "./static/js/6137.ebbd233b.chunk.js",
|
||||
"static/js/7045.bc049940.chunk.js": "./static/js/7045.bc049940.chunk.js",
|
||||
"static/js/9251.4a7c5817.chunk.js": "./static/js/9251.4a7c5817.chunk.js",
|
||||
"static/js/2338.56b092f8.chunk.js": "./static/js/2338.56b092f8.chunk.js",
|
||||
"static/js/4335.7187f6a6.chunk.js": "./static/js/4335.7187f6a6.chunk.js",
|
||||
"static/js/3061.bb1cfd70.chunk.js": "./static/js/3061.bb1cfd70.chunk.js",
|
||||
"static/js/6763.16fe0032.chunk.js": "./static/js/6763.16fe0032.chunk.js",
|
||||
"static/js/4575.5b10a969.chunk.js": "./static/js/4575.5b10a969.chunk.js",
|
||||
"static/js/4061.1e4b2694.chunk.js": "./static/js/4061.1e4b2694.chunk.js",
|
||||
"static/js/5112.30236fa2.chunk.js": "./static/js/5112.30236fa2.chunk.js",
|
||||
"static/js/9251.5be021a3.chunk.js": "./static/js/9251.5be021a3.chunk.js",
|
||||
"static/js/2338.4512b89d.chunk.js": "./static/js/2338.4512b89d.chunk.js",
|
||||
"static/js/4335.c9054391.chunk.js": "./static/js/4335.c9054391.chunk.js",
|
||||
"static/js/3061.42c87510.chunk.js": "./static/js/3061.42c87510.chunk.js",
|
||||
"static/js/6763.ce363ce0.chunk.js": "./static/js/6763.ce363ce0.chunk.js",
|
||||
"static/js/4575.fcb7724d.chunk.js": "./static/js/4575.fcb7724d.chunk.js",
|
||||
"static/js/4061.c293b7bd.chunk.js": "./static/js/4061.c293b7bd.chunk.js",
|
||||
"static/js/5112.f134e323.chunk.js": "./static/js/5112.f134e323.chunk.js",
|
||||
"static/js/9611.c217768e.chunk.js": "./static/js/9611.c217768e.chunk.js",
|
||||
"static/js/2637.97fe472e.chunk.js": "./static/js/2637.97fe472e.chunk.js",
|
||||
"static/js/2637.583760ab.chunk.js": "./static/js/2637.583760ab.chunk.js",
|
||||
"static/css/5503.90c9cdc7.chunk.css": "./static/css/5503.90c9cdc7.chunk.css",
|
||||
"static/js/5503.dad78ff5.chunk.js": "./static/js/5503.dad78ff5.chunk.js",
|
||||
"static/js/5926.c0387455.chunk.js": "./static/js/5926.c0387455.chunk.js",
|
||||
"static/js/701.05206868.chunk.js": "./static/js/701.05206868.chunk.js",
|
||||
"static/js/5503.46dc465e.chunk.js": "./static/js/5503.46dc465e.chunk.js",
|
||||
"static/js/5926.67e41b5c.chunk.js": "./static/js/5926.67e41b5c.chunk.js",
|
||||
"static/js/701.e64d92dd.chunk.js": "./static/js/701.e64d92dd.chunk.js",
|
||||
"static/js/7821.bda18452.chunk.js": "./static/js/7821.bda18452.chunk.js",
|
||||
"static/css/2850.90c9cdc7.chunk.css": "./static/css/2850.90c9cdc7.chunk.css",
|
||||
"static/js/2850.92a58310.chunk.js": "./static/js/2850.92a58310.chunk.js",
|
||||
"static/js/1182.264ec55e.chunk.js": "./static/js/1182.264ec55e.chunk.js",
|
||||
"static/js/2850.0df9a9cb.chunk.js": "./static/js/2850.0df9a9cb.chunk.js",
|
||||
"static/js/1182.0b468b7f.chunk.js": "./static/js/1182.0b468b7f.chunk.js",
|
||||
"static/css/343.90c9cdc7.chunk.css": "./static/css/343.90c9cdc7.chunk.css",
|
||||
"static/js/343.ce17ca62.chunk.js": "./static/js/343.ce17ca62.chunk.js",
|
||||
"static/js/343.b753d8a6.chunk.js": "./static/js/343.b753d8a6.chunk.js",
|
||||
"static/css/1199.90c9cdc7.chunk.css": "./static/css/1199.90c9cdc7.chunk.css",
|
||||
"static/js/1199.ae4c29a1.chunk.js": "./static/js/1199.ae4c29a1.chunk.js",
|
||||
"static/js/1199.acc7a3c5.chunk.js": "./static/js/1199.acc7a3c5.chunk.js",
|
||||
"static/css/5517.90c9cdc7.chunk.css": "./static/css/5517.90c9cdc7.chunk.css",
|
||||
"static/js/5517.84805a10.chunk.js": "./static/js/5517.84805a10.chunk.js",
|
||||
"static/js/2555.247780d4.chunk.js": "./static/js/2555.247780d4.chunk.js",
|
||||
"static/js/7585.90e7c2ed.chunk.js": "./static/js/7585.90e7c2ed.chunk.js",
|
||||
"static/js/4902.8927358d.chunk.js": "./static/js/4902.8927358d.chunk.js",
|
||||
"static/js/7847.6c81d37f.chunk.js": "./static/js/7847.6c81d37f.chunk.js",
|
||||
"static/js/4653.0d13044c.chunk.js": "./static/js/4653.0d13044c.chunk.js",
|
||||
"static/js/692.c28b1b9b.chunk.js": "./static/js/692.c28b1b9b.chunk.js",
|
||||
"static/js/8626.58e34c6f.chunk.js": "./static/js/8626.58e34c6f.chunk.js",
|
||||
"static/js/736.66a05831.chunk.js": "./static/js/736.66a05831.chunk.js",
|
||||
"static/js/6577.06d06144.chunk.js": "./static/js/6577.06d06144.chunk.js",
|
||||
"static/js/9561.bf1e32db.chunk.js": "./static/js/9561.bf1e32db.chunk.js",
|
||||
"static/js/6860.f8ff9efd.chunk.js": "./static/js/6860.f8ff9efd.chunk.js",
|
||||
"static/js/5517.5881c974.chunk.js": "./static/js/5517.5881c974.chunk.js",
|
||||
"static/js/2555.f6831ab1.chunk.js": "./static/js/2555.f6831ab1.chunk.js",
|
||||
"static/js/7585.c6b3f151.chunk.js": "./static/js/7585.c6b3f151.chunk.js",
|
||||
"static/js/4902.09995c8f.chunk.js": "./static/js/4902.09995c8f.chunk.js",
|
||||
"static/js/7847.04dba10f.chunk.js": "./static/js/7847.04dba10f.chunk.js",
|
||||
"static/js/4653.512865cd.chunk.js": "./static/js/4653.512865cd.chunk.js",
|
||||
"static/js/692.cb0079a0.chunk.js": "./static/js/692.cb0079a0.chunk.js",
|
||||
"static/js/8626.8bb53c19.chunk.js": "./static/js/8626.8bb53c19.chunk.js",
|
||||
"static/js/736.09b2feed.chunk.js": "./static/js/736.09b2feed.chunk.js",
|
||||
"static/js/6577.c372268c.chunk.js": "./static/js/6577.c372268c.chunk.js",
|
||||
"static/js/9561.ebe2bdbf.chunk.js": "./static/js/9561.ebe2bdbf.chunk.js",
|
||||
"static/js/6401.546f3ad0.chunk.js": "./static/js/6401.546f3ad0.chunk.js",
|
||||
"static/js/4932.09da6134.chunk.js": "./static/js/4932.09da6134.chunk.js",
|
||||
"static/js/3119.de98cea1.chunk.js": "./static/js/3119.de98cea1.chunk.js",
|
||||
"static/js/6860.2c2b34f2.chunk.js": "./static/js/6860.2c2b34f2.chunk.js",
|
||||
"static/js/4781.f4794912.chunk.js": "./static/js/4781.f4794912.chunk.js",
|
||||
"static/js/9478.dca1d314.chunk.js": "./static/js/9478.dca1d314.chunk.js",
|
||||
"static/js/7164.3762a0c0.chunk.js": "./static/js/7164.3762a0c0.chunk.js",
|
||||
"static/js/4414.34edf059.chunk.js": "./static/js/4414.34edf059.chunk.js",
|
||||
"static/js/7798.b974925d.chunk.js": "./static/js/7798.b974925d.chunk.js",
|
||||
"static/js/8833.8e4bf585.chunk.js": "./static/js/8833.8e4bf585.chunk.js",
|
||||
"static/js/9388.20842728.chunk.js": "./static/js/9388.20842728.chunk.js",
|
||||
"static/js/483.96dc1806.chunk.js": "./static/js/483.96dc1806.chunk.js",
|
||||
"static/js/9467.e157f032.chunk.js": "./static/js/9467.e157f032.chunk.js",
|
||||
"static/js/6895.5d78f23b.chunk.js": "./static/js/6895.5d78f23b.chunk.js",
|
||||
"static/js/1379.7e93fe73.chunk.js": "./static/js/1379.7e93fe73.chunk.js",
|
||||
"static/js/6331.9d5ff423.chunk.js": "./static/js/6331.9d5ff423.chunk.js",
|
||||
"static/js/4133.45077897.chunk.js": "./static/js/4133.45077897.chunk.js",
|
||||
"static/js/4414.428aea58.chunk.js": "./static/js/4414.428aea58.chunk.js",
|
||||
"static/js/7798.3457153d.chunk.js": "./static/js/7798.3457153d.chunk.js",
|
||||
"static/js/8833.ff06f54a.chunk.js": "./static/js/8833.ff06f54a.chunk.js",
|
||||
"static/js/6526.3ea27eec.chunk.js": "./static/js/6526.3ea27eec.chunk.js",
|
||||
"static/js/483.ef8155e7.chunk.js": "./static/js/483.ef8155e7.chunk.js",
|
||||
"static/js/9467.2f82fcf5.chunk.js": "./static/js/9467.2f82fcf5.chunk.js",
|
||||
"static/js/6895.913992ec.chunk.js": "./static/js/6895.913992ec.chunk.js",
|
||||
"static/js/1379.9ed2e025.chunk.js": "./static/js/1379.9ed2e025.chunk.js",
|
||||
"static/js/6331.83e8107a.chunk.js": "./static/js/6331.83e8107a.chunk.js",
|
||||
"static/js/4133.21aad0d8.chunk.js": "./static/js/4133.21aad0d8.chunk.js",
|
||||
"static/css/1367.90c9cdc7.chunk.css": "./static/css/1367.90c9cdc7.chunk.css",
|
||||
"static/js/1367.79a7a1e1.chunk.js": "./static/js/1367.79a7a1e1.chunk.js",
|
||||
"static/js/3956.d3b4cd02.chunk.js": "./static/js/3956.d3b4cd02.chunk.js",
|
||||
"static/js/9221.14d6096a.chunk.js": "./static/js/9221.14d6096a.chunk.js",
|
||||
"static/js/8896.86116952.chunk.js": "./static/js/8896.86116952.chunk.js",
|
||||
"static/js/9134.3cd624c6.chunk.js": "./static/js/9134.3cd624c6.chunk.js",
|
||||
"static/js/1367.a94951c1.chunk.js": "./static/js/1367.a94951c1.chunk.js",
|
||||
"static/js/3956.8ed30c16.chunk.js": "./static/js/3956.8ed30c16.chunk.js",
|
||||
"static/js/9221.696bb93f.chunk.js": "./static/js/9221.696bb93f.chunk.js",
|
||||
"static/js/8896.af72e26d.chunk.js": "./static/js/8896.af72e26d.chunk.js",
|
||||
"static/js/9134.02674829.chunk.js": "./static/js/9134.02674829.chunk.js",
|
||||
"static/css/1268.90c9cdc7.chunk.css": "./static/css/1268.90c9cdc7.chunk.css",
|
||||
"static/js/1268.cb6b69cf.chunk.js": "./static/js/1268.cb6b69cf.chunk.js",
|
||||
"static/js/1030.e86b3822.chunk.js": "./static/js/1030.e86b3822.chunk.js",
|
||||
"static/js/9145.82dff7c3.chunk.js": "./static/js/9145.82dff7c3.chunk.js",
|
||||
"static/js/8998.9a18741c.chunk.js": "./static/js/8998.9a18741c.chunk.js",
|
||||
"static/js/1501.3b54336e.chunk.js": "./static/js/1501.3b54336e.chunk.js",
|
||||
"static/js/7770.5dad74f3.chunk.js": "./static/js/7770.5dad74f3.chunk.js",
|
||||
"static/js/426.9fd80f88.chunk.js": "./static/js/426.9fd80f88.chunk.js",
|
||||
"static/js/4298.e8216a7e.chunk.js": "./static/js/4298.e8216a7e.chunk.js",
|
||||
"static/js/2878.caa1771d.chunk.js": "./static/js/2878.caa1771d.chunk.js",
|
||||
"static/js/1268.6b4f91d2.chunk.js": "./static/js/1268.6b4f91d2.chunk.js",
|
||||
"static/js/1030.a80a23bf.chunk.js": "./static/js/1030.a80a23bf.chunk.js",
|
||||
"static/js/9145.2e7a2761.chunk.js": "./static/js/9145.2e7a2761.chunk.js",
|
||||
"static/js/8998.952b511e.chunk.js": "./static/js/8998.952b511e.chunk.js",
|
||||
"static/js/1501.64c3165f.chunk.js": "./static/js/1501.64c3165f.chunk.js",
|
||||
"static/js/7770.ab89838c.chunk.js": "./static/js/7770.ab89838c.chunk.js",
|
||||
"static/js/426.8a124aa3.chunk.js": "./static/js/426.8a124aa3.chunk.js",
|
||||
"static/js/4298.39009639.chunk.js": "./static/js/4298.39009639.chunk.js",
|
||||
"static/js/2878.3aef87af.chunk.js": "./static/js/2878.3aef87af.chunk.js",
|
||||
"static/js/8495.b1689c2d.chunk.js": "./static/js/8495.b1689c2d.chunk.js",
|
||||
"static/js/4934.72071d47.chunk.js": "./static/js/4934.72071d47.chunk.js",
|
||||
"static/js/9942.406de82c.chunk.js": "./static/js/9942.406de82c.chunk.js",
|
||||
"static/js/7021.2df7e2e0.chunk.js": "./static/js/7021.2df7e2e0.chunk.js",
|
||||
"static/js/2684.52d25845.chunk.js": "./static/js/2684.52d25845.chunk.js",
|
||||
"static/js/6683.f9402dc8.chunk.js": "./static/js/6683.f9402dc8.chunk.js",
|
||||
"static/js/8350.ee721e94.chunk.js": "./static/js/8350.ee721e94.chunk.js",
|
||||
"static/js/4873.6fb2072e.chunk.js": "./static/js/4873.6fb2072e.chunk.js",
|
||||
"static/js/5367.991f75c4.chunk.js": "./static/js/5367.991f75c4.chunk.js",
|
||||
"static/js/5223.750c796e.chunk.js": "./static/js/5223.750c796e.chunk.js",
|
||||
"static/js/7659.8b358177.chunk.js": "./static/js/7659.8b358177.chunk.js",
|
||||
"static/js/9968.14f204ee.chunk.js": "./static/js/9968.14f204ee.chunk.js",
|
||||
"static/js/2180.03cd0c4b.chunk.js": "./static/js/2180.03cd0c4b.chunk.js",
|
||||
"static/js/8253.ec0f3d9f.chunk.js": "./static/js/8253.ec0f3d9f.chunk.js",
|
||||
"static/js/3328.c7470c38.chunk.js": "./static/js/3328.c7470c38.chunk.js",
|
||||
"static/js/1440.b9a2f19f.chunk.js": "./static/js/1440.b9a2f19f.chunk.js",
|
||||
"static/js/9179.3874e070.chunk.js": "./static/js/9179.3874e070.chunk.js",
|
||||
"static/js/51.f85def1c.chunk.js": "./static/js/51.f85def1c.chunk.js",
|
||||
"static/js/711.be9f8284.chunk.js": "./static/js/711.be9f8284.chunk.js",
|
||||
"static/js/6901.5afa1e6f.chunk.js": "./static/js/6901.5afa1e6f.chunk.js",
|
||||
"static/js/2185.12707550.chunk.js": "./static/js/2185.12707550.chunk.js",
|
||||
"static/js/312.cd77f5db.chunk.js": "./static/js/312.cd77f5db.chunk.js",
|
||||
"static/js/2112.e0047ff5.chunk.js": "./static/js/2112.e0047ff5.chunk.js",
|
||||
"static/js/4619.8d9ee17c.chunk.js": "./static/js/4619.8d9ee17c.chunk.js",
|
||||
"static/js/8990.194642a8.chunk.js": "./static/js/8990.194642a8.chunk.js",
|
||||
"static/js/8455.6f71a45b.chunk.js": "./static/js/8455.6f71a45b.chunk.js",
|
||||
"static/js/9942.d86db577.chunk.js": "./static/js/9942.d86db577.chunk.js",
|
||||
"static/js/7021.0cd1393a.chunk.js": "./static/js/7021.0cd1393a.chunk.js",
|
||||
"static/js/2684.3b290eb0.chunk.js": "./static/js/2684.3b290eb0.chunk.js",
|
||||
"static/js/6683.31f7943c.chunk.js": "./static/js/6683.31f7943c.chunk.js",
|
||||
"static/js/8350.927cb0f2.chunk.js": "./static/js/8350.927cb0f2.chunk.js",
|
||||
"static/js/4873.b3b8ac8e.chunk.js": "./static/js/4873.b3b8ac8e.chunk.js",
|
||||
"static/js/5367.4ee5c384.chunk.js": "./static/js/5367.4ee5c384.chunk.js",
|
||||
"static/js/5223.d2798e93.chunk.js": "./static/js/5223.d2798e93.chunk.js",
|
||||
"static/js/7659.a9f31d32.chunk.js": "./static/js/7659.a9f31d32.chunk.js",
|
||||
"static/js/1799.dceada24.chunk.js": "./static/js/1799.dceada24.chunk.js",
|
||||
"static/js/9297.8a17bfe7.chunk.js": "./static/js/9297.8a17bfe7.chunk.js",
|
||||
"static/js/9968.42e61fd8.chunk.js": "./static/js/9968.42e61fd8.chunk.js",
|
||||
"static/js/2180.3032b83a.chunk.js": "./static/js/2180.3032b83a.chunk.js",
|
||||
"static/js/8253.112a3c07.chunk.js": "./static/js/8253.112a3c07.chunk.js",
|
||||
"static/js/3328.161f27a6.chunk.js": "./static/js/3328.161f27a6.chunk.js",
|
||||
"static/js/1440.0a79a7c6.chunk.js": "./static/js/1440.0a79a7c6.chunk.js",
|
||||
"static/js/9179.c920b1c6.chunk.js": "./static/js/9179.c920b1c6.chunk.js",
|
||||
"static/js/51.6f729db1.chunk.js": "./static/js/51.6f729db1.chunk.js",
|
||||
"static/js/711.f849ab21.chunk.js": "./static/js/711.f849ab21.chunk.js",
|
||||
"static/js/6901.0b8f3982.chunk.js": "./static/js/6901.0b8f3982.chunk.js",
|
||||
"static/js/2185.c6714d7f.chunk.js": "./static/js/2185.c6714d7f.chunk.js",
|
||||
"static/js/312.9d2483e2.chunk.js": "./static/js/312.9d2483e2.chunk.js",
|
||||
"static/js/2112.218ae789.chunk.js": "./static/js/2112.218ae789.chunk.js",
|
||||
"static/js/4619.e0972aca.chunk.js": "./static/js/4619.e0972aca.chunk.js",
|
||||
"static/js/8990.943dbbfb.chunk.js": "./static/js/8990.943dbbfb.chunk.js",
|
||||
"static/js/8455.01f5b771.chunk.js": "./static/js/8455.01f5b771.chunk.js",
|
||||
"static/css/1913.90c9cdc7.chunk.css": "./static/css/1913.90c9cdc7.chunk.css",
|
||||
"static/js/1913.549c180b.chunk.js": "./static/js/1913.549c180b.chunk.js",
|
||||
"static/js/1604.25690eb1.chunk.js": "./static/js/1604.25690eb1.chunk.js",
|
||||
"static/js/8391.968204ad.chunk.js": "./static/js/8391.968204ad.chunk.js",
|
||||
"static/js/402.5c660ae6.chunk.js": "./static/js/402.5c660ae6.chunk.js",
|
||||
"static/js/1705.32ce00fc.chunk.js": "./static/js/1705.32ce00fc.chunk.js",
|
||||
"static/js/1581.c60c0082.chunk.js": "./static/js/1581.c60c0082.chunk.js",
|
||||
"static/js/455.6aa5b756.chunk.js": "./static/js/455.6aa5b756.chunk.js",
|
||||
"static/js/2661.7fe77f72.chunk.js": "./static/js/2661.7fe77f72.chunk.js",
|
||||
"static/js/889.43037296.chunk.js": "./static/js/889.43037296.chunk.js",
|
||||
"static/js/9088.1edd5d6a.chunk.js": "./static/js/9088.1edd5d6a.chunk.js",
|
||||
"static/js/247.9ce190b5.chunk.js": "./static/js/247.9ce190b5.chunk.js",
|
||||
"static/js/2763.ec4b0ce6.chunk.js": "./static/js/2763.ec4b0ce6.chunk.js",
|
||||
"static/js/1913.aef0d716.chunk.js": "./static/js/1913.aef0d716.chunk.js",
|
||||
"static/js/1604.54fe3660.chunk.js": "./static/js/1604.54fe3660.chunk.js",
|
||||
"static/js/8391.824bba1f.chunk.js": "./static/js/8391.824bba1f.chunk.js",
|
||||
"static/js/402.56cf1d62.chunk.js": "./static/js/402.56cf1d62.chunk.js",
|
||||
"static/js/1705.0a3da076.chunk.js": "./static/js/1705.0a3da076.chunk.js",
|
||||
"static/js/1581.b372ec91.chunk.js": "./static/js/1581.b372ec91.chunk.js",
|
||||
"static/js/455.ae9e0193.chunk.js": "./static/js/455.ae9e0193.chunk.js",
|
||||
"static/js/2661.59158a7f.chunk.js": "./static/js/2661.59158a7f.chunk.js",
|
||||
"static/js/889.22fc77b5.chunk.js": "./static/js/889.22fc77b5.chunk.js",
|
||||
"static/js/9088.0e6ebda2.chunk.js": "./static/js/9088.0e6ebda2.chunk.js",
|
||||
"static/js/247.6b8f3ceb.chunk.js": "./static/js/247.6b8f3ceb.chunk.js",
|
||||
"static/js/2408.a316c373.chunk.js": "./static/js/2408.a316c373.chunk.js",
|
||||
"static/js/5171.e8fc646a.chunk.js": "./static/js/5171.e8fc646a.chunk.js",
|
||||
"static/js/2426.ab27f6f9.chunk.js": "./static/js/2426.ab27f6f9.chunk.js",
|
||||
"static/js/3691.ef93d563.chunk.js": "./static/js/3691.ef93d563.chunk.js",
|
||||
"static/js/2426.ab27f6f9.chunk.js": "./static/js/2426.ab27f6f9.chunk.js",
|
||||
"static/js/3762.52bd15d3.chunk.js": "./static/js/3762.52bd15d3.chunk.js",
|
||||
"static/js/3801.64b6e473.chunk.js": "./static/js/3801.64b6e473.chunk.js",
|
||||
"static/js/1918.4309a619.chunk.js": "./static/js/1918.4309a619.chunk.js",
|
||||
@@ -137,127 +143,134 @@
|
||||
"static/js/7142.4191cc91.chunk.js": "./static/js/7142.4191cc91.chunk.js",
|
||||
"static/js/2691.53531251.chunk.js": "./static/js/2691.53531251.chunk.js",
|
||||
"static/js/7472.f63abe1f.chunk.js": "./static/js/7472.f63abe1f.chunk.js",
|
||||
"static/js/2983.e938a4fe.chunk.js": "./static/js/2983.e938a4fe.chunk.js",
|
||||
"static/js/5289.39c9d169.chunk.js": "./static/js/5289.39c9d169.chunk.js",
|
||||
"static/js/2983.365588dd.chunk.js": "./static/js/2983.365588dd.chunk.js",
|
||||
"static/js/5289.289c4818.chunk.js": "./static/js/5289.289c4818.chunk.js",
|
||||
"static/js/2763.eff3ace0.chunk.js": "./static/js/2763.eff3ace0.chunk.js",
|
||||
"index.html": "./index.html",
|
||||
"main.90d417ae.css.map": "./static/css/main.90d417ae.css.map",
|
||||
"main.44b939e3.js.map": "./static/js/main.44b939e3.js.map",
|
||||
"main.85f28419.js.map": "./static/js/main.85f28419.js.map",
|
||||
"6914.ed2f1662.chunk.js.map": "./static/js/6914.ed2f1662.chunk.js.map",
|
||||
"4209.05b25520.chunk.js.map": "./static/js/4209.05b25520.chunk.js.map",
|
||||
"1829.223fb198.chunk.js.map": "./static/js/1829.223fb198.chunk.js.map",
|
||||
"4455.596f5a0d.chunk.js.map": "./static/js/4455.596f5a0d.chunk.js.map",
|
||||
"5088.7692271b.chunk.js.map": "./static/js/5088.7692271b.chunk.js.map",
|
||||
"4209.2f923e7c.chunk.js.map": "./static/js/4209.2f923e7c.chunk.js.map",
|
||||
"1829.51f89ce7.chunk.js.map": "./static/js/1829.51f89ce7.chunk.js.map",
|
||||
"4455.0e61928a.chunk.js.map": "./static/js/4455.0e61928a.chunk.js.map",
|
||||
"5088.37366b7d.chunk.js.map": "./static/js/5088.37366b7d.chunk.js.map",
|
||||
"5140.b1dd0e23.chunk.js.map": "./static/js/5140.b1dd0e23.chunk.js.map",
|
||||
"5997.59dab43a.chunk.js.map": "./static/js/5997.59dab43a.chunk.js.map",
|
||||
"2527.65ee9c60.chunk.js.map": "./static/js/2527.65ee9c60.chunk.js.map",
|
||||
"1260.add10538.chunk.js.map": "./static/js/1260.add10538.chunk.js.map",
|
||||
"3176.121f3468.chunk.js.map": "./static/js/3176.121f3468.chunk.js.map",
|
||||
"6137.2c486126.chunk.js.map": "./static/js/6137.2c486126.chunk.js.map",
|
||||
"6137.ebbd233b.chunk.js.map": "./static/js/6137.ebbd233b.chunk.js.map",
|
||||
"7045.bc049940.chunk.js.map": "./static/js/7045.bc049940.chunk.js.map",
|
||||
"9251.4a7c5817.chunk.js.map": "./static/js/9251.4a7c5817.chunk.js.map",
|
||||
"2338.56b092f8.chunk.js.map": "./static/js/2338.56b092f8.chunk.js.map",
|
||||
"4335.7187f6a6.chunk.js.map": "./static/js/4335.7187f6a6.chunk.js.map",
|
||||
"3061.bb1cfd70.chunk.js.map": "./static/js/3061.bb1cfd70.chunk.js.map",
|
||||
"6763.16fe0032.chunk.js.map": "./static/js/6763.16fe0032.chunk.js.map",
|
||||
"4575.5b10a969.chunk.js.map": "./static/js/4575.5b10a969.chunk.js.map",
|
||||
"4061.1e4b2694.chunk.js.map": "./static/js/4061.1e4b2694.chunk.js.map",
|
||||
"5112.30236fa2.chunk.js.map": "./static/js/5112.30236fa2.chunk.js.map",
|
||||
"9251.5be021a3.chunk.js.map": "./static/js/9251.5be021a3.chunk.js.map",
|
||||
"2338.4512b89d.chunk.js.map": "./static/js/2338.4512b89d.chunk.js.map",
|
||||
"4335.c9054391.chunk.js.map": "./static/js/4335.c9054391.chunk.js.map",
|
||||
"3061.42c87510.chunk.js.map": "./static/js/3061.42c87510.chunk.js.map",
|
||||
"6763.ce363ce0.chunk.js.map": "./static/js/6763.ce363ce0.chunk.js.map",
|
||||
"4575.fcb7724d.chunk.js.map": "./static/js/4575.fcb7724d.chunk.js.map",
|
||||
"4061.c293b7bd.chunk.js.map": "./static/js/4061.c293b7bd.chunk.js.map",
|
||||
"5112.f134e323.chunk.js.map": "./static/js/5112.f134e323.chunk.js.map",
|
||||
"9611.c217768e.chunk.js.map": "./static/js/9611.c217768e.chunk.js.map",
|
||||
"2637.97fe472e.chunk.js.map": "./static/js/2637.97fe472e.chunk.js.map",
|
||||
"2637.583760ab.chunk.js.map": "./static/js/2637.583760ab.chunk.js.map",
|
||||
"5503.90c9cdc7.chunk.css.map": "./static/css/5503.90c9cdc7.chunk.css.map",
|
||||
"5503.dad78ff5.chunk.js.map": "./static/js/5503.dad78ff5.chunk.js.map",
|
||||
"5926.c0387455.chunk.js.map": "./static/js/5926.c0387455.chunk.js.map",
|
||||
"701.05206868.chunk.js.map": "./static/js/701.05206868.chunk.js.map",
|
||||
"5503.46dc465e.chunk.js.map": "./static/js/5503.46dc465e.chunk.js.map",
|
||||
"5926.67e41b5c.chunk.js.map": "./static/js/5926.67e41b5c.chunk.js.map",
|
||||
"701.e64d92dd.chunk.js.map": "./static/js/701.e64d92dd.chunk.js.map",
|
||||
"7821.bda18452.chunk.js.map": "./static/js/7821.bda18452.chunk.js.map",
|
||||
"2850.90c9cdc7.chunk.css.map": "./static/css/2850.90c9cdc7.chunk.css.map",
|
||||
"2850.92a58310.chunk.js.map": "./static/js/2850.92a58310.chunk.js.map",
|
||||
"1182.264ec55e.chunk.js.map": "./static/js/1182.264ec55e.chunk.js.map",
|
||||
"2850.0df9a9cb.chunk.js.map": "./static/js/2850.0df9a9cb.chunk.js.map",
|
||||
"1182.0b468b7f.chunk.js.map": "./static/js/1182.0b468b7f.chunk.js.map",
|
||||
"343.90c9cdc7.chunk.css.map": "./static/css/343.90c9cdc7.chunk.css.map",
|
||||
"343.ce17ca62.chunk.js.map": "./static/js/343.ce17ca62.chunk.js.map",
|
||||
"343.b753d8a6.chunk.js.map": "./static/js/343.b753d8a6.chunk.js.map",
|
||||
"1199.90c9cdc7.chunk.css.map": "./static/css/1199.90c9cdc7.chunk.css.map",
|
||||
"1199.ae4c29a1.chunk.js.map": "./static/js/1199.ae4c29a1.chunk.js.map",
|
||||
"1199.acc7a3c5.chunk.js.map": "./static/js/1199.acc7a3c5.chunk.js.map",
|
||||
"5517.90c9cdc7.chunk.css.map": "./static/css/5517.90c9cdc7.chunk.css.map",
|
||||
"5517.84805a10.chunk.js.map": "./static/js/5517.84805a10.chunk.js.map",
|
||||
"2555.247780d4.chunk.js.map": "./static/js/2555.247780d4.chunk.js.map",
|
||||
"7585.90e7c2ed.chunk.js.map": "./static/js/7585.90e7c2ed.chunk.js.map",
|
||||
"4902.8927358d.chunk.js.map": "./static/js/4902.8927358d.chunk.js.map",
|
||||
"7847.6c81d37f.chunk.js.map": "./static/js/7847.6c81d37f.chunk.js.map",
|
||||
"4653.0d13044c.chunk.js.map": "./static/js/4653.0d13044c.chunk.js.map",
|
||||
"692.c28b1b9b.chunk.js.map": "./static/js/692.c28b1b9b.chunk.js.map",
|
||||
"8626.58e34c6f.chunk.js.map": "./static/js/8626.58e34c6f.chunk.js.map",
|
||||
"736.66a05831.chunk.js.map": "./static/js/736.66a05831.chunk.js.map",
|
||||
"6577.06d06144.chunk.js.map": "./static/js/6577.06d06144.chunk.js.map",
|
||||
"9561.bf1e32db.chunk.js.map": "./static/js/9561.bf1e32db.chunk.js.map",
|
||||
"6860.f8ff9efd.chunk.js.map": "./static/js/6860.f8ff9efd.chunk.js.map",
|
||||
"5517.5881c974.chunk.js.map": "./static/js/5517.5881c974.chunk.js.map",
|
||||
"2555.f6831ab1.chunk.js.map": "./static/js/2555.f6831ab1.chunk.js.map",
|
||||
"7585.c6b3f151.chunk.js.map": "./static/js/7585.c6b3f151.chunk.js.map",
|
||||
"4902.09995c8f.chunk.js.map": "./static/js/4902.09995c8f.chunk.js.map",
|
||||
"7847.04dba10f.chunk.js.map": "./static/js/7847.04dba10f.chunk.js.map",
|
||||
"4653.512865cd.chunk.js.map": "./static/js/4653.512865cd.chunk.js.map",
|
||||
"692.cb0079a0.chunk.js.map": "./static/js/692.cb0079a0.chunk.js.map",
|
||||
"8626.8bb53c19.chunk.js.map": "./static/js/8626.8bb53c19.chunk.js.map",
|
||||
"736.09b2feed.chunk.js.map": "./static/js/736.09b2feed.chunk.js.map",
|
||||
"6577.c372268c.chunk.js.map": "./static/js/6577.c372268c.chunk.js.map",
|
||||
"9561.ebe2bdbf.chunk.js.map": "./static/js/9561.ebe2bdbf.chunk.js.map",
|
||||
"6401.546f3ad0.chunk.js.map": "./static/js/6401.546f3ad0.chunk.js.map",
|
||||
"4932.09da6134.chunk.js.map": "./static/js/4932.09da6134.chunk.js.map",
|
||||
"3119.de98cea1.chunk.js.map": "./static/js/3119.de98cea1.chunk.js.map",
|
||||
"6860.2c2b34f2.chunk.js.map": "./static/js/6860.2c2b34f2.chunk.js.map",
|
||||
"4781.f4794912.chunk.js.map": "./static/js/4781.f4794912.chunk.js.map",
|
||||
"9478.dca1d314.chunk.js.map": "./static/js/9478.dca1d314.chunk.js.map",
|
||||
"7164.3762a0c0.chunk.js.map": "./static/js/7164.3762a0c0.chunk.js.map",
|
||||
"4414.34edf059.chunk.js.map": "./static/js/4414.34edf059.chunk.js.map",
|
||||
"7798.b974925d.chunk.js.map": "./static/js/7798.b974925d.chunk.js.map",
|
||||
"8833.8e4bf585.chunk.js.map": "./static/js/8833.8e4bf585.chunk.js.map",
|
||||
"9388.20842728.chunk.js.map": "./static/js/9388.20842728.chunk.js.map",
|
||||
"483.96dc1806.chunk.js.map": "./static/js/483.96dc1806.chunk.js.map",
|
||||
"9467.e157f032.chunk.js.map": "./static/js/9467.e157f032.chunk.js.map",
|
||||
"6895.5d78f23b.chunk.js.map": "./static/js/6895.5d78f23b.chunk.js.map",
|
||||
"1379.7e93fe73.chunk.js.map": "./static/js/1379.7e93fe73.chunk.js.map",
|
||||
"6331.9d5ff423.chunk.js.map": "./static/js/6331.9d5ff423.chunk.js.map",
|
||||
"4133.45077897.chunk.js.map": "./static/js/4133.45077897.chunk.js.map",
|
||||
"4414.428aea58.chunk.js.map": "./static/js/4414.428aea58.chunk.js.map",
|
||||
"7798.3457153d.chunk.js.map": "./static/js/7798.3457153d.chunk.js.map",
|
||||
"8833.ff06f54a.chunk.js.map": "./static/js/8833.ff06f54a.chunk.js.map",
|
||||
"6526.3ea27eec.chunk.js.map": "./static/js/6526.3ea27eec.chunk.js.map",
|
||||
"483.ef8155e7.chunk.js.map": "./static/js/483.ef8155e7.chunk.js.map",
|
||||
"9467.2f82fcf5.chunk.js.map": "./static/js/9467.2f82fcf5.chunk.js.map",
|
||||
"6895.913992ec.chunk.js.map": "./static/js/6895.913992ec.chunk.js.map",
|
||||
"1379.9ed2e025.chunk.js.map": "./static/js/1379.9ed2e025.chunk.js.map",
|
||||
"6331.83e8107a.chunk.js.map": "./static/js/6331.83e8107a.chunk.js.map",
|
||||
"4133.21aad0d8.chunk.js.map": "./static/js/4133.21aad0d8.chunk.js.map",
|
||||
"1367.90c9cdc7.chunk.css.map": "./static/css/1367.90c9cdc7.chunk.css.map",
|
||||
"1367.79a7a1e1.chunk.js.map": "./static/js/1367.79a7a1e1.chunk.js.map",
|
||||
"3956.d3b4cd02.chunk.js.map": "./static/js/3956.d3b4cd02.chunk.js.map",
|
||||
"9221.14d6096a.chunk.js.map": "./static/js/9221.14d6096a.chunk.js.map",
|
||||
"8896.86116952.chunk.js.map": "./static/js/8896.86116952.chunk.js.map",
|
||||
"9134.3cd624c6.chunk.js.map": "./static/js/9134.3cd624c6.chunk.js.map",
|
||||
"1367.a94951c1.chunk.js.map": "./static/js/1367.a94951c1.chunk.js.map",
|
||||
"3956.8ed30c16.chunk.js.map": "./static/js/3956.8ed30c16.chunk.js.map",
|
||||
"9221.696bb93f.chunk.js.map": "./static/js/9221.696bb93f.chunk.js.map",
|
||||
"8896.af72e26d.chunk.js.map": "./static/js/8896.af72e26d.chunk.js.map",
|
||||
"9134.02674829.chunk.js.map": "./static/js/9134.02674829.chunk.js.map",
|
||||
"1268.90c9cdc7.chunk.css.map": "./static/css/1268.90c9cdc7.chunk.css.map",
|
||||
"1268.cb6b69cf.chunk.js.map": "./static/js/1268.cb6b69cf.chunk.js.map",
|
||||
"1030.e86b3822.chunk.js.map": "./static/js/1030.e86b3822.chunk.js.map",
|
||||
"9145.82dff7c3.chunk.js.map": "./static/js/9145.82dff7c3.chunk.js.map",
|
||||
"8998.9a18741c.chunk.js.map": "./static/js/8998.9a18741c.chunk.js.map",
|
||||
"1501.3b54336e.chunk.js.map": "./static/js/1501.3b54336e.chunk.js.map",
|
||||
"7770.5dad74f3.chunk.js.map": "./static/js/7770.5dad74f3.chunk.js.map",
|
||||
"426.9fd80f88.chunk.js.map": "./static/js/426.9fd80f88.chunk.js.map",
|
||||
"4298.e8216a7e.chunk.js.map": "./static/js/4298.e8216a7e.chunk.js.map",
|
||||
"2878.caa1771d.chunk.js.map": "./static/js/2878.caa1771d.chunk.js.map",
|
||||
"1268.6b4f91d2.chunk.js.map": "./static/js/1268.6b4f91d2.chunk.js.map",
|
||||
"1030.a80a23bf.chunk.js.map": "./static/js/1030.a80a23bf.chunk.js.map",
|
||||
"9145.2e7a2761.chunk.js.map": "./static/js/9145.2e7a2761.chunk.js.map",
|
||||
"8998.952b511e.chunk.js.map": "./static/js/8998.952b511e.chunk.js.map",
|
||||
"1501.64c3165f.chunk.js.map": "./static/js/1501.64c3165f.chunk.js.map",
|
||||
"7770.ab89838c.chunk.js.map": "./static/js/7770.ab89838c.chunk.js.map",
|
||||
"426.8a124aa3.chunk.js.map": "./static/js/426.8a124aa3.chunk.js.map",
|
||||
"4298.39009639.chunk.js.map": "./static/js/4298.39009639.chunk.js.map",
|
||||
"2878.3aef87af.chunk.js.map": "./static/js/2878.3aef87af.chunk.js.map",
|
||||
"8495.b1689c2d.chunk.js.map": "./static/js/8495.b1689c2d.chunk.js.map",
|
||||
"4934.72071d47.chunk.js.map": "./static/js/4934.72071d47.chunk.js.map",
|
||||
"9942.406de82c.chunk.js.map": "./static/js/9942.406de82c.chunk.js.map",
|
||||
"7021.2df7e2e0.chunk.js.map": "./static/js/7021.2df7e2e0.chunk.js.map",
|
||||
"2684.52d25845.chunk.js.map": "./static/js/2684.52d25845.chunk.js.map",
|
||||
"6683.f9402dc8.chunk.js.map": "./static/js/6683.f9402dc8.chunk.js.map",
|
||||
"8350.ee721e94.chunk.js.map": "./static/js/8350.ee721e94.chunk.js.map",
|
||||
"4873.6fb2072e.chunk.js.map": "./static/js/4873.6fb2072e.chunk.js.map",
|
||||
"5367.991f75c4.chunk.js.map": "./static/js/5367.991f75c4.chunk.js.map",
|
||||
"5223.750c796e.chunk.js.map": "./static/js/5223.750c796e.chunk.js.map",
|
||||
"7659.8b358177.chunk.js.map": "./static/js/7659.8b358177.chunk.js.map",
|
||||
"9968.14f204ee.chunk.js.map": "./static/js/9968.14f204ee.chunk.js.map",
|
||||
"2180.03cd0c4b.chunk.js.map": "./static/js/2180.03cd0c4b.chunk.js.map",
|
||||
"8253.ec0f3d9f.chunk.js.map": "./static/js/8253.ec0f3d9f.chunk.js.map",
|
||||
"3328.c7470c38.chunk.js.map": "./static/js/3328.c7470c38.chunk.js.map",
|
||||
"1440.b9a2f19f.chunk.js.map": "./static/js/1440.b9a2f19f.chunk.js.map",
|
||||
"9179.3874e070.chunk.js.map": "./static/js/9179.3874e070.chunk.js.map",
|
||||
"51.f85def1c.chunk.js.map": "./static/js/51.f85def1c.chunk.js.map",
|
||||
"711.be9f8284.chunk.js.map": "./static/js/711.be9f8284.chunk.js.map",
|
||||
"6901.5afa1e6f.chunk.js.map": "./static/js/6901.5afa1e6f.chunk.js.map",
|
||||
"2185.12707550.chunk.js.map": "./static/js/2185.12707550.chunk.js.map",
|
||||
"312.cd77f5db.chunk.js.map": "./static/js/312.cd77f5db.chunk.js.map",
|
||||
"2112.e0047ff5.chunk.js.map": "./static/js/2112.e0047ff5.chunk.js.map",
|
||||
"4619.8d9ee17c.chunk.js.map": "./static/js/4619.8d9ee17c.chunk.js.map",
|
||||
"8990.194642a8.chunk.js.map": "./static/js/8990.194642a8.chunk.js.map",
|
||||
"8455.6f71a45b.chunk.js.map": "./static/js/8455.6f71a45b.chunk.js.map",
|
||||
"9942.d86db577.chunk.js.map": "./static/js/9942.d86db577.chunk.js.map",
|
||||
"7021.0cd1393a.chunk.js.map": "./static/js/7021.0cd1393a.chunk.js.map",
|
||||
"2684.3b290eb0.chunk.js.map": "./static/js/2684.3b290eb0.chunk.js.map",
|
||||
"6683.31f7943c.chunk.js.map": "./static/js/6683.31f7943c.chunk.js.map",
|
||||
"8350.927cb0f2.chunk.js.map": "./static/js/8350.927cb0f2.chunk.js.map",
|
||||
"4873.b3b8ac8e.chunk.js.map": "./static/js/4873.b3b8ac8e.chunk.js.map",
|
||||
"5367.4ee5c384.chunk.js.map": "./static/js/5367.4ee5c384.chunk.js.map",
|
||||
"5223.d2798e93.chunk.js.map": "./static/js/5223.d2798e93.chunk.js.map",
|
||||
"7659.a9f31d32.chunk.js.map": "./static/js/7659.a9f31d32.chunk.js.map",
|
||||
"1799.dceada24.chunk.js.map": "./static/js/1799.dceada24.chunk.js.map",
|
||||
"9297.8a17bfe7.chunk.js.map": "./static/js/9297.8a17bfe7.chunk.js.map",
|
||||
"9968.42e61fd8.chunk.js.map": "./static/js/9968.42e61fd8.chunk.js.map",
|
||||
"2180.3032b83a.chunk.js.map": "./static/js/2180.3032b83a.chunk.js.map",
|
||||
"8253.112a3c07.chunk.js.map": "./static/js/8253.112a3c07.chunk.js.map",
|
||||
"3328.161f27a6.chunk.js.map": "./static/js/3328.161f27a6.chunk.js.map",
|
||||
"1440.0a79a7c6.chunk.js.map": "./static/js/1440.0a79a7c6.chunk.js.map",
|
||||
"9179.c920b1c6.chunk.js.map": "./static/js/9179.c920b1c6.chunk.js.map",
|
||||
"51.6f729db1.chunk.js.map": "./static/js/51.6f729db1.chunk.js.map",
|
||||
"711.f849ab21.chunk.js.map": "./static/js/711.f849ab21.chunk.js.map",
|
||||
"6901.0b8f3982.chunk.js.map": "./static/js/6901.0b8f3982.chunk.js.map",
|
||||
"2185.c6714d7f.chunk.js.map": "./static/js/2185.c6714d7f.chunk.js.map",
|
||||
"312.9d2483e2.chunk.js.map": "./static/js/312.9d2483e2.chunk.js.map",
|
||||
"2112.218ae789.chunk.js.map": "./static/js/2112.218ae789.chunk.js.map",
|
||||
"4619.e0972aca.chunk.js.map": "./static/js/4619.e0972aca.chunk.js.map",
|
||||
"8990.943dbbfb.chunk.js.map": "./static/js/8990.943dbbfb.chunk.js.map",
|
||||
"8455.01f5b771.chunk.js.map": "./static/js/8455.01f5b771.chunk.js.map",
|
||||
"1913.90c9cdc7.chunk.css.map": "./static/css/1913.90c9cdc7.chunk.css.map",
|
||||
"1913.549c180b.chunk.js.map": "./static/js/1913.549c180b.chunk.js.map",
|
||||
"1604.25690eb1.chunk.js.map": "./static/js/1604.25690eb1.chunk.js.map",
|
||||
"8391.968204ad.chunk.js.map": "./static/js/8391.968204ad.chunk.js.map",
|
||||
"402.5c660ae6.chunk.js.map": "./static/js/402.5c660ae6.chunk.js.map",
|
||||
"1705.32ce00fc.chunk.js.map": "./static/js/1705.32ce00fc.chunk.js.map",
|
||||
"1581.c60c0082.chunk.js.map": "./static/js/1581.c60c0082.chunk.js.map",
|
||||
"455.6aa5b756.chunk.js.map": "./static/js/455.6aa5b756.chunk.js.map",
|
||||
"2661.7fe77f72.chunk.js.map": "./static/js/2661.7fe77f72.chunk.js.map",
|
||||
"889.43037296.chunk.js.map": "./static/js/889.43037296.chunk.js.map",
|
||||
"9088.1edd5d6a.chunk.js.map": "./static/js/9088.1edd5d6a.chunk.js.map",
|
||||
"247.9ce190b5.chunk.js.map": "./static/js/247.9ce190b5.chunk.js.map",
|
||||
"2763.ec4b0ce6.chunk.js.map": "./static/js/2763.ec4b0ce6.chunk.js.map",
|
||||
"1913.aef0d716.chunk.js.map": "./static/js/1913.aef0d716.chunk.js.map",
|
||||
"1604.54fe3660.chunk.js.map": "./static/js/1604.54fe3660.chunk.js.map",
|
||||
"8391.824bba1f.chunk.js.map": "./static/js/8391.824bba1f.chunk.js.map",
|
||||
"402.56cf1d62.chunk.js.map": "./static/js/402.56cf1d62.chunk.js.map",
|
||||
"1705.0a3da076.chunk.js.map": "./static/js/1705.0a3da076.chunk.js.map",
|
||||
"1581.b372ec91.chunk.js.map": "./static/js/1581.b372ec91.chunk.js.map",
|
||||
"455.ae9e0193.chunk.js.map": "./static/js/455.ae9e0193.chunk.js.map",
|
||||
"2661.59158a7f.chunk.js.map": "./static/js/2661.59158a7f.chunk.js.map",
|
||||
"889.22fc77b5.chunk.js.map": "./static/js/889.22fc77b5.chunk.js.map",
|
||||
"9088.0e6ebda2.chunk.js.map": "./static/js/9088.0e6ebda2.chunk.js.map",
|
||||
"247.6b8f3ceb.chunk.js.map": "./static/js/247.6b8f3ceb.chunk.js.map",
|
||||
"2408.a316c373.chunk.js.map": "./static/js/2408.a316c373.chunk.js.map",
|
||||
"5171.e8fc646a.chunk.js.map": "./static/js/5171.e8fc646a.chunk.js.map",
|
||||
"2426.ab27f6f9.chunk.js.map": "./static/js/2426.ab27f6f9.chunk.js.map",
|
||||
"3691.ef93d563.chunk.js.map": "./static/js/3691.ef93d563.chunk.js.map",
|
||||
"2426.ab27f6f9.chunk.js.map": "./static/js/2426.ab27f6f9.chunk.js.map",
|
||||
"3762.52bd15d3.chunk.js.map": "./static/js/3762.52bd15d3.chunk.js.map",
|
||||
"3801.64b6e473.chunk.js.map": "./static/js/3801.64b6e473.chunk.js.map",
|
||||
"1918.4309a619.chunk.js.map": "./static/js/1918.4309a619.chunk.js.map",
|
||||
@@ -277,11 +290,12 @@
|
||||
"7142.4191cc91.chunk.js.map": "./static/js/7142.4191cc91.chunk.js.map",
|
||||
"2691.53531251.chunk.js.map": "./static/js/2691.53531251.chunk.js.map",
|
||||
"7472.f63abe1f.chunk.js.map": "./static/js/7472.f63abe1f.chunk.js.map",
|
||||
"2983.e938a4fe.chunk.js.map": "./static/js/2983.e938a4fe.chunk.js.map",
|
||||
"5289.39c9d169.chunk.js.map": "./static/js/5289.39c9d169.chunk.js.map"
|
||||
"2983.365588dd.chunk.js.map": "./static/js/2983.365588dd.chunk.js.map",
|
||||
"5289.289c4818.chunk.js.map": "./static/js/5289.289c4818.chunk.js.map",
|
||||
"2763.eff3ace0.chunk.js.map": "./static/js/2763.eff3ace0.chunk.js.map"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.90d417ae.css",
|
||||
"static/js/main.44b939e3.js"
|
||||
"static/js/main.85f28419.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"/><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.44b939e3.js"></script><link href="./static/css/main.90d417ae.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"/><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.85f28419.js"></script><link href="./static/css/main.90d417ae.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="preload"><img src="./images/background.svg"/> <img src="./images/background-wave-orig2.svg"/></div><div id="loader-block"><img src="./Loader.svg"/></div></div></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
portal-ui/build/static/js/1182.0b468b7f.chunk.js
Normal file
2
portal-ui/build/static/js/1182.0b468b7f.chunk.js
Normal file
File diff suppressed because one or more lines are too long
1
portal-ui/build/static/js/1182.0b468b7f.chunk.js.map
Normal file
1
portal-ui/build/static/js/1182.0b468b7f.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/1199.acc7a3c5.chunk.js
Normal file
2
portal-ui/build/static/js/1199.acc7a3c5.chunk.js
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/1260.add10538.chunk.js
Normal file
2
portal-ui/build/static/js/1260.add10538.chunk.js
Normal file
File diff suppressed because one or more lines are too long
1
portal-ui/build/static/js/1260.add10538.chunk.js.map
Normal file
1
portal-ui/build/static/js/1260.add10538.chunk.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1268],{92217:function(e,n,t){var o=t(1413),r=t(72791),i=t(61889),a=t(30829),c=t(20068),s=t(64554),l=t(11135),u=t(25787),d=t(84570),f=t(23814),p=t(15900),m=t(40603),x=t(78029),h=t.n(x),Z=t(85457),j=t(80184);n.Z=(0,u.Z)((function(e){return(0,l.Z)((0,o.Z)({},f.YI))}))((function(e){var n=e.value,t=e.label,o=void 0===t?"":t,l=e.tooltip,u=void 0===l?"":l,f=e.mode,x=void 0===f?"json":f,y=e.classes,b=e.onBeforeChange,v=(e.readOnly,e.editorHeight),g=void 0===v?"250px":v;return(0,j.jsxs)(r.Fragment,{children:[(0,j.jsx)(i.ZP,{item:!0,xs:12,children:(0,j.jsxs)(a.Z,{className:y.inputLabel,children:[(0,j.jsx)("span",{children:o}),""!==u&&(0,j.jsx)("div",{className:y.tooltipContainer,children:(0,j.jsx)(c.Z,{title:u,placement:"top-start",children:(0,j.jsx)("div",{className:y.tooltip,children:(0,j.jsx)(d.Z,{})})})})]})}),(0,j.jsx)(i.ZP,{item:!0,xs:12,style:{maxHeight:g,overflow:"auto"},children:(0,j.jsx)(Z.Z,{value:n,language:x,onChange:function(e){b(null,null,e.target.value)},id:"code_wrapper",padding:15,style:{fontSize:12,backgroundColor:"#fefefe",fontFamily:"ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace"}})}),(0,j.jsx)(i.ZP,{item:!0,xs:12,sx:{borderTop:"1px solid #eaeaea",background:"#f7f7f7"},children:(0,j.jsx)(s.Z,{sx:{display:"flex",alignItems:"center",padding:"2px",paddingRight:"5px",justifyContent:"flex-end","& button":{height:"26px",width:"26px",padding:"2px"," .min-icon":{marginLeft:"0"}}},children:(0,j.jsx)(h(),{text:n,children:(0,j.jsx)(m.Z,{tooltip:"Copy to Clipboard",onClick:function(){},text:"",icon:(0,j.jsx)(p.TIy,{}),color:"primary",variant:"outlined"})})})})]})}))},82859:function(e,n,t){t.r(n);var o=t(29439),r=t(1413),i=t(72791),a=t(60364),c=t(16871),s=t(61889),l=t(40986),u=t(36151),d=t(11135),f=t(25787),p=t(81207),m=t(23814),x=t(92217),h=t(87995),Z=t(81551),j=t(82295),y=t(50896),b=t(80184);n.default=(0,f.Z)((function(e){return(0,d.Z)((0,r.Z)((0,r.Z)({errorState:{color:"#b53b4b",fontSize:14,fontWeight:"bold"},codeMirrorContainer:{marginBottom:20,paddingLeft:15,"& label":{marginBottom:".5rem"},"& label + div":{display:"none"}}},m.ID),m.YI))}))((function(e){var n=e.classes,t=(0,Z.TL)(),r=(0,c.s0)(),d=(0,a.v9)((function(e){return e.tenants.currentTenant})),f=(0,a.v9)((function(e){return e.tenants.currentNamespace})),m=(0,i.useState)(!1),v=(0,o.Z)(m,2),g=v[0],C=v[1],S=(0,i.useState)(!1),P=(0,o.Z)(S,2),w=P[0],k=P[1],T=(0,i.useState)(""),O=(0,o.Z)(T,2),_=O[0],L=O[1],M=(0,i.useState)(""),E=(0,o.Z)(M,2),F=E[0],I=E[1];(0,i.useEffect)((function(){p.Z.invoke("GET","/api/v1/namespaces/".concat(f,"/tenants/").concat(d,"/yaml")).then((function(e){k(!1),L(e.yaml)})).catch((function(e){k(!1),t((0,h.zb)(e))}))}),[d,f,t]),(0,i.useEffect)((function(){}),[]);var N=""!==_.trim();return(0,b.jsxs)(i.Fragment,{children:[g||w&&(0,b.jsx)(s.ZP,{item:!0,xs:12,children:(0,b.jsx)(l.Z,{})}),""!==F&&(0,b.jsx)("div",{className:n.errorState,children:F}),!w&&(0,b.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),g||(C(!0),I(""),p.Z.invoke("PUT","/api/v1/namespaces/".concat(f,"/tenants/").concat(d,"/yaml"),{yaml:_}).then((function(e){C(!1),t((0,j.v)()),I(""),r("/namespaces/".concat(f,"/tenants/").concat(d,"/summary"))})).catch((function(e){C(!1),I(e.errorMessage)})))},children:(0,b.jsxs)(s.ZP,{container:!0,children:[(0,b.jsx)(s.ZP,{item:!0,xs:12,children:(0,b.jsx)(y.Z,{children:"Tenant Specification"})}),(0,b.jsx)(s.ZP,{item:!0,xs:12,style:{border:"1px solid #eaeaea"},children:(0,b.jsx)(x.Z,{value:_,mode:"yaml",onBeforeChange:function(e,n,t){L(t)},editorHeight:"550px"})}),(0,b.jsxs)(s.ZP,{item:!0,xs:12,style:{textAlign:"right",paddingTop:16},children:[(0,b.jsx)(u.Z,{type:"button",variant:"outlined",color:"primary",disabled:g,onClick:function(){r("/namespaces/".concat(f,"/tenants/").concat(d,"/summary"))},children:"Cancel"}),(0,b.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:g||!N,style:{marginLeft:8},children:"Save"})]})]})})]})}))},61120:function(e,n,t){function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}t.d(n,{Z:function(){return o}})},60136:function(e,n,t){t.d(n,{Z:function(){return r}});var o=t(89611);function r(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&(0,o.Z)(e,n)}},82963:function(e,n,t){t.d(n,{Z:function(){return i}});var o=t(71002),r=t(97326);function i(e,n){if(n&&("object"===(0,o.Z)(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.Z)(e)}}}]);
|
||||
//# sourceMappingURL=1268.cb6b69cf.chunk.js.map
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1268],{92217:function(e,n,t){var o=t(1413),r=t(72791),i=t(61889),a=t(30829),c=t(20068),s=t(64554),l=t(11135),u=t(25787),d=t(84570),f=t(23814),p=t(38734),m=t(40603),x=t(78029),h=t.n(x),Z=t(85457),j=t(80184);n.Z=(0,u.Z)((function(e){return(0,l.Z)((0,o.Z)({},f.YI))}))((function(e){var n=e.value,t=e.label,o=void 0===t?"":t,l=e.tooltip,u=void 0===l?"":l,f=e.mode,x=void 0===f?"json":f,y=e.classes,b=e.onBeforeChange,v=(e.readOnly,e.editorHeight),g=void 0===v?"250px":v;return(0,j.jsxs)(r.Fragment,{children:[(0,j.jsx)(i.ZP,{item:!0,xs:12,children:(0,j.jsxs)(a.Z,{className:y.inputLabel,children:[(0,j.jsx)("span",{children:o}),""!==u&&(0,j.jsx)("div",{className:y.tooltipContainer,children:(0,j.jsx)(c.Z,{title:u,placement:"top-start",children:(0,j.jsx)("div",{className:y.tooltip,children:(0,j.jsx)(d.Z,{})})})})]})}),(0,j.jsx)(i.ZP,{item:!0,xs:12,style:{maxHeight:g,overflow:"auto"},children:(0,j.jsx)(Z.Z,{value:n,language:x,onChange:function(e){b(null,null,e.target.value)},id:"code_wrapper",padding:15,style:{fontSize:12,backgroundColor:"#fefefe",fontFamily:"ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace"}})}),(0,j.jsx)(i.ZP,{item:!0,xs:12,sx:{borderTop:"1px solid #eaeaea",background:"#f7f7f7"},children:(0,j.jsx)(s.Z,{sx:{display:"flex",alignItems:"center",padding:"2px",paddingRight:"5px",justifyContent:"flex-end","& button":{height:"26px",width:"26px",padding:"2px"," .min-icon":{marginLeft:"0"}}},children:(0,j.jsx)(h(),{text:n,children:(0,j.jsx)(m.Z,{tooltip:"Copy to Clipboard",onClick:function(){},text:"",icon:(0,j.jsx)(p.TIy,{}),color:"primary",variant:"outlined"})})})})]})}))},82859:function(e,n,t){t.r(n);var o=t(29439),r=t(1413),i=t(72791),a=t(60364),c=t(16871),s=t(61889),l=t(40986),u=t(36151),d=t(11135),f=t(25787),p=t(81207),m=t(23814),x=t(92217),h=t(87995),Z=t(25469),j=t(82295),y=t(50896),b=t(80184);n.default=(0,f.Z)((function(e){return(0,d.Z)((0,r.Z)((0,r.Z)({errorState:{color:"#b53b4b",fontSize:14,fontWeight:"bold"},codeMirrorContainer:{marginBottom:20,paddingLeft:15,"& label":{marginBottom:".5rem"},"& label + div":{display:"none"}}},m.ID),m.YI))}))((function(e){var n=e.classes,t=(0,Z.TL)(),r=(0,c.s0)(),d=(0,a.v9)((function(e){return e.tenants.currentTenant})),f=(0,a.v9)((function(e){return e.tenants.currentNamespace})),m=(0,i.useState)(!1),v=(0,o.Z)(m,2),g=v[0],C=v[1],S=(0,i.useState)(!1),P=(0,o.Z)(S,2),w=P[0],k=P[1],T=(0,i.useState)(""),O=(0,o.Z)(T,2),_=O[0],L=O[1],M=(0,i.useState)(""),E=(0,o.Z)(M,2),F=E[0],I=E[1];(0,i.useEffect)((function(){p.Z.invoke("GET","/api/v1/namespaces/".concat(f,"/tenants/").concat(d,"/yaml")).then((function(e){k(!1),L(e.yaml)})).catch((function(e){k(!1),t((0,h.zb)(e))}))}),[d,f,t]),(0,i.useEffect)((function(){}),[]);var N=""!==_.trim();return(0,b.jsxs)(i.Fragment,{children:[g||w&&(0,b.jsx)(s.ZP,{item:!0,xs:12,children:(0,b.jsx)(l.Z,{})}),""!==F&&(0,b.jsx)("div",{className:n.errorState,children:F}),!w&&(0,b.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),g||(C(!0),I(""),p.Z.invoke("PUT","/api/v1/namespaces/".concat(f,"/tenants/").concat(d,"/yaml"),{yaml:_}).then((function(e){C(!1),t((0,j.v)()),I(""),r("/namespaces/".concat(f,"/tenants/").concat(d,"/summary"))})).catch((function(e){C(!1),I(e.errorMessage)})))},children:(0,b.jsxs)(s.ZP,{container:!0,children:[(0,b.jsx)(s.ZP,{item:!0,xs:12,children:(0,b.jsx)(y.Z,{children:"Tenant Specification"})}),(0,b.jsx)(s.ZP,{item:!0,xs:12,style:{border:"1px solid #eaeaea"},children:(0,b.jsx)(x.Z,{value:_,mode:"yaml",onBeforeChange:function(e,n,t){L(t)},editorHeight:"550px"})}),(0,b.jsxs)(s.ZP,{item:!0,xs:12,style:{textAlign:"right",paddingTop:16},children:[(0,b.jsx)(u.Z,{type:"button",variant:"outlined",color:"primary",disabled:g,onClick:function(){r("/namespaces/".concat(f,"/tenants/").concat(d,"/summary"))},children:"Cancel"}),(0,b.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:g||!N,style:{marginLeft:8},children:"Save"})]})]})})]})}))},61120:function(e,n,t){function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}t.d(n,{Z:function(){return o}})},60136:function(e,n,t){t.d(n,{Z:function(){return r}});var o=t(89611);function r(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&(0,o.Z)(e,n)}},82963:function(e,n,t){t.d(n,{Z:function(){return i}});var o=t(71002),r=t(97326);function i(e,n){if(n&&("object"===(0,o.Z)(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.Z)(e)}}}]);
|
||||
//# sourceMappingURL=1268.6b4f91d2.chunk.js.map
|
||||
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/1379.9ed2e025.chunk.js
Normal file
2
portal-ui/build/static/js/1379.9ed2e025.chunk.js
Normal file
File diff suppressed because one or more lines are too long
1
portal-ui/build/static/js/1379.9ed2e025.chunk.js.map
Normal file
1
portal-ui/build/static/js/1379.9ed2e025.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
@@ -1,2 +1,2 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1581],{1581:function(e,t,n){n.r(t);var a=n(29439),s=n(1413),i=n(72791),o=n(36151),l=n(40986),c=n(11135),r=n(25787),u=n(61889),d=n(45248),m=n(23814),f=n(37516),Z=n(21435),h=n(56028),x=n(81207),p=n(15900),j=n(56578),v=n(87995),b=n(81551),g=n(80184);t.default=(0,r.Z)((function(e){return(0,c.Z)((0,s.Z)((0,s.Z)({},m.DF),m.ID))}))((function(e){var t=e.classes,n=e.open,s=e.enabled,c=e.cfg,r=e.selectedBucket,m=e.closeModalAndRefresh,k=(0,b.TL)(),C=(0,i.useState)(!1),S=(0,a.Z)(C,2),N=S[0],P=S[1],q=(0,i.useState)(!1),y=(0,a.Z)(q,2),B=y[0],w=y[1],E=(0,i.useState)("1"),_=(0,a.Z)(E,2),M=_[0],z=_[1],D=(0,i.useState)("Ti"),T=(0,a.Z)(D,2),F=T[0],I=T[1],L=(0,i.useState)(!1),Q=(0,a.Z)(L,2),R=Q[0],W=Q[1];(0,i.useEffect)((function(){if(s&&(w(!0),c)){var e=(0,d.Am)(c.quota,!0,!1,!0);z(e.total.toString()),I(e.unit),W(!0)}}),[s,c]),(0,i.useEffect)((function(){W(!B||/^\d*(?:\.\d{1,2})?$/.test(M))}),[B,M]);return(0,g.jsx)(h.Z,{modalOpen:n,onClose:function(){m()},title:"Enable Bucket Quota",titleIcon:(0,g.jsx)(p.Wqw,{}),children:(0,g.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),function(){if(!N&&R){var e={enabled:B,amount:parseInt((0,d.Pw)(M,F,!0)),quota_type:"hard"};x.Z.invoke("PUT","/api/v1/buckets/".concat(r,"/quota"),e).then((function(){P(!1),m()})).catch((function(e){P(!1),k((0,v.zb)(e))}))}}()},children:(0,g.jsxs)(u.ZP,{container:!0,children:[(0,g.jsxs)(u.ZP,{item:!0,xs:12,className:t.formScrollable,children:[(0,g.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,g.jsx)(f.Z,{value:"bucket_quota",id:"bucket_quota",name:"bucket_quota",checked:B,onChange:function(e){w(e.target.checked)},label:"Enabled"})}),B&&(0,g.jsx)(i.Fragment,{children:(0,g.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,g.jsx)(u.ZP,{container:!0,children:(0,g.jsx)(u.ZP,{item:!0,xs:12,children:(0,g.jsx)(Z.Z,{id:"quota_size",name:"quota_size",onChange:function(e){z(e.target.value),e.target.validity.valid?W(!0):W(!1)},label:"Quota",value:M,required:!0,min:"1",overlayObject:(0,g.jsx)(j.Z,{id:"quota_unit",onUnitChange:function(e){I(e)},unitSelected:F,unitsList:(0,d.zQ)(["Ki"]),disabled:!1}),error:R?"":"Please enter a valid quota"})})})})})]}),(0,g.jsxs)(u.ZP,{item:!0,xs:12,className:t.modalButtonBar,children:[(0,g.jsx)(o.Z,{type:"button",variant:"outlined",color:"primary",disabled:N,onClick:function(){m()},children:"Cancel"}),(0,g.jsx)(o.Z,{type:"submit",variant:"contained",color:"primary",disabled:N||!R,children:"Save"})]}),N&&(0,g.jsx)(u.ZP,{item:!0,xs:12,children:(0,g.jsx)(l.Z,{})})]})})})}))},56028:function(e,t,n){var a=n(29439),s=n(1413),i=n(72791),o=n(60364),l=n(13400),c=n(55646),r=n(5574),u=n(65661),d=n(39157),m=n(11135),f=n(25787),Z=n(23814),h=n(81551),x=n(29823),p=n(28057),j=n(87995),v=n(80184);t.Z=(0,f.Z)((function(e){return(0,m.Z)((0,s.Z)((0,s.Z)({},Z.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},Z.sN))}))((function(e){var t=e.onClose,n=e.modalOpen,m=e.title,f=e.children,Z=e.classes,b=e.wideLimit,g=void 0===b||b,k=e.noContentPadding,C=e.titleIcon,S=void 0===C?null:C,N=(0,h.TL)(),P=(0,i.useState)(!1),q=(0,a.Z)(P,2),y=q[0],B=q[1],w=(0,o.v9)((function(e){return e.system.modalSnackBar}));(0,i.useEffect)((function(){N((0,j.MK)(""))}),[N]),(0,i.useEffect)((function(){if(w){if(""===w.message)return void B(!1);"error"!==w.type&&B(!0)}}),[w]);var E=g?{classes:{paper:Z.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},_="";return w&&(_=w.detailedErrorMsg,(""===w.detailedErrorMsg||w.detailedErrorMsg.length<5)&&(_=w.message)),(0,v.jsxs)(r.Z,(0,s.Z)((0,s.Z)({open:n,classes:Z},E),{},{scroll:"paper",onClose:function(e,n){"backdropClick"!==n&&t()},className:Z.root,children:[(0,v.jsxs)(u.Z,{className:Z.title,children:[(0,v.jsxs)("div",{className:Z.titleText,children:[S," ",m]}),(0,v.jsx)("div",{className:Z.closeContainer,children:(0,v.jsx)(l.Z,{"aria-label":"close",id:"close",className:Z.closeButton,onClick:t,disableRipple:!0,size:"small",children:(0,v.jsx)(x.Z,{})})})]}),(0,v.jsx)(p.Z,{isModal:!0}),(0,v.jsx)(c.Z,{open:y,className:Z.snackBarModal,onClose:function(){B(!1),N((0,j.MK)(""))},message:_,ContentProps:{className:"".concat(Z.snackBar," ").concat(w&&"error"===w.type?Z.errorSnackBar:"")},autoHideDuration:w&&"error"===w.type?1e4:5e3}),(0,v.jsx)(d.Z,{className:k?"":Z.content,children:f})]}))}))}}]);
|
||||
//# sourceMappingURL=1581.c60c0082.chunk.js.map
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1581],{1581:function(e,t,n){n.r(t);var a=n(29439),s=n(1413),i=n(72791),o=n(36151),l=n(40986),c=n(11135),r=n(25787),u=n(61889),d=n(45248),m=n(23814),f=n(37516),Z=n(21435),h=n(56028),x=n(81207),p=n(38734),j=n(56578),v=n(87995),b=n(25469),g=n(80184);t.default=(0,r.Z)((function(e){return(0,c.Z)((0,s.Z)((0,s.Z)({},m.DF),m.ID))}))((function(e){var t=e.classes,n=e.open,s=e.enabled,c=e.cfg,r=e.selectedBucket,m=e.closeModalAndRefresh,k=(0,b.TL)(),C=(0,i.useState)(!1),S=(0,a.Z)(C,2),N=S[0],P=S[1],q=(0,i.useState)(!1),y=(0,a.Z)(q,2),B=y[0],w=y[1],E=(0,i.useState)("1"),_=(0,a.Z)(E,2),M=_[0],z=_[1],D=(0,i.useState)("Ti"),T=(0,a.Z)(D,2),F=T[0],I=T[1],L=(0,i.useState)(!1),Q=(0,a.Z)(L,2),R=Q[0],W=Q[1];(0,i.useEffect)((function(){if(s&&(w(!0),c)){var e=(0,d.Am)(c.quota,!0,!1,!0);z(e.total.toString()),I(e.unit),W(!0)}}),[s,c]),(0,i.useEffect)((function(){W(!B||/^\d*(?:\.\d{1,2})?$/.test(M))}),[B,M]);return(0,g.jsx)(h.Z,{modalOpen:n,onClose:function(){m()},title:"Enable Bucket Quota",titleIcon:(0,g.jsx)(p.Wqw,{}),children:(0,g.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),function(){if(!N&&R){var e={enabled:B,amount:parseInt((0,d.Pw)(M,F,!0)),quota_type:"hard"};x.Z.invoke("PUT","/api/v1/buckets/".concat(r,"/quota"),e).then((function(){P(!1),m()})).catch((function(e){P(!1),k((0,v.zb)(e))}))}}()},children:(0,g.jsxs)(u.ZP,{container:!0,children:[(0,g.jsxs)(u.ZP,{item:!0,xs:12,className:t.formScrollable,children:[(0,g.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,g.jsx)(f.Z,{value:"bucket_quota",id:"bucket_quota",name:"bucket_quota",checked:B,onChange:function(e){w(e.target.checked)},label:"Enabled"})}),B&&(0,g.jsx)(i.Fragment,{children:(0,g.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,g.jsx)(u.ZP,{container:!0,children:(0,g.jsx)(u.ZP,{item:!0,xs:12,children:(0,g.jsx)(Z.Z,{id:"quota_size",name:"quota_size",onChange:function(e){z(e.target.value),e.target.validity.valid?W(!0):W(!1)},label:"Quota",value:M,required:!0,min:"1",overlayObject:(0,g.jsx)(j.Z,{id:"quota_unit",onUnitChange:function(e){I(e)},unitSelected:F,unitsList:(0,d.zQ)(["Ki"]),disabled:!1}),error:R?"":"Please enter a valid quota"})})})})})]}),(0,g.jsxs)(u.ZP,{item:!0,xs:12,className:t.modalButtonBar,children:[(0,g.jsx)(o.Z,{type:"button",variant:"outlined",color:"primary",disabled:N,onClick:function(){m()},children:"Cancel"}),(0,g.jsx)(o.Z,{type:"submit",variant:"contained",color:"primary",disabled:N||!R,children:"Save"})]}),N&&(0,g.jsx)(u.ZP,{item:!0,xs:12,children:(0,g.jsx)(l.Z,{})})]})})})}))},56028:function(e,t,n){var a=n(29439),s=n(1413),i=n(72791),o=n(60364),l=n(13400),c=n(55646),r=n(5574),u=n(65661),d=n(39157),m=n(11135),f=n(25787),Z=n(23814),h=n(25469),x=n(29823),p=n(28057),j=n(87995),v=n(80184);t.Z=(0,f.Z)((function(e){return(0,m.Z)((0,s.Z)((0,s.Z)({},Z.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},Z.sN))}))((function(e){var t=e.onClose,n=e.modalOpen,m=e.title,f=e.children,Z=e.classes,b=e.wideLimit,g=void 0===b||b,k=e.noContentPadding,C=e.titleIcon,S=void 0===C?null:C,N=(0,h.TL)(),P=(0,i.useState)(!1),q=(0,a.Z)(P,2),y=q[0],B=q[1],w=(0,o.v9)((function(e){return e.system.modalSnackBar}));(0,i.useEffect)((function(){N((0,j.MK)(""))}),[N]),(0,i.useEffect)((function(){if(w){if(""===w.message)return void B(!1);"error"!==w.type&&B(!0)}}),[w]);var E=g?{classes:{paper:Z.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},_="";return w&&(_=w.detailedErrorMsg,(""===w.detailedErrorMsg||w.detailedErrorMsg.length<5)&&(_=w.message)),(0,v.jsxs)(r.Z,(0,s.Z)((0,s.Z)({open:n,classes:Z},E),{},{scroll:"paper",onClose:function(e,n){"backdropClick"!==n&&t()},className:Z.root,children:[(0,v.jsxs)(u.Z,{className:Z.title,children:[(0,v.jsxs)("div",{className:Z.titleText,children:[S," ",m]}),(0,v.jsx)("div",{className:Z.closeContainer,children:(0,v.jsx)(l.Z,{"aria-label":"close",id:"close",className:Z.closeButton,onClick:t,disableRipple:!0,size:"small",children:(0,v.jsx)(x.Z,{})})})]}),(0,v.jsx)(p.Z,{isModal:!0}),(0,v.jsx)(c.Z,{open:y,className:Z.snackBarModal,onClose:function(){B(!1),N((0,j.MK)(""))},message:_,ContentProps:{className:"".concat(Z.snackBar," ").concat(w&&"error"===w.type?Z.errorSnackBar:"")},autoHideDuration:w&&"error"===w.type?1e4:5e3}),(0,v.jsx)(d.Z,{className:k?"":Z.content,children:f})]}))}))}}]);
|
||||
//# sourceMappingURL=1581.b372ec91.chunk.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1604],{1604:function(e,t,n){n.r(t);var i=n(29439),a=n(1413),o=n(72791),s=n(36151),l=n(40986),r=n(11135),c=n(25787),u=n(61889),d=n(23814),m=n(81207),f=n(56028),Z=n(83679),h=n(21435),p=n(72401),x=n(87995),v=n(81551),b=n(80184);t.default=(0,c.Z)((function(e){return(0,r.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},d.bK),d.QV),d.DF),d.ID))}))((function(e){var t=e.classes,n=e.open,a=e.bucketName,r=e.closeModalAndRefresh,c=(0,v.TL)(),d=(0,o.useState)(!1),j=(0,i.Z)(d,2),g=j[0],y=j[1],C=(0,o.useState)(!0),N=(0,i.Z)(C,2),S=N[0],k=N[1],P=(0,o.useState)("compliance"),w=(0,i.Z)(P,2),M=w[0],R=w[1],B=(0,o.useState)("days"),E=(0,i.Z)(B,2),_=E[0],D=E[1],F=(0,o.useState)(1),T=(0,i.Z)(F,2),z=T[0],O=T[1],K=(0,o.useState)(!1),L=(0,i.Z)(K,2),V=L[0],W=L[1];return(0,o.useEffect)((function(){Number.isNaN(z)||z<1?W(!1):W(!0)}),[z]),(0,o.useEffect)((function(){S&&m.Z.invoke("GET","/api/v1/buckets/".concat(a,"/retention")).then((function(e){k(!1),R(e.mode),O(e.validity),D(e.unit)})).catch((function(e){k(!1)}))}),[S,a]),(0,b.jsx)(f.Z,{title:"Set Retention Configuration",modalOpen:n,onClose:function(){r()},children:S?(0,b.jsx)(p.Z,{style:{width:16,height:16}}):(0,b.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),g||(y(!0),m.Z.invoke("PUT","/api/v1/buckets/".concat(a,"/retention"),{mode:M,unit:_,validity:z}).then((function(){y(!1),r()})).catch((function(e){y(!1),c((0,x.zb)(e))})))},children:(0,b.jsxs)(u.ZP,{container:!0,children:[(0,b.jsxs)(u.ZP,{item:!0,xs:12,className:t.modalFormScrollable,children:[(0,b.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,b.jsx)(Z.Z,{currentSelection:M,id:"retention_mode",name:"retention_mode",label:"Retention Mode",onChange:function(e){R(e.target.value)},selectorOptions:[{value:"compliance",label:"Compliance"},{value:"governance",label:"Governance"}]})}),(0,b.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,b.jsx)(Z.Z,{currentSelection:_,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)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,b.jsx)(h.Z,{type:"number",id:"retention_validity",name:"retention_validity",onChange:function(e){O(e.target.valueAsNumber)},label:"Retention Validity",value:String(z),required:!0,min:"1"})})]}),(0,b.jsxs)(u.ZP,{item:!0,xs:12,className:t.modalButtonBar,children:[(0,b.jsx)(s.Z,{type:"button",variant:"outlined",color:"primary",disabled:g,onClick:function(){r()},children:"Cancel"}),(0,b.jsx)(s.Z,{type:"submit",variant:"contained",color:"primary",disabled:g||!V,children:"Set"})]}),g&&(0,b.jsx)(u.ZP,{item:!0,xs:12,children:(0,b.jsx)(l.Z,{})})]})})})}))},56028:function(e,t,n){var i=n(29439),a=n(1413),o=n(72791),s=n(60364),l=n(13400),r=n(55646),c=n(5574),u=n(65661),d=n(39157),m=n(11135),f=n(25787),Z=n(23814),h=n(81551),p=n(29823),x=n(28057),v=n(87995),b=n(80184);t.Z=(0,f.Z)((function(e){return(0,m.Z)((0,a.Z)((0,a.Z)({},Z.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},Z.sN))}))((function(e){var t=e.onClose,n=e.modalOpen,m=e.title,f=e.children,Z=e.classes,j=e.wideLimit,g=void 0===j||j,y=e.noContentPadding,C=e.titleIcon,N=void 0===C?null:C,S=(0,h.TL)(),k=(0,o.useState)(!1),P=(0,i.Z)(k,2),w=P[0],M=P[1],R=(0,s.v9)((function(e){return e.system.modalSnackBar}));(0,o.useEffect)((function(){S((0,v.MK)(""))}),[S]),(0,o.useEffect)((function(){if(R){if(""===R.message)return void M(!1);"error"!==R.type&&M(!0)}}),[R]);var B=g?{classes:{paper:Z.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},E="";return R&&(E=R.detailedErrorMsg,(""===R.detailedErrorMsg||R.detailedErrorMsg.length<5)&&(E=R.message)),(0,b.jsxs)(c.Z,(0,a.Z)((0,a.Z)({open:n,classes:Z},B),{},{scroll:"paper",onClose:function(e,n){"backdropClick"!==n&&t()},className:Z.root,children:[(0,b.jsxs)(u.Z,{className:Z.title,children:[(0,b.jsxs)("div",{className:Z.titleText,children:[N," ",m]}),(0,b.jsx)("div",{className:Z.closeContainer,children:(0,b.jsx)(l.Z,{"aria-label":"close",id:"close",className:Z.closeButton,onClick:t,disableRipple:!0,size:"small",children:(0,b.jsx)(p.Z,{})})})]}),(0,b.jsx)(x.Z,{isModal:!0}),(0,b.jsx)(r.Z,{open:w,className:Z.snackBarModal,onClose:function(){M(!1),S((0,v.MK)(""))},message:E,ContentProps:{className:"".concat(Z.snackBar," ").concat(R&&"error"===R.type?Z.errorSnackBar:"")},autoHideDuration:R&&"error"===R.type?1e4:5e3}),(0,b.jsx)(d.Z,{className:y?"":Z.content,children:f})]}))}))}}]);
|
||||
//# sourceMappingURL=1604.25690eb1.chunk.js.map
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1604],{1604:function(e,t,n){n.r(t);var i=n(29439),a=n(1413),o=n(72791),s=n(36151),l=n(40986),r=n(11135),c=n(25787),u=n(61889),d=n(23814),m=n(81207),f=n(56028),Z=n(83679),h=n(21435),p=n(72401),x=n(87995),v=n(25469),b=n(80184);t.default=(0,c.Z)((function(e){return(0,r.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},d.bK),d.QV),d.DF),d.ID))}))((function(e){var t=e.classes,n=e.open,a=e.bucketName,r=e.closeModalAndRefresh,c=(0,v.TL)(),d=(0,o.useState)(!1),j=(0,i.Z)(d,2),g=j[0],y=j[1],C=(0,o.useState)(!0),N=(0,i.Z)(C,2),S=N[0],k=N[1],P=(0,o.useState)("compliance"),w=(0,i.Z)(P,2),M=w[0],R=w[1],B=(0,o.useState)("days"),E=(0,i.Z)(B,2),_=E[0],D=E[1],F=(0,o.useState)(1),T=(0,i.Z)(F,2),z=T[0],O=T[1],K=(0,o.useState)(!1),L=(0,i.Z)(K,2),V=L[0],W=L[1];return(0,o.useEffect)((function(){Number.isNaN(z)||z<1?W(!1):W(!0)}),[z]),(0,o.useEffect)((function(){S&&m.Z.invoke("GET","/api/v1/buckets/".concat(a,"/retention")).then((function(e){k(!1),R(e.mode),O(e.validity),D(e.unit)})).catch((function(e){k(!1)}))}),[S,a]),(0,b.jsx)(f.Z,{title:"Set Retention Configuration",modalOpen:n,onClose:function(){r()},children:S?(0,b.jsx)(p.Z,{style:{width:16,height:16}}):(0,b.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),g||(y(!0),m.Z.invoke("PUT","/api/v1/buckets/".concat(a,"/retention"),{mode:M,unit:_,validity:z}).then((function(){y(!1),r()})).catch((function(e){y(!1),c((0,x.zb)(e))})))},children:(0,b.jsxs)(u.ZP,{container:!0,children:[(0,b.jsxs)(u.ZP,{item:!0,xs:12,className:t.modalFormScrollable,children:[(0,b.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,b.jsx)(Z.Z,{currentSelection:M,id:"retention_mode",name:"retention_mode",label:"Retention Mode",onChange:function(e){R(e.target.value)},selectorOptions:[{value:"compliance",label:"Compliance"},{value:"governance",label:"Governance"}]})}),(0,b.jsx)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,b.jsx)(Z.Z,{currentSelection:_,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)(u.ZP,{item:!0,xs:12,className:t.formFieldRow,children:(0,b.jsx)(h.Z,{type:"number",id:"retention_validity",name:"retention_validity",onChange:function(e){O(e.target.valueAsNumber)},label:"Retention Validity",value:String(z),required:!0,min:"1"})})]}),(0,b.jsxs)(u.ZP,{item:!0,xs:12,className:t.modalButtonBar,children:[(0,b.jsx)(s.Z,{type:"button",variant:"outlined",color:"primary",disabled:g,onClick:function(){r()},children:"Cancel"}),(0,b.jsx)(s.Z,{type:"submit",variant:"contained",color:"primary",disabled:g||!V,children:"Set"})]}),g&&(0,b.jsx)(u.ZP,{item:!0,xs:12,children:(0,b.jsx)(l.Z,{})})]})})})}))},56028:function(e,t,n){var i=n(29439),a=n(1413),o=n(72791),s=n(60364),l=n(13400),r=n(55646),c=n(5574),u=n(65661),d=n(39157),m=n(11135),f=n(25787),Z=n(23814),h=n(25469),p=n(29823),x=n(28057),v=n(87995),b=n(80184);t.Z=(0,f.Z)((function(e){return(0,m.Z)((0,a.Z)((0,a.Z)({},Z.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},Z.sN))}))((function(e){var t=e.onClose,n=e.modalOpen,m=e.title,f=e.children,Z=e.classes,j=e.wideLimit,g=void 0===j||j,y=e.noContentPadding,C=e.titleIcon,N=void 0===C?null:C,S=(0,h.TL)(),k=(0,o.useState)(!1),P=(0,i.Z)(k,2),w=P[0],M=P[1],R=(0,s.v9)((function(e){return e.system.modalSnackBar}));(0,o.useEffect)((function(){S((0,v.MK)(""))}),[S]),(0,o.useEffect)((function(){if(R){if(""===R.message)return void M(!1);"error"!==R.type&&M(!0)}}),[R]);var B=g?{classes:{paper:Z.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},E="";return R&&(E=R.detailedErrorMsg,(""===R.detailedErrorMsg||R.detailedErrorMsg.length<5)&&(E=R.message)),(0,b.jsxs)(c.Z,(0,a.Z)((0,a.Z)({open:n,classes:Z},B),{},{scroll:"paper",onClose:function(e,n){"backdropClick"!==n&&t()},className:Z.root,children:[(0,b.jsxs)(u.Z,{className:Z.title,children:[(0,b.jsxs)("div",{className:Z.titleText,children:[N," ",m]}),(0,b.jsx)("div",{className:Z.closeContainer,children:(0,b.jsx)(l.Z,{"aria-label":"close",id:"close",className:Z.closeButton,onClick:t,disableRipple:!0,size:"small",children:(0,b.jsx)(p.Z,{})})})]}),(0,b.jsx)(x.Z,{isModal:!0}),(0,b.jsx)(r.Z,{open:w,className:Z.snackBarModal,onClose:function(){M(!1),S((0,v.MK)(""))},message:E,ContentProps:{className:"".concat(Z.snackBar," ").concat(R&&"error"===R.type?Z.errorSnackBar:"")},autoHideDuration:R&&"error"===R.type?1e4:5e3}),(0,b.jsx)(d.Z,{className:y?"":Z.content,children:f})]}))}))}}]);
|
||||
//# sourceMappingURL=1604.54fe3660.chunk.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +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),o=t(9505),i=t(64554),c=t(56087),a=t(38442),u=t(26181),r=t.n(u),d=t(81918),h=t(29823),f=t(42419),p=t(75578),v=t(72401),x=t(87995),Z=t(81551),T=t(80184),j=(0,p.Z)(s.lazy((function(){return t.e(247).then(t.bind(t,40247))}))),m=(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,Z.TL)(),u=(0,s.useState)(null),p=(0,l.Z)(u,2),b=p[0],k=p[1],g=(0,s.useState)(!1),G=(0,l.Z)(g,2),_=G[0],y=G[1],C=(0,s.useState)([]),A=(0,l.Z)(C,2),S=A[0],U=A[1],E=(0,s.useState)(["",""]),I=(0,l.Z)(E,2),N=I[0],z=I[1],w=(0,s.useState)(!1),F=(0,l.Z)(w,2),P=F[0],B=F[1],K=(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)&&(k(null===e||void 0===e||null===(n=e.details)||void 0===n?void 0:n.tags),U(Object.keys(null===e||void 0===e||null===(t=e.details)||void 0===t?void 0:t.tags)))}),(function(e){t((0,x.Ih)(e))})),O=(0,l.Z)(K,2),D=O[0],H=O[1],L=function(){H("GET","/api/v1/buckets/".concat(n))};return(0,s.useEffect)((function(){L()}),[n]),(0,T.jsxs)(i.Z,{children:[D?(0,T.jsx)(v.Z,{style:{width:16,height:16}}):null,(0,T.jsx)(a.s,{scopes:[c.Ft.S3_GET_BUCKET_TAGGING],resource:n,children:(0,T.jsxs)(i.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,T.jsx)(i.Z,{children:S&&S.map((function(e,t){var l=r()(b,"".concat(e),"");return""!==l?(0,T.jsx)(a.s,{scopes:[c.Ft.S3_PUT_BUCKET_TAGGING],resource:n,matchAll:!0,errorProps:{deleteIcon:null,onDelete:null},children:(0,T.jsx)(d.Z,{style:{textTransform:"none",marginRight:"5px"},size:"small",label:"".concat(e," : ").concat(l),color:"primary",deleteIcon:(0,T.jsx)(h.Z,{}),onDelete:function(){!function(e,n){z([e,n]),B(!0)}(e,l)}})},"chip-".concat(t)):null}))}),(0,T.jsx)(a.s,{scopes:[c.Ft.S3_PUT_BUCKET_TAGGING],resource:n,errorProps:{disabled:!0,onClick:null},children:(0,T.jsx)(d.Z,{style:{maxWidth:80,marginTop:"10px"},icon:(0,T.jsx)(f.Z,{}),clickable:!0,size:"small",label:"Add tag",color:"primary",variant:"outlined",onClick:function(){y(!0)}})})]})}),_&&(0,T.jsx)(j,{modalOpen:_,currentTags:b,bucketName:n,onCloseAndUpdate:function(e){y(!1),e&&L()}}),P&&(0,T.jsx)(m,{deleteOpen:P,currentTags:b,bucketName:n,onCloseAndUpdate:function(e){B(!1),e&&L()},selectedTag:N})]})}},42419:function(e,n,t){var l=t(95318);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.32ce00fc.chunk.js.map
|
||||
"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),c=t(56087),a=t(38442),u=t(26181),r=t.n(u),d=t(81918),h=t(29823),f=t(42419),p=t(75578),v=t(72401),x=t(87995),Z=t(25469),T=t(80184),j=(0,p.Z)(s.lazy((function(){return t.e(247).then(t.bind(t,40247))}))),m=(0,p.Z)(s.lazy((function(){return t.e(2408).then(t.bind(t,22763))})));n.default=function(e){var n=e.bucketName,t=(0,Z.TL)(),u=(0,s.useState)(null),p=(0,l.Z)(u,2),b=p[0],k=p[1],g=(0,s.useState)(!1),G=(0,l.Z)(g,2),_=G[0],y=G[1],C=(0,s.useState)([]),A=(0,l.Z)(C,2),S=A[0],U=A[1],E=(0,s.useState)(["",""]),I=(0,l.Z)(E,2),N=I[0],z=I[1],w=(0,s.useState)(!1),F=(0,l.Z)(w,2),P=F[0],B=F[1],K=(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)&&(k(null===e||void 0===e||null===(n=e.details)||void 0===n?void 0:n.tags),U(Object.keys(null===e||void 0===e||null===(t=e.details)||void 0===t?void 0:t.tags)))}),(function(e){t((0,x.Ih)(e))})),O=(0,l.Z)(K,2),D=O[0],H=O[1],L=function(){H("GET","/api/v1/buckets/".concat(n))};return(0,s.useEffect)((function(){L()}),[n]),(0,T.jsxs)(i.Z,{children:[D?(0,T.jsx)(v.Z,{style:{width:16,height:16}}):null,(0,T.jsx)(a.s,{scopes:[c.Ft.S3_GET_BUCKET_TAGGING],resource:n,children:(0,T.jsxs)(i.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,T.jsx)(i.Z,{children:S&&S.map((function(e,t){var l=r()(b,"".concat(e),"");return""!==l?(0,T.jsx)(a.s,{scopes:[c.Ft.S3_PUT_BUCKET_TAGGING],resource:n,matchAll:!0,errorProps:{deleteIcon:null,onDelete:null},children:(0,T.jsx)(d.Z,{style:{textTransform:"none",marginRight:"5px"},size:"small",label:"".concat(e," : ").concat(l),color:"primary",deleteIcon:(0,T.jsx)(h.Z,{}),onDelete:function(){!function(e,n){z([e,n]),B(!0)}(e,l)}})},"chip-".concat(t)):null}))}),(0,T.jsx)(a.s,{scopes:[c.Ft.S3_PUT_BUCKET_TAGGING],resource:n,errorProps:{disabled:!0,onClick:null},children:(0,T.jsx)(d.Z,{style:{maxWidth:80,marginTop:"10px"},icon:(0,T.jsx)(f.Z,{}),clickable:!0,size:"small",label:"Add tag",color:"primary",variant:"outlined",onClick:function(){y(!0)}})})]})}),_&&(0,T.jsx)(j,{modalOpen:_,currentTags:b,bucketName:n,onCloseAndUpdate:function(e){y(!1),e&&L()}}),P&&(0,T.jsx)(m,{deleteOpen:P,currentTags:b,bucketName:n,onCloseAndUpdate:function(e){B(!1),e&&L()},selectedTag:N})]})}},42419:function(e,n,t){var l=t(95318);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.0a3da076.chunk.js.map
|
||||
File diff suppressed because one or more lines are too long
2
portal-ui/build/static/js/1799.dceada24.chunk.js
Normal file
2
portal-ui/build/static/js/1799.dceada24.chunk.js
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1799],{64163:function(e,n,t){var i=t(1413),r=t(72791),s=t(61889),o=t(11135),a=t(25787),c=t(23814),l=t(80184);n.Z=(0,a.Z)((function(e){return(0,o.Z)((0,i.Z)({},c.xx))}))((function(e){var n=e.classes,t=e.label,i=void 0===t?"":t,o=e.content,a=e.multiLine,c=void 0!==a&&a,d=e.actionButton;return(0,l.jsx)(r.Fragment,{children:(0,l.jsxs)(s.ZP,{className:n.prefinedContainer,children:[""!==i&&(0,l.jsx)(s.ZP,{item:!0,xs:12,className:n.predefinedTitle,children:i}),(0,l.jsxs)(s.ZP,{item:!0,xs:12,className:"".concat(n.predefinedList," ").concat(d?n.includesActionButton:""),children:[(0,l.jsx)(s.ZP,{item:!0,xs:12,className:c?n.innerContentMultiline:n.innerContent,children:o}),d&&(0,l.jsx)("div",{className:n.overlayShareOption,children:d})]})]})})}))},61799:function(e,n,t){t.r(n);var i=t(29439),r=t(72791),s=t(51691),o=t(61889),a=t(40986),c=t(81207),l=t(21435),d=t(64163),u=t(37516),f=t(2148),x=t(38734),m=t(87995),h=t(25469),j=t(80184);n.default=function(e){var n=e.closeFormatModalAndRefresh,t=e.deleteOpen,v=e.allDrives,Z=e.drivesToFormat,b=(0,h.TL)(),p=(0,r.useState)(!1),g=(0,i.Z)(p,2),C=g[0],P=g[1],F=(0,r.useState)(""),S=(0,i.Z)(F,2),k=S[0],A=S[1],D=(0,r.useState)(!1),E=(0,i.Z)(D,2),L=E[0],N=E[1];return(0,j.jsx)(f.Z,{title:"Format ".concat(v?"All ":""," Drives"),confirmText:"Format Drive".concat(Z.length>1||v?"s":""),confirmButtonProps:{disabled:"YES, PROCEED"!==k},isOpen:t,isLoading:C,onConfirm:function(){C||(P(!0),c.Z.invoke("POST","/api/v1/directpv/drives/format",{drives:Z,force:L}).then((function(e){P(!1),n(!0,e.formatIssuesList)})).catch((function(e){P(!1),b((0,m.Ih)(e))})))},onClose:function(){n(!1,[])},titleIcon:(0,j.jsx)(x.QaX,{}),confirmationContent:(0,j.jsxs)(r.Fragment,{children:[(0,j.jsxs)(s.Z,{children:[!v&&(0,j.jsxs)(r.Fragment,{children:[(0,j.jsx)(d.Z,{label:"Selected Drive".concat(Z.length>1?"s":""),content:Z.join(", ")}),(0,j.jsx)("br",{})]}),(0,j.jsx)(o.ZP,{item:!0,xs:12,children:(0,j.jsx)(u.Z,{value:"force",id:"force",name:"force",checked:L,onChange:function(e){N(e.target.checked)},label:"Force Format",indicatorLabels:["Yes","No"]})}),"Are you sure you want to format"," ",v?(0,j.jsx)("strong",{children:"All"}):"the selected"," drive",Z.length>1||v?"s":"","?.",(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),(0,j.jsx)("strong",{children:"All information contained will be erased and cannot be recovered"}),(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),"To continue please type ",(0,j.jsx)("b",{children:"YES, PROCEED"})," in the box.",(0,j.jsx)(o.ZP,{item:!0,xs:12,children:(0,j.jsx)(l.Z,{id:"format-confirm",name:"format-confirm",onChange:function(e){A(e.target.value)},label:"",value:k})})]}),C&&(0,j.jsx)(a.Z,{})]})})}}}]);
|
||||
//# sourceMappingURL=1799.dceada24.chunk.js.map
|
||||
1
portal-ui/build/static/js/1799.dceada24.chunk.js.map
Normal file
1
portal-ui/build/static/js/1799.dceada24.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
@@ -1,2 +1,2 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[2112],{32112:function(e,n,t){t.r(n);var a=t(29439),o=t(72791),r=t(51691),i=t(21435),c=t(61889),s=t(9505),l=t(2148),u=t(15900),p=t(87995),f=t(81551),d=t(80184);n.default=function(e){var n=e.deleteOpen,t=e.selectedPVC,m=e.closeDeleteModalAndRefresh,h=(0,f.TL)(),C=(0,o.useState)(""),x=(0,a.Z)(C,2),v=x[0],P=x[1],Z=(0,s.Z)((function(){return m(!0)}),(function(e){return h((0,p.Ih)(e))})),b=(0,a.Z)(Z,2),j=b[0],T=b[1];return(0,d.jsx)(l.Z,{title:"Delete PVC",confirmText:"Delete",isOpen:n,titleIcon:(0,d.jsx)(u.NvT,{}),isLoading:j,onConfirm:function(){v===t.name?T("DELETE","/api/v1/namespaces/".concat(t.namespace,"/tenants/").concat(t.tenant,"/pvc/").concat(t.name)):h((0,p.Ih)({errorMessage:"PVC name is incorrect",detailedError:""}))},onClose:function(){return m(!1)},confirmButtonProps:{disabled:v!==t.name||j},confirmationContent:(0,d.jsxs)(r.Z,{children:["To continue please type ",(0,d.jsx)("b",{children:t.name})," in the box.",(0,d.jsx)(c.ZP,{item:!0,xs:12,children:(0,d.jsx)(i.Z,{id:"retype-PVC",name:"retype-PVC",onChange:function(e){P(e.target.value)},label:"",value:v})})]})})}}}]);
|
||||
//# sourceMappingURL=2112.e0047ff5.chunk.js.map
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[2112],{32112:function(e,n,t){t.r(n);var a=t(29439),o=t(72791),r=t(51691),i=t(21435),c=t(61889),s=t(9505),l=t(2148),u=t(38734),p=t(87995),f=t(25469),d=t(80184);n.default=function(e){var n=e.deleteOpen,t=e.selectedPVC,m=e.closeDeleteModalAndRefresh,h=(0,f.TL)(),C=(0,o.useState)(""),x=(0,a.Z)(C,2),v=x[0],P=x[1],Z=(0,s.Z)((function(){return m(!0)}),(function(e){return h((0,p.Ih)(e))})),b=(0,a.Z)(Z,2),j=b[0],T=b[1];return(0,d.jsx)(l.Z,{title:"Delete PVC",confirmText:"Delete",isOpen:n,titleIcon:(0,d.jsx)(u.NvT,{}),isLoading:j,onConfirm:function(){v===t.name?T("DELETE","/api/v1/namespaces/".concat(t.namespace,"/tenants/").concat(t.tenant,"/pvc/").concat(t.name)):h((0,p.Ih)({errorMessage:"PVC name is incorrect",detailedError:""}))},onClose:function(){return m(!1)},confirmButtonProps:{disabled:v!==t.name||j},confirmationContent:(0,d.jsxs)(r.Z,{children:["To continue please type ",(0,d.jsx)("b",{children:t.name})," in the box.",(0,d.jsx)(c.ZP,{item:!0,xs:12,children:(0,d.jsx)(i.Z,{id:"retype-PVC",name:"retype-PVC",onChange:function(e){P(e.target.value)},label:"",value:v})})]})})}}}]);
|
||||
//# sourceMappingURL=2112.218ae789.chunk.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"static/js/2112.e0047ff5.chunk.js","mappings":"+OAkGA,UA/DkB,SAAC,GAIA,IAHjBA,EAGgB,EAHhBA,WACAC,EAEgB,EAFhBA,YACAC,EACgB,EADhBA,2BAEMC,GAAWC,EAAAA,EAAAA,MACjB,GAAkCC,EAAAA,EAAAA,UAAS,IAA3C,eAAOC,EAAP,KAAkBC,EAAlB,KAOA,GAAyCC,EAAAA,EAAAA,IALpB,kBAAMN,GAA2B,EAAjC,IACF,SAACO,GAAD,OACjBN,GAASO,EAAAA,EAAAA,IAAqBD,GADb,IAInB,eAAOE,EAAP,KAAsBC,EAAtB,KAkBA,OACE,SAAC,IAAD,CACEC,MAAK,aACLC,YAAa,SACbC,OAAQf,EACRgB,WAAW,SAAC,MAAD,IACXC,UAAWN,EACXO,UAvBoB,WAClBZ,IAAcL,EAAYkB,KAS9BP,EACE,SADa,6BAESX,EAAYmB,UAFrB,oBAE0CnB,EAAYoB,OAFtD,gBAEoEpB,EAAYkB,OAV7FhB,GACEO,EAAAA,EAAAA,IAAqB,CACnBY,aAAc,wBACdC,cAAe,KAStB,EAUGC,QA5BY,kBAAMtB,GAA2B,EAAjC,EA6BZuB,mBAAoB,CAClBC,SAAUpB,IAAcL,EAAYkB,MAAQR,GAE9CgB,qBACE,UAAC,IAAD,uCAC0B,uBAAI1B,EAAYkB,OAD1C,gBAEE,SAAC,KAAD,CAAMS,MAAI,EAACC,GAAI,GAAf,UACE,SAAC,IAAD,CACEC,GAAG,aACHX,KAAK,aACLY,SAAU,SAACC,GACTzB,EAAayB,EAAMC,OAAOC,MAC3B,EACDC,MAAM,GACND,MAAO5B,UAOpB,C","sources":["screens/Console/Tenants/TenantDetails/DeletePVC.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, { useState } from \"react\";\nimport { DialogContentText } from \"@mui/material\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport Grid from \"@mui/material/Grid\";\n\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport useApi from \"../../Common/Hooks/useApi\";\nimport ConfirmDialog from \"../../Common/ModalWrapper/ConfirmDialog\";\nimport { ConfirmDeleteIcon } from \"../../../../icons\";\nimport { IStoragePVCs } from \"../../Storage/types\";\nimport { setErrorSnackMessage } from \"../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../store\";\n\ninterface IDeletePVC {\n deleteOpen: boolean;\n selectedPVC: IStoragePVCs;\n closeDeleteModalAndRefresh: (refreshList: boolean) => any;\n}\n\nconst DeletePVC = ({\n deleteOpen,\n selectedPVC,\n closeDeleteModalAndRefresh,\n}: IDeletePVC) => {\n const dispatch = useAppDispatch();\n const [retypePVC, setRetypePVC] = useState(\"\");\n\n const onDelSuccess = () => closeDeleteModalAndRefresh(true);\n const onDelError = (err: ErrorResponseHandler) =>\n dispatch(setErrorSnackMessage(err));\n const onClose = () => closeDeleteModalAndRefresh(false);\n\n const [deleteLoading, invokeDeleteApi] = useApi(onDelSuccess, onDelError);\n\n const onConfirmDelete = () => {\n if (retypePVC !== selectedPVC.name) {\n dispatch(\n setErrorSnackMessage({\n errorMessage: \"PVC name is incorrect\",\n detailedError: \"\",\n })\n );\n return;\n }\n invokeDeleteApi(\n \"DELETE\",\n `/api/v1/namespaces/${selectedPVC.namespace}/tenants/${selectedPVC.tenant}/pvc/${selectedPVC.name}`\n );\n };\n\n return (\n <ConfirmDialog\n title={`Delete PVC`}\n confirmText={\"Delete\"}\n isOpen={deleteOpen}\n titleIcon={<ConfirmDeleteIcon />}\n isLoading={deleteLoading}\n onConfirm={onConfirmDelete}\n onClose={onClose}\n confirmButtonProps={{\n disabled: retypePVC !== selectedPVC.name || deleteLoading,\n }}\n confirmationContent={\n <DialogContentText>\n To continue please type <b>{selectedPVC.name}</b> in the box.\n <Grid item xs={12}>\n <InputBoxWrapper\n id=\"retype-PVC\"\n name=\"retype-PVC\"\n onChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n setRetypePVC(event.target.value);\n }}\n label=\"\"\n value={retypePVC}\n />\n </Grid>\n </DialogContentText>\n }\n />\n );\n};\n\nexport default DeletePVC;\n"],"names":["deleteOpen","selectedPVC","closeDeleteModalAndRefresh","dispatch","useAppDispatch","useState","retypePVC","setRetypePVC","useApi","err","setErrorSnackMessage","deleteLoading","invokeDeleteApi","title","confirmText","isOpen","titleIcon","isLoading","onConfirm","name","namespace","tenant","errorMessage","detailedError","onClose","confirmButtonProps","disabled","confirmationContent","item","xs","id","onChange","event","target","value","label"],"sourceRoot":""}
|
||||
{"version":3,"file":"static/js/2112.218ae789.chunk.js","mappings":"+OAkGA,UA/DkB,SAAC,GAIA,IAHjBA,EAGgB,EAHhBA,WACAC,EAEgB,EAFhBA,YACAC,EACgB,EADhBA,2BAEMC,GAAWC,EAAAA,EAAAA,MACjB,GAAkCC,EAAAA,EAAAA,UAAS,IAA3C,eAAOC,EAAP,KAAkBC,EAAlB,KAOA,GAAyCC,EAAAA,EAAAA,IALpB,kBAAMN,GAA2B,EAAjC,IACF,SAACO,GAAD,OACjBN,GAASO,EAAAA,EAAAA,IAAqBD,GADb,IAInB,eAAOE,EAAP,KAAsBC,EAAtB,KAkBA,OACE,SAAC,IAAD,CACEC,MAAK,aACLC,YAAa,SACbC,OAAQf,EACRgB,WAAW,SAAC,MAAD,IACXC,UAAWN,EACXO,UAvBoB,WAClBZ,IAAcL,EAAYkB,KAS9BP,EACE,SADa,6BAESX,EAAYmB,UAFrB,oBAE0CnB,EAAYoB,OAFtD,gBAEoEpB,EAAYkB,OAV7FhB,GACEO,EAAAA,EAAAA,IAAqB,CACnBY,aAAc,wBACdC,cAAe,KAStB,EAUGC,QA5BY,kBAAMtB,GAA2B,EAAjC,EA6BZuB,mBAAoB,CAClBC,SAAUpB,IAAcL,EAAYkB,MAAQR,GAE9CgB,qBACE,UAAC,IAAD,uCAC0B,uBAAI1B,EAAYkB,OAD1C,gBAEE,SAAC,KAAD,CAAMS,MAAI,EAACC,GAAI,GAAf,UACE,SAAC,IAAD,CACEC,GAAG,aACHX,KAAK,aACLY,SAAU,SAACC,GACTzB,EAAayB,EAAMC,OAAOC,MAC3B,EACDC,MAAM,GACND,MAAO5B,UAOpB,C","sources":["screens/Console/Tenants/TenantDetails/DeletePVC.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, { useState } from \"react\";\nimport { DialogContentText } from \"@mui/material\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport Grid from \"@mui/material/Grid\";\n\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport useApi from \"../../Common/Hooks/useApi\";\nimport ConfirmDialog from \"../../Common/ModalWrapper/ConfirmDialog\";\nimport { ConfirmDeleteIcon } from \"../../../../icons\";\nimport { IStoragePVCs } from \"../../Storage/types\";\nimport { setErrorSnackMessage } from \"../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../store\";\n\ninterface IDeletePVC {\n deleteOpen: boolean;\n selectedPVC: IStoragePVCs;\n closeDeleteModalAndRefresh: (refreshList: boolean) => any;\n}\n\nconst DeletePVC = ({\n deleteOpen,\n selectedPVC,\n closeDeleteModalAndRefresh,\n}: IDeletePVC) => {\n const dispatch = useAppDispatch();\n const [retypePVC, setRetypePVC] = useState(\"\");\n\n const onDelSuccess = () => closeDeleteModalAndRefresh(true);\n const onDelError = (err: ErrorResponseHandler) =>\n dispatch(setErrorSnackMessage(err));\n const onClose = () => closeDeleteModalAndRefresh(false);\n\n const [deleteLoading, invokeDeleteApi] = useApi(onDelSuccess, onDelError);\n\n const onConfirmDelete = () => {\n if (retypePVC !== selectedPVC.name) {\n dispatch(\n setErrorSnackMessage({\n errorMessage: \"PVC name is incorrect\",\n detailedError: \"\",\n })\n );\n return;\n }\n invokeDeleteApi(\n \"DELETE\",\n `/api/v1/namespaces/${selectedPVC.namespace}/tenants/${selectedPVC.tenant}/pvc/${selectedPVC.name}`\n );\n };\n\n return (\n <ConfirmDialog\n title={`Delete PVC`}\n confirmText={\"Delete\"}\n isOpen={deleteOpen}\n titleIcon={<ConfirmDeleteIcon />}\n isLoading={deleteLoading}\n onConfirm={onConfirmDelete}\n onClose={onClose}\n confirmButtonProps={{\n disabled: retypePVC !== selectedPVC.name || deleteLoading,\n }}\n confirmationContent={\n <DialogContentText>\n To continue please type <b>{selectedPVC.name}</b> in the box.\n <Grid item xs={12}>\n <InputBoxWrapper\n id=\"retype-PVC\"\n name=\"retype-PVC\"\n onChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n setRetypePVC(event.target.value);\n }}\n label=\"\"\n value={retypePVC}\n />\n </Grid>\n </DialogContentText>\n }\n />\n );\n};\n\nexport default DeletePVC;\n"],"names":["deleteOpen","selectedPVC","closeDeleteModalAndRefresh","dispatch","useAppDispatch","useState","retypePVC","setRetypePVC","useApi","err","setErrorSnackMessage","deleteLoading","invokeDeleteApi","title","confirmText","isOpen","titleIcon","isLoading","onConfirm","name","namespace","tenant","errorMessage","detailedError","onClose","confirmButtonProps","disabled","confirmationContent","item","xs","id","onChange","event","target","value","label"],"sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[2185],{62185:function(e,t,n){n.r(t);var r=n(29439),a=n(1413),i=n(72791),o=n(16871),s=n(56028),l=n(61889),c=n(36151),d=n(21435),u=n(11135),h=n(25787),f=n(23814),m=n(60364),x=n(45248),p=n(15900),j=n(81551),Z=n(87995),v=n(80184),w=(0,m.$j)((function(e){return{simplePath:e.objectBrowser.simplePath}}));t.default=w((0,h.Z)((function(e){return(0,u.Z)((0,a.Z)((0,a.Z)({},f.ID),f.DF))}))((function(e){var t=e.modalOpen,n=(e.folderName,e.bucketName),a=e.onClose,u=e.classes,h=e.existingFiles,f=e.simplePath,m=(0,j.TL)(),w=(0,o.s0)(),P=(0,i.useState)(""),b=(0,r.Z)(P,2),C=b[0],g=b[1],k=(0,i.useState)(!1),F=(0,r.Z)(k,2),y=F[0],N=F[1],E=(0,i.useState)(n),S=(0,r.Z)(E,2),B=S[0],I=S[1];(0,i.useEffect)((function(){if(f){var e="".concat(n).concat(n.endsWith("/")||f.startsWith("/")?"":"/").concat(f);I(e)}}),[f,n]);var L=function(){var e="/";f&&(e=f.endsWith("/")?f:"".concat(f,"/"));if(-1===h.findIndex((function(t){return t.name===e+C}))){var t=C.split("/").filter((function(e){return""!==e.trim()})).join("/"),r="/buckets/".concat(n,"/browse/").concat((0,x.LL)("".concat(e).concat(t,"/")));w(r),a()}else m((0,Z.zb)({errorMessage:"Folder cannot have the same name as an existing file",detailedError:""}))};(0,i.useEffect)((function(){var e=!0;0===C.trim().length&&(e=!1),N(e)}),[C]);return(0,v.jsx)(i.Fragment,{children:(0,v.jsx)(s.Z,{modalOpen:t,title:"Choose or create a new path",onClose:a,titleIcon:(0,v.jsx)(p.Z9m,{}),children:(0,v.jsxs)(l.ZP,{container:!0,children:[(0,v.jsxs)(l.ZP,{item:!0,xs:12,className:u.formFieldRow,children:[(0,v.jsx)("strong",{children:"Current Path:"})," ",(0,v.jsx)("br",{}),(0,v.jsx)("div",{style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",fontSize:14,textAlign:"left"},dir:"rtl",children:B})]}),(0,v.jsx)(l.ZP,{item:!0,xs:12,className:u.formFieldRow,children:(0,v.jsx)(d.Z,{value:C,label:"New Folder Path",id:"folderPath",name:"folderPath",placeholder:"Enter the new Folder Path",onChange:function(e){g(e.target.value)},onKeyPress:function(e){"Enter"===e.code&&""!==C&&L()},required:!0})}),(0,v.jsxs)(l.ZP,{item:!0,xs:12,className:u.modalButtonBar,children:[(0,v.jsx)(c.Z,{type:"button",color:"primary",variant:"outlined",onClick:function(){g("")},children:"Clear"}),(0,v.jsx)(c.Z,{type:"submit",variant:"contained",color:"primary",disabled:!y,onClick:L,children:"Create"})]})]})})})})))}}]);
|
||||
//# sourceMappingURL=2185.12707550.chunk.js.map
|
||||
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[2185],{62185:function(e,t,n){n.r(t);var r=n(29439),a=n(1413),i=n(72791),o=n(16871),s=n(56028),l=n(61889),c=n(36151),d=n(21435),u=n(11135),h=n(25787),f=n(23814),m=n(60364),x=n(45248),p=n(38734),j=n(25469),Z=n(87995),v=n(80184),w=(0,m.$j)((function(e){return{simplePath:e.objectBrowser.simplePath}}));t.default=w((0,h.Z)((function(e){return(0,u.Z)((0,a.Z)((0,a.Z)({},f.ID),f.DF))}))((function(e){var t=e.modalOpen,n=(e.folderName,e.bucketName),a=e.onClose,u=e.classes,h=e.existingFiles,f=e.simplePath,m=(0,j.TL)(),w=(0,o.s0)(),P=(0,i.useState)(""),b=(0,r.Z)(P,2),C=b[0],g=b[1],k=(0,i.useState)(!1),F=(0,r.Z)(k,2),y=F[0],N=F[1],E=(0,i.useState)(n),S=(0,r.Z)(E,2),B=S[0],I=S[1];(0,i.useEffect)((function(){if(f){var e="".concat(n).concat(n.endsWith("/")||f.startsWith("/")?"":"/").concat(f);I(e)}}),[f,n]);var L=function(){var e="/";f&&(e=f.endsWith("/")?f:"".concat(f,"/"));if(-1===h.findIndex((function(t){return t.name===e+C}))){var t=C.split("/").filter((function(e){return""!==e.trim()})).join("/"),r="/buckets/".concat(n,"/browse/").concat((0,x.LL)("".concat(e).concat(t,"/")));w(r),a()}else m((0,Z.zb)({errorMessage:"Folder cannot have the same name as an existing file",detailedError:""}))};(0,i.useEffect)((function(){var e=!0;0===C.trim().length&&(e=!1),N(e)}),[C]);return(0,v.jsx)(i.Fragment,{children:(0,v.jsx)(s.Z,{modalOpen:t,title:"Choose or create a new path",onClose:a,titleIcon:(0,v.jsx)(p.Z9m,{}),children:(0,v.jsxs)(l.ZP,{container:!0,children:[(0,v.jsxs)(l.ZP,{item:!0,xs:12,className:u.formFieldRow,children:[(0,v.jsx)("strong",{children:"Current Path:"})," ",(0,v.jsx)("br",{}),(0,v.jsx)("div",{style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",fontSize:14,textAlign:"left"},dir:"rtl",children:B})]}),(0,v.jsx)(l.ZP,{item:!0,xs:12,className:u.formFieldRow,children:(0,v.jsx)(d.Z,{value:C,label:"New Folder Path",id:"folderPath",name:"folderPath",placeholder:"Enter the new Folder Path",onChange:function(e){g(e.target.value)},onKeyPress:function(e){"Enter"===e.code&&""!==C&&L()},required:!0})}),(0,v.jsxs)(l.ZP,{item:!0,xs:12,className:u.modalButtonBar,children:[(0,v.jsx)(c.Z,{type:"button",color:"primary",variant:"outlined",onClick:function(){g("")},children:"Clear"}),(0,v.jsx)(c.Z,{type:"submit",variant:"contained",color:"primary",disabled:!y,onClick:L,children:"Create"})]})]})})})})))}}]);
|
||||
//# sourceMappingURL=2185.c6714d7f.chunk.js.map
|
||||
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