Skip to content

Commit be069ed

Browse files
dvaldiviaBenjamin Perez
andauthored
Small Tweaks (#186)
* Support for MinDNS * mindns option * Added minDNS to summary table * Validations of configure page * Added create label & removed console logs * Adding login workaround * Added min limits to inputs * Fixed issue with sizes * Removed empty values from review page * Added zone names * Added validation to zones selector * Fixed issue with back button in zones page * Changed validation for zones filter & simplified clean zones * Changed CredentialsPrompt to be a global component. * Added assets * Added hover to table & removed view button * Added view links & actions to tables * Added links for cloud & console in table * Fixed position of progress bar * Added advanced mode to wizard * Added "zebra-style" tables * Added servers field to simple form * Fixes for demo * Tweaks * updated assets * remove hardcoded bypass * Address Comments Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
1 parent 59a5c9d commit be069ed

File tree

25 files changed

+855
-343
lines changed

25 files changed

+855
-343
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM golang:1.13
22

3+
RUN apt-get update -y && apt-get install -y ca-certificates
4+
35
ADD go.mod /go/src/github.com/minio/mcs/go.mod
46
ADD go.sum /go/src/github.com/minio/mcs/go.sum
57
WORKDIR /go/src/github.com/minio/mcs/
@@ -12,7 +14,6 @@ WORKDIR /go/src/github.com/minio/mcs/
1214

1315
ENV CGO_ENABLED=0
1416

15-
RUN apt-get update -y && apt-get install -y ca-certificates
1617
RUN go build -ldflags "-w -s" -a -o mcs ./cmd/mcs
1718

1819
FROM scratch

portal-ui/bindata_assetfs.go

Lines changed: 139 additions & 116 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

portal-ui/src/index.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,34 +33,35 @@ const GlobalCss = withStyles({
3333
fontSize: "14px",
3434
textTransform: "capitalize",
3535
padding: "16px 25px 16px 25px",
36-
borderRadius: "3px"
36+
borderRadius: 3,
3737
},
3838
".MuiButton-sizeSmall": {
3939
padding: "4px 10px",
40-
fontSize: "0.8125rem"
40+
fontSize: "0.8125rem",
4141
},
4242
".MuiTableCell-head": {
4343
borderRadius: "3px 3px 0px 0px",
44-
fontSize: "13px"
44+
fontSize: 13,
4545
},
4646
".MuiPaper-root": {
47-
borderRadius: "3px"
47+
borderRadius: 3,
4848
},
4949
".MuiDrawer-paperAnchorDockedLeft": {
50-
borderRight: "0px"
50+
borderRight: 0,
5151
},
5252
".MuiDrawer-root": {
5353
"& .MuiPaper-root": {
54-
borderRadius: "0px"
55-
}
56-
}
57-
}
54+
borderRadius: 0,
55+
},
56+
},
57+
},
5858
})(() => null);
5959

6060
ReactDOM.render(
6161
<Provider store={configureStore()}>
6262
<GlobalCss />
6363
<ThemeProvider theme={theme}>
64+
{/*<ThemeProvider theme={newTheme}>*/}
6465
<Routes />
6566
</ThemeProvider>
6667
</Provider>,

portal-ui/src/screens/Console/ServiceAccounts/CredentialsPrompt.tsx renamed to portal-ui/src/screens/Console/Common/CredentialsPrompt/CredentialsPrompt.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
1919
import { NewServiceAccount } from "./types";
2020
import { Button } from "@material-ui/core";
2121
import Typography from "@material-ui/core/Typography";
22-
import ModalWrapper from "../Common/ModalWrapper/ModalWrapper";
22+
import ModalWrapper from "../ModalWrapper/ModalWrapper";
2323
import Grid from "@material-ui/core/Grid";
2424

2525
const styles = (theme: Theme) =>
@@ -36,6 +36,7 @@ interface ICredentialsPromptProps {
3636
classes: any;
3737
newServiceAccount: NewServiceAccount | null;
3838
open: boolean;
39+
entity: string;
3940
closeModal: () => void;
4041
}
4142

@@ -60,6 +61,7 @@ const CredentialsPrompt = ({
6061
newServiceAccount,
6162
open,
6263
closeModal,
64+
entity,
6365
}: ICredentialsPromptProps) => {
6466
if (!newServiceAccount) {
6567
return null;
@@ -71,12 +73,12 @@ const CredentialsPrompt = ({
7173
onClose={() => {
7274
closeModal();
7375
}}
74-
title="New Service Account Created"
76+
title={`New ${entity} Created`}
7577
>
7678
<React.Fragment>
7779
<Grid container>
7880
<Grid item xs={12} className={classes.formScrollable}>
79-
A new service account has been created with the following details:
81+
A new {entity} has been created with the following details:
8082
<ul>
8183
<li>
8284
<b>Access Key:</b> {newServiceAccount.accessKey}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// This file is part of MinIO Console Server
2+
// Copyright (c) 2020 MinIO, Inc.
3+
//
4+
// This program is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU Affero General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU Affero General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU Affero General Public License
15+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
export interface NewServiceAccount {
18+
accessKey: string;
19+
secretKey: string;
20+
}

portal-ui/src/screens/Console/Common/FormComponents/InputBoxWrapper/InputBoxWrapper.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ interface InputBoxProps {
4747
error?: string;
4848
required?: boolean;
4949
placeholder?: string;
50+
min?: string;
51+
max?: string;
5052
}
5153

5254
const styles = (theme: Theme) =>
@@ -110,8 +112,20 @@ const InputBoxWrapper = ({
110112
error = "",
111113
required = false,
112114
placeholder = "",
115+
min,
116+
max,
113117
classes,
114118
}: InputBoxProps) => {
119+
let inputProps: any = { "data-index": index };
120+
121+
if (type === "number" && min) {
122+
inputProps["min"] = min;
123+
}
124+
125+
if (type === "number" && max) {
126+
inputProps["max"] = max;
127+
}
128+
115129
return (
116130
<React.Fragment>
117131
<Grid
@@ -154,7 +168,7 @@ const InputBoxWrapper = ({
154168
type={type}
155169
multiline={multiline}
156170
autoComplete={autoComplete}
157-
inputProps={{ "data-index": index }}
171+
inputProps={inputProps}
158172
error={error !== ""}
159173
helperText={error}
160174
placeholder={placeholder}

portal-ui/src/screens/Console/Common/FormComponents/common/styleLibrary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const fieldBasic = {
2020
inputLabel: {
2121
fontWeight: 500,
2222
marginRight: 10,
23-
width: 100,
23+
width: 160,
2424
fontSize: 14,
2525
color: "#393939",
2626
textAlign: "right" as const,

portal-ui/src/screens/Console/Common/GenericWizard/GenericWizard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const styles = (theme: Theme) =>
2727
flexGrow: 1,
2828
},
2929
wizardSteps: {
30+
minWidth: 180,
3031
marginRight: 10,
3132
"& ul": {
3233
padding: 15,

portal-ui/src/screens/Console/Common/GenericWizard/WizardPage.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ const WizardPage = ({ classes, page, pageChange }: IWizardPage) => {
5959
}
6060
};
6161

62-
console.log("buttons", page);
63-
6462
return (
6563
<div className={classes.wizardStepContainer}>
6664
<div className={classes.wizardComponent}>{page.componentRender}</div>

portal-ui/src/screens/Console/Common/GenericWizard/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export interface IWizardElement {
2626
label: string;
2727
componentRender: any;
2828
buttons: IWizardButton[];
29+
advancedOnly?: boolean;
2930
}
3031

3132
export interface IWizardMain {

0 commit comments

Comments
 (0)