Skip to content

Commit

Permalink
chore: bump deps + lint props
Browse files Browse the repository at this point in the history
  • Loading branch information
echarles committed Aug 16, 2023
1 parent 4a2561a commit 23831f0
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 88 deletions.
4 changes: 2 additions & 2 deletions dev/config/jupyter_server_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
# URLs
#################

# c.ServerApp.base_url = '/api/jupyter'
# c.ServerApp.default_url = '/api/jupyter/lab'
c.ServerApp.base_url = '/'
c.ServerApp.default_url = '/jupyter_rtc_test/get_config'

#################
# Kernel
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ The WebSocket connector for `Ypy` is developed in https://github.com/y-crdt/ypy-

## 7. Jupyter Collaboration

The JupyterLab extension that delivers the RTC functionality to the end-user is developed in https://github.com/jupyterlab/jupyter_collaboration.
The `JupyterLab Collaboration` extension that delivers the RTC functionality to the end-user is developed in https://github.com/jupyterlab/jupyter_collaboration.
11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ classifiers = [
]
dependencies = [
"jupyter_server>=2.0,<3",
"y_py",
"ypy_websocket",
"jupyter_ydoc",
"y_py==0.6.0",
"ypy_websocket===0.12.1",
"jupyter_ydoc==1.1.0a0",
"jupyterlab==4.0.3",
"jupyter_collaboration",
"jupyter_collaboration==1.1.0",
"websockets",
"uvicorn",
]
dynamic = ["version", "description", "authors", "urls", "keywords"]
Expand All @@ -41,8 +42,6 @@ test = [
"pytest",
"pytest-asyncio",
"pytest-cov",
"ypy-websocket",
"websockets",
]

[tool.hatch.version]
Expand Down
92 changes: 22 additions & 70 deletions src/components/stress/tabs/charts/UsersGauge.tsx
Original file line number Diff line number Diff line change
@@ -1,72 +1,27 @@
import ReactEChartsCore from 'echarts-for-react/lib/core';
import * as echarts from 'echarts/core';
import {
// LineChart,
BarChart,
// PieChart,
// ScatterChart,
// RadarChart,
// MapChart,
// TreeChart,
// TreemapChart,
// GraphChart,
GaugeChart,
// FunnelChart,
// ParallelChart,
// SankeyChart,
// BoxplotChart,
// CandlestickChart,
// EffectScatterChart,
// LinesChart,
// HeatmapChart,
// PictorialBarChart,
// ThemeRiverChart,
// SunburstChart,
// CustomChart,
} from 'echarts/charts';
// import components, all suffixed with Component
import {
// GridSimpleComponent,
GridComponent,
// PolarComponent,
// RadarComponent,
// GeoComponent,
// SingleAxisComponent,
// ParallelComponent,
// CalendarComponent,
// GraphicComponent,
// ToolboxComponent,
TooltipComponent,
// AxisPointerComponent,
// BrushComponent,
TitleComponent,
// TimelineComponent,
// MarkPointComponent,
// MarkLineComponent,
// MarkAreaComponent,
// LegendComponent,
// LegendScrollComponent,
// LegendPlainComponent,
// DataZoomComponent,
// DataZoomInsideComponent,
// DataZoomSliderComponent,
// VisualMapComponent,
// VisualMapContinuousComponent,
// VisualMapPiecewiseComponent,
// AriaComponent,
// TransformComponent,
// DatasetComponent,
} from 'echarts/components';
import {
CanvasRenderer,
// SVGRenderer,
} from 'echarts/renderers';
import { BarChart, GaugeChart } from 'echarts/charts';
import { GridComponent, TooltipComponent, TitleComponent } from 'echarts/components';
import { CanvasRenderer } from 'echarts/renderers';

echarts.use(
[TitleComponent, TooltipComponent, GridComponent, BarChart, CanvasRenderer, GaugeChart]
[
BarChart,
CanvasRenderer,
GaugeChart,
GridComponent,
TitleComponent,
TooltipComponent,
]
);

const StackedGauge = (props: { title: string, ok: number, nok: number }) => {
type Props = {
title: string,
ok: number,
nok: number,
}

const StackedGauge = (props: Props) => {
const { title, ok, nok } = props;
const total = ok + nok;
const option = {
Expand Down Expand Up @@ -101,14 +56,11 @@ const StackedGauge = (props: { title: string, ok: number, nok: number }) => {
style={{ height: 400 }}
notMerge={true}
lazyUpdate={true}
// theme={"theme_name"}
// onChartReady={this.onChartReadyCallback}
// onEvents={EventsDict}
/>
/>
);
};
}

const UsersGauge = (props: { title: string, ok: number, nok: number }) => {
const UsersGauge = (props: Props) => {
const { title, ok, nok } = props;
return (
<>
Expand All @@ -118,7 +70,7 @@ const UsersGauge = (props: { title: string, ok: number, nok: number }) => {
<></>
}
</>
)
);
}

export default UsersGauge;
11 changes: 3 additions & 8 deletions src/jupyterlab/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'
import { ISettingRegistry } from '@jupyterlab/settingregistry';
import { MainAreaWidget, ICommandPalette } from '@jupyterlab/apputils';
import { ILauncher } from '@jupyterlab/launcher';
import { LabIcon } from '@jupyterlab/ui-components';
import { requestAPI } from './handler';
import { JupyterRTCTestWidget } from './widget';
import jupyterRtcTestSvg from '../../style/svg/jupyter-rtc-test.icon.svg';
import icon from '@datalayer/icons-react/data1/MobileSignalIconLabIcon';

import './../../style/index.css';

Expand All @@ -32,19 +31,15 @@ const plugin: JupyterFrontEndPlugin<void> = {
) => {
const { commands } = app;
const command = CommandIDs.create;
const jupyterRtcTestIcon = new LabIcon({
name: 'jupyter-rtc-test:icon',
svgstr: jupyterRtcTestSvg,
});
commands.addCommand(command, {
caption: 'Show Jupyter RTC Test',
label: 'Jupyter RTC Test',
icon: (args: any) => jupyterRtcTestIcon,
icon,
execute: () => {
const content = new JupyterRTCTestWidget();
const widget = new MainAreaWidget<JupyterRTCTestWidget>({ content });
widget.title.label = 'Jupyter RTC Test';
widget.title.icon = jupyterRtcTestIcon;
widget.title.icon = icon;
app.shell.add(widget, 'main');
}
});
Expand Down
1 change: 0 additions & 1 deletion style/svg/jupyter-rtc-test.icon.svg

This file was deleted.

0 comments on commit 23831f0

Please sign in to comment.