2021-08-14 22:13:24 +12:00
<?php
$logs = $this->getParam('logs', null);
?>
2020-03-09 08:27:21 +13:00
< div
2019-08-08 06:10:53 +12:00
data-service="database.getCollection"
data-param-collection-id="{{router.params.id}}"
2020-03-09 08:27:21 +13:00
data-scope="sdk"
2021-08-09 03:59:48 +12:00
data-event="load,database.updateCollection,database.createAttribute,database.deleteAttribute,database.createIndex,database.deleteIndex"
2019-08-08 06:10:53 +12:00
data-name="project-collection">
2019-08-17 18:06:56 +12:00
2020-03-09 08:27:21 +13:00
< div class = "cover" >
< h1 class = "zone xl margin-bottom-large" >
2020-06-10 02:43:24 +12:00
< a data-ls-attrs = "href=/console/database?project={{router.params.project}}" class = "back text-size-small link-return-animation--start" > < i class = "icon-left-open" > < / i > Database< / a >
2019-08-17 18:06:56 +12:00
2020-03-09 08:27:21 +13:00
< br / >
2019-08-17 18:06:56 +12:00
2021-07-29 20:09:24 +12:00
< span data-ls-bind = "{{project-collection.name}}" > < / span >
2020-03-09 08:27:21 +13:00
< / h1 >
2019-08-17 18:06:56 +12:00
< / div >
2020-04-21 20:12:06 +12:00
< div data-ui-modal class = "modal width-large box close" data-button-hide = "on" data-open-event = "open-json" >
2021-08-09 17:47:05 +12:00
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2020-04-21 20:29:09 +12:00
< h2 > JSON View< / h2 >
2020-04-21 20:12:06 +12:00
< div class = "margin-bottom" >
< input type = "hidden" data-ls-bind = "{{project-collection}}" data-forms-code / >
< / div >
< button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / div >
2020-03-09 08:27:21 +13:00
< div class = "zone xl" >
< ul class = "phases clear" data-ui-phases data-selected = "{{router.params.tab}}" >
< li data-state = "/console/database/collection?id={{router.params.id}}&project={{router.params.project}}" >
2020-04-02 10:41:29 +13:00
2020-03-09 08:27:21 +13:00
< h2 > Documents< / h2 >
2020-03-15 17:54:55 +13:00
< div
data-service="database.listDocuments"
data-event="load,database.createDocument,database.updateDocument,database.deleteDocument"
2020-03-16 06:16:42 +13:00
data-param-collection-id="{{router.params.id}}"
2020-03-15 17:54:55 +13:00
data-param-limit="<?php echo APP_PAGING_LIMIT ; ?> "
2021-08-16 09:09:40 +12:00
data-param-order-types="DESC"
data-param-order-types-cast-to="array"
2020-03-15 17:54:55 +13:00
data-scope="sdk"
2021-11-24 21:33:21 +13:00
data-name="project-documents"
2022-01-04 01:30:03 +13:00
x-data="{ project: new URLSearchParams(location.search).get('project') }">
2020-03-15 17:54:55 +13:00
< div data-ls-if = "0 == {{project-documents.sum}}" class = "box margin-bottom" >
2020-05-22 13:39:00 +12:00
< h3 class = "margin-bottom-small text-bold" > No Documents Found< / h3 >
2020-03-15 17:54:55 +13:00
2021-08-09 19:08:49 +12:00
< p class = "margin-bottom-no" > Add your first document to get started< / p >
2020-03-15 17:54:55 +13:00
< / div >
2021-08-16 09:32:27 +12:00
< div data-ls-if = "({{project-documents.sum}})" class = "margin-top-negative" >
2021-10-30 01:01:48 +13:00
< div class = "margin-bottom-small text-align-end text-size-small text-fade" >< span data-ls-bind = "{{project-documents.sum}}" ></ span >< span data-ls-if = "{{project-documents.sum}} == <?php echo APP_LIMIT_COUNT ; ?> " > +</ span > documents found</ div >
2021-08-16 09:09:40 +12:00
< div class = "box margin-bottom y-scroll text-size-small" >
2021-11-24 21:33:21 +13:00
<!-- Alpine.js Start -->
< table
data-ls-attrs="x-init=attributes = {{project-collection.attributes}}"
x-data="{attributes: []}"
class="vertical borders">
2020-03-16 06:16:42 +13:00
< thead >
2021-11-24 21:33:21 +13:00
< tr >
< td style = "width: 170px" > $id < i class = "pull-end text-size-xs icon-key" > < / i > < / td >
< template x-for = "attr in attributes" >
< td x-show = "attr.status === 'available'" style = "width: 170px" >
< i :class = "'icon-' + (attr.format ? attr.format : attr.type)" class = "pull-end text-size-xs" > < / i >
< span x-text = "attr.key" class = "text-bold" > < / span >
< span x-show = "attr.array" class = "text-size-small" > []< / span >
< / td >
< / template >
2020-03-16 06:16:42 +13:00
< / tr >
< / thead >
2021-11-24 21:33:21 +13:00
< tbody data-ls-attrs = "x-init=documents = {{project-documents.documents}}" x-data = "{documents: []}" >
< template x-for = "doc in documents" >
< tr >
2021-12-02 01:19:15 +13:00
< td data-title = "$id: " >
2021-11-24 21:33:21 +13:00
< a :href = "`/console/database/document?id=${doc.$id}&collection=${doc.$collection}&project=${project}`" x-text = "doc.$id" > < / a >
< / td >
< template x-for = "attr in attributes" >
2021-12-02 01:19:15 +13:00
< td x-show = "attr.status === 'available'" :data-title = "attr.key + ':'" >
2021-11-24 21:33:21 +13:00
< a :href = "`/console/database/document?id=${doc.$id}&collection=${doc.$collection}&project=${project}`" >
< span x-text = "doc[attr.key] ?? 'n/a'" > < / span >
< / a >
< / td >
< / template >
< / tr >
< / template >
2020-03-16 06:16:42 +13:00
< / tbody >
< / table >
2021-11-24 21:33:21 +13:00
<!-- Alpine.js End -->
2020-03-16 06:16:42 +13:00
< / div >
< / div >
2021-10-30 04:51:21 +13:00
< div class = "pull-end text-align-center paging" >
2020-03-16 06:16:42 +13:00
< form
data-service="database.listDocuments"
data-event="submit"
data-param-collection-id="{{router.params.id}}"
data-param-limit="<?php echo APP_PAGING_LIMIT ; ?> "
2021-11-10 22:43:51 +13:00
data-param-order-types="DESC"
data-param-order-types-cast-to="array"
2020-03-16 06:16:42 +13:00
data-scope="sdk"
data-name="project-documents"
data-success="state"
2021-10-30 04:51:21 +13:00
data-success-param-state-keys="search,offset">
< button name = "offset" data-paging-back data-offset = "{{router.params.offset}}" data-sum = "{{project-documents.sum}}" class = "margin-end round small" aria-label = "Back" > < i class = "icon-left-open" > < / i > < / button >
2020-03-16 06:16:42 +13:00
< / form >
2021-10-30 04:51:21 +13:00
< span data-ls-bind = "{{router.params.offset|pageCurrent}} / {{project-documents.sum|pageTotal}}" > < / span >
2020-03-16 06:16:42 +13:00
< form
data-service="database.listDocuments"
data-event="submit"
data-param-collection-id="{{router.params.id}}"
data-param-limit="<?php echo APP_PAGING_LIMIT ; ?> "
2021-11-10 22:43:51 +13:00
data-param-order-types="DESC"
data-param-order-types-cast-to="array"
2020-03-16 06:16:42 +13:00
data-scope="sdk"
data-name="project-documents"
data-success="state"
2021-10-30 04:51:21 +13:00
data-success-param-state-keys="search,offset">
< button name = "offset" data-paging-next data-offset = "{{router.params.offset}}" data-sum = "{{project-documents.sum}}" class = "margin-start round small" aria-label = "Next" > < i class = "icon-right-open" > < / i > < / button >
2020-03-16 06:16:42 +13:00
< / form >
2020-03-15 17:54:55 +13:00
< / div >
2021-04-03 19:29:13 +13:00
2021-08-29 19:43:09 +12:00
< a data-ls-if = "0 < {{project-collection.attributes.length}}" data-ls-attrs = "href=/console/database/document/new?collection={{router.params.id}}&project={{router.params.project}}" class = "button" >
2021-04-03 19:29:13 +13:00
Add Document
< / a >
2021-09-27 03:30:21 +13:00
< a data-ls-if = "!{{project-collection.attributes.length}}" data-ls-attrs = "href=/console/database/collection/attributes?id={{router.params.id}}&project={{router.params.project}}" class = "button" >
Create Attribute
< / a >
2020-03-15 17:54:55 +13:00
< / div >
2020-03-09 08:27:21 +13:00
< / li >
2021-08-08 00:45:44 +12:00
< li data-state = "/console/database/collection/attributes?id={{router.params.id}}&project={{router.params.project}}" >
2021-08-09 03:59:48 +12:00
< h2 > Attributes< / h2 >
2021-08-08 00:45:44 +12:00
2021-08-09 03:59:48 +12:00
< div class = "clear box margin-bottom" >
2021-08-21 16:47:04 +12:00
< div data-ls-if = "0 == {{project-collection.attributes.length}}" >
2021-08-08 00:45:44 +12:00
< h3 class = "margin-bottom-small text-bold" > No Attributes Found< / h3 >
2021-10-28 05:55:36 +13:00
2021-08-09 19:08:49 +12:00
< p class = "margin-bottom-no" > Add your first attribute to get started< / p >
2021-08-08 00:45:44 +12:00
< / div >
2021-08-09 03:59:48 +12:00
2021-08-21 16:47:04 +12:00
< table class = "vertical" data-ls-if = "0 < {{project-collection.attributes.length}}" >
2021-08-09 03:59:48 +12:00
< thead >
< tr >
2021-08-16 09:09:40 +12:00
< th width = "30" > < / th >
2021-08-21 16:47:04 +12:00
< th width = "100" > < / th >
2021-08-16 09:09:40 +12:00
< th width = "130" > Attribute ID< / th >
2021-08-09 03:59:48 +12:00
< th width = "100" > Type< / th >
< th > < / th >
2022-01-01 05:54:55 +13:00
< th width = "32" > < / th >
2021-08-09 03:59:48 +12:00
< / tr >
< / thead >
< tbody data-ls-loop = "project-collection.attributes" data-ls-as = "attribute" >
< tr >
2021-08-16 09:09:40 +12:00
< td >
2021-09-27 03:30:21 +13:00
< i data-ls-if = "!{{attribute.format}}" data-ls-attrs = "class=icon-{{attribute.type}}" > < / i >
2021-10-28 05:55:36 +13:00
< i data-ls-if = "{{attribute.format}}" data-ls-attrs = "class=icon-{{attribute.format}}" > < / i >
2021-08-16 09:09:40 +12:00
< / td >
2021-11-18 23:33:42 +13:00
2021-08-09 03:59:48 +12:00
< td data-title = "Status" >
2021-08-21 16:47:04 +12:00
< span data-ls-if = "{{attribute.status}} == 'available'" class = "text-size-small text-success" > available < / span >
< span data-ls-if = "{{attribute.status}} == 'processing'" class = "text-size-small text-info" > processing < / span >
< span data-ls-if = "{{attribute.status}} == 'failed'" class = "text-size-small text-danger" > failed < / span >
2021-08-22 20:00:09 +12:00
< span data-ls-if = "{{attribute.status}} == 'deleting'" class = "text-size-small text-danger" > deleting < / span >
2021-10-28 05:55:36 +13:00
< span data-ls-if = "{{attribute.status}} == 'stuck'" class = "text-size-small text-danger" > stuck < / span >
2021-08-09 03:59:48 +12:00
< / td >
< td data-title = "Attribute ID: " >
2021-11-25 02:27:44 +13:00
< span class = "text-size-small" data-ls-bind = "{{attribute.key}}" > < / span >
2021-08-09 03:59:48 +12:00
< / td >
< td data-title = "Type:" >
2021-11-25 02:27:44 +13:00
< span class = "text-size-small" data-ls-if = "!{{attribute.array}}" data-ls-bind = "{{attribute.type}}" > < / span >
< span class = "text-size-small" data-ls-if = "{{attribute.array}}" data-ls-bind = "{{attribute.type}}[]" > < / span >
2021-09-27 03:30:21 +13:00
< span class = "text-size-small" data-ls-if = "{{attribute.format}}" data-ls-bind = "({{attribute.format}})" > < / span >
2021-08-09 03:59:48 +12:00
< / td >
< td data-title = "" >
2021-08-16 09:09:40 +12:00
< span class = "text-size-small text-danger" data-ls-if = "{{attribute.required}}" > required< / span >
2021-08-09 03:59:48 +12:00
< / td >
< td data-title = "" >
2022-01-01 05:54:55 +13:00
< div data-ui-modal class = "box modal sticky-footer width-large close" data-button-class = "icon-dot-3 link" data-button-element = "i" >
2022-01-01 02:02:19 +13:00
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
< h1 >
< i data-ls-if = "!{{attribute.format}}" data-ls-attrs = "class=icon-{{attribute.type}}" > < / i >
< i data-ls-if = "{{attribute.format}}" data-ls-attrs = "class=icon-{{attribute.format}}" > < / i >
< span data-ls-bind = "{{attribute.key}}" > < / span >
< / h1 >
< hr / >
< div class = "row responsive modalize" >
< form >
< div class = "col span-12" >
< label > Key< / label >
< div class = "input-copy" >
< input type = "text" data-ls-bind = "{{attribute.key}}" data-forms-copy disabled / >
< / div >
2022-01-01 02:29:00 +13:00
2022-01-01 02:02:19 +13:00
< label > Type< / label >
< input type = "text" data-ls-bind = "{{attribute.type}}" disabled / >
< div data-ls-if = "{{attribute.format}}" >
< label > Format< / label >
< input type = "text" data-ls-bind = "{{attribute.format}}" class = "full-width" disabled / >
< / div >
2022-01-01 02:29:00 +13:00
< div class = "row responsive thin" >
< div class = "col span-6 margin-bottom-small" >
< label > Required< / label >
< input type = "text" data-ls-bind = "{{attribute.required}}" disabled / >
< / div >
< div class = "col span-6 margin-bottom-small" >
< label > Array< / label >
< input type = "text" data-ls-bind = "{{attribute.array}}" disabled / >
< / div >
< / div >
2022-01-01 02:02:19 +13:00
< div data-ls-if = "{{attribute.default}}" >
< label > Default Value< / label >
< input type = "text" data-ls-bind = "{{attribute.default}}" class = "full-width" disabled / >
< / div >
< div data-ls-if = "{{attribute.size}}" >
< label for = "size" > Length< / label >
< input type = "text" data-ls-bind = "{{attribute.size}}" class = "full-width" disabled / >
< / div >
< div data-ls-if = "{{attribute.format}} == 'enum'" >
< label > Elements< / label >
< span data-ls-loop = "attribute.elements" data-ls-as = "element" >
< input type = "text" data-ls-bind = "{{element}}" class = "full-width" disabled / >
< / span >
< / div >
2022-01-01 02:29:00 +13:00
< div data-ls-if = "{{attribute.min}} && {{attribute.max}}" class = "row responsive thin" >
< div class = "col span-6 margin-bottom-small" >
< label > Min< / label >
< input type = "text" name = "min" data-ls-bind = "{{attribute.min}}" class = "full-width" disabled / >
< / div >
< div class = "col span-6 margin-bottom-small" >
< label > Max< / label >
< input type = "text" name = "max" data-ls-bind = "{{attribute.max}}" class = "full-width" disabled / >
< / div >
2022-01-01 02:02:19 +13:00
< / div >
2022-01-01 02:29:00 +13:00
2022-01-01 02:02:19 +13:00
< / div >
< / form >
< / div >
< footer >
2022-01-01 05:54:55 +13:00
< button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< form
data-ls-if="{{attribute.status}} !== 'deleting'"
class="pull-end"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Delete Collection Attribute"
data-service="database.deleteAttribute"
data-scope="sdk"
data-event="submit"
data-confirm="Are you sure you want to delete this attribute?"
data-success="alert,trigger"
data-success-param-alert-text="Deleted attribute successfully"
data-success-param-trigger-events="database.deleteAttribute"
data-failure="alert"
data-failure-param-alert-text="Failed to delete attribute"
data-failure-param-alert-classname="error">
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{project-collection.$id}}" / >
< input type = "hidden" name = "key" data-ls-bind = "{{attribute.key}}" / >
< button class = "danger" > Delete< / button >
< / form >
2022-01-01 02:02:19 +13:00
< / footer >
< / div >
2021-08-09 03:59:48 +12:00
< / td >
< / tr >
< / tbody >
< / table >
< / div >
2022-01-01 05:54:55 +13:00
< div class = "drop-list pull-start" data-ls-ui-open = "" data-button-aria = "Choose Attribute" data-button-text = "Add Attribute" data-button-class = "button" data-blur = "1" >
2021-08-09 03:59:48 +12:00
< ul >
< li >
2021-08-22 20:00:09 +12:00
< div class = "link new-attribute-string" > < i class = "avatar icon-string" > < / i > New String Attribute< / div >
2021-08-09 03:59:48 +12:00
< / li >
< li >
2021-08-22 20:00:09 +12:00
< div class = "link new-attribute-integer" > < i class = "avatar icon-integer" > < / i > New Integer Attribute< / div >
2021-08-09 03:59:48 +12:00
< / li >
< li >
2021-08-22 20:00:09 +12:00
< div class = "link new-attribute-float" > < i class = "avatar icon-float" > < / i > New Float Attribute< / div >
2021-08-09 03:59:48 +12:00
< / li >
< li >
2021-08-22 20:00:09 +12:00
< div class = "link new-attribute-boolean" > < i class = "avatar icon-boolean" > < / i > New Boolean Attribute< / div >
< / li >
< li >
2021-08-23 00:59:44 +12:00
< div class = "link new-attribute-url" > < i class = "avatar icon-link" > < / i > New URL Attribute< / div >
2021-08-22 20:00:09 +12:00
< / li >
< li >
2021-08-23 00:59:44 +12:00
< div class = "link new-attribute-email" > < i class = "avatar icon-mail" > < / i > New Email Attribute< / div >
2021-08-22 20:00:09 +12:00
< / li >
< li >
2021-08-23 00:59:44 +12:00
< div class = "link new-attribute-ip" > < i class = "avatar icon-ip" > < / i > New IP Attribute< / div >
2021-08-09 03:59:48 +12:00
< / li >
2021-10-30 01:01:48 +13:00
< li >
2021-11-24 01:46:20 +13:00
< div class = "link new-attribute-enum" > < i class = "avatar icon-enum" > < / i > New Enum Attribute< / div >
2021-10-30 01:01:48 +13:00
< / li >
2021-08-09 03:59:48 +12:00
< / ul >
2021-08-08 00:45:44 +12:00
< / div >
< / li >
< li data-state = "/console/database/collection/indexes?id={{router.params.id}}&project={{router.params.project}}" >
< h2 > Indexes< / h2 >
2021-08-09 03:59:48 +12:00
< div class = "clear box margin-bottom" >
2021-08-21 16:47:04 +12:00
< div data-ls-if = "0 == {{project-collection.indexes.length}}" >
2021-08-09 03:59:48 +12:00
< h3 class = "margin-bottom-small text-bold" > No Indexes Found< / h3 >
2021-10-28 05:55:36 +13:00
2021-08-09 19:08:49 +12:00
< p class = "margin-bottom-no" > Add your first index to get started< / p >
2021-08-09 03:59:48 +12:00
< / div >
2021-08-08 00:45:44 +12:00
2021-08-21 16:47:04 +12:00
< table class = "vertical multi-line" data-ls-if = "0 < {{project-collection.indexes.length}}" >
2021-08-09 03:59:48 +12:00
< thead >
< tr >
2021-08-16 09:09:40 +12:00
< th width = "30" > < / th >
< th width = "80" > < / th >
2021-12-18 00:16:53 +13:00
< th width = "130" > Index Key< / th >
2021-08-09 03:59:48 +12:00
< th width = "100" > Type< / th >
2021-08-09 19:08:49 +12:00
< th width = "180" > Attributes< / th >
2021-08-09 03:59:48 +12:00
< th > < / th >
< th width = "80" > < / th >
< / tr >
< / thead >
< tbody data-ls-loop = "project-collection.indexes" data-ls-as = "index" >
< tr >
2021-08-16 09:09:40 +12:00
< td >
< i class = "icon-key" > < / i >
< / td >
2021-08-09 03:59:48 +12:00
< td data-title = "Status" >
2021-08-23 04:36:26 +12:00
< span data-ls-if = "{{index.status}} == 'available'" class = "text-size-small text-success" > available < / span >
< span data-ls-if = "{{index.status}} == 'processing'" class = "text-size-small text-info" > processing < / span >
< span data-ls-if = "{{index.status}} == 'failed'" class = "text-size-small text-danger" > failed < / span >
< span data-ls-if = "{{index.status}} == 'deleting'" class = "text-size-small text-danger" > deleting < / span >
2022-01-04 23:52:59 +13:00
< span data-ls-if = "{{index.status}} == 'stuck'" class = "text-size-small text-danger" > stuck < / span >
2021-08-09 03:59:48 +12:00
< / td >
2021-12-18 00:16:53 +13:00
< td data-title = "Index Key: " >
2021-08-23 04:36:26 +12:00
< span class = "text-size-small" data-ls-bind = "{{index.key}}" > < / span > < span class = "text-size-small" data-ls-if = "{{index.size}}" data-ls-bind = "({{index.size}})" > < / span >
2021-08-09 03:59:48 +12:00
< / td >
< td data-title = "Type:" >
< span class = "text-size-small" data-ls-bind = "{{index.type}}" > < / span >
< span class = "text-size-small" data-ls-if = "{{index.array}}" > []< / span >
< / td >
2021-08-09 19:08:49 +12:00
< td data-title = "Attributes:" >
2021-08-14 22:13:24 +12:00
< span class = "text-size-small" data-ls-bind = "{{index|indexAttributes}}" > < / span >
2021-08-09 03:59:48 +12:00
< / td >
< td data-title = "" >
2021-08-16 09:09:40 +12:00
< span class = "text-size-small text-danger" data-ls-if = "{{index.required}}" > required< / span >
2021-08-09 03:59:48 +12:00
< / td >
< td data-title = "" >
2021-10-28 05:55:36 +13:00
< form
data-ls-if="{{index.status}} !== 'deleting'"
2021-08-23 16:06:53 +12:00
class="pull-end"
2021-08-09 03:59:48 +12:00
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Delete Collection Index"
data-service="database.deleteIndex"
data-scope="sdk"
data-event="submit"
data-confirm="Are you sure you want to delete this index?"
data-success="alert,trigger"
data-success-param-alert-text="Deleted index successfully"
data-success-param-trigger-events="database.deleteIndex"
data-failure="alert"
data-failure-param-alert-text="Failed to delete index"
data-failure-param-alert-classname="error">
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{project-collection.$id}}" / >
2021-12-18 00:16:53 +13:00
< input type = "hidden" name = "key" data-ls-bind = "{{index.key}}" / >
2021-08-09 03:59:48 +12:00
< button class = "danger small" > Delete< / button >
< / form >
< / td >
< / tr >
< / tbody >
< / table >
2021-08-08 00:45:44 +12:00
< / div >
2021-08-09 03:59:48 +12:00
2021-08-09 19:08:49 +12:00
< button class = "new-index" > Add Index< / button >
2021-08-08 00:45:44 +12:00
< / li >
2021-08-11 04:18:28 +12:00
< li data-state = "/console/database/collection/activity?id={{router.params.id}}&project={{router.params.project}}" >
2021-12-16 23:25:17 +13:00
< h2 > Activity< / h2 >
2021-08-11 04:18:28 +12:00
2021-10-26 05:58:11 +13:00
<?php echo $logs -> render (); ?>
2021-08-11 04:18:28 +12:00
< / li >
2021-08-16 09:32:27 +12:00
< li data-state = "/console/database/collection/usage?id={{router.params.id}}&project={{router.params.project}}" >
2021-10-28 05:55:36 +13:00
< form
class="pull-end margin-start-small margin-top-small" data-ls-if="{{usage.range}} !== '90d'"
2021-10-26 05:58:11 +13:00
data-service="database.getCollectionUsage"
data-event="submit"
data-name="usage"
data-param-collection-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 >
2021-10-28 05:55:36 +13:00
< form
class="pull-end margin-start-small margin-top-small" data-ls-if="{{usage.range}} !== '30d'"
2021-10-26 05:58:11 +13:00
data-service="database.getCollectionUsage"
data-event="submit"
data-name="usage"
data-param-collection-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 >
2021-10-28 05:55:36 +13:00
< form
class="pull-end margin-start-small margin-top-small" data-ls-if="{{usage.range}} !== '24h'"
2021-10-26 05:58:11 +13:00
data-service="database.getCollectionUsage"
data-event="submit"
data-name="usage"
data-param-collection-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-08-16 09:32:27 +12:00
< h2 > Usage< / h2 >
2021-10-26 05:58:11 +13:00
2021-10-28 05:55:36 +13:00
< div data-service = "database.getCollectionUsage" data-event = "load" data-name = "usage" data-param-collection-id = "{{router.params.id}}" >
2021-11-18 23:33:42 +13:00
< h3 class = "margin-bottom-tiny" > Documents< / h3 >
< p class = "text-fade" > Count of documents over time< / p >
2021-10-26 05:58:11 +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-25 23:54:02 +13:00
< div class = "chart background-image-no border-no margin-bottom-no" >
2021-11-18 23:33:42 +13:00
< input type = "hidden" data-ls-bind = "{{usage}}" data-forms-chart = "Documents=documentsCount" data-show-y-axis = "true" data-height = "140" / >
2021-10-26 05:58:11 +13:00
< / div >
< / div >
< / div >
< ul class = "chart-notes margin-bottom-large" >
2021-10-27 02:19:28 +13:00
< li > Documents < span data-ls-bind = "({{usage.documentsCount|statsGetLast|statsTotal}})" > < / span > < / li >
2021-10-26 05:58:11 +13:00
< / ul >
2021-11-18 23:33:42 +13:00
< h3 class = "margin-bottom-tiny" > Operations< / h3 >
< p class = "text-fade" > Count of documents create, read, update and delete operations over time< / p >
2021-10-26 05:58:11 +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-25 23:54:02 +13:00
< div class = "chart background-image-no border-no margin-bottom-no" >
2021-11-18 23:33:42 +13:00
< input
type="hidden"
data-ls-bind="{{usage}}"
data-forms-chart="Created=documentsCreate,Read=documentsRead,Updated=documentsUpdate,Deleted=documentsDelete"
data-show-y-axis="true"
data-colors="create,read,update,delete"
data-height="140" />
2021-10-26 05:58:11 +13:00
< / div >
< / div >
< / div >
2021-11-18 23:33:42 +13:00
< ul class = "chart-notes margin-bottom-large crud" >
2021-11-19 02:19:14 +13:00
< li > Created< / li >
< li > Read< / li >
< li > Updated< / li >
< li > Deleted< / li >
2021-10-26 05:58:11 +13:00
< / ul >
< / div >
2021-08-16 09:32:27 +12:00
< / li >
2020-04-25 07:58:40 +12:00
< li data-state = "/console/database/collection/settings?id={{router.params.id}}&project={{router.params.project}}" >
< h2 > Settings< / h2 >
2020-03-09 08:27:21 +13:00
< div class = "row responsive margin-top-negative" >
< div class = "col span-8 margin-bottom" >
2020-03-17 07:41:56 +13:00
< form
2021-01-18 19:29:26 +13:00
data-analytics
data-analytics-activity
2020-03-09 08:27:21 +13:00
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Update Database Collection"
data-service="database.updateCollection"
data-scope="sdk"
data-event="submit"
data-param-collection-id="{{router.params.id}}"
2021-08-16 09:09:40 +12:00
data-success="alert,trigger"
2020-03-09 08:27:21 +13:00
data-success-param-alert-text="Updated collection successfully"
data-success-param-trigger-events="database.updateCollection"
data-failure="alert"
data-failure-param-alert-text="Failed to update collection"
data-failure-param-alert-classname="error">
< label > < / label >
2020-03-16 06:16:42 +13:00
2020-04-28 06:36:21 +12:00
< div class = "box" >
2021-07-29 20:09:24 +12:00
< label for = "collection-name" > Name< / label >
< input name = "name" id = "collection-name" type = "text" autocomplete = "off" data-ls-bind = "{{project-collection.name}}" data-forms-text-direction required placeholder = "Collection Name" maxlength = "128" / >
2021-12-14 01:42:17 +13:00
< div class = "margin-bottom" >
< input name = "enabled" type = "hidden" data-forms-switch data-cast-to = "boolean" data-ls-bind = "{{project-collection.enabled}}" / > Enabled < span class = "tooltip" data-tooltip = "Mark whether collection is enabled" > < i class = "icon-info-circled" > < / i > < / span >
< / div >
2021-08-13 23:19:16 +12:00
< label class = "margin-bottom-small" > Permissions< / label >
< p class = "text-fade text-size-small" > Choose the permissions model for this collection.< / p >
2021-10-28 00:05:12 +13:00
2021-08-13 23:19:16 +12:00
< hr class = "margin-top-small" / >
< div class = "row" >
2021-08-21 16:47:04 +12:00
< div class = "col span-1" > < input name = "permission" value = "collection" type = "radio" class = "margin-top-tiny" data-ls-bind = "{{project-collection.permission}}" / > < / div >
2021-08-13 23:19:16 +12:00
< div class = "col span-11" >
< b > Collection Level< / b >
2021-12-14 23:14:39 +13:00
< p class = "text-fade margin-top-tiny" > With Collection Level permissions, you assign permissions only once in the collection.< / p >
2021-12-16 23:23:04 +13:00
< p class = "text-fade margin-top-tiny" > In this permission level, permissions assigned to collection takes the precedence and documents permissions are ignored.< / p >
2021-11-26 02:18:53 +13:00
< div data-ls-if = "{{project-collection.permission}} === 'collection'" >
< label for = "collection-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 >
< input type = "hidden" id = "collection-read" name = "read" data-forms-tags data-cast-to = "json" data-ls-bind = "{{project-collection.$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 = "collection-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 >
< input type = "hidden" id = "collection-write" name = "write" data-forms-tags data-cast-to = "json" data-ls-bind = "{{project-collection.$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 >
< / div >
2021-08-13 23:19:16 +12:00
< / div >
< / div >
2022-01-22 09:35:52 +13:00
< div class = "row" >
< div class = "col span-1" > < input name = "permission" value = "document" type = "radio" class = "margin-top-no" data-ls-bind = "{{project-collection.permission}}" / > < / div >
< div class = "col span-11" >
< b > Document Level< / b >
< p class = "text-fade margin-top-tiny" > With Document Level permissions, you have granular access control over every document. Users will only be able to access documents for which they have explicit permissions.< / p >
< p class = "text-fade margin-top-tiny" > In this permission level, document permissions take precedence and collection permissions are ignored.< / p >
< / div >
< / div >
2021-08-13 23:19:16 +12:00
< hr class = "margin-top-no" / >
2020-03-09 08:27:21 +13:00
< button > Update< / button >
2021-10-28 05:55:36 +13:00
< / form >
< / div >
< / div >
< div class = "col span-4 sticky-top" >
< label > Collection ID< / label >
< div class = "input-copy margin-bottom" >
< input id = "id" type = "text" autocomplete = "off" placeholder = "" data-ls-bind = "{{project-collection.$id}}" disabled data-forms-copy class = "margin-bottom-no" / >
2020-03-09 08:27:21 +13:00
< / div >
2021-10-28 05:55:36 +13:00
< 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-collection.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-collection.dateCreated|dateText}}" > < / span > < / li >
< / ul >
2020-03-09 08:27:21 +13:00
2021-10-28 05:55:36 +13:00
< form
name="database.deleteCollection" class="margin-bottom"
2021-01-18 19:29:26 +13:00
data-analytics
data-analytics-activity
2020-03-09 08:27:21 +13:00
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Delete Database Collection"
data-service="database.deleteCollection"
data-event="submit"
data-param-collection-id="{{router.params.id}}"
data-confirm="Are you sure you want to delete this collection?"
data-success="alert,trigger,redirect"
data-success-param-alert-text="Collection deleted successfully"
data-success-param-trigger-events="database.deleteCollection"
data-success-param-redirect-url="/console/database?project={{router.params.project}}"
data-failure="alert"
data-failure-param-alert-text="Failed to delete collection"
data-failure-param-alert-classname="error">
2021-10-28 05:55:36 +13:00
< button type = "submit" class = "danger fill" > Delete Collection< / button >
< / form >
2020-03-09 08:27:21 +13:00
< / div >
2021-10-28 05:55:36 +13:00
< / div >
< / li >
< / ul >
< / div >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< div data-ui-modal class = "modal box close sticky-footer" data-button-alias = ".new-attribute-string" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< h1 > Add String Attribute< / h1 >
2021-08-09 03:59:48 +12:00
2022-01-02 03:54:39 +13:00
< form
id="add-string-attribute"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Collection Attribute (string)"
data-service="database.createStringAttribute"
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
data-success-param-trigger-events="database.createAttribute"
data-failure="alert"
data-failure-param-alert-text="Failed to create attribute"
data-failure-param-alert-classname="error"
2022-01-20 22:55:33 +13:00
@reset="array = required = false"
2022-01-02 03:54:39 +13:00
x-data="{ array: false, required: false }">
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
2021-08-09 03:59:48 +12:00
2021-12-18 00:16:53 +13:00
< label for = "string-key" > Attribute ID< / label >
2021-12-30 06:09:21 +13:00
< input id = "string-key" type = "text" class = "full-width" name = "key" required autocomplete = "off" maxlength = "36" pattern = "^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot< / div >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< label for = "string-length" > Size< / label >
< input id = "string-length" name = "size" type = "number" class = "margin-bottom" autocomplete = "off" required value = "255" data-cast-to = "integer" / >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "required" name = "required" class = "button switch" type = "checkbox" / > Required < span class = "tooltip" data-tooltip = "Mark whether this is a required attribute" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-10-28 00:05:12 +13:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "array" name = "array" class = "button switch" type = "checkbox" / > Array < span class = "tooltip" data-tooltip = "Mark whether this attribute should act as an array" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-08-09 03:59:48 +12:00
2022-01-02 03:54:39 +13:00
< label for = "xdefault" > Default Value< / label >
< template x-if = "!(array || required)" >
2021-10-28 05:55:36 +13:00
< input name = "xdefault" type = "text" class = "margin-bottom-large" autocomplete = "off" >
2022-01-02 03:54:39 +13:00
< / template >
< template x-if = "(array || required)" >
< input name = "xdefault" type = "text" class = "margin-bottom-large" autocomplete = "off" disabled value = "" >
< / template >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / footer >
< / form >
< / div >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< div data-ui-modal class = "modal box close sticky-footer" data-button-alias = ".new-attribute-integer" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< h1 > Add Integer Attribute< / h1 >
2021-08-09 03:59:48 +12:00
2022-01-02 03:54:39 +13:00
< form
id="add-integer-attribute"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Collection Attribute (integer)"
data-service="database.createIntegerAttribute"
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
data-success-param-trigger-events="database.createAttribute"
data-failure="alert"
data-failure-param-alert-text="Failed to create attribute"
data-failure-param-alert-classname="error"
2022-01-20 22:55:33 +13:00
@reset="array = required = false"
2022-01-02 03:54:39 +13:00
x-data="{ array: false, required: false }">
2021-08-09 19:08:49 +12:00
2021-10-28 05:55:36 +13:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
2021-08-09 19:08:49 +12:00
2021-12-18 00:16:53 +13:00
< label for = "integer-key" > Attribute ID< / label >
2021-12-30 06:09:21 +13:00
< input id = "integer-key" type = "text" class = "full-width" name = "key" required autocomplete = "off" maxlength = "36" pattern = "^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot< / div >
2021-08-09 19:08:49 +12:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "required" name = "required" class = "button switch" type = "checkbox" / > Required < span class = "tooltip" data-tooltip = "Mark whether this is a required attribute" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-10-28 00:05:12 +13:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "array" name = "array" class = "button switch" type = "checkbox" / > Array < span class = "tooltip" data-tooltip = "Mark whether this attribute should act as an array" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-08-09 19:08:49 +12:00
2021-10-28 05:55:36 +13:00
< div class = "row responsive thin" >
< div class = "col span-6 margin-bottom-small" >
< label for = "integer-min" > Min< / label >
2021-10-28 21:55:48 +13:00
< input id = "integer-min" type = "number" step = "1" class = "full-width" name = "min" autocomplete = "off" data-cast-to = "integer" / >
2021-08-09 19:08:49 +12:00
< / div >
2021-10-28 05:55:36 +13:00
< div class = "col span-6 margin-bottom-small" >
< label for = "integer-max" > Max< / label >
2021-10-28 21:55:48 +13:00
< input id = "integer-max" type = "number" step = "1" class = "full-width" name = "max" autocomplete = "off" data-cast-to = "integer" / >
2021-10-28 05:55:36 +13:00
< / div >
< / div >
2021-08-09 19:08:49 +12:00
2021-10-28 05:55:36 +13:00
< label for = "integer-default" > Default Value< / label >
2022-01-02 03:54:39 +13:00
< template x-if = "!(array || required)" >
2022-01-17 23:47:22 +13:00
< input name = "xdefault" type = "number" class = "margin-bottom-large" autocomplete = "off" data-cast-to = "integer" >
2022-01-02 03:54:39 +13:00
< / template >
< template x-if = "(array || required)" >
2022-01-17 23:47:22 +13:00
< input name = "xdefault" type = "number" class = "margin-bottom-large" autocomplete = "off" data-cast-to = "integer" disabled >
2022-01-02 03:54:39 +13:00
< / template >
2021-10-28 05:55:36 +13:00
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / footer >
< / form >
< / div >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< div data-ui-modal class = "modal box close sticky-footer" data-button-alias = ".new-attribute-float" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< h1 > Add Float Attribute< / h1 >
2021-09-27 03:30:21 +13:00
2022-01-02 03:54:39 +13:00
< form
id="add-float-attribute"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Collection Attribute (float)"
data-service="database.createFloatAttribute"
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
data-success-param-trigger-events="database.createAttribute"
data-failure="alert"
data-failure-param-alert-text="Failed to create attribute"
data-failure-param-alert-classname="error"
2022-01-20 22:55:33 +13:00
@reset="array = required = false"
2022-01-02 03:54:39 +13:00
x-data="{ array: false, required: false }">
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
2021-09-27 03:30:21 +13:00
2021-12-18 00:16:53 +13:00
< label for = "float-key" > Attribute ID< / label >
2021-12-30 06:09:21 +13:00
< input id = "float-key" type = "text" class = "full-width" name = "key" required autocomplete = "off" maxlength = "36" pattern = "^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot< / div >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "required" name = "required" class = "button switch" type = "checkbox" / > Required < span class = "tooltip" data-tooltip = "Mark whether this is a required attribute" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "array" name = "array" class = "button switch" type = "checkbox" / > Array < span class = "tooltip" data-tooltip = "Mark whether this attribute should act as an array" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< div class = "row responsive thin" >
< div class = "col span-6 margin-bottom-small" >
< label for = "float-min" > Min< / label >
2021-10-28 21:55:48 +13:00
< input id = "float-min" type = "number" class = "full-width" name = "min" step = "0.01" autocomplete = "off" data-cast-to = "float" / >
2021-09-27 03:30:21 +13:00
< / div >
2021-10-28 05:55:36 +13:00
< div class = "col span-6 margin-bottom-small" >
< label for = "float-max" > Max< / label >
2021-10-28 21:55:48 +13:00
< input id = "float-max" type = "number" class = "full-width" name = "max" step = "0.01" autocomplete = "off" data-cast-to = "float" / >
2021-10-28 05:55:36 +13:00
< / div >
< / div >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< label for = "float-default" > Default Value< / label >
2022-01-02 03:54:39 +13:00
< template x-if = "!(array || required)" >
2022-01-17 23:47:22 +13:00
< input name = "xdefault" type = "number" step = "0.01" class = "margin-bottom-large" autocomplete = "off" data-cast-to = "float" >
2022-01-02 03:54:39 +13:00
< / template >
< template x-if = "(array || required)" >
2022-01-17 23:47:22 +13:00
< input name = "xdefault" type = "number" step = "0.01" class = "margin-bottom-large" autocomplete = "off" data-cast-to = "float" disabled >
2022-01-02 03:54:39 +13:00
< / template >
2021-10-28 05:55:36 +13:00
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / footer >
< / form >
< / div >
2021-08-09 19:08:49 +12:00
2021-10-28 05:55:36 +13:00
< div data-ui-modal class = "modal box close sticky-footer" data-button-alias = ".new-attribute-email" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2021-08-23 00:59:44 +12:00
2021-10-28 05:55:36 +13:00
< h1 > Add Email Attribute< / h1 >
2021-08-23 00:59:44 +12:00
2022-01-02 03:54:39 +13:00
< form
id="add-email-attribute"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Collection Attribute (email)"
data-service="database.createEmailAttribute"
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
data-success-param-trigger-events="database.createAttribute"
data-failure="alert"
data-failure-param-alert-text="Failed to create attribute"
data-failure-param-alert-classname="error"
2022-01-20 22:55:33 +13:00
@reset="array = required = false"
2022-01-02 03:54:39 +13:00
x-data="{ array: false, required: false }">
2021-08-23 00:59:44 +12:00
2021-10-28 05:55:36 +13:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
2021-08-23 00:59:44 +12:00
2021-12-18 00:16:53 +13:00
< label for = "email-key" > Attribute ID< / label >
2021-12-30 06:09:21 +13:00
< input id = "email-key" type = "text" class = "full-width" name = "key" required autocomplete = "off" maxlength = "128" maxlength = "36" pattern = "^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot< / div >
2021-08-23 00:59:44 +12:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "required" name = "required" class = "button switch" type = "checkbox" / > Required < span class = "tooltip" data-tooltip = "Mark whether this is a required attribute" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "array" name = "array" class = "button switch" type = "checkbox" / > Array < span class = "tooltip" data-tooltip = "Mark whether this attribute should act as an array" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< label for = "string-default" > Default Value< / label >
2022-01-02 03:54:39 +13:00
< template x-if = "!(array || required)" >
< input name = "xdefault" type = "email" class = "margin-bottom-large" autocomplete = "off" >
< / template >
< template x-if = "(array || required)" >
< input name = "xdefault" type = "email" class = "margin-bottom-large" autocomplete = "off" disabled value = "" >
< / template >
2021-10-28 05:55:36 +13:00
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / footer >
< / form >
< / div >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< div data-ui-modal class = "modal box close sticky-footer" data-button-alias = ".new-attribute-boolean" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< h1 > Add Boolean Attribute< / h1 >
2021-09-27 03:30:21 +13:00
2022-01-02 03:54:39 +13:00
< form
id="add-boolean-attribute"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Collection Attribute (boolean)"
data-service="database.createBooleanAttribute"
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
data-success-param-trigger-events="database.createAttribute"
data-failure="alert"
data-failure-param-alert-text="Failed to create attribute"
data-failure-param-alert-classname="error"
2022-01-20 22:55:33 +13:00
@reset="array = required = false"
2022-01-02 03:54:39 +13:00
x-data="{ array: false, required: false }">
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
2021-09-27 03:30:21 +13:00
2021-12-18 00:16:53 +13:00
< label for = "boolean-key" > Attribute ID< / label >
2021-12-30 06:09:21 +13:00
< input id = "boolean-key" type = "text" class = "full-width" name = "key" required autocomplete = "off" maxlength = "36" pattern = "^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot< / div >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "required" name = "required" class = "button switch" type = "checkbox" / > Required < span class = "tooltip" data-tooltip = "Mark whether this is a required attribute" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "array" name = "array" class = "button switch" type = "checkbox" / > Array < span class = "tooltip" data-tooltip = "Mark whether this attribute should act as an array" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-09-27 03:30:21 +13:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom-large" >
2022-01-02 03:54:39 +13:00
< template x-if = "!(array || required)" >
2022-01-24 23:27:46 +13:00
< input name = "xdefault" class = "button switch" type = "checkbox" / >
2022-01-02 03:54:39 +13:00
< / template >
< template x-if = "(array || required)" >
2022-01-24 23:27:46 +13:00
< input name = "" class = "button switch" type = "checkbox" disabled / >
2022-01-02 03:54:39 +13:00
< / template >
Default Value < span class = "tooltip" data-tooltip = "Whether this attribute is set to true or false on creation" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-08-23 00:59:44 +12:00
2021-10-28 05:55:36 +13:00
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / footer >
< / form >
< / div >
2021-08-23 00:59:44 +12:00
2021-10-28 05:55:36 +13:00
< div data-ui-modal class = "modal box close sticky-footer" data-button-alias = ".new-attribute-ip" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2021-08-23 00:59:44 +12:00
2021-10-28 05:55:36 +13:00
< h1 > Add IP Attribute< / h1 >
2021-08-23 00:59:44 +12:00
2022-01-02 03:54:39 +13:00
< form
id="add-ip-attribute"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Collection Attribute (IP)"
data-service="database.createIpAttribute"
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
data-success-param-trigger-events="database.createAttribute"
data-failure="alert"
data-failure-param-alert-text="Failed to create attribute"
data-failure-param-alert-classname="error"
2022-01-20 22:55:33 +13:00
@reset="array = required = false"
2022-01-02 03:54:39 +13:00
x-data="{ array: false, required: false }">
2021-08-23 00:59:44 +12:00
2021-10-28 05:55:36 +13:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
2021-08-23 00:59:44 +12:00
2021-12-18 00:16:53 +13:00
< label for = "ip-key" > Attribute ID< / label >
2021-12-30 06:09:21 +13:00
< input id = "ip-key" type = "text" class = "full-width" name = "key" required autocomplete = "off" maxlength = "36" pattern = "^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot< / div >
2021-08-23 00:59:44 +12:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "required" name = "required" class = "button switch" type = "checkbox" / > Required < span class = "tooltip" data-tooltip = "Mark whether this is a required attribute" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-08-09 19:08:49 +12:00
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "array" name = "array" class = "button switch" type = "checkbox" / > Array < span class = "tooltip" data-tooltip = "Mark whether this attribute should act as an array" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-08-09 19:08:49 +12:00
2021-10-28 05:55:36 +13:00
< label for = "string-default" > Default Value< / label >
2022-01-02 03:54:39 +13:00
< template x-if = "!(array || required)" >
< input name = "xdefault" type = "text" class = "margin-bottom-large" autocomplete = "off" >
< / template >
< template x-if = "(array || required)" >
< input name = "xdefault" type = "text" class = "margin-bottom-large" autocomplete = "off" disabled value = "" >
< / template >
2021-10-28 05:55:36 +13:00
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / footer >
< / form >
< / div >
2021-10-28 00:05:12 +13:00
2021-10-28 05:55:36 +13:00
< div data-ui-modal class = "modal box close sticky-footer" data-button-alias = ".new-attribute-url" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2021-08-09 19:08:49 +12:00
2021-10-28 05:55:36 +13:00
< h1 > Add URL Attribute< / h1 >
2021-08-09 19:08:49 +12:00
2021-11-23 01:49:51 +13:00
< form
id="add-url-attribute"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Collection Attribute (url)"
data-service="database.createUrlAttribute"
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
data-success-param-trigger-events="database.createAttribute"
data-failure="alert"
data-failure-param-alert-text="Failed to create attribute"
2022-01-02 03:54:39 +13:00
data-failure-param-alert-classname="error"
2022-01-20 22:55:33 +13:00
@reset="array = required = false"
2022-01-02 03:54:39 +13:00
x-data="{ array: false, required: false }">
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
2021-12-18 00:16:53 +13:00
< label for = "url-key" > Attribute ID< / label >
2021-12-30 06:09:21 +13:00
< input id = "url-key" type = "text" class = "full-width" name = "key" required autocomplete = "off" maxlength = "36" pattern = "^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot< / div >
2021-10-28 05:55:36 +13:00
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "required" name = "required" class = "button switch" type = "checkbox" / > Required < span class = "tooltip" data-tooltip = "Mark whether this is a required attribute" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "array" name = "array" class = "button switch" type = "checkbox" / > Array < span class = "tooltip" data-tooltip = "Mark whether this attribute should act as an array" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-28 05:55:36 +13:00
< / div >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< label for = "string-default" > Default Value< / label >
2022-01-02 03:54:39 +13:00
< template x-if = "!(array || required)" >
< input name = "xdefault" type = "url" class = "margin-bottom-large" autocomplete = "off" >
< / template >
< template x-if = "(array || required)" >
< input name = "xdefault" type = "url" class = "margin-bottom-large" autocomplete = "off" disabled value = "" >
< / template >
2021-10-28 05:55:36 +13:00
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / footer >
< / form >
2021-10-30 01:01:48 +13:00
< / div >
< div data-ui-modal class = "modal box close sticky-footer" data-button-alias = ".new-attribute-enum" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
< h1 > Add Enum Attribute< / h1 >
2021-11-23 01:49:51 +13:00
< form
id="add-enum-attribute"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Collection Attribute (enum)"
data-service="database.createEnumAttribute"
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
data-success-param-trigger-events="database.createAttribute"
data-failure="alert"
data-failure-param-alert-text="Failed to create attribute"
2022-01-02 03:54:39 +13:00
data-failure-param-alert-classname="error"
2022-01-20 22:55:33 +13:00
@reset="array = required = false"
2022-01-02 03:54:39 +13:00
x-data="{ array: false, required: false }">
2021-10-30 01:01:48 +13:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
2021-12-18 00:16:53 +13:00
< label for = "enum-key" > Attribute ID< / label >
2021-12-30 06:09:21 +13:00
< input id = "enum-key" type = "text" class = "full-width" name = "key" required autocomplete = "off" maxlength = "36" pattern = "^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot< / div >
2021-10-30 01:01:48 +13:00
< label > Elements< / label >
< div id = "elements-section" > < / div >
< div class = "margin-bottom" >
< div data-forms-clone = "" data-label = "Add Element" data-target = "elements-section" data-first = "1" >
< div class = "row responsive thin margin-bottom-tiny" >
< div class = "col span-11 margin-bottom-small" >
< input type = "text" class = "full-width" name = "elements" required autocomplete = "off" maxlength = "128" / >
< / div >
< div class = "col span-1 margin-bottom-small" >
< button type = "button" data-remove class = "dark danger small round pull-end" style = "margin-top: 10px;" > < i class = "icon-cancel" > < / i > < / button >
< / div >
< / div >
< / div >
< / div >
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "required" name = "required" class = "button switch" type = "checkbox" / > Required < span class = "tooltip" data-tooltip = "Mark whether this is a required attribute" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-30 01:01:48 +13:00
< / div >
< div class = "margin-bottom" >
2022-01-02 03:54:39 +13:00
< input x-model = "array" name = "array" class = "button switch" type = "checkbox" / > Array < span class = "tooltip" data-tooltip = "Mark whether this attribute should act as an array" > < i class = "icon-info-circled" > < / i > < / span >
2021-10-30 01:01:48 +13:00
< / div >
2021-11-23 01:49:51 +13:00
< label for = "enunm-default" > Default Value< / label >
2022-01-02 03:54:39 +13:00
< template x-if = "!(array || required)" >
< input name = "xdefault" type = "text" class = "margin-bottom-large" autocomplete = "off" >
< / template >
< template x-if = "(array || required)" >
< input name = "xdefault" type = "text" class = "margin-bottom-large" autocomplete = "off" disabled value = "" >
< / template >
2021-10-30 01:01:48 +13:00
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / footer >
< / form >
2021-10-28 05:55:36 +13:00
< / div >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< div data-ui-modal class = "modal box close sticky-footer" data-button-alias = ".new-index" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< h1 > Add Index< / h1 >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< div data-ls-if = "0 == {{project-collection.attributes.length}}" >
< div class = "info margin-top margin-bottom" >
< h2 > No Attributes Found< / h2 >
2021-08-09 19:08:49 +12:00
2021-10-28 05:55:36 +13:00
< p > Please add your first attribute before adding your first index.< / p >
< / div >
< button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / div >
< form
data-ls-if="0 < {{project-collection.attributes.length}}"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Collection Index"
data-service="database.createIndex"
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new index successfully"
data-success-param-trigger-events="database.createIndex"
data-failure="alert"
data-failure-param-alert-text="Failed to create index"
data-failure-param-alert-classname="error">
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
2021-12-18 00:16:53 +13:00
< label for = "index-key" > Index Key< / label >
2021-12-30 06:09:21 +13:00
< input id = "index-key" type = "text" class = "full-width" name = "key" required autocomplete = "off" maxlength = "36" pattern = "^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" / >
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot< / div >
2021-10-28 05:55:36 +13:00
< label for = "index-type" > Type< / label >
< select id = "index-type" name = "type" >
< option value = "key" > Key< / option >
< option value = "unique" > Unique< / option >
< option value = "fulltext" > Fulltext< / option >
< / select >
< label > Attributes< / label >
< div id = "attributes-section" > < / div >
< div class = "margin-bottom" >
< div data-forms-clone = "" data-label = "Add Attribute" data-target = "attributes-section" data-first = "1" >
< div class = "row responsive thin margin-bottom-tiny" >
< div class = "col span-7 margin-bottom-small" >
< select data-duplications data-ls-attrs = "name=attributes" data-ls-loop = "project-collection.attributes" data-ls-as = "option" data-cast-to = "array" class = "margin-bottom-no" >
< option data-ls-attrs = "value={{option.key}}" data-ls-bind = "{{option.key}}" > < / option >
< / select >
< / div >
< div class = "col span-4 margin-bottom-small" >
< select name = "orders" data-cast-to = "array" class = "margin-bottom-no" >
< option value = "ASC" > ASC< / option >
< option value = "DESC" > DESC< / option >
< / select >
< / div >
< div class = "col span-1 margin-bottom-small" >
< button type = "button" data-remove class = "dark danger small round pull-end" style = "margin-top: 10px;" > < i class = "icon-cancel" > < / i > < / button >
2021-08-09 03:59:48 +12:00
< / div >
< / div >
< / div >
2021-10-28 05:55:36 +13:00
< / div >
2021-08-09 03:59:48 +12:00
2021-10-28 05:55:36 +13:00
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / footer >
< / form >
2020-04-04 08:27:18 +13:00
< / div >
2021-10-28 05:55:36 +13:00
< div class = "margin-top" data-service = "database.listCollections" data-event = "load,database.createCollection,database.updateCollection,database.deleteCollection" data-scope = "sdk" data-param-limit = "100" data-name = "project-collections" >
2021-08-16 09:09:40 +12:00
< / div >
< script type = "text/html" id = "template-attribute-title-first" >
< i data-ls-attrs = "class=pull-end icon-key text-size-xs" > < / i >
< span class = "text-bold" > $id< / span >
< / script >
< script type = "text/html" id = "template-attribute-body-first" >
< span class = "text-fade" data-ls-bind = "{{node.$id}}" data-general-copy data-class = "icon-docs note copy text-fade pull-end" > < / span >
2022-01-03 05:50:19 +13:00
< / script >