Browse Source
Merge pull request #1542 from Budibase/ak-fixes
Some fixes + polish
gh-pages
Andrew Kingston
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
35 additions and
13 deletions
-
packages/builder/src/components/deploy/DeployModal.svelte
-
packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte
-
packages/builder/src/components/start/AppCard.svelte
-
packages/builder/src/components/start/AppRow.svelte
-
packages/builder/src/pages/builder/apps/index.svelte
-
packages/builder/src/pages/builder/portal/apps/index.svelte
|
|
@ -24,11 +24,11 @@ |
|
|
|
|
|
|
|
|
async function deployApp() { |
|
|
async function deployApp() { |
|
|
try { |
|
|
try { |
|
|
notifications.info(`Deployment started. Please wait.`) |
|
|
|
|
|
const response = await api.post("/api/deploy") |
|
|
const response = await api.post("/api/deploy") |
|
|
const json = await response.json() |
|
|
|
|
|
if (response.status !== 200) { |
|
|
if (response.status !== 200) { |
|
|
throw new Error() |
|
|
throw new Error(`status ${response.status}`) |
|
|
|
|
|
} else { |
|
|
|
|
|
notifications.success(`Application published successfully`) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (analytics.requestFeedbackOnDeploy()) { |
|
|
if (analytics.requestFeedbackOnDeploy()) { |
|
|
@ -36,7 +36,7 @@ |
|
|
} |
|
|
} |
|
|
} catch (err) { |
|
|
} catch (err) { |
|
|
analytics.captureException(err) |
|
|
analytics.captureException(err) |
|
|
notifications.error("Deployment unsuccessful. Please try again later.") |
|
|
notifications.error(`Error publishing app: ${err}`) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -14,7 +14,9 @@ |
|
|
const ROUTE_NAME_MAP = { |
|
|
const ROUTE_NAME_MAP = { |
|
|
"/": { |
|
|
"/": { |
|
|
BASIC: "Home", |
|
|
BASIC: "Home", |
|
|
PUBLIC: "Login", |
|
|
PUBLIC: "Home", |
|
|
|
|
|
ADMIN: "Home", |
|
|
|
|
|
POWER: "Home", |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -9,8 +9,6 @@ |
|
|
StatusLight, |
|
|
StatusLight, |
|
|
} from "@budibase/bbui" |
|
|
} from "@budibase/bbui" |
|
|
import { gradient } from "actions" |
|
|
import { gradient } from "actions" |
|
|
import { auth } from "stores/portal" |
|
|
|
|
|
import { AppStatus } from "constants" |
|
|
|
|
|
import { processStringSync } from "@budibase/string-templates" |
|
|
import { processStringSync } from "@budibase/string-templates" |
|
|
|
|
|
|
|
|
export let app |
|
|
export let app |
|
|
|
|
|
@ -8,6 +8,7 @@ |
|
|
MenuItem, |
|
|
MenuItem, |
|
|
StatusLight, |
|
|
StatusLight, |
|
|
} from "@budibase/bbui" |
|
|
} from "@budibase/bbui" |
|
|
|
|
|
import { processStringSync } from "@budibase/string-templates" |
|
|
|
|
|
|
|
|
export let app |
|
|
export let app |
|
|
export let exportApp |
|
|
export let exportApp |
|
|
@ -27,7 +28,13 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
Updated {Math.round(Math.random() * 10 + 1)} months ago |
|
|
{#if app.updatedAt} |
|
|
|
|
|
{processStringSync("Updated {{ duration time 'millisecond' }} ago", { |
|
|
|
|
|
time: new Date().getTime() - new Date(app.updatedAt).getTime(), |
|
|
|
|
|
})} |
|
|
|
|
|
{:else} |
|
|
|
|
|
Never updated |
|
|
|
|
|
{/if} |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
<StatusLight |
|
|
<StatusLight |
|
|
|
|
|
@ -2,7 +2,6 @@ |
|
|
import { |
|
|
import { |
|
|
Heading, |
|
|
Heading, |
|
|
Layout, |
|
|
Layout, |
|
|
Select, |
|
|
|
|
|
Divider, |
|
|
Divider, |
|
|
ActionMenu, |
|
|
ActionMenu, |
|
|
MenuItem, |
|
|
MenuItem, |
|
|
@ -19,6 +18,7 @@ |
|
|
import { gradient } from "actions" |
|
|
import { gradient } from "actions" |
|
|
import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte" |
|
|
import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte" |
|
|
import ChangePasswordModal from "components/settings/ChangePasswordModal.svelte" |
|
|
import ChangePasswordModal from "components/settings/ChangePasswordModal.svelte" |
|
|
|
|
|
import { processStringSync } from "@budibase/string-templates" |
|
|
|
|
|
|
|
|
let loaded = false |
|
|
let loaded = false |
|
|
let userInfoModal |
|
|
let userInfoModal |
|
|
@ -83,7 +83,18 @@ |
|
|
<div class="app-info"> |
|
|
<div class="app-info"> |
|
|
<Heading size="XS">{app.name}</Heading> |
|
|
<Heading size="XS">{app.name}</Heading> |
|
|
<Body size="S"> |
|
|
<Body size="S"> |
|
|
Updated {Math.round(Math.random() * 10 + 1)} months ago |
|
|
{#if app.updatedAt} |
|
|
|
|
|
{processStringSync( |
|
|
|
|
|
"Updated {{ duration time 'millisecond' }} ago", |
|
|
|
|
|
{ |
|
|
|
|
|
time: |
|
|
|
|
|
new Date().getTime() - |
|
|
|
|
|
new Date(app.updatedAt).getTime(), |
|
|
|
|
|
} |
|
|
|
|
|
)} |
|
|
|
|
|
{:else} |
|
|
|
|
|
Never updated |
|
|
|
|
|
{/if} |
|
|
</Body> |
|
|
</Body> |
|
|
</div> |
|
|
</div> |
|
|
<Icon name="ChevronRight" /> |
|
|
<Icon name="ChevronRight" /> |
|
|
|
|
|
@ -51,12 +51,16 @@ |
|
|
} |
|
|
} |
|
|
return a.status === AppStatus.DEPLOYED ? -1 : 1 |
|
|
return a.status === AppStatus.DEPLOYED ? -1 : 1 |
|
|
}) |
|
|
}) |
|
|
} else if (sortBy === "name") { |
|
|
} else if (sortBy === "updated") { |
|
|
return enrichedApps.sort((a, b) => { |
|
|
return enrichedApps.sort((a, b) => { |
|
|
return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1 |
|
|
const aUpdated = a.updatedAt || "9999" |
|
|
|
|
|
const bUpdated = b.updatedAt || "9999" |
|
|
|
|
|
return aUpdated < bUpdated ? 1 : -1 |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
return enrichedApps |
|
|
return enrichedApps.sort((a, b) => { |
|
|
|
|
|
return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1 |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|