diff --git a/.github/workflows/release-charts.yml b/.github/workflows/release-charts.yml
new file mode 100644
index 0000000000..933edd36b9
--- /dev/null
+++ b/.github/workflows/release-charts.yml
@@ -0,0 +1,36 @@
+name: Budibase Release Helm Charts
+
+on:
+ workflow_dispatch:
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: 'Get Previous tag'
+ id: previoustag
+ uses: "WyriHaximus/github-action-get-previous-tag@v1"
+
+ - name: Install Helm
+ uses: azure/setup-helm@v1
+ with:
+ version: v3.4.0
+
+ # - run: yarn release:helm
+ # env:
+ # BUDIBASE_RELEASE_VERSION: ${{ steps.previoustag.outputs.tag }}
+
+ - name: Configure Git
+ run: |
+ git config user.name "Budibase Helm Bot"
+ git config user.email "<>"
+
+ - name: Run chart-releaser
+ uses: helm/chart-releaser-action@v1.2.1
+ env:
+ CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
\ No newline at end of file
diff --git a/.github/workflows/release-selfhost.yml b/.github/workflows/release-selfhost.yml
index 78009501f8..4fc8a98350 100644
--- a/.github/workflows/release-selfhost.yml
+++ b/.github/workflows/release-selfhost.yml
@@ -1,4 +1,4 @@
-name: Budibase Release Selfhost
+name: Budibase Release Docker Selfhost
on:
workflow_dispatch:
@@ -42,20 +42,4 @@ jobs:
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
BUDIBASE_RELEASE_VERSION: ${{ steps.previoustag.outputs.tag }}
-
- - uses: azure/setup-helm@v1
- id: install
-
- - run: yarn release:helm
- env:
- BUDIBASE_RELEASE_VERSION: ${{ steps.previoustag.outputs.tag }}
-
- - name: Configure Git
- run: |
- git config user.name "Budibase Helm Bot"
- git config user.email "<>"
-
- - name: Run chart-releaser
- uses: helm/chart-releaser-action@v1.2.0
- env:
- CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
\ No newline at end of file
+
\ No newline at end of file
diff --git a/index.yaml b/index.yaml
new file mode 100644
index 0000000000..4b00ff2f03
--- /dev/null
+++ b/index.yaml
@@ -0,0 +1,3 @@
+apiVersion: v1
+entries: {}
+generated: "2021-12-13T12:46:40.291206+01:00"
diff --git a/lerna.json b/lerna.json
index 698e56dc5c..66fd740bc5 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "1.0.15-alpha.1",
+ "version": "1.0.19-alpha.3",
"npmClient": "yarn",
"packages": [
"packages/*"
diff --git a/packages/auth/package.json b/packages/auth/package.json
index 72dddf313d..9f096630c9 100644
--- a/packages/auth/package.json
+++ b/packages/auth/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/auth",
- "version": "1.0.15-alpha.1",
+ "version": "1.0.19-alpha.3",
"description": "Authentication middlewares for budibase builder and apps",
"main": "src/index.js",
"author": "Budibase",
diff --git a/packages/bbui/package.json b/packages/bbui/package.json
index 1badc1b059..b9f779409b 100644
--- a/packages/bbui/package.json
+++ b/packages/bbui/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
- "version": "1.0.15-alpha.1",
+ "version": "1.0.19-alpha.3",
"license": "MPL-2.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
diff --git a/packages/bbui/src/ActionButton/ActionButton.svelte b/packages/bbui/src/ActionButton/ActionButton.svelte
index b518ac3d92..5ab7a7f047 100644
--- a/packages/bbui/src/ActionButton/ActionButton.svelte
+++ b/packages/bbui/src/ActionButton/ActionButton.svelte
@@ -80,4 +80,8 @@
.active svg {
color: var(--spectrum-global-color-blue-600);
}
+
+ .spectrum-ActionButton-label {
+ padding-bottom: 2px;
+ }
diff --git a/packages/bbui/src/Banner/Banner.svelte b/packages/bbui/src/Banner/Banner.svelte
new file mode 100644
index 0000000000..f28ee09d9c
--- /dev/null
+++ b/packages/bbui/src/Banner/Banner.svelte
@@ -0,0 +1,59 @@
+
+
+{#if show}
+
diff --git a/packages/bbui/src/Form/Core/Switch.svelte b/packages/bbui/src/Form/Core/Switch.svelte
index 667b2ab871..9e45683382 100644
--- a/packages/bbui/src/Form/Core/Switch.svelte
+++ b/packages/bbui/src/Form/Core/Switch.svelte
@@ -25,7 +25,9 @@
class="spectrum-Switch-input"
/>
-
+ {#if text}
+
+ {/if}
diff --git a/packages/bbui/src/Modal/ModalContent.svelte b/packages/bbui/src/Modal/ModalContent.svelte
index 7f2d7fbdb9..c18be1e4e1 100644
--- a/packages/bbui/src/Modal/ModalContent.svelte
+++ b/packages/bbui/src/Modal/ModalContent.svelte
@@ -21,6 +21,7 @@
export let showSecondaryButton = false
export let secondaryButtonText = undefined
export let secondaryAction = undefined
+ export let secondaryButtonWarning = false
const { hide, cancel } = getContext(Context.Modal)
let loading = false
@@ -88,8 +89,11 @@
{#if showSecondaryButton && secondaryButtonText && secondaryAction}
- {secondaryButtonText}
{/if}
diff --git a/packages/bbui/src/Tabs/Tab.svelte b/packages/bbui/src/Tabs/Tab.svelte
index 86f2c0ee52..0aa59f7f8a 100644
--- a/packages/bbui/src/Tabs/Tab.svelte
+++ b/packages/bbui/src/Tabs/Tab.svelte
@@ -5,7 +5,7 @@
export let icon = ""
const dispatch = createEventDispatcher()
- const selected = getContext("tab")
+ let selected = getContext("tab")
let tab
let tabInfo
@@ -16,8 +16,8 @@
// We just need to get this off the main thread to fix this, by using
// a 0ms timeout.
setTimeout(() => {
- tabInfo = tab.getBoundingClientRect()
- if ($selected.title === title) {
+ tabInfo = tab?.getBoundingClientRect()
+ if (tabInfo && $selected.title === title) {
$selected.info = tabInfo
}
}, 0)
diff --git a/packages/bbui/src/Tabs/Tabs.svelte b/packages/bbui/src/Tabs/Tabs.svelte
index 2a4017e605..c68f715de0 100644
--- a/packages/bbui/src/Tabs/Tabs.svelte
+++ b/packages/bbui/src/Tabs/Tabs.svelte
@@ -6,9 +6,13 @@
export let selected
export let vertical = false
export let noPadding = false
+ // added as a separate option as noPadding is used for vertical padding
+ export let noHorizPadding = false
export let quiet = false
export let emphasized = false
+ let thisSelected = undefined
+
let _id = id()
const tab = writable({ title: selected, id: _id, emphasized })
setContext("tab", tab)
@@ -18,9 +22,19 @@
const dispatch = createEventDispatcher()
$: {
- if ($tab.title !== selected) {
+ if (thisSelected !== selected) {
+ thisSelected = selected
+ dispatch("select", thisSelected)
+ } else if ($tab.title !== thisSelected) {
+ thisSelected = $tab.title
selected = $tab.title
- dispatch("select", selected)
+ dispatch("select", thisSelected)
+ }
+ if ($tab.title !== thisSelected) {
+ tab.update(state => {
+ state.title = thisSelected
+ return state
+ })
}
}
@@ -59,6 +73,7 @@
+
+
diff --git a/packages/builder/cypress/integration/renameAnApplication.spec.js b/packages/builder/cypress/integration/renameAnApplication.spec.js
index 95a152c017..a954faee95 100644
--- a/packages/builder/cypress/integration/renameAnApplication.spec.js
+++ b/packages/builder/cypress/integration/renameAnApplication.spec.js
@@ -10,7 +10,7 @@ it("should rename an unpublished application", () => {
cy.get(".home-logo").click()
renameApp(appRename)
cy.searchForApplication(appRename)
- cy.get(".appGrid").find(".wrapper").should("have.length", 1)
+ cy.get(".appTable").find(".title").should("have.length", 1)
cy.deleteApp(appRename)
})
@@ -29,7 +29,7 @@ xit("Should rename a published application", () => {
cy.get(".home-logo").click()
renameApp(appRename, true)
cy.searchForApplication(appRename)
- cy.get(".appGrid").find(".wrapper").should("have.length", 1)
+ cy.get(".appTable").find(".title").should("have.length", 1)
})
it("Should try to rename an application to have no name", () => {
@@ -38,7 +38,7 @@ it("Should try to rename an application to have no name", () => {
// Close modal and confirm name has not been changed
cy.get(".spectrum-Dialog-grid").contains("Cancel").click()
cy.searchForApplication("Cypress Tests")
- cy.get(".appGrid").find(".wrapper").should("have.length", 1)
+ cy.get(".appTable").find(".title").should("have.length", 1)
})
xit("Should create two applications with the same name", () => {
@@ -64,7 +64,7 @@ it("should validate application names", () => {
cy.get(".home-logo").click()
renameApp(numberName)
cy.searchForApplication(numberName)
- cy.get(".appGrid").find(".wrapper").should("have.length", 1)
+ cy.get(".appTable").find(".title").should("have.length", 1)
renameApp(specialCharName)
cy.get(".error").should("have.text", "App name must be letters, numbers and spaces only")
})
@@ -74,14 +74,14 @@ it("should validate application names", () => {
.its("body")
.then(val => {
if (val.length > 0) {
- cy.get(".title > :nth-child(3) > .spectrum-Icon").click()
+ cy.get(".appTable > :nth-child(5) > :nth-child(2) > .spectrum-Icon").click()
// Check for when an app is published
if (published == true){
// Should not have Edit as option, will unpublish app
cy.should("not.have.value", "Edit")
cy.get(".spectrum-Menu").contains("Unpublish").click()
cy.get(".spectrum-Dialog-grid").contains("Unpublish app").click()
- cy.get(".title > :nth-child(3) > .spectrum-Icon").click()
+ cy.get(".appTable > :nth-child(5) > :nth-child(2) > .spectrum-Icon").click()
}
cy.contains("Edit").click()
cy.get(".spectrum-Modal")
diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js
index 0870ceac7a..e67057344a 100644
--- a/packages/builder/cypress/support/commands.js
+++ b/packages/builder/cypress/support/commands.js
@@ -50,7 +50,9 @@ Cypress.Commands.add("deleteApp", appName => {
.its("body")
.then(val => {
if (val.length > 0) {
- cy.get(".title > :nth-child(3) > .spectrum-Icon").click()
+ cy.get(
+ ".appTable > :nth-child(5) > :nth-child(2) > .spectrum-Icon"
+ ).click()
cy.contains("Delete").click()
cy.get(".spectrum-Modal").within(() => {
cy.get("input").type(appName)
diff --git a/packages/builder/package.json b/packages/builder/package.json
index 891b19e674..1a19246ba0 100644
--- a/packages/builder/package.json
+++ b/packages/builder/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
- "version": "1.0.15-alpha.1",
+ "version": "1.0.19-alpha.3",
"license": "GPL-3.0",
"private": true,
"scripts": {
@@ -65,10 +65,10 @@
}
},
"dependencies": {
- "@budibase/bbui": "^1.0.15-alpha.1",
- "@budibase/client": "^1.0.15-alpha.1",
+ "@budibase/bbui": "^1.0.19-alpha.3",
+ "@budibase/client": "^1.0.19-alpha.3",
"@budibase/colorpicker": "1.1.2",
- "@budibase/string-templates": "^1.0.15-alpha.1",
+ "@budibase/string-templates": "^1.0.19-alpha.3",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",
diff --git a/packages/builder/src/builderStore/datasource.js b/packages/builder/src/builderStore/datasource.js
new file mode 100644
index 0000000000..61cead2e16
--- /dev/null
+++ b/packages/builder/src/builderStore/datasource.js
@@ -0,0 +1,44 @@
+import { datasources, tables } from "../stores/backend"
+import { IntegrationNames } from "../constants/backend"
+import analytics, { Events } from "../analytics"
+import { get } from "svelte/store"
+import cloneDeep from "lodash/cloneDeepWith"
+
+function prepareData(config) {
+ let datasource = {}
+ let existingTypeCount = get(datasources).list.filter(
+ ds => ds.source === config.type
+ ).length
+
+ let baseName = IntegrationNames[config.type]
+ let name =
+ existingTypeCount === 0 ? baseName : `${baseName}-${existingTypeCount + 1}`
+
+ datasource.type = "datasource"
+ datasource.source = config.type
+ datasource.config = config.config
+ datasource.name = name
+ datasource.plus = config.plus
+
+ return datasource
+}
+
+export async function saveDatasource(config) {
+ const datasource = prepareData(config)
+ // Create datasource
+ const resp = await datasources.save(datasource, datasource.plus)
+
+ // update the tables incase data source plus
+ await tables.fetch()
+ await datasources.select(resp._id)
+ analytics.captureEvent(Events.DATASOURCE.CREATED, {
+ name: resp.name,
+ source: resp.source,
+ })
+ return resp
+}
+
+export async function createRestDatasource(integration) {
+ const config = cloneDeep(integration)
+ return saveDatasource(config)
+}
diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte
index 1ffac83b1a..3c646bde68 100644
--- a/packages/builder/src/components/backend/DataTable/Table.svelte
+++ b/packages/builder/src/components/backend/DataTable/Table.svelte
@@ -39,7 +39,7 @@
$: editRowComponent = isUsersTable ? CreateEditUser : CreateEditRow
$: {
UNSORTABLE_TYPES.forEach(type => {
- Object.values(schema).forEach(col => {
+ Object.values(schema || {}).forEach(col => {
if (col.type === type) {
col.sortable = false
}
@@ -113,16 +113,16 @@
-
- {#if title}
+ {#if title}
+
{title}
- {/if}
- {#if loading}
-
-
-
- {/if}
-
+ {#if loading}
+
+
+
+ {/if}
+
+ {/if}
{#if !isUsersTable && selectedRows.length > 0}
diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte
index 796f70b43b..18143c2071 100644
--- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte
+++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte
@@ -8,6 +8,7 @@
import EditQueryPopover from "./popovers/EditQueryPopover.svelte"
import NavItem from "components/common/NavItem.svelte"
import TableNavigator from "components/backend/TableNavigator/TableNavigator.svelte"
+ import { customQueryIconText, customQueryIconColor } from "helpers/data/utils"
import ICONS from "./icons"
let openDataSources = []
@@ -129,6 +130,8 @@
filter(el))
+ .map(([key]) => key)
let addButton
+
+ function getDisplayName(key) {
+ let name
+ if (schema[key]?.display) {
+ name = schema[key].display
+ } else {
+ name = key
+ }
+ return capitalise(name)
+ }