Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 42 additions & 2 deletions labextension/src/widgets/LeftPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ import {
import { JupyterFrontEnd } from '@jupyterlab/application';
import { IDocumentManager } from '@jupyterlab/docmanager';
import { ThemeProvider } from '@mui/material/styles';
import { Switch } from '@mui/material';
import { theme } from '../Theme';
import { Input } from '../components/Input';
import Commands from '../lib/Commands';
import { PageConfig } from '@jupyterlab/coreutils';
import kaleIconSvg from '../../style/icons/kale.svg';

const KALE_NOTEBOOK_METADATA_KEY = 'kubeflow_notebook';
const DEFAULT_UI_URL = 'http://localhost:8080';
Expand Down Expand Up @@ -556,19 +558,57 @@ export class KubeflowKaleLeftPanel extends React.Component<IProps, IState> {
style={{
fontSize: 'var(--jp-ui-font-size3)',
color: theme.kale.headers.main,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: '8px',
}}
className="kale-header"
>
Kale Deployment Panel {this.state.isEnabled}
Kale
<span
style={{
width: '24px',
height: '24px',
display: 'inline-flex',
}}
dangerouslySetInnerHTML={{ __html: kaleIconSvg }}
/>
</p>
</div>

<div className="kale-component">
{activeNotebook && (
{activeNotebook ? (
<InlineCellsMetadata
onMetadataEnable={this.onMetadataEnable}
notebook={activeNotebook}
/>
) : (
<div>
<div className="toolbar input-container">
<div className={'switch-label'} style={{ opacity: 0.5 }}>
Enable
</div>
<Switch
checked={false}
disabled={true}
color="primary"
name="enableKale"
classes={{ root: 'material-switch' }}
/>
</div>
<p
style={{
color: theme.kale.headers.main,
fontSize: 'var(--jp-ui-font-size1)',
textAlign: 'center',
marginTop: '16px',
opacity: 0.7,
}}
>
Please open a notebook to start working with Kale
</p>
</div>
)}
</div>

Expand Down