Skip to content

Commit

Permalink
Merge branch 'main' into dashboard2-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Carson-Shaar authored Jan 22, 2024
2 parents fe81a50 + f07cf86 commit e718d70
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = zero-true
description = A collaborative notebook built for data scientists
long_description = file: README.md
long_description_content_type = text/markdown
version = 0.0.dev43
version = 0.0.dev45

[options]
include_package_data = true
Expand Down
7 changes: 7 additions & 0 deletions zt_backend/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from zt_backend.config import settings
from zt_backend.utils import *
from zt_backend.runner.user_state import UserState
from fastapi.responses import HTMLResponse
import logging
import site
import duckdb
Expand Down Expand Up @@ -71,6 +72,7 @@ def kill(self):

router = APIRouter()
manager = ConnectionManager()
current_path = os.path.dirname(os.path.abspath(__file__))

#connect to db for saving notebook
notebook_db_dir = site.USER_SITE+'/.zero_true/'
Expand All @@ -95,6 +97,11 @@ def kill(self):

logger = logging.getLogger("__name__")

@router.get("/app", response_class=HTMLResponse)
async def catch_all():
if(run_mode=='dev'):
return HTMLResponse(open(os.path.join(current_path, "dist_dev", "index.html")).read())

@router.get("/health")
def health():
return('UP')
Expand Down
6 changes: 3 additions & 3 deletions zt_frontend/src/components/CodeCellManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:completions="completions[codeCell.id]"
@runCode="runCode"
@saveCell="saveCell"
@componentChange="componentValueChange"
@componentValueChange="componentValueChange"
@deleteCell="deleteCell"
@createCell="createCodeCell"
/>
Expand All @@ -36,7 +36,7 @@
:cellData="codeCell"
@runCode="runCode"
@saveCell="saveCell"
@componentChange="componentValueChange"
@componentValueChange="componentValueChange"
@deleteCell="deleteCell"
@createCell="createCodeCell"
/>
Expand Down Expand Up @@ -132,7 +132,7 @@ export default {
componentId: string,
componentValue: any
) {
this.$emit("componentChange", cell, componentId, componentValue);
this.$emit("componentValueChange", cell, componentId, componentValue);
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion zt_frontend/src/components/CodeComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export default {
runCode(fromComponent: boolean, componentId: string, componentValue: any) {
if (!this.$devMode && fromComponent) {
this.$emit(
"componentChange",
"componentValueChange",
this.cellData.id,
componentId,
componentValue
Expand Down

0 comments on commit e718d70

Please sign in to comment.