Skip to content

Commit 2c8e839

Browse files
committed
updated LASSO results
1 parent 6783e72 commit 2c8e839

73 files changed

Lines changed: 221 additions & 308 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lasso/src/components/Graph/graph.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import Grid from '@mui/material/Grid2';
33

44
import { Graph } from "react-d3-graph";
55

6-
import { HubExamples } from '../HubFeatures/HubFeatures';
7-
8-
const GraphComponent = ({ exampleId }: any) => {
9-
const code = HubExamples.MAP[exampleId].lsl
10-
6+
const GraphComponent = ({ code }: any) => {
117
const actionRegex = /action\(name: '(.*?)'\)/g;
128
const includeRegex = /include \'(.*?)'/g;
139
const dependsOnRegex = /dependsOn \'(.*?)'/g;

lasso/src/pages/hub.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const HubPage = () => {
164164
</CustomTabPanel>
165165
<CustomTabPanel value={value} index={1}>
166166
<Typography variant="h5" component="div">
167-
<GraphComponent exampleId={currentExampleId} />
167+
<GraphComponent code={HubExamples.MAP[currentExampleId].lsl} />
168168
</Typography>
169169
</CustomTabPanel>
170170
<CustomTabPanel value={value} index={2}>

lasso/src/pages/labs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ The project is actively developed by **David Cebulla**, a business informatics s
2323

2424
### Preview
2525

26-
Visit the Project Website: Explore the preview version of LSLFlow here: [LSLFlow](https://softwareobservatorium.github.io/lslflow/)
26+
Visit the Project Website: Explore the preview version of LSLFlow here: [LSLFlow](https://softwareobservatorium.github.io/lslflow/).

lasso/src/pages/lasso/result.tsx

Lines changed: 60 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
1818
import Code from '@mui/icons-material/Code';
1919
import ActuationSheet from '@site/src/components/Sheet/ActuationSheet';
2020
import SheetService from '@site/src/components/Sheet/SheetService';
21+
import AuthService from '@site/src/services/AuthService';
22+
import { Editor } from '@monaco-editor/react';
23+
import GraphComponent from '@site/src/components/Graph/graph';
2124

2225
interface TabPanelProps {
2326
children?: React.ReactNode;
@@ -104,6 +107,26 @@ const ResultPage = () => {
104107
)
105108
};
106109

110+
const login = async () => {
111+
await AuthService.loginDefault().then(
112+
(response) => {
113+
// login successful
114+
console.log("Successfully logged in")
115+
},
116+
(error) => {
117+
const resMessage =
118+
(error.response &&
119+
error.response.data &&
120+
error.response.data.message) ||
121+
error.message ||
122+
error.toString();
123+
124+
// FIXME
125+
console.log("Login attempt failed " + error)
126+
}
127+
)
128+
}
129+
107130
const queryScript = (forAction: string) => {
108131
const request = new SearchSrmQueryRequest()
109132
request.executionId = executionId
@@ -137,6 +160,9 @@ const ResultPage = () => {
137160
};
138161

139162
useEffect(() => {
163+
// login
164+
login()
165+
140166
intervalRef.current = setInterval(() => {
141167
checkScriptJobStatus();
142168
console.log(JSON.stringify(scriptInfo));
@@ -165,6 +191,16 @@ DRAFT
165191
return () => clearInterval(intervalRef.current);
166192
})
167193

194+
const editorRef = useRef<any>(null);
195+
const monacoRef = useRef<any>(null);
196+
197+
function handleEditorDidMount(editor: any, monaco: any) {
198+
monaco.languages.register({ id: 'java' });
199+
200+
monacoRef.current = monaco;
201+
editorRef.current = editor;
202+
}
203+
168204
return (
169205
<Layout>
170206
<Head>
@@ -186,6 +222,7 @@ DRAFT
186222
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
187223
<Tabs value={value} onChange={handleChange} aria-label="basic tabs example">
188224
<Tab label="Overview" {...a11yProps(0)} />
225+
<Tab label="LSL Pipeline" {...a11yProps(1)} />
189226
{/* {scriptInfo.status === "SUCCESSFUL" ?
190227
<>
191228
<Tab label="SRM Explorer" {...a11yProps(1)} />
@@ -194,19 +231,19 @@ DRAFT
194231
</>
195232
: null} */}
196233
{scriptInfo.status === "SUCCESSFUL" ?
197-
<Tab label="SRM Explorer" {...a11yProps(1)} />
234+
<Tab label="SRM Explorer" {...a11yProps(2)} />
198235
: null}
199236
{scriptInfo.status === "SUCCESSFUL" ?
200-
<Tab label="JupyterLab" {...a11yProps(2)} />
237+
<Tab label="JupyterLab" {...a11yProps(3)} />
201238
: null}
202239
{scriptInfo.status === "SUCCESSFUL" ?
203-
<Tab label="Export" {...a11yProps(3)} />
240+
<Tab label="Export" {...a11yProps(4)} />
204241
: null}
205242
</Tabs>
206243
</Box>
207244
<CustomTabPanel value={value} index={0}>
208245
<Typography variant="h5" component="div">
209-
<p>The execution status of your LSL is <code>{scriptInfo.status}</code> (started {scriptInfo.start})</p>
246+
<p>The execution status of your LSL is <code>{scriptInfo.status}</code> (started {scriptInfo.start.toLocaleString()})</p>
210247
{scriptInfo.status === "PENDING" ?
211248
<CircularProgress size="3rem" /> : null}
212249
</Typography>
@@ -329,20 +366,36 @@ DRAFT
329366
: null}
330367

331368
</CustomTabPanel>
369+
<CustomTabPanel value={value} index={1}>
370+
<CardContent>
371+
<Typography sx={{ margin: 2 }} variant="h5" component="div">LSL Pipeline Viewer<Typography variant="h6" component="div">Explore the study and actions</Typography></Typography>
372+
<Typography variant="h5" component="div">
373+
<Editor
374+
height="500px"
375+
defaultLanguage="java"
376+
defaultValue={scriptInfo.content}
377+
onMount={handleEditorDidMount} />
378+
</Typography>
379+
<br/><Divider/><br/>
380+
<Typography variant="h5" component="div">Graph Viewer
381+
<GraphComponent code={scriptInfo.content} />
382+
</Typography>
383+
</CardContent>
384+
</CustomTabPanel>
332385
{scriptInfo.status === "SUCCESSFUL" ?
333386
<>
334-
<CustomTabPanel value={value} index={1}>
387+
<CustomTabPanel value={value} index={2}>
335388
<SrmViewer fileName={LassoService.retrieveParquetUrl(scriptInfo.executionId)} />
336389
</CustomTabPanel>
337-
<CustomTabPanel value={value} index={2}>
390+
<CustomTabPanel value={value} index={3}>
338391
<React.Fragment>
339392
<Typography variant="h6" component="div">Analyze SRM Data in Jupyter Lite (WASM powered Juyper running in the browser!)</Typography>
340393
<Typography component="div">(note: you can also download the Notebook and run it in your local Juypter environment)</Typography>
341394
<br />
342395
<p><Link target="_blank" href={`${LassoService.API_URL}notebooks/lab/index.html?fromURL=${LassoService.API_URL}publicapi/v1/lasso/analytics/srm/${scriptInfo.executionId}.ipynb`}>Open Notebook</Link></p>
343396
</React.Fragment>
344397
</CustomTabPanel>
345-
<CustomTabPanel value={value} index={3}>
398+
<CustomTabPanel value={value} index={4}>
346399
<React.Fragment>
347400
<Typography variant="h6" component="div">Export SRM data as Parquet File</Typography>
348401
<p><Link target="_blank" href={LassoService.retrieveParquetUrl(scriptInfo.executionId)}>Download Link</Link></p>

lasso/src/pages/lasso/submit.tsx

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const SubmitPage = () => {
7474
};
7575

7676
const execute = async (lslRequest: LslRequest) => {
77-
return await Promise.all([AuthService.loginDefault().then(
77+
await AuthService.loginDefault().then(
7878
(response) => {
7979
// login successful
8080
console.log("Successfully logged in")
@@ -90,7 +90,9 @@ const SubmitPage = () => {
9090
// FIXME
9191
console.log("Login attempt failed " + error)
9292
}
93-
), LassoService.execute(lslRequest).then(
93+
)
94+
95+
await LassoService.execute(lslRequest).then(
9496
(response) => {
9597
let lslResponse: LslResponse = response.data
9698
console.log("Successfully executed. Execution ID is " + lslResponse.executionId)
@@ -109,7 +111,44 @@ const SubmitPage = () => {
109111
// FIXME
110112
console.log("Execute attempt failed " + error)
111113
}
112-
)])
114+
)
115+
116+
// return await Promise.all([AuthService.loginDefault().then(
117+
// (response) => {
118+
// // login successful
119+
// console.log("Successfully logged in")
120+
// },
121+
// (error) => {
122+
// const resMessage =
123+
// (error.response &&
124+
// error.response.data &&
125+
// error.response.data.message) ||
126+
// error.message ||
127+
// error.toString();
128+
129+
// // FIXME
130+
// console.log("Login attempt failed " + error)
131+
// }
132+
// ), LassoService.execute(lslRequest).then(
133+
// (response) => {
134+
// let lslResponse: LslResponse = response.data
135+
// console.log("Successfully executed. Execution ID is " + lslResponse.executionId)
136+
137+
// // redirect to result page
138+
// history.push(`./result?executionId=${lslResponse.executionId}`)
139+
// },
140+
// (error) => {
141+
// const resMessage =
142+
// (error.response &&
143+
// error.response.data &&
144+
// error.response.data.message) ||
145+
// error.message ||
146+
// error.toString();
147+
148+
// // FIXME
149+
// console.log("Execute attempt failed " + error)
150+
// }
151+
// )])
113152
};
114153

115154
const editorRef = useRef<any>(null);

lasso/src/services/LassoService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const execute = (request: LslRequest) => {
1414
};
1515

1616
const getScriptJobStatus = (executionId: string) => {
17-
return axios.get(`${API_URL}api/v1/lasso/scripts/${executionId}/status`, { headers: authHeader() });
17+
return axios.get(`${API_URL}api/v1/lasso/scripts/${executionId}`, { headers: authHeader() });
1818
};
1919

2020
const queryScript = (request: SearchSrmQueryRequest) => {

web/404.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

web/about/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta name="generator" content="Docusaurus v3.7.0">
66
<title data-rh="true">About LASSO | LASSO</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://softwareobservatorium.github.io/web/img/docusaurus-social-card.jpg"><meta data-rh="true" name="twitter:image" content="https://softwareobservatorium.github.io/web/img/docusaurus-social-card.jpg"><meta data-rh="true" property="og:url" content="https://softwareobservatorium.github.io/web/about"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="About LASSO | LASSO"><meta data-rh="true" name="description" content="Team / Authors"><meta data-rh="true" property="og:description" content="Team / Authors"><link data-rh="true" rel="icon" href="/web/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://softwareobservatorium.github.io/web/about"><link data-rh="true" rel="alternate" href="https://softwareobservatorium.github.io/web/about" hreflang="en"><link data-rh="true" rel="alternate" href="https://softwareobservatorium.github.io/web/about" hreflang="x-default"><link rel="alternate" type="application/rss+xml" href="/web/blog/rss.xml" title="LASSO RSS Feed">
77
<link rel="alternate" type="application/atom+xml" href="/web/blog/atom.xml" title="LASSO Atom Feed"><link rel="stylesheet" href="/web/assets/css/styles.fb9580f6.css">
8-
<script src="/web/assets/js/runtime~main.e163d23e.js" defer="defer"></script>
9-
<script src="/web/assets/js/main.5032f80e.js" defer="defer"></script>
8+
<script src="/web/assets/js/runtime~main.70c59c6e.js" defer="defer"></script>
9+
<script src="/web/assets/js/main.ed028fa9.js" defer="defer"></script>
1010
</head>
1111
<body class="navigation-with-keyboard">
1212
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const n=new URLSearchParams(window.location.search).entries();for(var[t,e]of n)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><script>!function(){try{let e="";const t=localStorage.getItem("mui-mode")||"system",o=localStorage.getItem("mui-color-scheme-dark")||"dark",c=localStorage.getItem("mui-color-scheme-light")||"light";if("system"===t){e=window.matchMedia("(prefers-color-scheme: dark)").matches?o:c}"light"===t&&(e=c),"dark"===t&&(e=o),e&&document.documentElement.setAttribute("data-color-scheme",e)}catch(e){}}()</script><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/web/"><div class="navbar__logo"><img src="/web/img/lasso_logo_trans.png" alt="LASSO Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/web/img/lasso_logo_trans.png" alt="LASSO Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate">LASSO</b></a><a class="navbar__item navbar__link" href="/web/docs/intro">Documentation</a><a class="navbar__item navbar__link" href="/web/hub">TDSEHub (Pipelines)</a><a class="navbar__item navbar__link" href="/web/labs">Labs (Playground)</a><a class="navbar__item navbar__link" href="/web/blog">Blog</a><a class="navbar__item navbar__link" href="/web/research/intro">Research</a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/SoftwareObservatorium/lasso" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)" aria-live="polite" aria-pressed="false"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><main class="container container--fluid margin-vert--lg"><div class="row mdxPageWrapper_j9I6"><div class="col col--8"><article><header><h1>About LASSO</h1></header>

0 commit comments

Comments
 (0)