summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4f71744)
Feature #13590
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>
15 files changed:
const regex = new RegExp('[\\?&]' + safeName + '=([^&#]*)');
const results = regex.exec(search);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
const regex = new RegExp('[\\?&]' + safeName + '=([^&#]*)');
const results = regex.exec(search);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
componentDidMount() {
const search = this.props.location ? this.props.location.search : "";
componentDidMount() {
const search = this.props.location ? this.props.location.search : "";
this.props.dispatch(projectService.getProjectList());
}
render() {
this.props.dispatch(projectService.getProjectList());
}
render() {
- return <Redirect to="/"/>
+ return <Redirect to="/"/>;
import { withStyles } from '@material-ui/core';
export interface Breadcrumb {
import { withStyles } from '@material-ui/core';
export interface Breadcrumb {
}
interface BreadcrumbsDataProps {
}
interface BreadcrumbsDataProps {
}
interface BreadcrumbsActionProps {
}
interface BreadcrumbsActionProps {
- onClick: (breadcrumb: Breadcrumb) => any
+ onClick: (breadcrumb: Breadcrumb) => any;
}
type BreadcrumbsProps = BreadcrumbsDataProps & BreadcrumbsActionProps & WithStyles<CssRules>;
}
type BreadcrumbsProps = BreadcrumbsDataProps & BreadcrumbsActionProps & WithStyles<CssRules>;
}
getInactiveItems = () => {
}
getInactiveItems = () => {
- return this.props.items.slice(0, -1)
+ return this.props.items.slice(0, -1);
}
getActiveItem = () => {
}
getActiveItem = () => {
- return this.props.items.slice(-1)
+ return this.props.items.slice(-1);
-type CssRules = 'inactiveItem'
+type CssRules = 'inactiveItem';
const styles: StyleRulesCallback<CssRules> = theme => {
const styles: StyleRulesCallback<CssRules> = theme => {
- const { unit } = theme.spacing
+ const { unit } = theme.spacing;
return {
inactiveItem: {
opacity: 0.6
}
return {
inactiveItem: {
opacity: 0.6
}
-export default withStyles(styles)(Breadcrumbs)
+export default withStyles(styles)(Breadcrumbs);
interface DropdownMenuDataProps {
interface DropdownMenuDataProps {
- id: string,
- icon: React.ComponentType,
+ id: string;
+ icon: React.ComponentType;
state = {
anchorEl: undefined
state = {
anchorEl: undefined
transformOrigin: PopoverOrigin = {
vertical: "top",
horizontal: "center"
transformOrigin: PopoverOrigin = {
vertical: "top",
horizontal: "center"
render() {
const { icon: Icon, id, children } = this.props;
render() {
const { icon: Icon, id, children } = this.props;
{children}
</Menu>
</div>
{children}
</Menu>
</div>
- this.setState({ anchorEl: undefined })
+ this.setState({ anchorEl: undefined });
}
handleOpen = (event: React.MouseEvent<HTMLButtonElement>) => {
}
handleOpen = (event: React.MouseEvent<HTMLButtonElement>) => {
- this.setState({ anchorEl: event.currentTarget })
+ this.setState({ anchorEl: event.currentTarget });
-export default DropdownMenu
+export default DropdownMenu;
import PersonIcon from "@material-ui/icons/Person";
import HelpIcon from "@material-ui/icons/Help";
import SearchBar from "./search-bar/search-bar";
import PersonIcon from "@material-ui/icons/Person";
import HelpIcon from "@material-ui/icons/Help";
import SearchBar from "./search-bar/search-bar";
-import Breadcrumbs, { Breadcrumb } from "../breadcrumbs/breadcrumbs"
-import DropdownMenu from "./dropdown-menu/dropdown-menu"
+import Breadcrumbs, { Breadcrumb } from "../breadcrumbs/breadcrumbs";
+import DropdownMenu from "./dropdown-menu/dropdown-menu";
import { User } from "../../models/user";
export interface MainAppBarMenuItem {
import { User } from "../../models/user";
export interface MainAppBarMenuItem {
}
export interface MainAppBarActionProps {
}
export interface MainAppBarActionProps {
- onSearch: (searchText: string) => void,
- onBreadcrumbClick: (breadcrumb: Breadcrumb) => void,
- onMenuItemClick: (menuItem: MainAppBarMenuItem) => void
+ onSearch: (searchText: string) => void;
+ onBreadcrumbClick: (breadcrumb: Breadcrumb) => void;
+ onMenuItemClick: (menuItem: MainAppBarMenuItem) => void;
}
type MainAppBarProps = MainAppBarDataProps & MainAppBarActionProps & WithStyles<CssRules>;
}
type MainAppBarProps = MainAppBarDataProps & MainAppBarActionProps & WithStyles<CssRules>;
export class MainAppBar extends React.Component<MainAppBarProps> {
render() {
export class MainAppBar extends React.Component<MainAppBarProps> {
render() {
- const { classes, searchText, breadcrumbs, searchDebounce } = this.props
+ const { classes, searchText, breadcrumbs, searchDebounce } = this.props;
return <AppBar className={classes.appBar} position="static">
<Toolbar>
<Grid
return <AppBar className={classes.appBar} position="static">
<Toolbar>
<Grid
<Breadcrumbs items={breadcrumbs} onClick={this.props.onBreadcrumbClick} />
</Toolbar>
}
<Breadcrumbs items={breadcrumbs} onClick={this.props.onBreadcrumbClick} />
</Toolbar>
}
}
renderMenuForUser = () => {
}
renderMenuForUser = () => {
- const { user } = this.props
+ const { user } = this.props;
return (
<>
<IconButton color="inherit">
return (
<>
<IconButton color="inherit">
{this.renderMenuItems(this.props.menuItems.helpMenu)}
</DropdownMenu>
</>
{this.renderMenuItems(this.props.menuItems.helpMenu)}
</DropdownMenu>
</>
}
renderMenuForAnonymous = () => {
return this.props.menuItems.anonymousMenu.map((item, index) => (
<Button key={index} color="inherit" onClick={() => this.props.onMenuItemClick(item)}>{item.label}</Button>
}
renderMenuForAnonymous = () => {
return this.props.menuItems.anonymousMenu.map((item, index) => (
<Button key={index} color="inherit" onClick={() => this.props.onMenuItemClick(item)}>{item.label}</Button>
}
renderMenuItems = (menuItems: MainAppBarMenuItem[]) => {
return menuItems.map((item, index) => (
<MenuItem key={index} onClick={() => this.props.onMenuItemClick(item)}>{item.label}</MenuItem>
}
renderMenuItems = (menuItems: MainAppBarMenuItem[]) => {
return menuItems.map((item, index) => (
<MenuItem key={index} onClick={() => this.props.onMenuItemClick(item)}>{item.label}</MenuItem>
}
getUserFullname = () => {
}
getUserFullname = () => {
-type CssRules = "appBar"
+type CssRules = "appBar";
const styles: StyleRulesCallback<CssRules> = theme => ({
appBar: {
backgroundColor: "#692498"
}
const styles: StyleRulesCallback<CssRules> = theme => ({
appBar: {
backgroundColor: "#692498"
}
-export default withStyles(styles)(MainAppBar)
\ No newline at end of file
+export default withStyles(styles)(MainAppBar);
\ No newline at end of file
jest.advanceTimersByTime(500);
searchBar.find("input").simulate("change", { target: { value: "intermediate value" } });
jest.advanceTimersByTime(1000);
jest.advanceTimersByTime(500);
searchBar.find("input").simulate("change", { target: { value: "intermediate value" } });
jest.advanceTimersByTime(1000);
- expect(onSearch).toBeCalledWith("intermediate value")
+ expect(onSearch).toBeCalledWith("intermediate value");
searchBar.find("input").simulate("change", { target: { value: "latest value" } });
jest.advanceTimersByTime(1000);
searchBar.find("input").simulate("change", { target: { value: "latest value" } });
jest.advanceTimersByTime(1000);
- expect(onSearch).toBeCalledWith("latest value")
+ expect(onSearch).toBeCalledWith("latest value");
expect(onSearch).toHaveBeenCalledTimes(2);
});
expect(onSearch).toHaveBeenCalledTimes(2);
});
-type SearchBarProps = SearchBarDataProps & SearchBarActionProps & WithStyles<CssRules>
+type SearchBarProps = SearchBarDataProps & SearchBarActionProps & WithStyles<CssRules>;
interface SearchBarState {
value: string;
interface SearchBarState {
value: string;
state: SearchBarState = {
value: ""
state: SearchBarState = {
value: ""
timeout: NodeJS.Timer;
render() {
timeout: NodeJS.Timer;
render() {
- const { classes } = this.props
+ const { classes } = this.props;
return <Paper className={classes.container}>
<form onSubmit={this.handleSubmit}>
<input
return <Paper className={classes.container}>
<form onSubmit={this.handleSubmit}>
<input
<SearchIcon />
</IconButton>
</form>
<SearchIcon />
</IconButton>
</form>
-type CssRules = 'container' | 'input' | 'button'
+type CssRules = 'container' | 'input' | 'button';
const styles: StyleRulesCallback<CssRules> = theme => {
const styles: StyleRulesCallback<CssRules> = theme => {
- const { unit } = theme.spacing
+ const { unit } = theme.spacing;
return {
container: {
position: 'relative',
return {
container: {
position: 'relative',
width: unit * 3,
height: unit * 3
}
width: unit * 3,
height: unit * 3
}
-export default withStyles(styles)(SearchBar)
\ No newline at end of file
+export default withStyles(styles)(SearchBar);
\ No newline at end of file
</TableRow>
</TableBody>
</Table>
</TableRow>
</TableBody>
</Table>
-export default withStyles(styles)(ProjectTree)
+export default withStyles(styles)(ProjectTree);
class Tree<T> extends React.Component<TreeProps<T> & WithStyles<CssRules>, {}> {
renderArrow (items: boolean, arrowClass: string, open: boolean){
class Tree<T> extends React.Component<TreeProps<T> & WithStyles<CssRules>, {}> {
renderArrow (items: boolean, arrowClass: string, open: boolean){
- return <i className={`${arrowClass} ${open ? "fas fa-caret-down" : `fas fa-caret-down ${this.props.classes.arrowRotate}`}`} />
+ return <i className={`${arrowClass} ${open ? "fas fa-caret-down" : `fas fa-caret-down ${this.props.classes.arrowRotate}`}`} />;
}
render(): ReactElement<any> {
const level = this.props.level ? this.props.level : 0;
}
render(): ReactElement<any> {
const level = this.props.level ? this.props.level : 0;
level={level + 1}/>
</Collapse>}
</div>)}
level={level + 1}/>
</Collapse>}
</div>)}
}
}
const StyledTree = withStyles(styles)(Tree);
}
}
const StyledTree = withStyles(styles)(Tree);
-export default StyledTree
+export default StyledTree;
.get<UserDetailsResponse>('/users/current')
.then(resp => {
dispatch(actions.USER_DETAILS_SUCCESS(resp.data));
.get<UserDetailsResponse>('/users/current')
.then(resp => {
dispatch(actions.USER_DETAILS_SUCCESS(resp.data));
// .catch(err => {
// });
// .catch(err => {
// });
dispatch(actions.PROJECTS_SUCCESS({projects, parentItemId: parentUuid}));
return projects;
});
dispatch(actions.PROJECTS_SUCCESS({projects, parentItemId: parentUuid}));
return projects;
});
export interface AuthState {
user?: User;
apiToken?: string;
export interface AuthState {
user?: User;
apiToken?: string;
const authReducer = (state: AuthState = {}, action: AuthAction) => {
return actions.match(action, {
const authReducer = (state: AuthState = {}, action: AuthAction) => {
return actions.match(action, {
compose;
export interface RootState {
compose;
export interface RootState {
- auth: AuthState,
- projects: ProjectState,
- router: RouterState
+ auth: AuthState;
+ projects: ProjectState;
+ router: RouterState;
}
const rootReducer = combineReducers({
}
const rootReducer = combineReducers({
import MainAppBar, { MainAppBarActionProps, MainAppBarMenuItems, MainAppBarMenuItem } from '../../components/main-app-bar/main-app-bar';
import { Breadcrumb } from '../../components/breadcrumbs/breadcrumbs';
import { push } from 'react-router-redux';
import MainAppBar, { MainAppBarActionProps, MainAppBarMenuItems, MainAppBarMenuItem } from '../../components/main-app-bar/main-app-bar';
import { Breadcrumb } from '../../components/breadcrumbs/breadcrumbs';
import { push } from 'react-router-redux';
-import projectActions from "../../store/project/project-action"
+import projectActions from "../../store/project/project-action";
import ProjectTree from '../../components/project-tree/project-tree';
import { TreeItem } from "../../components/tree/tree";
import { Project } from "../../models/project";
import ProjectTree from '../../components/project-tree/project-tree';
import { TreeItem } from "../../components/tree/tree";
import { Project } from "../../models/project";
type WorkbenchProps = WorkbenchDataProps & WorkbenchActionProps & DispatchProp & WithStyles<CssRules>;
interface NavBreadcrumb extends Breadcrumb {
type WorkbenchProps = WorkbenchDataProps & WorkbenchActionProps & DispatchProp & WithStyles<CssRules>;
interface NavBreadcrumb extends Breadcrumb {
}
interface NavMenuItem extends MainAppBarMenuItem {
}
interface NavMenuItem extends MainAppBarMenuItem {
}
interface WorkbenchState {
}
interface WorkbenchState {
mainAppBarActions: MainAppBarActionProps = {
mainAppBarActions: MainAppBarActionProps = {
this.props.dispatch(push(`/search?q=${searchText}`));
},
onMenuItemClick: (menuItem: NavMenuItem) => menuItem.action()
this.props.dispatch(push(`/search?q=${searchText}`));
},
onMenuItemClick: (menuItem: NavMenuItem) => menuItem.action()
toggleProjectTreeItem = (itemId: string) => {
this.props.dispatch<any>(projectService.getProjectList(itemId)).then(() => {
this.props.dispatch(projectActions.TOGGLE_PROJECT_TREE_ITEM(itemId));
});
toggleProjectTreeItem = (itemId: string) => {
this.props.dispatch<any>(projectService.getProjectList(itemId)).then(() => {
this.props.dispatch(projectActions.TOGGLE_PROJECT_TREE_ITEM(itemId));
});
render() {
const { classes, user } = this.props;
render() {
const { classes, user } = this.props;
"jsx-no-lambda": false,
"no-debugger": false,
"no-console": false,
"jsx-no-lambda": false,
"no-debugger": false,
"no-console": false,
- "no-shadowed-variable": false
+ "no-shadowed-variable": false,
+ "semicolon": true
},
"linterOptions": {
"exclude": [
},
"linterOptions": {
"exclude": [