Skip to content

Commit

Permalink
Merge branch 'master' into add-service-accounts-api
Browse files Browse the repository at this point in the history
  • Loading branch information
dvaldivia committed Apr 21, 2020
2 parents 677ca3b + 068ac28 commit 9857f90
Show file tree
Hide file tree
Showing 25 changed files with 2,183 additions and 143 deletions.
434 changes: 309 additions & 125 deletions portal-ui/bindata_assetfs.go

Large diffs are not rendered by default.

Binary file added portal-ui/public/amqp.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added portal-ui/public/elasticsearch.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added portal-ui/public/kafka.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added portal-ui/public/mqtt.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added portal-ui/public/mysql.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added portal-ui/public/nats.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added portal-ui/public/postgres.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added portal-ui/public/redis.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 20 additions & 1 deletion portal-ui/src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
// 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/>.

import { MENU_OPEN, USER_LOGGED } from "./types";
import {
MENU_OPEN,
SERVER_IS_LOADING,
SERVER_NEEDS_RESTART,
USER_LOGGED
} from "./types";

export function userLoggedIn(loggedIn: boolean) {
return {
Expand All @@ -29,3 +34,17 @@ export function setMenuOpen(open: boolean) {
open: open
};
}

export function serverNeedsRestart(needsRestart: boolean) {
return {
type: SERVER_NEEDS_RESTART,
needsRestart: needsRestart
};
}

export function serverIsLoading(isLoading: boolean) {
return {
type: SERVER_IS_LOADING,
isLoading: isLoading
};
}
Binary file added portal-ui/src/icons/postgres.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 22 additions & 2 deletions portal-ui/src/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,22 @@
// 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/>.

import {MENU_OPEN, SystemActionTypes, SystemState, USER_LOGGED} from "./types";
import {
MENU_OPEN,
SERVER_IS_LOADING,
SERVER_NEEDS_RESTART,
SystemActionTypes,
SystemState,
USER_LOGGED
} from "./types";

const initialState: SystemState = {
loggedIn: false,
session: "",
userName: "",
sidebarOpen:true,
sidebarOpen: true,
serverNeedsRestart: false,
serverIsLoading: false
};

export function systemReducer(
Expand All @@ -38,6 +47,17 @@ export function systemReducer(
...state,
sidebarOpen: action.open
};
case SERVER_NEEDS_RESTART:
return {
...state,
serverNeedsRestart: action.needsRestart
};

case SERVER_IS_LOADING:
return {
...state,
serverIsLoading: action.isLoading
};
default:
return state;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
// 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/>.
import React from "react";
import { TextField, Grid, InputLabel, TextFieldProps } from "@material-ui/core";
import {
Grid,
InputLabel,
TextField,
TextFieldProps,
Tooltip
} from "@material-ui/core";
import { OutlinedInputProps } from "@material-ui/core/OutlinedInput";
import {
createStyles,
Expand All @@ -23,16 +29,19 @@ import {
withStyles
} from "@material-ui/core/styles";
import { fieldBasic } from "../common/styleLibrary";
import HelpIcon from "@material-ui/icons/Help";

interface InputBoxProps {
label: string;
classes: any;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
value: string;
value: string | boolean;
id: string;
name: string;
disabled?: boolean;
multiline?: boolean;
type?: string;
tooltip?: string;
autoComplete?: string;
}

Expand Down Expand Up @@ -78,6 +87,8 @@ const InputBoxWrapper = ({
type = "text",
autoComplete = "off",
disabled = false,
multiline = false,
tooltip = "",
classes
}: InputBoxProps) => {
return (
Expand All @@ -97,9 +108,17 @@ const InputBoxWrapper = ({
disabled={disabled}
onChange={onChange}
type={type}
multiline={multiline}
autoComplete={autoComplete}
/>
</div>
{tooltip !== "" && (
<div>
<Tooltip title={tooltip} placement="left">
<HelpIcon />
</Tooltip>
</div>
)}
</Grid>
</React.Fragment>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,28 @@ import Grid from "@material-ui/core/Grid";
import RadioGroup from "@material-ui/core/RadioGroup";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import Radio, { RadioProps } from "@material-ui/core/Radio";
import { InputLabel } from "@material-ui/core";
import { InputLabel, Tooltip } from "@material-ui/core";
import {
createStyles,
Theme,
withStyles,
makeStyles
} from "@material-ui/core/styles";
import { fieldBasic } from "../common/styleLibrary";
import HelpIcon from "@material-ui/icons/Help";

interface selectorTypes {
export interface SelectorTypes {
label: string;
value: string;
}

interface RadioGroupProps {
selectorOptions: selectorTypes[];
selectorOptions: SelectorTypes[];
currentSelection: string;
label: string;
id: string;
name: string;
tooltip?: string;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
classes: any;
displayInColumn?: boolean;
Expand Down Expand Up @@ -106,6 +108,7 @@ export const RadioGroupSelector = ({
id,
name,
onChange,
tooltip = "",
classes,
displayInColumn = false
}: RadioGroupProps) => {
Expand Down Expand Up @@ -136,6 +139,13 @@ export const RadioGroupSelector = ({
})}
</RadioGroup>
</div>
{tooltip !== "" && (
<div>
<Tooltip title={tooltip} placement="left">
<HelpIcon />
</Tooltip>
</div>
)}
</Grid>
</React.Fragment>
);
Expand Down

0 comments on commit 9857f90

Please sign in to comment.