Skip to content

Commit

Permalink
add streaming logs to logs header & add log exporting
Browse files Browse the repository at this point in the history
add prevent editing nodes if pipeline running
  • Loading branch information
Armaldio committed Jan 17, 2025
1 parent 86b7fe4 commit b467271
Show file tree
Hide file tree
Showing 9 changed files with 310 additions and 22 deletions.
6 changes: 5 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ Active cancel button to not be locked out
Simple mode: also allow to pick variables & such
QuickJS: memory leak, open close action
Add own timers for electorn export & such
si tu appuies sur New Project, puis que tu selectionne direct le dropdown pour choisir Local/Cloud, ça ferme le popup et c'est impossible de rappuyer sur New Project
C3 Preview ne fonctionne pas
Steam achievement test c3 example
Filesystem plugin: overwrite parameter + better sentences/descriptions

Convert dektop app to web app + node backend
Communication via rest api (for now) or websocket

vérifier que le fichier custom main existe sinon ca lance une erreur
https://playwright.dev/docs/browsers#opt-in-to-new-headless-mode
Docs sur Electron
Docs sur les logs
3 changes: 3 additions & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ declare module 'vue' {
Skeleton: typeof import('primevue/skeleton')['default']
Toast: typeof import('primevue/toast')['default']
}
export interface ComponentCustomProperties {
Tooltip: typeof import('primevue/tooltip')['default']
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"semver": "7.6.3",
"set-value": "4.1.0",
"slash": "5.1.0",
"string-strip-html": "13.4.8",
"thememirror": "2.0.1",
"tinykeys": "2.1.0",
"ts-deepmerge": "7.0.1",
Expand Down
108 changes: 108 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 23 additions & 6 deletions src/renderer/components/AddNodeButton.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<template>
<div class="add-button-wrapper">
<div class="vl"></div>
<Button v-bind="buttonProps" class="add-btn" size="small" @click="addNode"></Button>
<Button
:disabled="isRunning"
v-bind="buttonProps"
class="add-btn"
size="small"
@click="addNode"
></Button>
<!-- <pre>{{ path }}</pre> -->
<div class="vl"></div>

<Dialog :closable="false" v-model:visible="visible" modal header="" :style="{ width: '75%' }">
<Dialog v-model:visible="visible" :closable="false" modal header="" :style="{ width: '75%' }">
<template #header>
<div class="flex flex-column w-full">
<p class="text-xl">Add plugin</p>
Expand Down Expand Up @@ -43,8 +49,8 @@
v-for="node in plugin.nodes"
:key="node.node.id"
class="flex node-item"
@click="selected = { nodeId: node.node.id, pluginId: plugin.id }"
:disabled="node.disabled"
@click="selected = { nodeId: node.node.id, pluginId: plugin.id }"
>
<a
class="element flex align-items-center p-3 border-round w-full transition-colors transition-duration-150 cursor-pointer"
Expand All @@ -57,7 +63,11 @@
<span class="flex flex-column">
<span class="font-bold mb-1"> {{ node.node.name }}</span>
<span class="m-0 text-secondary"> {{ node.node.description }}</span>
<span class="m-0 text-secondary font-bold" v-if="typeof node.disabled === 'string'">{{ node.disabled }}</span>
<span
v-if="typeof node.disabled === 'string'"
class="m-0 text-secondary font-bold"
>{{ node.disabled }}</span
>
</span>
</a>
</li>
Expand Down Expand Up @@ -104,10 +114,15 @@ const props = defineProps({
path: {
type: Array as PropType<string[]>,
required: true
},
isRunning: {
type: Boolean,
required: false,
default: false
}
})
const { path } = toRefs(props)
const { path, isRunning } = toRefs(props)
const instance = useEditor()
const appStore = useAppStore()
Expand All @@ -131,7 +146,9 @@ watchEffect(() => {
const selected = ref<{ nodeId: string; pluginId: string }>()
const addNode = () => {
visible.value = true
if (!isRunning.value) {
visible.value = true
}
}
const editor = useEditor()
Expand Down
24 changes: 19 additions & 5 deletions src/renderer/components/nodes/EditorNodeAction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
:class="{
active: activeNode?.uid === value.uid,
error: Object.keys(errors).length > 0,
disabled: value.disabled
disabled: value.disabled || isRunning
}"
@click="showSidebar = true"
@click="onNodeClick"
>
<!-- <div class="hover-overlay">
<div class="hover-overlay-content">
Expand Down Expand Up @@ -105,8 +105,8 @@
:value="value"
:steps="steps"
:variables="variables"
@update:model-value="onValueChanged($event, key.toString())"
:vm="vm"
@update:model-value="onValueChanged($event, key.toString())"
></ParamEditor>
</div>
</div>
Expand All @@ -128,6 +128,7 @@
:button-props="{ size: 'small', icon: 'pi pi-plus' }"
class="add-btn"
:path="path"
:is-running="isRunning"
@add-node="addNode"
>
</AddNodeButton>
Expand Down Expand Up @@ -173,11 +174,16 @@ const props = defineProps({
type: Object as PropType<Record<string, ValidationError[]>>,
required: false,
default: () => ({})
},
isRunning: {
type: Boolean,
required: false,
default: false
}
})
const menu = ref()
const { value, steps, index } = toRefs(props)
const { value, steps, index, isRunning } = toRefs(props)
/*
<div class="left">
Expand Down Expand Up @@ -292,7 +298,9 @@ const items = computed<MenuItem[]>(() => [
])
const toggle = (event: MouseEvent) => {
menu.value.toggle(event)
if (!isRunning.value) {
menu.value.toggle(event)
}
}
const $node = ref<HTMLDivElement>()
Expand Down Expand Up @@ -401,6 +409,12 @@ watchDebounced(
const showSidebar = ref(false)
const onNodeClick = () => {
if (!isRunning.value) {
showSidebar.value = true
}
}
const hasErrored = computed(() => {
return false
})
Expand Down
Loading

0 comments on commit b467271

Please sign in to comment.