Skip to content

Commit 8c46881

Browse files
committed
Test out change for #97
AuScalableDroneCloud/Tracker#97
1 parent 0f60d44 commit 8c46881

File tree

1 file changed

+5
-76
lines changed

1 file changed

+5
-76
lines changed

public/OpenButton.jsx

Lines changed: 5 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import React, { Component, Fragment } from "react";
2-
import { DropdownButton, MenuItem } from "react-bootstrap";
2+
import { Button, MenuItem } from "react-bootstrap";
33

44
import PropTypes from 'prop-types';
5-
import { Button } from "react-bootstrap";
6-
import $ from 'jquery';
5+
//import $ from 'jquery';
76

87
import "./Button.scss";
98

@@ -45,81 +44,11 @@ export default class OpenButton extends Component {
4544
]
4645

4746
render() {
48-
const url = this.url;
49-
50-
const nMenuItems = this.assets
51-
.map(asset => (
52-
<MenuItem
53-
key={asset.name}
54-
tag={"a"}
55-
href={asset.url}
56-
target='_blank'
57-
to=''
58-
disabled={asset.disabled}
59-
>
60-
<Fragment>
61-
<i className={asset.icon}></i>
62-
{" "}
63-
{asset.name}
64-
</Fragment>
65-
</MenuItem>
66-
));
67-
68-
const ntitle = (
69-
<Fragment>
70-
<i className={"fab fa-python"} />
71-
&nbsp; {" "} Open Notebook
72-
</Fragment>
73-
74-
);
75-
76-
const menuItems = this.pipelines
77-
.map(pipeline => (
78-
<MenuItem
79-
key={pipeline.name}
80-
tag={"a"}
81-
href={pipeline.url}
82-
target='_blank'
83-
to=''
84-
>
85-
<Fragment>
86-
<i className={pipeline.icon}></i>
87-
{" "}
88-
{pipeline.name}
89-
</Fragment>
90-
</MenuItem>
91-
));
92-
93-
const title = (
94-
<Fragment>
95-
<i className={"fas fa-stream"} />
96-
&nbsp; {" "} Run Pipeline
97-
</Fragment>
98-
99-
);
100-
101-
// <p>Task Status: {this.props.task.status}</p>
102-
10347
return (
10448
<Fragment>
105-
<DropdownButton
106-
id={"pipelinesDropdown"}
107-
bsStyle={"default"}
108-
bsSize={"small"}
109-
className={"pipeline-btn"}
110-
title={title}
111-
>
112-
{menuItems}
113-
</DropdownButton>
114-
<DropdownButton
115-
id={"notebookDropdown"}
116-
bsStyle={"default"}
117-
bsSize={"small"}
118-
className={"notebook-btn"}
119-
title={ntitle}
120-
>
121-
{nMenuItems}
122-
</DropdownButton>
49+
<Button href={`${this.base}&next=${encodeURIComponent(this.nextbase)}`}
50+
variant="secondary"
51+
><i className={"fab fa-python"} /> Open notebook</Button>
12352
</Fragment>
12453
);
12554
}

0 commit comments

Comments
 (0)