2021-08-14 22:13:24 +12:00
<?php
$logs = $this->getParam('logs', null);
2022-08-13 18:33:11 +12:00
$permissions = $this->getParam('permissions', null);
2021-08-14 22:13:24 +12:00
?>
2020-03-09 08:27:21 +13:00
< div
2022-06-22 22:51:49 +12:00
data-service="databases.getCollection"
data-param-database-id="{{router.params.databaseId}}"
2019-08-08 06:10:53 +12:00
data-param-collection-id="{{router.params.id}}"
2020-03-09 08:27:21 +13:00
data-scope="sdk"
2022-06-22 22:51:49 +12:00
data-event="load,databases.updateCollection,databases.createAttribute,databases.deleteAttribute,databases.createIndex,databases.deleteIndex"
2019-08-08 06:10:53 +12:00
data-name="project-collection">
2019-08-17 18:06:56 +12:00
2022-06-22 22:51:49 +12:00
< div
data-service="databases.get"
data-param-database-id="{{router.params.databaseId}}"
data-scope="sdk"
data-event="load,databases.update"
data-name="project-database">
< div class = "cover" >
< h1 class = "zone xl margin-bottom-large" >
< a data-ls-attrs = "href=/console/databases/database?id={{router.params.databaseId}}&project={{router.params.project}}" class = "back text-size-small link-return-animation--start" > < i class = "icon-left-open" > < / i > < span data-ls-bind = "{{project-database.name}}" > < / span > < / a >
2019-08-17 18:06:56 +12:00
2022-06-22 22:51:49 +12:00
< br / >
2019-08-17 18:06:56 +12:00
2022-06-22 22:51:49 +12:00
< span data-ls-bind = "{{project-collection.name}}" > < / span >
< / h1 >
< / div >
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}}" >
2022-06-22 22:51:49 +12:00
< li data-state = "/console/databases/collection?id={{router.params.id}}&databaseId={{router.params.databaseId}}&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
2022-06-22 22:51:49 +12:00
data-service="databases.listDocuments"
data-event="load,databases.createDocument,databases.updateDocument,databases.deleteDocument"
2020-03-16 06:16:42 +13:00
data-param-collection-id="{{router.params.id}}"
2022-06-22 22:51:49 +12:00
data-param-database-id="{{router.params.databaseId}}"
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
2022-02-28 22:25:38 +13:00
< div data-ls-if = "0 == {{project-documents.total}}" 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 >
2022-02-28 22:25:38 +13:00
< div data-ls-if = "({{project-documents.total}})" class = "margin-top-negative" >
< div class = "margin-bottom-small text-align-end text-size-small text-fade" >< span data-ls-bind = "{{project-documents.total}}" ></ span >< span data-ls-if = "{{project-documents.total}} == <?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 >
2022-06-22 22:51:49 +12:00
< tbody data-ls-attrs = "x-init=documents = {{project-documents.documents}}; databaseId='{{router.params.databaseId}}'" x-data = "{documents: []}" >
2021-11-24 21:33:21 +13:00
< template x-for = "doc in documents" >
< tr >
2021-12-02 01:19:15 +13:00
< td data-title = "$id: " >
2022-06-22 22:51:49 +12:00
< a :href = "`/console/databases/document?id=${doc.$id}&collection=${doc.$collection}&databaseId=${databaseId}&project=${project}`" x-text = "doc.$id" > < / a >
2021-11-24 21:33:21 +13:00
< / 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 + ':'" >
2022-06-30 02:44:24 +12:00
< a :href = "`/console/databases/document?id=${doc.$id}&collection=${doc.$collection}&databaseId=${databaseId}&project=${project}`" >
2021-11-24 21:33:21 +13:00
< 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
2022-06-22 22:51:49 +12:00
data-service="databases.listDocuments"
2020-03-16 06:16:42 +13:00
data-event="submit"
2022-06-22 22:51:49 +12:00
data-param-database-id="{{router.params.databaseId}}"
2020-03-16 06:16:42 +13:00
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">
2022-02-28 22:26:55 +13:00
< button name = "offset" data-paging-back data-offset = "{{router.params.offset}}" data-total = "{{project-documents.total}}" class = "margin-end round small" aria-label = "Back" > < i class = "icon-left-open" > < / i > < / button >
2020-03-16 06:16:42 +13:00
< / form >
2022-02-28 22:25:38 +13:00
< span data-ls-bind = "{{router.params.offset|pageCurrent}} / {{project-documents.total|pageTotal}}" > < / span >
2021-10-30 04:51:21 +13:00
2020-03-16 06:16:42 +13:00
< form
2022-06-22 22:51:49 +12:00
data-service="databases.listDocuments"
2020-03-16 06:16:42 +13:00
data-event="submit"
2022-06-22 22:51:49 +12:00
data-param-database-id="{{router.params.databaseId}}"
2020-03-16 06:16:42 +13:00
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">
2022-02-28 22:26:55 +13:00
< button name = "offset" data-paging-next data-offset = "{{router.params.offset}}" data-total = "{{project-documents.total}}" 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
2022-06-22 22:51:49 +12:00
< a data-ls-if = "0 < {{project-collection.attributes.length}}" data-ls-attrs = "href=/console/databases/document/new?collection={{router.params.id}}&databaseId={{router.params.databaseId}}&project={{router.params.project}}" class = "button" >
2021-04-03 19:29:13 +13:00
Add Document
< / a >
2022-06-22 22:51:49 +12:00
< a data-ls-if = "!{{project-collection.attributes.length}}" data-ls-attrs = "href=/console/databases/collection/attributes?id={{router.params.id}}&databaseId={{router.params.databaseId}}&project={{router.params.project}}" class = "button" >
2021-09-27 03:30:21 +13:00
Create Attribute
< / a >
2020-03-15 17:54:55 +13:00
< / div >
2020-03-09 08:27:21 +13:00
< / li >
2022-06-22 22:51:49 +12:00
< li data-state = "/console/databases/collection/attributes?id={{router.params.id}}&databaseId={{router.params.databaseId}}&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"
2022-06-22 22:51:49 +12:00
data-service="databases.deleteAttribute"
2022-01-01 05:54:55 +13:00
data-scope="sdk"
data-event="submit"
data-confirm="Are you sure you want to delete this attribute?"
2022-06-23 01:03:55 +12:00
data-param-database-id="{{router.params.databaseId}}"
2022-01-01 05:54:55 +13:00
data-success="alert,trigger"
data-success-param-alert-text="Deleted attribute successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.deleteAttribute"
2022-01-01 05:54:55 +13:00
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 >
2022-07-29 00:38:54 +12:00
< li >
< div class = "link new-attribute-datetime" > < i class = "avatar icon-string" > < / i > New DateTime Attribute< / div >
< / li >
2021-08-22 20:00:09 +12:00
< 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 >
2022-06-22 22:51:49 +12:00
< li data-state = "/console/databases/collection/indexes?id={{router.params.id}}&databaseId={{router.params.databaseId}}&project={{router.params.project}}" >
2021-08-08 00:45:44 +12:00
< 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"
2022-06-22 22:51:49 +12:00
data-service="databases.deleteIndex"
2021-08-09 03:59:48 +12:00
data-scope="sdk"
data-event="submit"
data-confirm="Are you sure you want to delete this index?"
2022-06-23 01:30:35 +12:00
data-param-database-id="{{router.params.databaseId}}"
2021-08-09 03:59:48 +12:00
data-success="alert,trigger"
data-success-param-alert-text="Deleted index successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.deleteIndex"
2021-08-09 03:59:48 +12:00
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 >
2022-06-22 22:51:49 +12:00
< li data-state = "/console/databases/collection/activity?id={{router.params.id}}&databaseId={{router.params.databaseId}}&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 >
2022-06-22 22:51:49 +12:00
< li data-state = "/console/databases/collection/usage?id={{router.params.id}}&databaseId={{router.params.databaseId}}&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'"
2022-06-22 22:51:49 +12:00
data-service="databases.getCollectionUsage"
2021-10-26 05:58:11 +13:00
data-event="submit"
data-name="usage"
data-param-collection-id="{{router.params.id}}"
2022-06-22 22:51:49 +12:00
data-param-database-id="{{router.params.databaseId}}"
2021-10-26 05:58:11 +13:00
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'"
2022-06-22 22:51:49 +12:00
data-service="databases.getCollectionUsage"
2021-10-26 05:58:11 +13:00
data-event="submit"
data-name="usage"
2022-06-22 22:51:49 +12:00
data-param-database-id="{{router.params.databaseId}}"
2021-10-26 05:58:11 +13:00
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'"
2022-06-22 22:51:49 +12:00
data-service="databases.getCollectionUsage"
2021-10-26 05:58:11 +13:00
data-event="submit"
data-name="usage"
2022-06-22 22:51:49 +12:00
data-param-database-id="{{router.params.databaseId}}"
2021-10-26 05:58:11 +13:00
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
2022-06-22 22:51:49 +12:00
< div data-service = "databases.getCollectionUsage" data-event = "load" data-name = "usage" data-param-collection-id = "{{router.params.id}}" data-param-database-id = "{{router.params.databaseId}}" >
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" >
2022-08-10 22:23:53 +12:00
< input
type="hidden"
2021-11-18 23:33:42 +13:00
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 >
2022-06-22 22:51:49 +12:00
< li data-state = "/console/databases/collection/settings?id={{router.params.id}}&databaseId={{router.params.databaseId}}&project={{router.params.project}}" >
2020-04-25 07:58:40 +12:00
< 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" >
2022-08-29 22:25:39 +12:00
< form id = " <?php echo $permissions -> getParam ( 'form' ) ?> " ></ form >
2022-08-12 22:37:52 +12:00
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"
2022-06-22 22:51:49 +12:00
data-service="databases.updateCollection"
2020-03-09 08:27:21 +13:00
data-scope="sdk"
data-event="submit"
data-param-collection-id="{{router.params.id}}"
2022-06-22 22:51:49 +12:00
data-param-database-id="{{router.params.databaseId}}"
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"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.updateCollection"
2020-03-09 08:27:21 +13:00
data-failure="alert"
data-failure-param-alert-text="Failed to update collection"
data-failure-param-alert-classname="error">
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
2022-08-12 14:59:11 +12:00
< hr class = "margin-top-small" / >
2021-08-13 23:19:16 +12:00
< label class = "margin-bottom-small" > Permissions< / label >
2022-08-12 13:05:54 +12:00
< p class = "text-fade text-size-small" > Configure the permissions 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" / >
2022-08-13 18:33:11 +12:00
<?php echo $permissions -> render (); ?>
2021-08-13 23:19:16 +12:00
2022-08-10 22:23:53 +12:00
< hr class = "margin-top-no" / >
< label class = "margin-bottom-small" > Document Security< / label >
2022-01-22 09:35:52 +13:00
< div class = "row" >
2022-08-10 22:23:53 +12:00
< div class = "col span-1" > < input name = "documentSecurity" value = "false" type = "checkbox" class = "margin-top-no" data-ls-bind = "{{project-collection.documentSecurity}}" / > < / div >
2022-01-22 09:35:52 +13:00
< div class = "col span-11" >
2022-08-10 22:23:53 +12:00
< b > Enabled< / b >
2022-08-12 22:37:52 +12:00
< p class = "text-fade margin-top-tiny" > With Document Security enabled, users will be able to access documents for which they have been granted < b > either< / b > Document or Collection permissions.< / p >
2022-01-22 09:35:52 +13:00
< / 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 >
2022-08-10 04:18:43 +12:00
< label > Database ID< / label >
< div class = "input-copy margin-bottom" >
< input type = "text" autocomplete = "off" placeholder = "" data-ls-bind = "{{router.params.databaseId}}" disabled data-forms-copy class = "margin-bottom-no" / >
< / div >
2021-10-28 05:55:36 +13:00
< ul class = "margin-bottom-large text-fade text-size-small" >
2022-08-10 22:23:53 +12:00
< 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"
2022-06-24 21:12:29 +12:00
data-analytics
data-analytics-event="click"
data-analytics-category="console"
data-analytics-label="View as JSON (Collection)">
View as JSON
< / button >
< / li >
2022-08-10 02:05:34 +12:00
< 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.$updatedAt|date}}" > < / 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.$createdAt|date}}" > < / span > < / li >
2021-10-28 05:55:36 +13:00
< / ul >
2020-03-09 08:27:21 +13:00
2021-10-28 05:55:36 +13:00
< form
2022-06-22 22:51:49 +12:00
name="databases.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"
2022-06-22 22:51:49 +12:00
data-service="databases.deleteCollection"
2020-03-09 08:27:21 +13:00
data-event="submit"
data-param-collection-id="{{router.params.id}}"
2022-06-22 22:51:49 +12:00
data-param-database-id="{{router.params.databaseId}}"
2020-03-09 08:27:21 +13:00
data-confirm="Are you sure you want to delete this collection?"
data-success="alert,trigger,redirect"
data-success-param-alert-text="Collection deleted successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.deleteCollection"
2022-07-01 03:40:16 +12:00
data-success-param-redirect-url="/console/databases?project={{router.params.project}}"
2020-03-09 08:27:21 +13:00
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)"
2022-06-22 22:51:49 +12:00
data-service="databases.createStringAttribute"
2022-01-02 03:54:39 +13:00
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.createAttribute"
2022-01-02 03:54:39 +13:00
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-04-23 00:10:16 +12:00
x-data="{ array: false, required: false, size: null }">
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}}" / >
2022-06-22 22:51:49 +12:00
< input type = "hidden" name = "databaseId" data-ls-bind = "{{router.params.databaseId}}" / >
2021-08-09 03:59:48 +12:00
2021-12-18 00:16:53 +13:00
< label for = "string-key" > Attribute ID< / label >
2022-03-23 01:31:52 +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._-]{0,35}$" / >
2021-12-30 06:09:21 +13:00
< 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 >
2022-04-23 00:10:16 +12:00
< input id = "string-length" name = "size" type = "number" class = "margin-bottom" autocomplete = "off" required value = "255" data-cast-to = "integer" x-model = "size" / >
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)" >
2022-04-23 00:10:16 +12:00
< input name = "xdefault" type = "text" class = "margin-bottom-large" autocomplete = "off" :maxlength = "size" >
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
2022-07-29 00:38:54 +12:00
< div data-ui-modal class = "modal box close sticky-footer" data-button-alias = ".new-attribute-datetime" >
< button type = "button" class = "close pull-end" data-ui-modal-close = "" > < i class = "icon-cancel" > < / i > < / button >
< h1 > Add DateTime Attribute< / h1 >
< form
id="add-datetime-attribute"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Collection Attribute (datetime)"
data-service="databases.createDatetimeAttribute"
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="databases.createAttribute"
data-failure="alert"
data-failure-param-alert-text="Failed to create attribute"
data-failure-param-alert-classname="error"
@reset="array = required = false"
x-data="{ array: false, required: false, size: null }">
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
< input type = "hidden" name = "databaseId" data-ls-bind = "{{router.params.databaseId}}" / >
< label for = "string-key" > Attribute ID< / label >
< 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._-]{0,35}$" / >
< 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 >
< div class = "margin-bottom" >
< 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 >
< / div >
< div class = "margin-bottom" >
< 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 >
< / div >
< label for = "xdefault" > Default Value< / label >
< template x-if = "!(array || required)" >
< input name = "xdefault" type = "datetime-local" class = "margin-bottom-large" >
< / template >
< template x-if = "(array || required)" >
< input name = "xdefault" type = "datetime-local" class = "margin-bottom-large" disabled value = "" >
< / template >
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Cancel< / button >
< / footer >
< / form >
< / div >
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)"
2022-06-22 22:51:49 +12:00
data-service="databases.createIntegerAttribute"
2022-01-02 03:54:39 +13:00
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.createAttribute"
2022-01-02 03:54:39 +13:00
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-04-23 00:10:16 +12:00
x-data="{ array: false, required: false, min: null, max: null }">
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}}" / >
2022-06-22 22:51:49 +12:00
< input type = "hidden" name = "databaseId" data-ls-bind = "{{router.params.databaseId}}" / >
2021-10-28 05:55:36 +13:00
< 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 >
2022-03-23 01:31:52 +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._-]{0,35}$" / >
2021-12-30 06:09:21 +13:00
< 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 >
2022-04-23 00:10:16 +12:00
< input id = "integer-min" type = "number" step = "1" class = "full-width" name = "min" autocomplete = "off" data-cast-to = "integer" x-model = "min" / >
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 >
2022-04-23 00:10:16 +12:00
< input id = "integer-max" type = "number" step = "1" class = "full-width" name = "max" autocomplete = "off" data-cast-to = "integer" x-model = "max" / >
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-04-23 00:10:16 +12:00
< input name = "xdefault" type = "number" class = "margin-bottom-large" autocomplete = "off" data-cast-to = "integer" :min = "min" :max = "max" >
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)"
2022-06-22 22:51:49 +12:00
data-service="databases.createFloatAttribute"
2022-01-02 03:54:39 +13:00
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.createAttribute"
2022-01-02 03:54:39 +13:00
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-04-23 00:10:16 +12:00
x-data="{ array: false, required: false, min: null, max: null }">
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}}" / >
2022-06-22 22:51:49 +12:00
< input type = "hidden" name = "databaseId" data-ls-bind = "{{router.params.databaseId}}" / >
2021-10-28 05:55:36 +13:00
< 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 >
2022-03-23 01:31:52 +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._-]{0,35}$" / >
2021-12-30 06:09:21 +13:00
< 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 >
2022-04-23 00:10:16 +12:00
< input id = "float-min" type = "number" class = "full-width" name = "min" step = "any" autocomplete = "off" data-cast-to = "float" x-model = "min" / >
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 >
2022-04-23 00:10:16 +12:00
< input id = "float-max" type = "number" class = "full-width" name = "max" step = "any" autocomplete = "off" data-cast-to = "float" x-model = "max" / >
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-04-23 00:10:16 +12:00
< input name = "xdefault" type = "number" step = "any" class = "margin-bottom-large" autocomplete = "off" data-cast-to = "float" :min = "min" :max = "max" >
2022-01-02 03:54:39 +13:00
< / template >
< template x-if = "(array || required)" >
2022-03-10 10:40:16 +13:00
< input name = "xdefault" type = "number" step = "any" 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)"
2022-06-22 22:51:49 +12:00
data-service="databases.createEmailAttribute"
2022-01-02 03:54:39 +13:00
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.createAttribute"
2022-01-02 03:54:39 +13:00
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}}" / >
2022-06-22 22:51:49 +12:00
< input type = "hidden" name = "databaseId" data-ls-bind = "{{router.params.databaseId}}" / >
2021-10-28 05:55:36 +13:00
< 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 >
2022-03-23 01:31:52 +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._-]{0,35}$" / >
2021-12-30 06:09:21 +13:00
< 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)"
2022-06-22 22:51:49 +12:00
data-service="databases.createBooleanAttribute"
2022-01-02 03:54:39 +13:00
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.createAttribute"
2022-01-02 03:54:39 +13:00
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}}" / >
2022-06-22 22:51:49 +12:00
< input type = "hidden" name = "databaseId" data-ls-bind = "{{router.params.databaseId}}" / >
2021-10-28 05:55:36 +13:00
< 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 >
2022-03-23 01:31:52 +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._-]{0,35}$" / >
2021-12-30 06:09:21 +13:00
< 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)"
2022-06-22 22:51:49 +12:00
data-service="databases.createIpAttribute"
2022-01-02 03:54:39 +13:00
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.createAttribute"
2022-01-02 03:54:39 +13:00
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}}" / >
2022-06-22 22:51:49 +12:00
< input type = "hidden" name = "databaseId" data-ls-bind = "{{router.params.databaseId}}" / >
2021-10-28 05:55:36 +13:00
< 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 >
2022-03-23 01:31:52 +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._-]{0,35}$" / >
2021-12-30 06:09:21 +13:00
< 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)"
2022-06-22 22:51:49 +12:00
data-service="databases.createUrlAttribute"
2021-11-23 01:49:51 +13:00
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.createAttribute"
2021-11-23 01:49:51 +13:00
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}}" / >
2022-06-22 22:51:49 +12:00
< input type = "hidden" name = "databaseId" data-ls-bind = "{{router.params.databaseId}}" / >
2021-10-28 05:55:36 +13:00
< 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 >
2022-03-23 01:31:52 +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._-]{0,35}$" / >
2021-12-30 06:09:21 +13:00
< 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)"
2022-06-22 22:51:49 +12:00
data-service="databases.createEnumAttribute"
2021-11-23 01:49:51 +13:00
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new attribute successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.createAttribute"
2021-11-23 01:49:51 +13:00
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}}" / >
2022-06-22 22:51:49 +12:00
< input type = "hidden" name = "databaseId" data-ls-bind = "{{router.params.databaseId}}" / >
2021-10-30 01:01:48 +13:00
< 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 >
2022-03-23 01:31:52 +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._-]{0,35}$" / >
2021-12-30 06:09:21 +13:00
< 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" >
2022-04-25 19:54:17 +12:00
< input data-cast-to = "array" type = "text" class = "full-width" name = "elements" required autocomplete = "off" maxlength = "128" / >
2021-10-30 01:01:48 +13:00
< / 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"
2022-06-22 22:51:49 +12:00
data-service="databases.createIndex"
2021-10-28 05:55:36 +13:00
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created new index successfully"
2022-06-22 22:51:49 +12:00
data-success-param-trigger-events="databases.createIndex"
2021-10-28 05:55:36 +13:00
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}}" / >
2022-06-22 22:51:49 +12:00
< input type = "hidden" name = "databaseId" data-ls-bind = "{{router.params.databaseId}}" / >
2021-10-28 05:55:36 +13:00
< 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 >
2022-03-23 01:31:52 +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._-]{0,35}$" / >
2021-12-30 06:09:21 +13:00
< 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" >
2022-06-29 22:52:10 +12:00
< select data-duplications data-ls-attrs = "name=attributes" data-cast-to = "array" class = "margin-bottom-no" >
< optgroup label = "Internal" >
< option value = "$id" > $id< / option >
< option value = "$createdAt" > $createdAt< / option >
< option value = "$updatedAt" > $updatedAt< / option >
< / optgroup >
< optgroup label = "Attributes" data-ls-loop = "project-collection.attributes" data-ls-as = "option" >
< option data-ls-attrs = "value={{option.key}}" data-ls-bind = "{{option.key}}" > < / option >
< / optgroup >
2021-10-28 05:55:36 +13:00
< / 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 >
2022-06-22 22:51:49 +12:00
< div class = "margin-top" data-service = "databases.listCollections" data-param-database-id = "{{router.params.databaseId}}" data-event = "load,databases.createCollection,databases.updateCollection,databases.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 >