2021-11-08 21:26:06 +13:00
<?php
$home = $this->getParam('home', '');
$fileLimit = $this->getParam('fileLimit', 0);
$fileLimitHuman = $this->getParam('fileLimitHuman', 0);
?>
< div
data-service="storage.getBucket"
data-param-bucket-id="{{router.params.id}}"
data-scope="sdk"
data-event="load,storage.updateBucket"
data-name="project-bucket">
< div class = "cover" >
< h1 class = "zone xl margin-bottom-large" >
< a data-ls-attrs = "href=/console/storage?project={{router.params.project}}" class = "back text-size-small link-return-animation--start" > < i class = "icon-left-open" > < / i > Storage< / a >
< br / >
< span data-ls-bind = "{{project-bucket.name}}" > < / span >
< / h1 >
< / div >
< div data-ui-modal class = "modal width-large box close" data-button-hide = "on" data-open-event = "open-json" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
< h2 > JSON View< / h2 >
< div class = "margin-bottom" >
< input type = "hidden" data-ls-bind = "{{project-bucket}}" data-forms-code / >
< / div >
< button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / div >
< div class = "zone xl" >
< ul class = "phases clear" data-ui-phases data-selected = "{{router.params.tab}}" >
< li data-state = "/console/storage/bucket?id={{router.params.id}}&project={{router.params.project}}" >
< h2 class = "margin-bottom" > Files< / h2 >
< form class = "box padding-small margin-bottom search"
data-service="storage.listFiles"
data-event="submit"
data-param-bucket-id="{{router.params.id}}"
data-param-search="{{router.params.search}}"
data-param-limit="<?php echo APP_PAGING_LIMIT ; ?> "
data-param-offset=""
data-param-order-type="DESC"
data-scope="sdk"
data-name="project-files"
data-success="state"
data-success-param-state-keys="search,offset">
< div class = "row thin responsive" >
< div class = "col span-10" >
< input name = "search" id = "searchFiles" type = "search" autocomplete = "off" placeholder = "Search" class = "margin-bottom-no" data-ls-bind = "{{router.params.search}}" >
< / div >
< div class = "col span-2 desktops-only" >
< button class = "fill" title = "Search" aria-label = "Search" > Search< / button >
< / div >
< / div >
< / form >
< div
data-service="storage.listFiles"
data-event="load,storage.createFile,storage.updateFile,storage.deleteFile"
data-param-bucket-id="{{router.params.id}}"
data-param-search="{{router.params.search}}"
data-param-limit="<?php echo APP_PAGING_LIMIT ; ?> "
data-param-offset="{{router.params.offset}}"
data-param-order-type="DESC"
data-scope="sdk"
data-name="project-files">
2022-02-28 22:25:38 +13:00
< div data-ls-if = "0 == {{project-files.total}}" class = "box margin-bottom" >
2021-11-08 21:26:06 +13:00
< h3 class = "margin-bottom-small text-bold" > No Files Found< / h3 >
< p class = "margin-bottom-no" > Upload your first file to get started< / p >
< / div >
2022-02-28 22:25:38 +13:00
< div data-ls-if = "0 != {{project-files.total}}" >
< div class = "margin-bottom-small text-align-end text-size-small text-fade" > < span data-ls-bind = "{{project-files.total}}" > < / span > files found< / div >
2021-11-08 21:26:06 +13:00
< div class = "box margin-bottom" >
2022-02-09 03:09:42 +13:00
< table class = "vertical" style = "overflow: visible" >
2021-11-08 21:26:06 +13:00
< thead >
< tr >
< th width = "40" > < / th >
2022-02-18 03:35:45 +13:00
< th > Filename< / th >
2021-11-08 21:26:06 +13:00
< th width = "140" > Type< / th >
< th width = "100" > Size< / th >
< th width = "120" > Created< / th >
2022-02-18 03:35:45 +13:00
< th width = "52" > < / th >
2021-11-08 21:26:06 +13:00
< / tr >
< / thead >
< tbody data-ls-loop = "project-files.files" data-ls-as = "file" >
< tr >
< td class = "hide" >
2022-02-18 23:04:02 +13:00
< img src = "" data-ls-attrs = "src={{env.ENDPOINT}}/v1/storage/buckets/{{router.params.id}}/files/{{file.$id}}/preview?width=65&height=65&project={{router.params.project}}&mode=admin" class = "pull-start avatar" width = "30" height = "30" loading = "lazy" alt = "" / >
2021-11-08 21:26:06 +13:00
< / td >
2022-02-18 03:35:45 +13:00
< td class = "col-name" data-title = "Name: " data-ls-attrs = "title={{file.name}}" >
< div class = "trim-inner-text" >
< span data-ls-ui-trigger = "modal-file-update-{{file.$id}}" class = "link text-one-liner" data-ls-bind = "{{file.name}}" > < / span >
< div data-ls-attrs = "data-open-event=modal-file-update-{{file.$id}}" data-button-hide = "1" data-ui-modal class = "box modal sticky-footer width-large close" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
< h1 > Update File< / h1 >
< hr / >
< div class = "row responsive modalize" >
< div class = "col span-8" >
< form class = "strip"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Update Storage File"
data-service="storage.updateFile"
data-event="file-update-{{file.$id}}"
data-scope="sdk"
data-success="alert,trigger"
data-success-param-alert-text="File updated successfully"
data-success-param-trigger-events="storage.updateFile"
data-failure="alert"
data-failure-param-alert-text="Failed to update file"
data-failure-param-alert-classname="error">
< label for = "files-fileId" > File ID< / label >
< div class = "input-copy" >
< input data-forms-copy type = "text" data-ls-attrs = "id=file-id-{{file.$id}}" name = "fileId" disabled data-ls-bind = "{{file.$id}}" / >
2022-02-17 23:52:51 +13:00
< / div >
2022-02-18 03:35:45 +13:00
< input type = "hidden" data-ls-attrs = "id=file-bucketId-{{file.$id}}" name = "bucketId" data-ls-bind = "{{file.bucketId}}" >
< label for = "file-read" > Read Access (< a data-ls-attrs = "href={{env.HOME}}/docs/permissions" target = "_blank" rel = "noopener" > Learn more< / a > )< / label >
< input type = "hidden" data-ls-attrs = "id=file-read-{{file.$id}}" name = "read" data-forms-tags data-cast-to = "json" data-ls-bind = "{{file.$read}}" placeholder = "User ID, Team ID or Role" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Add 'role:all' for wildcard access< / div >
< label for = "file-write" > Write Access (< a data-ls-attrs = "href={{env.HOME}}/docs/permissions" target = "_blank" rel = "noopener" > Learn more< / a > )< / label >
< input type = "hidden" data-ls-attrs = "id=file-write-{{file.$id}}" name = "write" data-forms-tags data-cast-to = "json" data-ls-bind = "{{file.$write}}" placeholder = "User ID, Team ID or Role" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Add 'role:all' for wildcard access< / div >
< / form >
< form class = "strip"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Delete File"
data-service="storage.deleteFile"
data-scope="sdk"
data-event="file-delete-{{file.$id}}"
data-confirm="Are you sure you want to delete this file?"
data-success="alert,trigger"
data-success-param-alert-text="Deleted file successfully"
data-success-param-trigger-events="storage.deleteFile"
data-failure="alert"
data-failure-param-alert-text="Failed to delete file"
data-failure-param-alert-classname="error">
< input type = "hidden" name = "bucketId" data-ls-bind = "{{file.bucketId}}" / >
< input type = "hidden" name = "fileId" data-ls-bind = "{{file.$id}}" / >
< / form >
2021-11-08 21:26:06 +13:00
< / div >
2022-02-18 03:35:45 +13:00
< div class = "col span-4 text-size-small" >
< div class = "margin-bottom-small" > File Preview< / div >
< div class = "margin-bottom-small" >
< div data-ls-if = "{{file.chunksTotal}} != {{file.chunksUploaded}}" class = "preview-box" >
< div class = "preview-box-image" >
2022-02-18 23:04:02 +13:00
< img src = "/images/default_preview.svg" width = "200" height = "100" alt = "" / >
2022-02-18 03:35:45 +13:00
< / div >
< span class = "preview-box-text" > Preview not available< / span >
< / div >
< img data-ls-if = "{{file.chunksTotal}} == {{file.chunksUploaded}}" src = "" class = "file-preview" data-ls-attrs = "src={{env.ENDPOINT}}/v1/storage/buckets/{{router.params.id}}/files/{{file.$id}}/preview?width=350&height=250&project={{router.params.project}}&mode=admin" loading = "lazy" width = "225" height = "160" / >
< / div >
2021-11-08 21:26:06 +13:00
2022-02-18 03:35:45 +13:00
< div class = "margin-bottom-tiny" >
< a href = "" data-ls-attrs = "href={{env.ENDPOINT}}/v1/storage/buckets/{{router.params.id}}/files/{{file.$id}}/view?project={{router.params.project}}&mode=admin" target = "_blank" rel = "noopener" > < i class = "icon-angle-circled-right margin-start-negative-tiny margin-end-tiny" > < / i > New Window < i class = "icon-link-ext" > < / i > < / a >
< / div >
2021-11-08 21:26:06 +13:00
2022-02-18 03:35:45 +13:00
< div class = "margin-bottom-small" >
< a href = "" data-ls-attrs = "href={{env.ENDPOINT}}/v1/storage/buckets/{{router.params.id}}/files/{{file.$id}}/download?project={{router.params.project}}&mode=admin" target = "_blank" rel = "noopener" > < i class = "icon-angle-circled-right margin-start-negative-tiny margin-end-tiny" > < / i > Download < i class = "icon-link-ext" > < / i > < / a >
< / div >
2021-11-08 21:26:06 +13:00
2022-02-18 03:35:45 +13:00
< div class = "margin-bottom-tiny" >
< i class = "icon-angle-circled-right margin-start-negative-tiny margin-end-tiny" > < / i > Type: < span data-ls-bind = "{{file.mimeType}}" > < / span >
< / div >
< div class = "margin-bottom-tiny" >
< i class = "icon-angle-circled-right margin-start-negative-tiny margin-end-tiny" > < / i > Size: < span data-ls-bind = "{{file.sizeOriginal|humanFileSize}}" > < / span >
< span data-ls-bind = "{{file.sizeOriginal|humanFileUnit}}" > < / span >
< / div >
< div class = "margin-bottom" >
< i class = "icon-angle-circled-right margin-start-negative-tiny margin-end-tiny" > < / i > Created at: < span data-ls-bind = "{{file.dateCreated|dateText}}" > < / span >
< / div >
2021-11-08 21:26:06 +13:00
< / div >
< / div >
2022-02-18 03:35:45 +13:00
< footer >
< button class = "link pull-end text-danger" data-ls-ui-trigger = "file-delete-{{file.$id}},modal-close" > Delete File< / button >
< button type = "button" data-ls-if = "{{file.chunksTotal}} == {{file.chunksUploaded}}" data-ls-ui-trigger = "file-update-{{file.$id}},modal-close" > Update< / button > < button data-ui-modal-close = "" type = "button" class = "reverse desktops-only-inline tablets-only-inline" > Cancel< / button >
< / footer >
< / div >
< span class = "pill is-pending" data-ls-if = "{{file.chunksTotal}} != {{file.chunksUploaded}}" > pending< / span >
2021-11-08 21:26:06 +13:00
< / div >
< / td >
< td data-title = "Type: " >
< span class = "text-fade text-size-small" data-ls-bind = "{{file.mimeType}}" > < / span >
< / td >
< td data-title = "Size: " >
2022-02-09 03:09:42 +13:00
< span class = "text-fade text-size-small" data-ls-bind = "{{file.sizeOriginal|humanFileSize}}" > < / span >
< span class = "text-fade text-size-small" data-ls-bind = "{{file.sizeOriginal|humanFileUnit}}" > < / span >
2021-11-08 21:26:06 +13:00
< / td >
< td data-title = "Created: " >
< span class = "text-fade text-size-small" data-ls-bind = "{{file.dateCreated|dateText}}" > < / span >
< / td >
2022-02-18 03:35:45 +13:00
< td data-title = "" class = "cell-options-more" style = "overflow: visible" >
< div class = "drop-list end" data-ls-ui-open = "" data-button-aria = "File Options" data-button-class = "icon-dot-3 reset-inner-button" data-blur = "1" >
< ul class = "no-arrow" >
2022-02-22 20:17:19 +13:00
< li data-ls-ui-trigger = "modal-file-update-{{file.$id}}" > < span class = "margin-start-small icon icon-edit" > < / span > < span class = "link" > Update< / span > < / li >
< li data-ls-ui-trigger = "file-delete-{{file.$id}}" > < span class = "margin-start-small icon icon-trash-2" > < / span > < span class = "link" > Delete< / span > < / li >
2022-02-09 03:09:42 +13:00
< / ul >
< / div >
< / td >
2021-11-08 21:26:06 +13:00
< / tr >
< / tbody >
< / table >
< / div >
< / div >
< div class = "pull-end text-align-center paging" >
< form
data-service="storage.listFiles"
data-event="submit"
data-param-search="{{router.params.search}}"
2022-01-27 01:45:41 +13:00
data-param-bucket-id="{{router.params.id}}"
2021-11-08 21:26:06 +13:00
data-param-limit="<?php echo APP_PAGING_LIMIT ; ?> "
data-param-order-type="DESC"
data-scope="sdk"
data-name="project-files"
data-success="state"
data-success-param-state-keys="search,offset">
2022-02-28 22:26:55 +13:00
< button name = "offset" data-paging-back data-offset = "{{router.params.offset}}" data-total = "{{project-files.total}}" class = "margin-end round small" aria-label = "Back" > < i class = "icon-left-open" > < / i > < / button >
2021-11-08 21:26:06 +13:00
< / form >
2022-02-28 22:25:38 +13:00
< span data-ls-bind = "{{router.params.offset|pageCurrent}} / {{project-files.total|pageTotal}}" > < / span >
2021-11-08 21:26:06 +13:00
< form
data-service="storage.listFiles"
data-event="submit"
2022-01-27 01:47:57 +13:00
data-param-bucket-id="{{router.params.id}}"
2021-11-08 21:26:06 +13:00
data-param-search="{{router.params.search}}"
data-param-limit="<?php echo APP_PAGING_LIMIT ; ?> "
data-param-order-type="DESC"
data-scope="sdk"
data-name="project-files"
data-success="state"
data-success-param-state-keys="search,offset">
2022-02-28 22:26:55 +13:00
< button name = "offset" data-paging-next data-offset = "{{router.params.offset}}" data-total = "{{project-files.total}}" class = "margin-start round small" aria-label = "Next" > < i class = "icon-right-open" > < / i > < / button >
2021-11-08 21:26:06 +13:00
< / form >
< / div >
< div data-ui-modal class = "box modal sticky-footer close" data-button-text = "Add File" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
< h1 > Upload File< / h1 >
< form
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Storage File"
2022-02-11 13:11:09 +13:00
x-data
2022-02-11 15:04:58 +13:00
@submit.prevent="$store.uploader.uploadFile($event.target)"
2022-02-11 13:11:09 +13:00
>
2021-11-08 21:26:06 +13:00
< input type = "hidden" name = "bucketId" id = "files-bucketId" data-ls-bind = "{{router.params.id}}" >
< label for = "fileId" > File ID< / label >
< input
type="hidden"
data-custom-id
data-id-type="auto"
data-validator="storage.getFile"
required
maxlength="36"
name="fileId"
id="fileId" />
< label for = "file-read" > File< / label >
< input type = "file" name = "file" id = "file-file" size = "1" required >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > (Max file size allowed: <?php echo $fileLimitHuman ; ?> )</ div >
< label for = "file-read" > Read Access (< a data-ls-attrs = "href={{env.HOME}}/docs/permissions" target = "_blank" rel = "noopener" > Learn more< / a > )< / label >
< input type = "hidden" id = "file-read" name = "read" data-forms-tags data-cast-to = "json" value = " <?php echo htmlentities ( json_encode ([ 'role:all' ])); ?> " placeholder = "User ID, Team ID or Role" />
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Add 'role:all' for wildcard access< / div >
< label for = "file-write" > Write Access (< a data-ls-attrs = "href={{env.HOME}}/docs/permissions" target = "_blank" rel = "noopener" > Learn more< / a > )< / label >
< input type = "hidden" id = "file-write" name = "write" data-forms-tags data-cast-to = "json" value = "" placeholder = "User ID, Team ID or Role" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Add 'role:all' for wildcard access< / div >
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / footer >
< / form >
< / div >
< / div >
< / li >
< li data-state = "/console/storage/bucket/usage?id={{router.params.id}}&project={{router.params.project}}" >
2021-11-09 23:20:47 +13:00
< form
class="pull-end margin-start-small margin-top-small" data-ls-if="{{usage.range}} !== '90d'"
data-service="storage.getBucketUsage"
data-event="submit"
data-name="usage"
data-param-bucket-id="{{router.params.id}}"
data-param-range="90d">
< button class = "tick" > 90d< / button >
< / form >
< button class = "tick pull-end margin-start-small margin-top-small" data-ls-if = "{{usage.range}} === '90d'" disabled > 90d< / button >
< form
class="pull-end margin-start-small margin-top-small" data-ls-if="{{usage.range}} !== '30d'"
data-service="storage.getBucketUsage"
data-event="submit"
data-name="usage"
data-param-bucket-id="{{router.params.id}}">
< button class = "tick" > 30d< / button >
< / form >
< button class = "tick pull-end margin-start-small margin-top-small" data-ls-if = "{{usage.range}} === '30d'" disabled > 30d< / button >
< form
class="pull-end margin-start-small margin-top-small" data-ls-if="{{usage.range}} !== '24h'"
data-service="storage.getBucketUsage"
data-event="submit"
data-name="usage"
data-param-bucket-id="{{router.params.id}}"
data-param-range="24h">
< button class = "tick" > 24h< / button >
< / form >
< button class = "tick pull-end margin-start-small margin-top-small" data-ls-if = "{{usage.range}} === '24h'" disabled > 24h< / button >
2021-11-08 21:26:06 +13:00
< h2 > Usage< / h2 >
2021-11-09 23:20:47 +13:00
< div data-service = "storage.getBucketUsage" data-event = "load" data-name = "usage" data-param-bucket-id = "{{router.params.id}}" >
2021-11-18 02:21:58 +13:00
< h3 class = "margin-bottom-tiny" > Files< / h3 >
2021-11-18 02:20:35 +13:00
< p class = "text-fade" > Count of files over time< / p >
2021-11-09 23:20:47 +13:00
< div class = "box margin-bottom-small" >
< div class = "margin-start-negative-small margin-end-negative-small margin-top-negative-small margin-bottom-negative-small" >
2021-11-12 22:47:39 +13:00
< div class = "chart background-image-no border-no margin-bottom-no" >
< input type = "hidden" data-ls-bind = "{{usage}}" data-show-y-axis = "true" data-forms-chart = "Files=filesCount" data-height = "140" / >
2021-11-09 23:20:47 +13:00
< / div >
< / div >
< / div >
< ul class = "chart-notes margin-bottom-large" >
2021-11-19 23:53:46 +13:00
< li > Files < / li >
2021-11-09 23:20:47 +13:00
< / ul >
2021-11-18 02:21:58 +13:00
< h3 class = "margin-bottom-tiny" > Operations< / h3 >
2021-11-12 22:47:39 +13:00
< p class = "text-fade" > Count of files create, read, update and delete operations over time< / p >
2021-11-09 23:20:47 +13:00
< div class = "box margin-bottom-small" >
< div class = "margin-start-negative-small margin-end-negative-small margin-top-negative-small margin-bottom-negative-small" >
2021-11-12 22:47:39 +13:00
< div class = "chart background-image-no border-no margin-bottom-no" >
< input type = "hidden" data-ls-bind = "{{usage}}" data-show-y-axis = "true" data-forms-chart = "Create=filesCreate,Read=filesRead,Updated=filesUpdate,Deleted=filesDelete" data-colors = "create,read,update,delete" data-height = "140" / >
2021-11-09 23:20:47 +13:00
< / div >
< / div >
< / div >
2021-11-12 20:46:57 +13:00
< ul class = "chart-notes crud margin-bottom-large" >
2021-11-19 23:53:46 +13:00
< li > Create< / li >
< li > Read< / li >
< li > Update< / li >
< li > Delete < / li >
2021-11-09 23:20:47 +13:00
< / ul >
< / div >
2021-11-08 21:26:06 +13:00
< / li >
< li data-state = "/console/storage/bucket/settings?id={{router.params.id}}&project={{router.params.project}}" >
< h2 > Settings< / h2 >
< div class = "row responsive margin-top-negative" >
< div class = "col span-8 margin-bottom" >
< form
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Update Storage Bucket"
data-service="storage.updateBucket"
data-scope="sdk"
data-event="submit"
data-param-bucket-id="{{router.params.id}}"
data-success="alert,trigger"
data-success-param-alert-text="Updated bucket successfully"
data-success-param-trigger-events="storage.updateBucket"
data-failure="alert"
data-failure-param-alert-text="Failed to update bucket"
data-failure-param-alert-classname="error">
< label > < / label >
< div class = "box" >
< label for = "bucket-name" > Name< / label >
< input name = "name" id = "bucket-name" type = "text" autocomplete = "off" data-ls-bind = "{{project-bucket.name}}" data-forms-text-direction required placeholder = "Bucket Name" maxlength = "128" / >
< label for = "bucket-maximum-file-size" > Maximum File Size (bytes) < span class = "tooltip small" data-tooltip = "Limit file size allowed in the bucket." > < i class = "icon-info-circled" > < / i > < / span > < / label >
< input name = "maximumFileSize" id = "bucket-maximum-file-size" type = "number" autocomplete = "off" data-ls-bind = "{{project-bucket.maximumFileSize}}" min = "1" data-cast-to = "integer" / >
< div class = "margin-bottom" >
< input name = "enabled" type = "hidden" data-forms-switch data-cast-to = "boolean" data-ls-bind = "{{project-bucket.enabled}}" / > Enabled < span class = "tooltip" data-tooltip = "Mark whether bucket is enabled" > < i class = "icon-info-circled" > < / i > < / span >
< / div >
< div class = "margin-bottom" >
2021-11-09 23:20:47 +13:00
< input name = "encryption" type = "hidden" data-forms-switch data-cast-to = "boolean" data-ls-bind = "{{project-bucket.encryption}}" / > Encryption < span class = "tooltip" data-tooltip = "Mark whether bucket is encrypted" > < i class = "icon-info-circled" > < / i > < / span >
2021-11-08 21:26:06 +13:00
< / div >
< div class = "margin-bottom" >
2022-01-16 20:55:55 +13:00
< input name = "antivirus" type = "hidden" data-forms-switch data-cast-to = "boolean" data-ls-bind = "{{project-bucket.antivirus}}" / > Anti Virus < span class = "tooltip" data-tooltip = "Mark whether anti virus scanning is enabled" > < i class = "icon-info-circled" > < / i > < / span >
2021-11-08 21:26:06 +13:00
< / div >
< label for = "bucket-allowedFileExtensions" > Allowed File Extensions< / label >
< input type = "hidden" id = "bucket-allowedFileExtensions" name = "allowedFileExtensions" data-forms-tags data-cast-to = "json" data-ls-bind = "{{project-bucket.allowedFileExtensions}}" placeholder = "Allowed file extensions (pdf, mp4)" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Leave empty to allow all.< / div >
< label class = "margin-bottom-small" > Permissions< / label >
< p class = "text-fade text-size-small" > Choose the permissions model for this bucket.< / p >
< hr class = "margin-top-small" / >
< div class = "row" >
2022-01-31 20:11:24 +13:00
< div class = "col span-1" > < input name = "permission" value = "bucket" type = "radio" class = "margin-top-tiny" data-ls-bind = "{{project-bucket.permission}}" / > < / div >
< div class = "col span-11" >
2021-11-08 21:26:06 +13:00
< b > Bucket Level< / b >
2021-12-05 22:43:30 +13:00
< p class = "text-fade margin-top-tiny" > With Bucket Level permissions, you assign permissions only once in the bucket.< / p >
< p class = "text-fade margin-top-tiny" > In this permission level permissions assigned to bucket takes the precedence and file permissions are ignored< / p >
2021-12-05 21:05:40 +13:00
< div data-ls-if = "{{project-bucket.permission}} == 'bucket'" >
2022-01-16 20:55:55 +13:00
2021-12-05 21:05:40 +13:00
< label for = "bucket-read" > Read Access < span class = "text-size-small" > (< a data-ls-attrs = "href={{env.HOME}}/docs/permissions" target = "_blank" rel = "noopener" > Learn more< / a > )< / span > < / label >
2022-02-28 00:30:31 +13:00
< input type = "hidden" id = "bucket-read" name = "read" data-forms-tags data-cast-to = "json" data-ls-bind = "{{project-bucket.$read}}" placeholder = "User ID, Team ID or Role" / >
2022-01-24 23:09:21 +13:00
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Add 'role:all' for wildcard access< / div >
2021-12-05 21:05:40 +13:00
< label for = "bucket-write" > Write Access < span class = "text-size-small" > (< a data-ls-attrs = "href={{env.HOME}}/docs/permissions" target = "_blank" rel = "noopener" > Learn more< / a > )< / label >
2022-02-28 00:30:31 +13:00
< input type = "hidden" id = "bucket-write" name = "write" data-forms-tags data-cast-to = "json" data-ls-bind = "{{project-bucket.$write}}" placeholder = "User ID, Team ID or Role" / >
2022-01-24 23:09:21 +13:00
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Add 'role:all' for wildcard access< / div >
2021-12-05 21:05:40 +13:00
< / div >
2021-11-08 21:26:06 +13:00
< / div >
< / div >
2022-01-31 19:50:15 +13:00
< div class = "row" >
< div class = "col span-1" > < input name = "permission" value = "file" type = "radio" class = "margin-top-no" data-ls-bind = "{{project-bucket.permission}}" / > < / div >
< div class = "col span-11" >
< b > File Level< / b >
< p class = "text-fade margin-top-tiny" > With File Level permissions, you have granular access control over every file. Users will only be able to access files for which they have explicit permissions.< / p >
< p class = "text-fade margin-top-tiny" > In this permission level file permissions take precedence and bucket permissions are ignored.< / p >
< / div >
< / div >
2021-11-08 21:26:06 +13:00
< hr class = "margin-top-no" / >
< button > Update< / button >
< / form >
< / div >
< / div >
< div class = "col span-4 sticky-top" >
< label > Bucket ID< / label >
< div class = "input-copy margin-bottom" >
< input id = "id" type = "text" autocomplete = "off" placeholder = "" data-ls-bind = "{{project-bucket.$id}}" disabled data-forms-copy class = "margin-bottom-no" / >
< / div >
< ul class = "margin-bottom-large text-fade text-size-small" >
< li class = "margin-bottom-small" > < i class = "icon-angle-circled-right margin-start-tiny margin-end-tiny" > < / i > < button data-ls-ui-trigger = "open-json" class = "link text-size-small" > View as JSON< / button > < / li >
< li class = "margin-bottom-small" > < i class = "icon-angle-circled-right margin-start-tiny margin-end-tiny" > < / i > Last Updated: < span data-ls-bind = "{{project-bucket.dateUpdated|dateText}}" > < / span > < / li >
< li class = "margin-bottom-small" > < i class = "icon-angle-circled-right margin-start-tiny margin-end-tiny" > < / i > Created: < span data-ls-bind = "{{project-bucket.dateCreated|dateText}}" > < / span > < / li >
< / ul >
< form name = "storage.deleteBucket" class = "margin-bottom"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Delete Storage Bucket"
data-service="storage.deleteBucket"
data-event="submit"
data-param-bucket-id="{{router.params.id}}"
data-confirm="Are you sure you want to delete this bucket?"
data-success="alert,trigger,redirect"
data-success-param-alert-text="Bucket deleted successfully"
data-success-param-trigger-events="storage.deleteBucket"
data-success-param-redirect-url="/console/storage?project={{router.params.project}}"
data-failure="alert"
data-failure-param-alert-text="Failed to delete bucket"
data-failure-param-alert-classname="error">
< button type = "submit" class = "danger fill" > Delete Bucket< / button >
< / form >
< / div >
< / div >
< / li >
< / ul >
< / div >
< / div >