Skip to content

Commit

Permalink
src: adding license note to all files
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinclert committed Jul 20, 2018
1 parent 2b146bc commit 2f1fa2b
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 81 deletions.
24 changes: 24 additions & 0 deletions reana-ui/src/App.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*
-*- coding: utf-8 -*-
This file is part of REANA.
Copyright (C) 2018 CERN.
REANA is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
REANA 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with REANA; if not, see <http://www.gnu.org/licenses>.
In applying this license, CERN does not waive the privileges and immunities
granted to it by virtue of its status as an Intergovernmental Organization or
submit itself to any jurisdiction.
*/


import React, { Component } from 'react';
import Header from './components/Header'
import Table from './components/Table'
Expand Down
26 changes: 25 additions & 1 deletion reana-ui/src/components/Header.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*
-*- coding: utf-8 -*-
This file is part of REANA.
Copyright (C) 2018 CERN.
REANA is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
REANA 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with REANA; if not, see <http://www.gnu.org/licenses>.
In applying this license, CERN does not waive the privileges and immunities
granted to it by virtue of its status as an Intergovernmental Organization or
submit itself to any jurisdiction.
*/


import React, { Component } from 'react';
import { Segment, Image, Button, Menu, Icon } from 'semantic-ui-react'
import LogoImg from '../images/logo.svg';
Expand All @@ -7,7 +31,7 @@ export default class Header extends Component {

render() {
return (
<Segment secondary clearing>
<Segment secondary clearing attached='top' padded='very'>
<Image src={LogoImg} size='medium' floated='left'/>
<Button size='huge' icon primary floated='right'>
<Icon name='user'/>
Expand Down
182 changes: 104 additions & 78 deletions reana-ui/src/components/Table.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
/*
-*- coding: utf-8 -*-
This file is part of REANA.
Copyright (C) 2018 CERN.
REANA is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
REANA 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with REANA; if not, see <http://www.gnu.org/licenses>.
In applying this license, CERN does not waive the privileges and immunities
granted to it by virtue of its status as an Intergovernmental Organization or
submit itself to any jurisdiction.
*/


import React, { Component } from 'react'
import { Table, Menu, Icon } from 'semantic-ui-react'
import { Icon, Menu, Segment, Table } from 'semantic-ui-react'
import TableProgress from './TableProgress'
import TableActions from './TableActions'
import _ from 'lodash'
Expand Down Expand Up @@ -46,84 +70,86 @@ export default class TableSortable extends Component {
const { column, data, direction } = this.state;

return (
<Table sortable fixed padded='very'>
<Table.Header>
<Table.Row>
<Table.HeaderCell
colSpan='1'
sorted={column === 'workflow' ? direction : null}
onClick={this.handleSort('workflow')}
>
Workflow
</Table.HeaderCell>
<Table.HeaderCell
colSpan='1'
sorted={column === 'run' ? direction : null}
onClick={this.handleSort('run')}
>
Run
</Table.HeaderCell>
<Table.HeaderCell
colSpan='1'
sorted={column === 'date' ? direction : null}
onClick={this.handleSort('date')}
>
Date
</Table.HeaderCell>
<Table.HeaderCell
colSpan='4'
sorted={column === 'progress' ? direction : null}
onClick={this.handleSort('progress')}
>
Progress
</Table.HeaderCell>
<Table.HeaderCell
colSpan='1'
sorted={column === 'status' ? direction : null}
onClick={this.handleSort('status')}
>
Status
</Table.HeaderCell>
<Table.HeaderCell colSpan='2'>
Actions
</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
{_.map(data, ({ workflow, run, date, completedSteps, totalSteps, status }) => (
<Table.Row key={workflow}>
<Table.Cell colSpan='1'>{workflow}</Table.Cell>
<Table.Cell colSpan='1'>{run}</Table.Cell>
<Table.Cell colSpan='1'>{date}</Table.Cell>
<Table.Cell colSpan='4'>
<TableProgress completed={completedSteps} total={totalSteps} status={status}/>
</Table.Cell>
<Table.Cell colSpan='1'>{status}</Table.Cell>
<Table.Cell colSpan='2'>
<TableActions status={status}/>
</Table.Cell>
<Segment attached padded='very'>
<Table sortable fixed>
<Table.Header>
<Table.Row>
<Table.HeaderCell
colSpan='1'
sorted={column === 'workflow' ? direction : null}
onClick={this.handleSort('workflow')}
>
Workflow
</Table.HeaderCell>
<Table.HeaderCell
colSpan='1'
sorted={column === 'run' ? direction : null}
onClick={this.handleSort('run')}
>
Run
</Table.HeaderCell>
<Table.HeaderCell
colSpan='1'
sorted={column === 'date' ? direction : null}
onClick={this.handleSort('date')}
>
Date
</Table.HeaderCell>
<Table.HeaderCell
colSpan='4'
sorted={column === 'progress' ? direction : null}
onClick={this.handleSort('progress')}
>
Progress
</Table.HeaderCell>
<Table.HeaderCell
colSpan='1'
sorted={column === 'status' ? direction : null}
onClick={this.handleSort('status')}
>
Status
</Table.HeaderCell>
<Table.HeaderCell colSpan='2'>
Actions
</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
{_.map(data, ({ workflow, run, date, completedSteps, totalSteps, status }) => (
<Table.Row key={workflow}>
<Table.Cell colSpan='1'>{workflow}</Table.Cell>
<Table.Cell colSpan='1'>{run}</Table.Cell>
<Table.Cell colSpan='1'>{date}</Table.Cell>
<Table.Cell colSpan='4'>
<TableProgress completed={completedSteps} total={totalSteps} status={status}/>
</Table.Cell>
<Table.Cell colSpan='1'>{status}</Table.Cell>
<Table.Cell colSpan='2'>
<TableActions status={status}/>
</Table.Cell>
</Table.Row>
))}
</Table.Body>
<Table.Footer>
<Table.Row>
<Table.HeaderCell colSpan='10'>
<Menu floated='right' pagination>
<Menu.Item as='a' icon>
<Icon name='chevron left' />
</Menu.Item>
<Menu.Item as='a'>1</Menu.Item>
<Menu.Item as='a'>2</Menu.Item>
<Menu.Item as='a'>3</Menu.Item>
<Menu.Item as='a'>4</Menu.Item>
<Menu.Item as='a' icon>
<Icon name='chevron right' />
</Menu.Item>
</Menu>
</Table.HeaderCell>
</Table.Row>
))}
</Table.Body>
<Table.Footer>
<Table.Row>
<Table.HeaderCell colSpan='10'>
<Menu floated='right' pagination>
<Menu.Item as='a' icon>
<Icon name='chevron left' />
</Menu.Item>
<Menu.Item as='a'>1</Menu.Item>
<Menu.Item as='a'>2</Menu.Item>
<Menu.Item as='a'>3</Menu.Item>
<Menu.Item as='a'>4</Menu.Item>
<Menu.Item as='a' icon>
<Icon name='chevron right' />
</Menu.Item>
</Menu>
</Table.HeaderCell>
</Table.Row>
</Table.Footer>
</Table>
</Table.Footer>
</Table>
</Segment>
)
}
}
28 changes: 27 additions & 1 deletion reana-ui/src/components/TableActions.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*
-*- coding: utf-8 -*-
This file is part of REANA.
Copyright (C) 2018 CERN.
REANA is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
REANA 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with REANA; if not, see <http://www.gnu.org/licenses>.
In applying this license, CERN does not waive the privileges and immunities
granted to it by virtue of its status as an Intergovernmental Organization or
submit itself to any jurisdiction.
*/


import React, { Component } from 'react';
import { Button } from 'semantic-ui-react'

Expand All @@ -24,16 +48,18 @@ export default class TableActions extends Component {
render() {

return(
<Button.Group basic icon size='tiny'>
<Button.Group basic icon size='tiny' color='blue' widths='4'>
<Button
disabled={TableActions.disableView()}
icon='eye'
content=' View'
compact
/>
<Button
disabled={TableActions.disablePause()}
icon='pause'
content=' Pause'
compact
/>
<Button
disabled={TableActions.disableResume(this.props.status)}
Expand Down
26 changes: 25 additions & 1 deletion reana-ui/src/components/TableProgress.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*
-*- coding: utf-8 -*-
This file is part of REANA.
Copyright (C) 2018 CERN.
REANA is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
REANA 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with REANA; if not, see <http://www.gnu.org/licenses>.
In applying this license, CERN does not waive the privileges and immunities
granted to it by virtue of its status as an Intergovernmental Organization or
submit itself to any jurisdiction.
*/


import React, { Component } from 'react';
import { Progress } from 'semantic-ui-react'

Expand Down Expand Up @@ -35,7 +59,7 @@ export default class TableProgress extends Component {

return(
<Progress
size = 'tiny'
size = 'small'
percent = {TableProgress.handlePercentage(this.props.completed, this.props.total)}
color = {TableProgress.handleColor(this.props.status)}
active = {TableProgress.handleActive(this.props.status)}
Expand Down

0 comments on commit 2f1fa2b

Please sign in to comment.