mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Merge pull request #1184 from appwrite/feat-download-deployment
feat: download deployment
This commit is contained in:
6 files changed
+34
-9
No files matched your search
Generated
+4
-4
@@ -6,7 +6,7 @@
|
||||
"": {
|
||||
"name": "@appwrite/console",
|
||||
"dependencies": {
|
||||
"@appwrite.io/console": "npm:matej-appwrite-console-16x@0.6.6",
|
||||
"@appwrite.io/console": "npm:matej-appwrite-console-16x@0.6.7",
|
||||
"@appwrite.io/pink": "0.23.0",
|
||||
"@appwrite.io/pink-icons": "0.23.0",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
@@ -150,9 +150,9 @@
|
||||
},
|
||||
"node_modules/@appwrite.io/console": {
|
||||
"name": "matej-appwrite-console-16x",
|
||||
"version": "0.6.6",
|
||||
"resolved": "https://registry.npmjs.org/matej-appwrite-console-16x/-/matej-appwrite-console-16x-0.6.6.tgz",
|
||||
"integrity": "sha512-QkHHFqFgfMftRcr5L1fz6784+MLEvL3tKNNpBU5W5mzdfFiAwRoBUigrCSmCIfK2IeiAtZBfGrcf/4k83YbnWA=="
|
||||
"version": "0.6.7",
|
||||
"resolved": "https://registry.npmjs.org/matej-appwrite-console-16x/-/matej-appwrite-console-16x-0.6.7.tgz",
|
||||
"integrity": "sha512-orhonLVjV0vzJE/OrI49DRJ75EAkEa+8QzWy30h1N04jNyAcEGFfx4OKmhWg4uG5XRrmWrrDj9nobHKCiBaDCg=="
|
||||
},
|
||||
"node_modules/@appwrite.io/pink": {
|
||||
"version": "0.23.0",
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
"e2e:ui": "playwright test tests/e2e --ui"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appwrite.io/console": "npm:matej-appwrite-console-16x@0.6.6",
|
||||
"@appwrite.io/console": "npm:matej-appwrite-console-16x@0.6.7",
|
||||
"@appwrite.io/pink": "0.23.0",
|
||||
"@appwrite.io/pink-icons": "0.23.0",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
|
||||
@@ -98,8 +98,6 @@
|
||||
function toggleMobileModal() {
|
||||
showFiltersMobile = !showFiltersMobile;
|
||||
}
|
||||
|
||||
$: console.log(selectedColumn, operatorKey, value, arrayValues);
|
||||
</script>
|
||||
|
||||
<div class="is-not-mobile">
|
||||
|
||||
@@ -48,8 +48,6 @@
|
||||
numbers.splice(index, 1);
|
||||
numbers = numbers;
|
||||
}
|
||||
|
||||
$: console.log(numbers, initialNumbers);
|
||||
</script>
|
||||
|
||||
<Form onSubmit={updateMockNumbers}>
|
||||
|
||||
+13
@@ -29,6 +29,13 @@
|
||||
invalidate(Dependencies.DEPLOYMENTS);
|
||||
}
|
||||
|
||||
function getDownload(deploymentId: string) {
|
||||
return (
|
||||
sdk.forProject.functions.getDeploymentDownload($func.$id, deploymentId).toString() +
|
||||
'&mode=admin'
|
||||
);
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
logs = $deployment.buildLogs;
|
||||
if ($deployment.status === 'ready') {
|
||||
@@ -61,6 +68,12 @@
|
||||
showCancel = true;
|
||||
}}>Cancel</Button>
|
||||
{/if}
|
||||
|
||||
{#if $deployment.status === 'ready'}
|
||||
<Button text href={getDownload($deployment.$id)} class="u-margin-inline-end-16">
|
||||
Download code
|
||||
</Button>
|
||||
{/if}
|
||||
<Button
|
||||
secondary
|
||||
disabled={data.activeDeployment}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import Cancel from './cancel.svelte';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
|
||||
export let columns: Column[];
|
||||
export let data: PageData;
|
||||
@@ -41,6 +42,13 @@
|
||||
function handleActivate() {
|
||||
invalidate(Dependencies.DEPLOYMENTS);
|
||||
}
|
||||
|
||||
function getDownload(deploymentId: string) {
|
||||
return (
|
||||
sdk.forProject.functions.getDeploymentDownload($func.$id, deploymentId).toString() +
|
||||
'&mode=admin'
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<TableScroll>
|
||||
@@ -139,6 +147,14 @@
|
||||
href={`/console/project-${$page.params.project}/functions/function-${$page.params.function}/deployment-${deployment.$id}`}>
|
||||
Logs
|
||||
</DropListLink>
|
||||
{#if deployment.status === 'ready'}
|
||||
<DropListLink
|
||||
icon="download"
|
||||
href={getDownload(deployment.$id)}
|
||||
on:click={() => (showDropdown[index] = false)}>
|
||||
Download
|
||||
</DropListLink>
|
||||
{/if}
|
||||
{#if deployment.status === 'processing' || deployment.status === 'building'}
|
||||
<DropListItem
|
||||
icon="x-circle"
|
||||
|
||||
Reference in new issue
Block a user