Fix lints and deprecation warnings (#768)
This commit is contained in:
parent
9a06de0e64
commit
ef7ce25c03
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
|
@ -22,9 +22,9 @@
|
||||||
"@hyper-tuner/ini": "^0.4.0",
|
"@hyper-tuner/ini": "^0.4.0",
|
||||||
"@hyper-tuner/types": "^0.4.0",
|
"@hyper-tuner/types": "^0.4.0",
|
||||||
"@reduxjs/toolkit": "^1.8.5",
|
"@reduxjs/toolkit": "^1.8.5",
|
||||||
"@sentry/react": "^7.13.0",
|
"@sentry/react": "^7.14.1",
|
||||||
"@sentry/tracing": "^7.13.0",
|
"@sentry/tracing": "^7.14.1",
|
||||||
"antd": "^4.23.2",
|
"antd": "^4.23.4",
|
||||||
"appwrite": "^9.0.2",
|
"appwrite": "^9.0.2",
|
||||||
"kbar": "^0.1.0-beta.36",
|
"kbar": "^0.1.0-beta.36",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
|
@ -40,19 +40,19 @@
|
||||||
"react-router-dom": "^6.4.1",
|
"react-router-dom": "^6.4.1",
|
||||||
"uplot": "^1.6.22",
|
"uplot": "^1.6.22",
|
||||||
"uplot-react": "^1.1.1",
|
"uplot-react": "^1.1.1",
|
||||||
"vite": "^3.1.3"
|
"vite": "^3.1.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@hyper-tuner/eslint-config": "^0.1.6",
|
"@hyper-tuner/eslint-config": "^0.1.6",
|
||||||
"@types/lodash.debounce": "^4.0.7",
|
"@types/lodash.debounce": "^4.0.7",
|
||||||
"@types/node": "^18.7.22",
|
"@types/node": "^18.8.0",
|
||||||
"@types/pako": "^2.0.0",
|
"@types/pako": "^2.0.0",
|
||||||
"@types/react": "^18.0.21",
|
"@types/react": "^18.0.21",
|
||||||
"@types/react-dom": "^18.0.6",
|
"@types/react-dom": "^18.0.6",
|
||||||
"@types/react-redux": "^7.1.24",
|
"@types/react-redux": "^7.1.24",
|
||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.38.0",
|
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
||||||
"@typescript-eslint/parser": "^5.38.0",
|
"@typescript-eslint/parser": "^5.38.1",
|
||||||
"@vitejs/plugin-react": "^2.1.0",
|
"@vitejs/plugin-react": "^2.1.0",
|
||||||
"eslint": "^8.24.0",
|
"eslint": "^8.24.0",
|
||||||
"eslint-plugin-flowtype": "^8.0.3",
|
"eslint-plugin-flowtype": "^8.0.3",
|
||||||
|
@ -65,6 +65,6 @@
|
||||||
"less": "^4.1.3",
|
"less": "^4.1.3",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"rollup-plugin-visualizer": "^5.8.2",
|
"rollup-plugin-visualizer": "^5.8.2",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.8.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ import TriggerLogsParser, {
|
||||||
import ToothCanvas from '../components/TriggerLogs/ToothCanvas';
|
import ToothCanvas from '../components/TriggerLogs/ToothCanvas';
|
||||||
import Loader from '../components/Loader';
|
import Loader from '../components/Loader';
|
||||||
|
|
||||||
const { TabPane } = Tabs;
|
|
||||||
const { Content } = Layout;
|
const { Content } = Layout;
|
||||||
const { Step } = Steps;
|
const { Step } = Steps;
|
||||||
|
|
||||||
|
@ -148,14 +147,22 @@ const Diagnose = ({ ui, config, loadedLogs }: { ui: UIState, config: Config, loa
|
||||||
<Loader />
|
<Loader />
|
||||||
:
|
:
|
||||||
!ui.sidebarCollapsed &&
|
!ui.sidebarCollapsed &&
|
||||||
<Tabs defaultActiveKey="files" style={{ marginLeft: 20 }}>
|
<Tabs
|
||||||
<TabPane tab={<FileTextOutlined />} key="files">
|
defaultActiveKey="files"
|
||||||
<PerfectScrollbar options={{ suppressScrollX: true }}>
|
style={{ marginLeft: 20 }}
|
||||||
<Typography.Paragraph>tooth.csv</Typography.Paragraph>
|
items={[
|
||||||
<Typography.Paragraph>composite.csv</Typography.Paragraph>
|
{
|
||||||
</PerfectScrollbar>
|
label: <FileTextOutlined />,
|
||||||
</TabPane>
|
key: 'files',
|
||||||
</Tabs>
|
children: (
|
||||||
|
<PerfectScrollbar options={{ suppressScrollX: true }}>
|
||||||
|
<Typography.Paragraph>tooth.csv</Typography.Paragraph>
|
||||||
|
<Typography.Paragraph>composite.csv</Typography.Paragraph>
|
||||||
|
</PerfectScrollbar>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
</Sider>
|
</Sider>
|
||||||
<Layout style={{ width: '100%', textAlign: 'center', marginTop: 50 }}>
|
<Layout style={{ width: '100%', textAlign: 'center', marginTop: 50 }}>
|
||||||
|
|
|
@ -51,7 +51,6 @@ import {
|
||||||
} from '../types/state';
|
} from '../types/state';
|
||||||
import Loader from '../components/Loader';
|
import Loader from '../components/Loader';
|
||||||
|
|
||||||
const { TabPane } = Tabs;
|
|
||||||
const { Content } = Layout;
|
const { Content } = Layout;
|
||||||
const { Step } = Steps;
|
const { Step } = Steps;
|
||||||
const edgeUnknown = 'Unknown';
|
const edgeUnknown = 'Unknown';
|
||||||
|
@ -222,42 +221,56 @@ const Logs = ({
|
||||||
<Loader />
|
<Loader />
|
||||||
:
|
:
|
||||||
!ui.sidebarCollapsed &&
|
!ui.sidebarCollapsed &&
|
||||||
<Tabs defaultActiveKey="fields" style={{ marginLeft: 20 }}>
|
<Tabs
|
||||||
<TabPane tab={<EditOutlined />} key="fields">
|
defaultActiveKey="fields"
|
||||||
<div style={{ height: '45%' }}>
|
style={{ marginLeft: 20 }}
|
||||||
<PerfectScrollbar options={{ suppressScrollX: true }}>
|
items={[
|
||||||
<Checkbox.Group onChange={setSelectedFields1} value={selectedFields1}>
|
{
|
||||||
{fields.map((field) => (
|
label: <EditOutlined />,
|
||||||
<Row key={field.name}>
|
key: 'fields',
|
||||||
<Checkbox key={field.name} value={field.name}>
|
children: (
|
||||||
{isExpression(field.label) ? stripExpression(field.label) : field.label}
|
<>
|
||||||
</Checkbox>
|
<div style={{ height: '45%' }}>
|
||||||
</Row>
|
<PerfectScrollbar options={{ suppressScrollX: true }}>
|
||||||
))}
|
<Checkbox.Group onChange={setSelectedFields1} value={selectedFields1}>
|
||||||
</Checkbox.Group>
|
{fields.map((field) => (
|
||||||
</PerfectScrollbar>
|
<Row key={field.name}>
|
||||||
</div>
|
<Checkbox key={field.name} value={field.name}>
|
||||||
<Divider />
|
{isExpression(field.label) ? stripExpression(field.label) : field.label}
|
||||||
<div style={{ height: '45%' }}>
|
</Checkbox>
|
||||||
<PerfectScrollbar options={{ suppressScrollX: true }}>
|
</Row>
|
||||||
<Checkbox.Group onChange={setSelectedFields2} value={selectedFields2}>
|
))}
|
||||||
{fields.map((field) => (
|
</Checkbox.Group>
|
||||||
<Row key={field.name}>
|
</PerfectScrollbar>
|
||||||
<Checkbox key={field.name} value={field.name}>
|
</div>
|
||||||
{isExpression(field.label) ? stripExpression(field.label) : field.label}
|
<Divider />
|
||||||
</Checkbox>
|
<div style={{ height: '45%' }}>
|
||||||
</Row>
|
<PerfectScrollbar options={{ suppressScrollX: true }}>
|
||||||
))}
|
<Checkbox.Group onChange={setSelectedFields2} value={selectedFields2}>
|
||||||
</Checkbox.Group>
|
{fields.map((field) => (
|
||||||
</PerfectScrollbar>
|
<Row key={field.name}>
|
||||||
</div>
|
<Checkbox key={field.name} value={field.name}>
|
||||||
</TabPane>
|
{isExpression(field.label) ? stripExpression(field.label) : field.label}
|
||||||
<TabPane tab={<FileTextOutlined />} key="files">
|
</Checkbox>
|
||||||
<PerfectScrollbar options={{ suppressScrollX: true }}>
|
</Row>
|
||||||
some_tune.mlg
|
))}
|
||||||
</PerfectScrollbar>
|
</Checkbox.Group>
|
||||||
</TabPane>
|
</PerfectScrollbar>
|
||||||
</Tabs>
|
</div>
|
||||||
|
</>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: <FileTextOutlined />,
|
||||||
|
key: 'files',
|
||||||
|
children: (
|
||||||
|
<PerfectScrollbar options={{ suppressScrollX: true }}>
|
||||||
|
some_tune.mlg
|
||||||
|
</PerfectScrollbar>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
</Sider>
|
</Sider>
|
||||||
<Layout style={{ width: '100%', textAlign: 'center', marginTop: 50 }}>
|
<Layout style={{ width: '100%', textAlign: 'center', marginTop: 50 }}>
|
||||||
|
|
|
@ -35,7 +35,7 @@ const Tune = ({ config, tune }: { config: ConfigType | null, tune: TuneState })
|
||||||
const tuneId = tunePathMatch?.params.tuneId;
|
const tuneId = tunePathMatch?.params.tuneId;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (tune && config && tuneRootMatch) {
|
if (tune && config && tuneRootMatch && tuneId) {
|
||||||
const firstCategory = Object.keys(config!.menus)[0];
|
const firstCategory = Object.keys(config!.menus)[0];
|
||||||
const firstDialog = Object.keys(config!.menus[firstCategory].subMenus)[0];
|
const firstDialog = Object.keys(config!.menus[firstCategory].subMenus)[0];
|
||||||
|
|
||||||
|
|
|
@ -452,7 +452,7 @@ const UploadPage = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
setTuneIsLoading(false);
|
setTuneIsLoading(false);
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [currentUser, form, navigateToNewTuneId]);
|
}, [currentUser, form, navigateToNewTuneId]);
|
||||||
|
|
||||||
const prepareData = useCallback(async () => {
|
const prepareData = useCallback(async () => {
|
||||||
|
@ -631,26 +631,38 @@ const UploadPage = () => {
|
||||||
<Typography.Text type="secondary">(markdown)</Typography.Text>
|
<Typography.Text type="secondary">(markdown)</Typography.Text>
|
||||||
</Space>
|
</Space>
|
||||||
</Divider>
|
</Divider>
|
||||||
<Tabs defaultActiveKey="source" className="upload-readme">
|
<Tabs
|
||||||
<Tabs.TabPane tab="Edit" key="source" style={{ height: descriptionEditorHeight }}>
|
defaultActiveKey="source"
|
||||||
<Item name="readme">
|
className="upload-readme"
|
||||||
<Input.TextArea
|
items={[
|
||||||
rows={10}
|
{
|
||||||
showCount
|
label: 'Edit',
|
||||||
value={readme}
|
key: 'source',
|
||||||
onChange={(e) => setReadme(e.target.value)}
|
style: { height: descriptionEditorHeight },
|
||||||
maxLength={3_000}
|
children: (
|
||||||
/>
|
<Input.TextArea
|
||||||
</Item>
|
rows={10}
|
||||||
</Tabs.TabPane>
|
showCount
|
||||||
<Tabs.TabPane tab="Preview" key="preview" style={{ height: descriptionEditorHeight }}>
|
value={readme}
|
||||||
<div className="markdown-preview">
|
onChange={(e) => setReadme(e.target.value)}
|
||||||
<ReactMarkdown>
|
maxLength={3_000}
|
||||||
{readme}
|
/>
|
||||||
</ReactMarkdown>
|
),
|
||||||
</div>
|
},
|
||||||
</Tabs.TabPane>
|
{
|
||||||
</Tabs>
|
label: 'Preview',
|
||||||
|
key: 'preview',
|
||||||
|
style: { height: descriptionEditorHeight },
|
||||||
|
children: (
|
||||||
|
<div className="markdown-preview">
|
||||||
|
<ReactMarkdown>
|
||||||
|
{readme}
|
||||||
|
</ReactMarkdown>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue