Merge pull request #1367 from Budibase/fix/automation-fields
fix automation fields
This commit is contained in:
commit
010b8fc3fc
|
@ -24,7 +24,7 @@
|
||||||
automation,
|
automation,
|
||||||
})
|
})
|
||||||
notifier.success("Automation deleted.")
|
notifier.success("Automation deleted.")
|
||||||
$goto('../automate')
|
$goto("../automate")
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { backendUiStore } from "builderStore"
|
import { backendUiStore } from "builderStore"
|
||||||
import { Select } from "@budibase/bbui"
|
import { Select, Label } from "@budibase/bbui"
|
||||||
import DrawerBindableInput from "../../common/DrawerBindableInput.svelte"
|
import DrawerBindableInput from "../../common/DrawerBindableInput.svelte"
|
||||||
import AutomationBindingPanel from "./AutomationBindingPanel.svelte"
|
import AutomationBindingPanel from "./AutomationBindingPanel.svelte"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { Icon, Input, Drawer, Body, Button } from "@budibase/bbui"
|
import { Icon, Input, Drawer, Label, Body, Button } from "@budibase/bbui"
|
||||||
import {
|
import {
|
||||||
readableToRuntimeBinding,
|
readableToRuntimeBinding,
|
||||||
runtimeToReadableBinding,
|
runtimeToReadableBinding,
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
export let thin = true
|
export let thin = true
|
||||||
export let title = "Bindings"
|
export let title = "Bindings"
|
||||||
export let placeholder
|
export let placeholder
|
||||||
|
export let label
|
||||||
|
|
||||||
let bindingDrawer
|
let bindingDrawer
|
||||||
|
|
||||||
|
@ -32,6 +33,7 @@
|
||||||
|
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<Input
|
<Input
|
||||||
|
{label}
|
||||||
{thin}
|
{thin}
|
||||||
value={readableValue}
|
value={readableValue}
|
||||||
on:change={event => onChange(event.target.value)}
|
on:change={event => onChange(event.target.value)}
|
||||||
|
@ -67,7 +69,6 @@
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
right: 2px;
|
right: 2px;
|
||||||
top: 2px;
|
|
||||||
bottom: 2px;
|
bottom: 2px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -80,7 +81,9 @@
|
||||||
border-bottom-right-radius: var(--border-radius-m);
|
border-bottom-right-radius: var(--border-radius-m);
|
||||||
color: var(--grey-7);
|
color: var(--grey-7);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon:hover {
|
.icon:hover {
|
||||||
color: var(--ink);
|
color: var(--ink);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -119,11 +119,13 @@
|
||||||
{#if deployment.status.toLowerCase() === 'pending'}
|
{#if deployment.status.toLowerCase() === 'pending'}
|
||||||
<Spinner size="10" />
|
<Spinner size="10" />
|
||||||
{/if}
|
{/if}
|
||||||
<div on:click={() => showErrorReasonModal(deployment.err)} class={`deployment-status ${deployment.status}`}>
|
<div
|
||||||
|
on:click={() => showErrorReasonModal(deployment.err)}
|
||||||
|
class={`deployment-status ${deployment.status}`}>
|
||||||
<span>
|
<span>
|
||||||
{deployment.status}
|
{deployment.status}
|
||||||
{#if deployment.status === DeploymentStatus.FAILURE}
|
{#if deployment.status === DeploymentStatus.FAILURE}
|
||||||
<i class="ri-information-line"/>
|
<i class="ri-information-line" />
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,4 +3,3 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<AutomationBuilder />
|
<AutomationBuilder />
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
<script>
|
<script>
|
||||||
import { goto, leftover } from "@sveltech/routify"
|
import { goto, leftover } from "@sveltech/routify"
|
||||||
import { onMount } from 'svelte'
|
import { onMount } from "svelte"
|
||||||
import { automationStore } from "builderStore"
|
import { automationStore } from "builderStore"
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
// navigate to first automation in list, if not already selected
|
// navigate to first automation in list, if not already selected
|
||||||
if (
|
if (
|
||||||
!$leftover &&
|
!$leftover &&
|
||||||
$automationStore.automations.length > 0 &&
|
$automationStore.automations.length > 0 &&
|
||||||
(!$automationStore.selectedAutomation || !$automationStore.selectedAutomation?.automation?._id)
|
(!$automationStore.selectedAutomation ||
|
||||||
) {
|
!$automationStore.selectedAutomation?.automation?._id)
|
||||||
$goto(`../${$automationStore.automations[0]._id}`)
|
) {
|
||||||
}
|
$goto(`../${$automationStore.automations[0]._id}`)
|
||||||
})
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<i>Create your first automation to get started</i>
|
<i>Create your first automation to get started</i>
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
let tab = $isActive('./datasource') ? "datasource" : "table"
|
let tab = $isActive("./datasource") ? "datasource" : "table"
|
||||||
|
|
||||||
function selectFirstTableOrSource({ detail }) {
|
function selectFirstTableOrSource({ detail }) {
|
||||||
const type = detail.heading.key
|
const type = detail.heading.key
|
||||||
if (type === 'datasource') {
|
if (type === "datasource") {
|
||||||
$goto("./datasource")
|
$goto("./datasource")
|
||||||
} else {
|
} else {
|
||||||
$goto("./table")
|
$goto("./table")
|
||||||
|
@ -34,7 +34,10 @@
|
||||||
<!-- routify:options index=0 -->
|
<!-- routify:options index=0 -->
|
||||||
<div class="root">
|
<div class="root">
|
||||||
<div class="nav">
|
<div class="nav">
|
||||||
<Switcher headings={tabs} bind:value={tab} on:change={selectFirstTableOrSource}>
|
<Switcher
|
||||||
|
headings={tabs}
|
||||||
|
bind:value={tab}
|
||||||
|
on:change={selectFirstTableOrSource}>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<i
|
<i
|
||||||
data-cy={`new-${tab}`}
|
data-cy={`new-${tab}`}
|
||||||
|
|
|
@ -3,9 +3,7 @@
|
||||||
import { backendUiStore } from "builderStore"
|
import { backendUiStore } from "builderStore"
|
||||||
|
|
||||||
if ($params.query) {
|
if ($params.query) {
|
||||||
const query = $backendUiStore.queries.find(
|
const query = $backendUiStore.queries.find(m => m._id === $params.query)
|
||||||
m => m._id === $params.query
|
|
||||||
)
|
|
||||||
if (query) {
|
if (query) {
|
||||||
backendUiStore.actions.queries.select(query)
|
backendUiStore.actions.queries.select(query)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,30 @@
|
||||||
<script>
|
<script>
|
||||||
import { backendUiStore } from "builderStore"
|
import { backendUiStore } from "builderStore"
|
||||||
import { goto, leftover } from "@sveltech/routify"
|
import { goto, leftover } from "@sveltech/routify"
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
// navigate to first table in list, if not already selected
|
// navigate to first table in list, if not already selected
|
||||||
// and this is the final url (i.e. no selectedTable)
|
// and this is the final url (i.e. no selectedTable)
|
||||||
if (
|
if (
|
||||||
!$leftover &&
|
!$leftover &&
|
||||||
$backendUiStore.datasources.length > 0 && !$backendUiStore.selectedDatasourceId
|
$backendUiStore.datasources.length > 0 &&
|
||||||
) {
|
!$backendUiStore.selectedDatasourceId
|
||||||
// this file routes as .../tables/index, so, go up one.
|
) {
|
||||||
$goto(`../${$backendUiStore.datasources[0]._id}`)
|
// this file routes as .../tables/index, so, go up one.
|
||||||
}
|
$goto(`../${$backendUiStore.datasources[0]._id}`)
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if $backendUiStore.tables.length === 0}
|
|
||||||
<i>Connect your first datasource to start building.</i>
|
|
||||||
{:else}<i>Select a datasource to edit</i>{/if}
|
|
||||||
|
|
||||||
<style>
|
|
||||||
i {
|
|
||||||
font-size: var(--font-size-m);
|
|
||||||
color: var(--grey-5);
|
|
||||||
margin-top: 2px;
|
|
||||||
}
|
}
|
||||||
</style>
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if $backendUiStore.tables.length === 0}
|
||||||
|
<i>Connect your first datasource to start building.</i>
|
||||||
|
{:else}<i>Select a datasource to edit</i>{/if}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
i {
|
||||||
|
font-size: var(--font-size-m);
|
||||||
|
color: var(--grey-5);
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue