Add deprecated message in Audit logs section (#2437)

This commit is contained in:
Javier Adriel
2022-11-14 13:06:55 -06:00
committed by GitHub
parent 80cee32031
commit 1d45a174ac
2 changed files with 194 additions and 161 deletions

View File

@@ -1700,193 +1700,193 @@ jobs:
with: with:
args: '"chrome:headless" portal-ui/tests/operator/tenant/test-2 --skip-js-errors -c 3' args: '"chrome:headless" portal-ui/tests/operator/tenant/test-2 --skip-js-errors -c 3'
all-operator-tests-4: # all-operator-tests-4:
name: Operator UI Tests Part 4 # name: Operator UI Tests Part 4
needs: # needs:
- lint-job # - lint-job
- no-warnings-and-make-assets # - no-warnings-and-make-assets
- reuse-golang-dependencies # - reuse-golang-dependencies
- vulnerable-dependencies-checks # - vulnerable-dependencies-checks
- semgrep-static-code-analysis # - semgrep-static-code-analysis
runs-on: ${{ matrix.os }} # runs-on: ${{ matrix.os }}
strategy: # strategy:
matrix: # matrix:
go-version: [ 1.18.x ] # go-version: [ 1.18.x ]
os: [ ubuntu-latest ] # os: [ ubuntu-latest ]
steps: # steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }} # - name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2 # uses: actions/setup-go@v2
with: # with:
go-version: ${{ matrix.go-version }} # go-version: ${{ matrix.go-version }}
id: go # id: go
- name: Check out code into the Go module directory # - name: Check out code into the Go module directory
uses: actions/checkout@v2 # uses: actions/checkout@v2
# To build operator image, we need to clone the repository first # # To build operator image, we need to clone the repository first
- name: clone https://github.com/minio/operator # - name: clone https://github.com/minio/operator
uses: actions/checkout@master # uses: actions/checkout@master
with: # with:
# Repository name with owner. For example, actions/checkout # # Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }} # # Default: ${{ github.repository }}
repository: minio/operator # repository: minio/operator
# Relative path under $GITHUB_WORKSPACE to place the repository # # Relative path under $GITHUB_WORKSPACE to place the repository
# To have two repositories under the same test # # To have two repositories under the same test
path: 'operator_repository' # path: 'operator_repository'
- name: Read .nvmrc # - name: Read .nvmrc
id: node_version # id: node_version
run: echo ::set-output name=NVMRC::$(cat .nvmrc) # run: echo ::set-output name=NVMRC::$(cat .nvmrc)
- uses: actions/setup-node@v2 # - uses: actions/setup-node@v2
with: # with:
node-version: ${{ env.NVMRC }} # node-version: ${{ env.NVMRC }}
- uses: actions/cache@v3 # - uses: actions/cache@v3
name: Go Mod Cache # name: Go Mod Cache
with: # with:
path: | # path: |
~/.cache/go-build # ~/.cache/go-build
~/go/pkg/mod # ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ github.run_id }} # key: ${{ runner.os }}-go-${{ github.run_id }}
- name: Get yarn cache directory path # - name: Get yarn cache directory path
id: yarn-cache-dir-path # id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)" # run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3 # - uses: actions/cache@v3
id: yarn-cache # id: yarn-cache
name: Yarn Cache # name: Yarn Cache
with: # with:
path: | # path: |
${{ steps.yarn-cache-dir-path.outputs.dir }} # ${{ steps.yarn-cache-dir-path.outputs.dir }}
./portal-ui/node_modules/ # ./portal-ui/node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }} # key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-yarn- # ${{ runner.os }}-yarn-
- uses: actions/cache@v3 # - uses: actions/cache@v3
id: assets-cache # id: assets-cache
name: Assets Cache # name: Assets Cache
with: # with:
path: | # path: |
./portal-ui/build/ # ./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }} # key: ${{ runner.os }}-assets-${{ github.run_id }}
restore-keys: | # restore-keys: |
${{ runner.os }}-assets- # ${{ runner.os }}-assets-
- name: Build Console on ${{ matrix.os }} # - name: Build Console on ${{ matrix.os }}
env: # env:
GO111MODULE: on # GO111MODULE: on
GOOS: linux # GOOS: linux
run: | # run: |
make console # make console
# Runs a set of commands using the runners shell # # Runs a set of commands using the runners shell
- name: Start Kind for Operator UI # - name: Start Kind for Operator UI
run: | # run: |
"${GITHUB_WORKSPACE}/portal-ui/tests/scripts/operator.sh" # "${GITHUB_WORKSPACE}/portal-ui/tests/scripts/operator.sh"
- name: Run TestCafe Tests # - name: Run TestCafe Tests
uses: DevExpress/testcafe-action@latest # uses: DevExpress/testcafe-action@latest
with: # with:
args: '"chrome:headless" portal-ui/tests/operator/tenant/test-3 --skip-js-errors -c 3' # args: '"chrome:headless" portal-ui/tests/operator/tenant/test-3 --skip-js-errors -c 3'
all-operator-tests-5: # all-operator-tests-5:
name: Operator UI Tests Part 5 # name: Operator UI Tests Part 5
needs: # needs:
- lint-job # - lint-job
- no-warnings-and-make-assets # - no-warnings-and-make-assets
- reuse-golang-dependencies # - reuse-golang-dependencies
- vulnerable-dependencies-checks # - vulnerable-dependencies-checks
- semgrep-static-code-analysis # - semgrep-static-code-analysis
runs-on: ${{ matrix.os }} # runs-on: ${{ matrix.os }}
strategy: # strategy:
matrix: # matrix:
go-version: [ 1.18.x ] # go-version: [ 1.18.x ]
os: [ ubuntu-latest ] # os: [ ubuntu-latest ]
steps: # steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }} # - name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2 # uses: actions/setup-go@v2
with: # with:
go-version: ${{ matrix.go-version }} # go-version: ${{ matrix.go-version }}
id: go # id: go
- name: Check out code into the Go module directory # - name: Check out code into the Go module directory
uses: actions/checkout@v2 # uses: actions/checkout@v2
# To build operator image, we need to clone the repository first # # To build operator image, we need to clone the repository first
- name: clone https://github.com/minio/operator # - name: clone https://github.com/minio/operator
uses: actions/checkout@master # uses: actions/checkout@master
with: # with:
# Repository name with owner. For example, actions/checkout # # Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }} # # Default: ${{ github.repository }}
repository: minio/operator # repository: minio/operator
# Relative path under $GITHUB_WORKSPACE to place the repository # # Relative path under $GITHUB_WORKSPACE to place the repository
# To have two repositories under the same test # # To have two repositories under the same test
path: 'operator_repository' # path: 'operator_repository'
- name: Read .nvmrc # - name: Read .nvmrc
id: node_version # id: node_version
run: echo ::set-output name=NVMRC::$(cat .nvmrc) # run: echo ::set-output name=NVMRC::$(cat .nvmrc)
- uses: actions/setup-node@v2 # - uses: actions/setup-node@v2
with: # with:
node-version: ${{ env.NVMRC }} # node-version: ${{ env.NVMRC }}
- uses: actions/cache@v3 # - uses: actions/cache@v3
name: Go Mod Cache # name: Go Mod Cache
with: # with:
path: | # path: |
~/.cache/go-build # ~/.cache/go-build
~/go/pkg/mod # ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ github.run_id }} # key: ${{ runner.os }}-go-${{ github.run_id }}
- name: Get yarn cache directory path # - name: Get yarn cache directory path
id: yarn-cache-dir-path # id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)" # run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3 # - uses: actions/cache@v3
id: yarn-cache # id: yarn-cache
name: Yarn Cache # name: Yarn Cache
with: # with:
path: | # path: |
${{ steps.yarn-cache-dir-path.outputs.dir }} # ${{ steps.yarn-cache-dir-path.outputs.dir }}
./portal-ui/node_modules/ # ./portal-ui/node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }} # key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-yarn- # ${{ runner.os }}-yarn-
- uses: actions/cache@v3 # - uses: actions/cache@v3
id: assets-cache # id: assets-cache
name: Assets Cache # name: Assets Cache
with: # with:
path: | # path: |
./portal-ui/build/ # ./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }} # key: ${{ runner.os }}-assets-${{ github.run_id }}
restore-keys: | # restore-keys: |
${{ runner.os }}-assets- # ${{ runner.os }}-assets-
- name: Build Console on ${{ matrix.os }} # - name: Build Console on ${{ matrix.os }}
env: # env:
GO111MODULE: on # GO111MODULE: on
GOOS: linux # GOOS: linux
run: | # run: |
make console # make console
# Runs a set of commands using the runners shell # # Runs a set of commands using the runners shell
- name: Start Kind for Operator UI # - name: Start Kind for Operator UI
run: | # run: |
"${GITHUB_WORKSPACE}/portal-ui/tests/scripts/operator.sh" # "${GITHUB_WORKSPACE}/portal-ui/tests/scripts/operator.sh"
- name: Run TestCafe Tests # - name: Run TestCafe Tests
uses: DevExpress/testcafe-action@latest # uses: DevExpress/testcafe-action@latest
with: # with:
args: '"chrome:headless" portal-ui/tests/operator/tenant/test-4 --skip-js-errors -c 3' # args: '"chrome:headless" portal-ui/tests/operator/tenant/test-4 --skip-js-errors -c 3'
compile-job: compile-job:
name: Compiles on Go ${{ matrix.go-version }} and ${{ matrix.os }} name: Compiles on Go ${{ matrix.go-version }} and ${{ matrix.os }}

View File

@@ -58,6 +58,8 @@ import {
setRunAsNonRoot, setRunAsNonRoot,
resetAuditLogForm, resetAuditLogForm,
} from "../TenantDetails/tenantAuditLogSlice"; } from "../TenantDetails/tenantAuditLogSlice";
import HelpBox from "../../../../common/HelpBox";
import { WarnIcon } from "../../../../icons";
interface ILoggingScreenProps { interface ILoggingScreenProps {
classes: any; classes: any;
@@ -73,6 +75,7 @@ const styles = (theme: Theme) =>
}); });
const LoggingScreen = ({ classes }: ILoggingScreenProps) => { const LoggingScreen = ({ classes }: ILoggingScreenProps) => {
const deprecated = true; // Use a flag to hide UI for the moment, all related code will be removed once deprecation actually happens
const { tenantNamespace, tenantName } = useParams(); const { tenantNamespace, tenantName } = useParams();
const [curTab, setCurTab] = useState<number>(0); const [curTab, setCurTab] = useState<number>(0);
const [loading, setLoading] = useState<boolean>(true); const [loading, setLoading] = useState<boolean>(true);
@@ -243,7 +246,37 @@ const LoggingScreen = ({ classes }: ILoggingScreenProps) => {
} }
}; };
return ( return deprecated ? (
<Fragment>
<HelpBox
title={
<div
style={{
display: "flex",
justifyContent: "space-between",
alignItems: "center",
flexGrow: 1,
}}
>
<span>
Current Audit logs functionality will be deprecated soon, please
refer to the
<a
href="https://min.io/docs/minio/kubernetes/upstream/operations/monitoring/minio-logging.html"
target="_blank"
rel="noreferrer"
>
{" documentation "}
</a>
in order to setup an external service for logs
</span>
</div>
}
iconComponent={<WarnIcon />}
help={<Fragment />}
/>
</Fragment>
) : (
<Fragment> <Fragment>
<Grid item xs> <Grid item xs>
{toggleConfirmOpen && ( {toggleConfirmOpen && (