Integrating into app overview panel.

This commit is contained in:
mike12345567 2022-05-16 16:22:19 +01:00
parent 227ed0fb67
commit d5c98d2bad
8 changed files with 38 additions and 56 deletions

View File

@ -52,7 +52,7 @@
reviewPendingDeployments(deployments, newDeployments) reviewPendingDeployments(deployments, newDeployments)
return newDeployments return newDeployments
} catch (err) { } catch (err) {
notifications.error("Error fetching deployment history") notifications.error("Error fetching deployment overview")
} }
} }

View File

@ -55,7 +55,7 @@
deployments = newDeployments deployments = newDeployments
} catch (err) { } catch (err) {
clearInterval(poll) clearInterval(poll)
notifications.error("Error fetching deployment history") notifications.error("Error fetching deployment overview")
} }
} }

View File

@ -1,7 +1,7 @@
<script> <script>
import { Body, Layout, Icon, ActionButton, Heading } from "@budibase/bbui" import { Body, Layout, Icon, ActionButton, Heading } from "@budibase/bbui"
import { capitalise } from "helpers" import { capitalise } from "helpers"
import StatusRenderer from "components/portal/history/StatusRenderer.svelte" import StatusRenderer from "components/portal/overview/StatusRenderer.svelte"
import DateTimeRenderer from "components/common/renderers/DateTimeRenderer.svelte" import DateTimeRenderer from "components/common/renderers/DateTimeRenderer.svelte"
import FlowItemHeader from "components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte" import FlowItemHeader from "components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte"

View File

@ -1,19 +1,13 @@
<script> <script>
import { import { Layout, Table, Select } from "@budibase/bbui"
Layout,
Page,
Heading,
Body,
Table,
Select,
Input,
} from "@budibase/bbui"
import DateTimeRenderer from "components/common/renderers/DateTimeRenderer.svelte" import DateTimeRenderer from "components/common/renderers/DateTimeRenderer.svelte"
import StatusRenderer from "components/portal/history/StatusRenderer.svelte" import StatusRenderer from "./StatusRenderer.svelte"
import HistoryDetailsPanel from "components/portal/history/HistoryDetailsPanel.svelte" import HistoryDetailsPanel from "./HistoryDetailsPanel.svelte"
import { automationStore } from "builderStore" import { automationStore } from "builderStore"
import { onMount } from "svelte" import { onMount } from "svelte"
export let appId
let showPanel = false let showPanel = false
let selectedHistory = null let selectedHistory = null
let runHistory = [] let runHistory = []
@ -101,39 +95,30 @@
</script> </script>
<div class="root" class:panelOpen={showPanel}> <div class="root" class:panelOpen={showPanel}>
<Page wide> <Layout paddingX="XL" gap="S" alignContent="start">
<Layout noPadding gap="S"> <div class="search">
<Heading size="L">Run History</Heading> <div class="select">
<Body>View all the automations your published apps have performed</Body> <Select placeholder="All automations" label="Automation" />
<div class="search">
<div class="select"><Select placeholder="All apps" label="Apps" /></div>
<div class="select">
<Select placeholder="All automations" label="Automation" />
</div>
<div class="select">
<Select placeholder="Past 30 days" label="Date range" />
</div>
<div class="select">
<Select placeholder="All status" label="Status" />
</div>
<div class="separator" />
<div class="searchInput">
<Input placeholder="Search" />
</div>
</div> </div>
{#if runHistory} <div class="select">
<Table <Select placeholder="Past 30 days" label="Date range" />
on:click={viewDetails} </div>
schema={runHistorySchema} <div class="select">
allowSelectRows={false} <Select placeholder="All status" label="Status" />
allowEditColumns={false} </div>
allowEditRows={false} </div>
data={runHistory} {#if runHistory}
{customRenderers} <Table
/> on:click={viewDetails}
{/if} schema={runHistorySchema}
</Layout> allowSelectRows={false}
</Page> allowEditColumns={false}
allowEditRows={false}
data={runHistory}
{customRenderers}
/>
{/if}
</Layout>
<div class="panel" class:panelShow={showPanel}> <div class="panel" class:panelShow={showPanel}>
<HistoryDetailsPanel <HistoryDetailsPanel
bind:history={selectedHistory} bind:history={selectedHistory}
@ -178,7 +163,7 @@
display: none; display: none;
right: 0; right: 0;
height: 100%; height: 100%;
width: 99%; width: 100%;
} }
.panelShow { .panelShow {

View File

@ -36,10 +36,6 @@
title: "Apps", title: "Apps",
href: "/builder/portal/apps", href: "/builder/portal/apps",
}, },
{
title: "Run History",
href: "/builder/portal/history",
},
] ]
if (admin) { if (admin) {
menu = menu.concat([ menu = menu.concat([

View File

@ -20,6 +20,7 @@
import { AppStatus } from "constants" import { AppStatus } from "constants"
import AppLockModal from "components/common/AppLockModal.svelte" import AppLockModal from "components/common/AppLockModal.svelte"
import EditableIcon from "components/common/EditableIcon.svelte" import EditableIcon from "components/common/EditableIcon.svelte"
import HistoryTab from "components/portal/overview/HistoryTab.svelte"
import { checkIncomingDeploymentStatus } from "components/deploy/utils" import { checkIncomingDeploymentStatus } from "components/deploy/utils"
import { onDestroy, onMount } from "svelte" import { onDestroy, onMount } from "svelte"
@ -97,7 +98,7 @@
reviewPendingDeployments(deployments, newDeployments) reviewPendingDeployments(deployments, newDeployments)
return newDeployments return newDeployments
} catch (err) { } catch (err) {
notifications.error("Error fetching deployment history") notifications.error("Error fetching deployment overview")
} }
} }
@ -209,10 +210,10 @@
navigateTab={handleTabChange} navigateTab={handleTabChange}
/> />
</Tab> </Tab>
<Tab title="Automation History">
<HistoryTab appId={selectedApp?._id} />
</Tab>
{#if false} {#if false}
<Tab title="Automation History">
<div class="container">Automation History contents</div>
</Tab>
<Tab title="Backups"> <Tab title="Backups">
<div class="container">Backups contents</div> <div class="container">Backups contents</div>
</Tab> </Tab>

View File

@ -135,7 +135,7 @@
action={() => { action={() => {
navigateTab("Automation History") navigateTab("Automation History")
}} }}
dataCy={"automation-history"} dataCy={"automation-overview"}
> >
<div class="automation-content"> <div class="automation-content">
<div class="automation-metrics"> <div class="automation-metrics">