Skip to content

Commit e4bfd66

Browse files
committed
Adds basic Picture-in-picture video playback and useful metadata to drives
1 parent 8b5a76f commit e4bfd66

File tree

11 files changed

+11753
-219
lines changed

11 files changed

+11753
-219
lines changed

app/actions/eon_detail_actions.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import * as types from '../constants/eon_detail_action_types';
22

3-
export function CONNECT() {
4-
return {
5-
type: types.CONNECT
6-
};
7-
}
8-
export function CONNECTED() {
9-
return {
10-
type: types.CONNECTED
11-
};
12-
}
13-
export function CONNECT_FAILED() {
14-
return {
15-
type: types.CONNECT_FAILED
16-
};
17-
}
3+
// export function CONNECT() {
4+
// return {
5+
// type: types.CONNECT
6+
// };
7+
// }
8+
// export function CONNECTED() {
9+
// return {
10+
// type: types.CONNECTED
11+
// };
12+
// }
13+
// export function CONNECT_FAILED() {
14+
// return {
15+
// type: types.CONNECT_FAILED
16+
// };
17+
// }
1818
export function CHANGE_TAB(tab) {
1919
return {
2020
type: types.CHANGE_TAB,

app/components/EonDetail/Console/RouteModal.js

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ import LoadingOverlay from '../../LoadingOverlay';
77
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
88
import { Row, Col, Button, ButtonGroup, Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Label, Input, FormText } from 'reactstrap';
99
import { Media } from 'reactstrap';
10+
import Video from '../../Video';
1011
const propTypes = {
1112
open: PropTypes.bool,
1213
loading: PropTypes.bool,
1314
route: PropTypes.object,
14-
className: PropTypes.string
15+
className: PropTypes.string,
16+
git_repo: PropTypes.string,
17+
git_commit_short: PropTypes.string
1518
};
1619

1720
class RouteModal extends React.Component {
@@ -34,7 +37,7 @@ class RouteModal extends React.Component {
3437
this.props.HIDE_ROUTE();
3538
}
3639
render() {
37-
const { open, loading, route, className } = this.props;
40+
const { open, loading, git_repo,git_commit_short, route, className } = this.props;
3841
let modalHeader = "Opening...";
3942
let modalBody = <div></div>;
4043
let segmentsList;
@@ -62,7 +65,24 @@ class RouteModal extends React.Component {
6265
<h3>{modalHeader}</h3>
6366
<Button onClick={(evt) => { this.close(); }} className={"command-close"}><FontAwesomeIcon icon="times"></FontAwesomeIcon></Button>
6467
<div className={"command-body"}>
65-
{segmentsList}
68+
<div className={"video-outer"}>
69+
<div className={"route-metadata"}>
70+
<div>{git_repo}</div>
71+
<div>{route.git_branch} {git_commit_short} {route.git_dirty && "modified"}</div>
72+
<div>{route.version}</div>
73+
</div>
74+
<Video />
75+
</div>
76+
<div className={"cabana-url"}>
77+
<FormGroup>
78+
<Label for={"cabana-link"}>Sharable Cabana Link</Label>
79+
<Input type={"textarea"} value={route.sharable_cabana_url} />
80+
</FormGroup>
81+
<FormGroup>
82+
<Label for={"segments"}>Segments</Label>
83+
{segmentsList}
84+
</FormGroup>
85+
</div>
6686
</div>
6787
<ButtonGroup className={"command-button-bar"}>
6888
<Button onClick={(evt) => { this.close(); }}>Close</Button>
@@ -79,8 +99,17 @@ function mapDispatchToProps(dispatch) {
7999

80100
const mapStateToProps = ({ eonDetail }) => {
81101
const { activeRouteId, activeRouteLoading, activeRouteError, routes } = eonDetail;
102+
let activeRoute;
103+
104+
if (activeRouteId) {
105+
activeRoute = routes[activeRouteId]
106+
}
107+
const git_repo = activeRoute.git_remote.replace('[email protected]:','').replace('https://github.com/').replace(".git","");
108+
const git_commit_short = activeRoute.git_commit.slice(0,7);
82109
return {
83-
route: activeRouteId ? routes[activeRouteId] : null,
110+
route: activeRoute,
111+
git_repo,
112+
git_commit_short,
84113
loading: activeRouteLoading,
85114
error: activeRouteError,
86115
open: (activeRouteId && activeRouteId.length > 0)

app/components/EonDetail/Console/SegmentsTab.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class SegmentsTab extends React.Component {
3737
</div>
3838
<div className="drive-title">
3939
<span>{drive.label}</span>
40+
<span className={"meta"}>
41+
<span>{drive.git_repo}</span><span>{drive.git_branch}</span><span>{drive.version}</span>
42+
</span>
4043
</div>
4144
</div>
4245
);

0 commit comments

Comments
 (0)