Skip to content

Commit

Permalink
Merge pull request plotly#537 from plotly/cs_rename
Browse files Browse the repository at this point in the history
Plotly to Chart Studio and other fixes
  • Loading branch information
nicolaskruchten authored Dec 4, 2018
2 parents 44ecffc + 665b0ca commit cbdb341
Show file tree
Hide file tree
Showing 16 changed files with 899 additions and 377 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ Visit the app in your web browser at `http://localhost:9494`.

Note that the API requests to the connector are not authenticated. Only run the app as a server on trusted networks, do not run the app on public networks.

By default, the connector app will connect to Plotly Cloud. If you would like to connect the app to your private [Plotly On-Premise](https://plot.ly/products/on-premise) server, then modify the app's settings in `~/.plotly/connector/settings.yaml` with:
By default, the connector app will connect to Chart Studio Cloud. If you would like to connect the app to your private [Chart Studio Enterprise](https://plot.ly/products/on-premise) server, then modify the app's settings in `~/.plotly/connector/settings.yaml` with:

```
PLOTLY_API_DOMAIN: 'plotly.your-company.com'
CORS_ALLOWED_ORIGINS:
- 'https://plotly.your-company.com'
```

The database connector runs as a server by default as part of [Plotly On-Premise](https://plot.ly/products/on-premise). On Plotly On-Premise, every user who has access to the on-premise server also has access to the database connector, no extra installation or SSL configuration is necessary. If you would like to try out Plotly On-Premise at your company, please [get in touch with our team](https://plotly.typeform.com/to/seG7Vb), we'd love to help you out.
The database connector runs as a server by default as part of [Chart Studio Enterprise](https://plot.ly/products/on-premise). On Chart Studio Enterprise, every user who has access to the on-premise server also has access to the database connector, no extra installation or SSL configuration is necessary. If you would like to try out Chart Studio Enterprise at your company, please [get in touch with our team](https://plotly.typeform.com/to/seG7Vb), we'd love to help you out.


## Run as a Docker Container
Expand Down
12 changes: 6 additions & 6 deletions app/components/Login.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ class Login extends Component {
{'Falcon SQL Client'}
</h2>
<h4>
{'Log in to Plotly to continue'}
{'Log in to Chart Studio to continue'}
</h4>

{!isOnPrem() &&
<div>
<div style={{'height': 60}}>
<label>Connect to Plotly Cloud</label>
<label>Connect to Chart Studio Cloud</label>
<input
type="radio"
checked={this.state.serverType !== ONPREM}
Expand All @@ -239,7 +239,7 @@ class Login extends Component {
</div>

<div style={{'height': 60}}>
<label>Connect to <Link href="https://plot.ly/products/on-premise/" className="externalLink">Plotly On-Premise</Link></label>
<label>Connect to <Link href="https://plot.ly/products/on-premise/" className="externalLink">Chart Studio Enterprise</Link></label>
<input
type="radio"
checked={this.state.serverType === ONPREM}
Expand All @@ -250,7 +250,7 @@ class Login extends Component {
{
this.state.serverType === ONPREM ? (
<div style={{'height': 60}}>
<label>Your Plotly On-Premise Domain</label>
<label>Your Chart Studio Enterprise Domain</label>
<input
type="text"
placeholder="https://plotly.your-company.com"
Expand All @@ -275,14 +275,14 @@ class Login extends Component {

<div style={{'marginTop': '30px'}}>
<span>
{'To schedule queries and update data, the Falcon SQL Client requires a Plotly login.'}
{'To schedule queries and update data, the Falcon SQL Client requires a Chart Studio login.'}
</span>
</div>

{!isOnPrem() &&
<div>
<span>
{'Don\'t have an account yet?'}
{'Don\'t have a Chart Studio Cloud account yet?'}
</span>
<Link href={`${domain}/accounts/login/?action=signup`} className="externalLink">
{'Create an account '}
Expand Down
117 changes: 16 additions & 101 deletions app/components/Settings/Settings.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import UserConnections from './UserConnections/UserConnections.react';
import DialectSelector from './DialectSelector/DialectSelector.react';
import ConnectButton from './ConnectButton/ConnectButton.react';
import Preview from './Preview/Preview.react';
import {Link} from '../Link.react';
import Scheduler from './scheduler/scheduler.jsx';
import {DIALECTS, FAQ, PREVIEW_QUERY, SQL_DIALECTS_USING_EDITOR} from '../../constants/constants.js';
import {isElectron, isOnPrem, homeUrl} from '../../utils/utils';
import {isElectron, homeUrl} from '../../utils/utils';

class Settings extends Component {
constructor(props) {
Expand Down Expand Up @@ -138,7 +137,7 @@ class Settings extends Component {
/>
{!isElectron() && <div className={'description'}>
Warning:
connections set up in this instance of Falcon are accessible to all Plotly On-Premise users.
connections set up in this instance of Falcon are accessible to all Chart Studio Enterprise users.
</div>}
</div>
);
Expand Down Expand Up @@ -306,7 +305,6 @@ class Settings extends Component {
queryRequest,
s3KeysRequest,
selectedTab,
settingsRequest,
setIndex,
setTable,
selectedTable,
Expand All @@ -327,13 +325,6 @@ class Settings extends Component {
return null; // initializing
}

const connectorUrl = this.state.urls.https;
const {httpsServerIsOK, timeElapsed} = this.state;

const plotlyUrl = (settingsRequest.status === 200 ?
settingsRequest.content.PLOTLY_URL : 'https://plot.ly'
);

const dialect = connections[selectedTab].dialect;

const queryPanelDisabled = (
Expand Down Expand Up @@ -369,11 +360,6 @@ class Settings extends Component {
<Tab>Connection</Tab>
<Tab disabled={queryPanelDisabled}>Query</Tab>
<Tab disabled={queryPanelDisabled}>Schedule</Tab>
{isOnPrem() || <Tab
className="test-ssl-tab react-tabs__tab"
>
Plot.ly
</Tab>}
{ isElectron() && <Tab>FAQ</Tab> }
</TabList>

Expand Down Expand Up @@ -422,6 +408,20 @@ class Settings extends Component {
</TabPanel>

<TabPanel>
{(username) ? (
<p style={{textAlign: 'right', margin: 0}}>
{`Logged in to Chart Studio as "${username}"`}
&nbsp;&nbsp;
<a onClick={logout}>Log Out</a>
</p>
) : (
<p style={{textAlign: 'right', margin: 0}}>
{'Not logged in to Chart Studio'}
&nbsp;&nbsp;
<a onClick={() => window.location.assign(`${homeUrl()}/login`)}>
Log In</a>
</p>
)}
<Scheduler
queries={selectedScheduledQueries}
tags={selectedTags}
Expand All @@ -438,91 +438,6 @@ class Settings extends Component {
/>
</TabPanel>

{isOnPrem() || <TabPanel>
{this.props.connectRequest.status === 200 ? (
<div className="big-whitespace-tab">
{httpsServerIsOK ? (
<div id="test-ssl-initialized" style={{textAlign: 'center'}}>
<img
src="/static/images/ms-icon-150x150.png"
style={{border: '1px solid #ebf0f8'}}
>
</img>
<p>
{`The Falcon SQL Client can be a middle man between
your database and Plot.ly, so that when your database updates,
your charts and dashboards update as well. Run Falcon on a server
for 24/7 dashboard updates, or just keep this app open on an
office computer. If you have Plotly On-Premises, this app is
already running in your container. Contact your On-Prem admin
to learn how to connect.`}
</p>

<Link
className="btn-primary"
style={{maxWidth: '50%', marginTop: '40px', marginBottom: '30px'}}
href={`${plotlyUrl}/create?upload=sql&url=${connectorUrl}`}
target="_blank"
>
Query {dialect} from plot.ly
</Link>
<div>
<code>Falcon has auto-generated a local URL
and SSL certificate for itself: </code>
<br />
<Link
href={`${plotlyUrl}/create?upload=sql&url=${connectorUrl}`}
target="_blank"
>
<strong><code>{connectorUrl}</code></strong>
</Link>
</div>
</div>
) : (username) ? (
<div>
<p>
{`Plotly is automatically initializing a
unique SSL certificate and URL for you.
This can take up to 10 minutes. Once this
is complete, you'll be able to query your
databases from `}
<Link href={`${plotlyUrl}/create?upload=sql`}>
Plotly
</Link>
{`. It has been ${timeElapsed}. Check out the
FAQ while you wait! 📰`}
</p>
</div>
) : (
<div>
<p>
Please connect to Plotly
to generate an SSL certificate and a URL for you.
</p>
</div>
)}
</div>
) : (
<div className="big-whitespace-tab">
<p>Please connect to a data store in the Connection tab first.</p>
</div>
)}

{(username) ? (
<p style={{textAlign: 'right'}}>
{`Logged in as "${username}"`}
<br/>
<a onClick={logout}>Log Out</a>
</p>
) : (
<p style={{textAlign: 'right'}}>
Not logged in
<br/>
<a onClick={() => window.location.assign(`${homeUrl()}/login`)}>Log into Plotly</a>
</p>
)}
</TabPanel> }

{isElectron() && <TabPanel>
<div className="big-whitespace-tab">
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,15 @@ class CreateModal extends Component {
<Column className="container" style={containerOverride}>
<Row>
<Column className="innerColumn">
<h5 className="header">Create Scheduled Query</h5>
<h5 className="header">Create Live Dataset & Scheduled Query</h5>
<button className="button close-btn" onClick={this.props.onClickAway}>
&times;
</button>
</Column>
</Row>
<Column className="detailsColumn">
<Row>
<p>A scheduled query runs and updates its corresponding dataset in Plotly Cloud.</p>
<p>A scheduled query runs and updates its corresponding dataset in Chart Studio.</p>
</Row>
<Row style={rowStyleOverride}>
<div className="row-header">Query</div>
Expand Down Expand Up @@ -274,7 +274,8 @@ class CreateModal extends Component {
) : (
<Column>
<button type="submit" className="submit" onClick={this.submit}>
{this.state.saving ? 'Saving...' : 'Save'}
{this.state.saving ? 'Creating...' :
'Create Live Dataset & Scheduled Query'}
</button>
<div className="save-warning">{SAVE_WARNING}</div>
</Column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class PromptLoginModal extends React.Component {
</button>
<Row className="header">
<p>
To create a scheduled query, you'll need to be logged into Plotly.
To create a scheduled query, you'll need to be logged into Chart Studio.
<br />
<br />
Note: logging in will reset your query, click the button below to copy the query to your
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function FormattedMessage(props) {
return (
<details style={outlineStyle}>
<summary style={outlineStyle}>
An unexpected error occurred syncing the query to the Plotly Cloud. Please try again later.
An unexpected error occurred syncing the query to the Chart Studio. Please try again later.
</summary>
<pre>{content}</pre>
</details>
Expand Down
2 changes: 1 addition & 1 deletion app/components/Settings/scheduler/scheduler.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}

.scheduler-table .react-grid-Grid {
min-height: calc(100vh - 320px) !important;
min-height: calc(100vh - 380px) !important;
}

.scheduler-table .react-grid-Canvas {
Expand Down
Loading

0 comments on commit cbdb341

Please sign in to comment.