mirror of
https://github.com/sasjs/server.git
synced 2026-01-15 01:40:05 +00:00
fix(web): sticky tabs on Studio + extra run code button removed
This commit is contained in:
@@ -40,9 +40,7 @@ const Studio = () => {
|
|||||||
return selection ?? ''
|
return selection ?? ''
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleRunSelectionBtnClick = () => runCode(getSelection())
|
const handleRunBtnClick = () => runCode(getSelection() || fileContent)
|
||||||
|
|
||||||
const handleRunBtnClick = () => runCode(fileContent)
|
|
||||||
|
|
||||||
const runCode = (code: string) => {
|
const runCode = (code: string) => {
|
||||||
axios
|
axios
|
||||||
@@ -102,7 +100,13 @@ const Studio = () => {
|
|||||||
<br />
|
<br />
|
||||||
<Box sx={{ width: '100%', typography: 'body1' }}>
|
<Box sx={{ width: '100%', typography: 'body1' }}>
|
||||||
<TabContext value={tab}>
|
<TabContext value={tab}>
|
||||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
<Box
|
||||||
|
sx={{
|
||||||
|
borderBottom: 1,
|
||||||
|
borderColor: 'divider'
|
||||||
|
}}
|
||||||
|
style={{ position: 'fixed', background: 'white', width: '100%' }}
|
||||||
|
>
|
||||||
<TabList onChange={handleTabChange} centered>
|
<TabList onChange={handleTabChange} centered>
|
||||||
<Tab className={classes.root} label="Code" value="1" />
|
<Tab className={classes.root} label="Code" value="1" />
|
||||||
<Tab className={classes.root} label="Log" value="2" />
|
<Tab className={classes.root} label="Log" value="2" />
|
||||||
@@ -114,6 +118,7 @@ const Studio = () => {
|
|||||||
<Paper
|
<Paper
|
||||||
sx={{
|
sx={{
|
||||||
height: '70vh',
|
height: '70vh',
|
||||||
|
marginTop: '50px',
|
||||||
padding: '10px',
|
padding: '10px',
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
position: 'relative'
|
position: 'relative'
|
||||||
@@ -137,16 +142,20 @@ const Studio = () => {
|
|||||||
<Button variant="contained" onClick={handleRunBtnClick}>
|
<Button variant="contained" onClick={handleRunBtnClick}>
|
||||||
Run SAS Code
|
Run SAS Code
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="contained" onClick={handleRunSelectionBtnClick}>
|
|
||||||
Run Selected SAS Code
|
|
||||||
</Button>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel value="2">
|
<TabPanel value="2">
|
||||||
<div dangerouslySetInnerHTML={{ __html: log }} />
|
<div
|
||||||
|
id="sas_log"
|
||||||
|
style={{ marginTop: '50px' }}
|
||||||
|
dangerouslySetInnerHTML={{ __html: log }}
|
||||||
|
/>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel value="3">
|
<TabPanel value="3">
|
||||||
<div dangerouslySetInnerHTML={{ __html: webout }} />
|
<div
|
||||||
|
style={{ marginTop: '50px' }}
|
||||||
|
dangerouslySetInnerHTML={{ __html: webout }}
|
||||||
|
/>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
</TabContext>
|
</TabContext>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in New Issue
Block a user