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" >
< 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-search="{{router.params.search}}"
data-param-limit="<?php echo APP_PAGING_LIMIT ; ?> "
data-param-offset="{{router.params.offset}}"
2020-04-02 10:41:29 +13:00
data-param-order-type="DESC"
2020-03-15 17:54:55 +13:00
data-scope="sdk"
data-name="project-documents">
< 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 >
2020-03-16 06:16:42 +13:00
< div data-ls-if = "({{project-documents.sum}})" >
< div class = "margin-bottom-small margin-end-small text-align-end text-size-small" > < span data-ls-bind = "{{project-documents.sum}}" > < / span > documents found< / div >
2020-03-17 07:41:56 +13:00
< div class = "box margin-bottom y-scroll" >
2020-04-19 01:57:28 +12:00
< table class = "vertical" >
2020-03-16 06:16:42 +13:00
< thead >
2020-05-03 07:57:52 +12:00
< tr >
2021-08-08 00:45:44 +12:00
< td > UID< / td >
2020-03-16 06:16:42 +13:00
< / tr >
< / thead >
< tbody data-ls-loop = "project-documents.documents" data-ls-as = "node" >
2020-05-03 07:57:52 +12:00
< tr >
2021-08-08 00:45:44 +12:00
< td > 42343< / td >
2020-03-16 06:16:42 +13:00
< / tr >
< / tbody >
< / table >
< / div >
< / div >
2021-04-03 19:29:13 +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-search="{{router.params.search}}"
data-param-limit="<?php echo APP_PAGING_LIMIT ; ?> "
data-param-order-type="DESC"
data-scope="sdk"
data-name="project-documents"
data-success="state"
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 >
< / form >
< span data-ls-bind = "{{router.params.offset|pageCurrent}} / {{project-documents.sum|pageTotal}}" > < / span >
< form
data-service="database.listDocuments"
data-event="submit"
data-param-collection-id="{{router.params.id}}"
data-param-search="{{router.params.search}}"
data-param-limit="<?php echo APP_PAGING_LIMIT ; ?> "
data-param-order-type="DESC"
data-scope="sdk"
data-name="project-documents"
data-success="state"
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 >
< / form >
2020-03-15 17:54:55 +13:00
< / div >
2021-04-03 19:29:13 +13:00
2021-08-08 00:45:44 +12:00
< a data-ls-attrs = "href=/console/database/document?collection={{router.params.id}}&project={{router.params.project}}&buster={{project-collection.dateUpdated}}" class = "button" >
2021-04-03 19:29:13 +13:00
Add Document
< / 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-09 19:08:49 +12:00
< div data-ls-if = "0 == {{project-collection.attributes.length}} && 0 == {{project-collection.attributesInQueue.length}}" >
2021-08-08 00:45:44 +12:00
< h3 class = "margin-bottom-small text-bold" > No Attributes Found< / h3 >
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-09 19:08:49 +12:00
< table class = "vertical" data-ls-if = "0 < {{project-collection.attributes.length}} || 0 < {{project-collection.attributesInQueue.length}}" >
2021-08-09 03:59:48 +12:00
< thead >
< tr >
2021-08-09 19:08:49 +12:00
< th width = "120" > < / th >
2021-08-09 03:59:48 +12:00
< th width = "140" > Attribute ID< / th >
< th width = "100" > Type< / th >
< th width = "180" > Default< / th >
< th > < / th >
< th width = "80" > < / th >
< / tr >
< / thead >
< tbody data-ls-loop = "project-collection.attributes" data-ls-as = "attribute" >
< tr >
< td data-title = "Status" >
2021-08-09 19:08:49 +12:00
< span class = "text-size-small text-success" > < i class = "icon-ok-circled" > < / i > Available < / span >
2021-08-09 03:59:48 +12:00
< / td >
< td data-title = "Attribute ID: " >
2021-08-09 19:08:49 +12:00
< span class = "text-size-small" data-ls-bind = "{{attribute.$id}}" > < / span > < span class = "text-size-small" data-ls-if = "{{attribute.size}}" data-ls-bind = " ({{attribute.size}})" > < / span >
2021-08-09 03:59:48 +12:00
< / td >
< td data-title = "Type:" >
< span class = "text-size-small" data-ls-bind = "{{attribute.type}}" > < / span >
< span class = "text-size-small" data-ls-if = "{{attribute.array}}" > []< / span >
< / td >
< td data-title = "Default:" >
< span class = "text-size-small" data-ls-bind = "{{attribute.default}}" data-ls-attr = "title={{attribute.default}}" > < / span >
< span class = "text-fade text-size-small" data-ls-if = "!({{attribute.default}})" > n/a< / span >
< / td >
< td data-title = "" >
< span class = "text-size-small text-danger" data-ls-if = "{{attribute.required}}" > Required *< / span >
< / td >
< td data-title = "" >
< form 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 = "attributeId" data-ls-bind = "{{attribute.$id}}" / >
< button class = "danger small" > Delete< / button >
< / form >
< / td >
< / tr >
< / tbody >
< / table >
< hr data-ls-if = "0 < {{project-collection.attributesInQueue.length}}" / >
< table class = "vertical" data-ls-if = "0 < {{project-collection.attributesInQueue.length}}" >
< tbody data-ls-loop = "project-collection.attributesInQueue" data-ls-as = "attribute" >
< tr >
2021-08-09 19:08:49 +12:00
< td width = "120" data-title = "Status" >
< span class = "text-size-small text-info" > < i class = "icon-dot-circled" > < / i > Creating < / span >
2021-08-09 03:59:48 +12:00
< / td >
< td width = "140" data-title = "Attribute ID: " >
2021-08-09 19:08:49 +12:00
< span class = "text-size-small" data-ls-bind = "{{attribute.$id}}" > < / span > < span class = "text-size-small" data-ls-if = "{{attribute.size}}" data-ls-bind = " ({{attribute.size}})" > < / span >
2021-08-09 03:59:48 +12:00
< / td >
< td width = "100" data-title = "Type:" >
< span class = "text-size-small" data-ls-bind = "{{attribute.type}}" > < / span >
< span class = "text-size-small" data-ls-if = "{{attribute.array}}" > []< / span >
< / td >
< td width = "180" data-title = "Default:" >
< span class = "text-size-small" data-ls-bind = "{{attribute.default}}" data-ls-attr = "title={{attribute.default}}" > < / span >
< span class = "text-fade text-size-small" data-ls-if = "!({{attribute.default}})" > n/a< / span >
< / td >
< td data-title = "" >
< span class = "text-size-small text-danger" data-ls-if = "{{attribute.required}}" > Required *< / span >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
2021-08-09 19:08:49 +12:00
< div class = "drop-list pull-start" data-ls-ui-open = "" data-button-aria = "Choose Platform" data-button-text = "Add Attribute" data-button-class = "button" data-blur = "1" >
2021-08-09 03:59:48 +12:00
< ul >
< li >
< div class = "link new-attribute-string" >< img src = "/images/clients/web.png?v= <?php echo APP_CACHE_BUSTER ; ?> " alt = "String Attribute Logo" class = "avatar xxs margin-end-small" loading = "lazy" /> New String Attribute</ div >
< / li >
< li >
< div class = "link new-attribute-integer" >< img src = "/images/clients/web.png?v= <?php echo APP_CACHE_BUSTER ; ?> " alt = "String Attribute Logo" class = "avatar xxs margin-end-small" loading = "lazy" /> New Integer Attribute</ div >
< / li >
< li >
< div class = "link new-attribute-float" >< img src = "/images/clients/web.png?v= <?php echo APP_CACHE_BUSTER ; ?> " alt = "String Attribute Logo" class = "avatar xxs margin-end-small" loading = "lazy" /> New Float Attribute</ div >
< / li >
< li >
< div class = "link new-attribute-boolean" >< img src = "/images/clients/web.png?v= <?php echo APP_CACHE_BUSTER ; ?> " alt = "String Attribute Logo" class = "avatar xxs margin-end-small" loading = "lazy" /> New Boolean Attribute</ div >
< / li >
< / 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-09 19:08:49 +12:00
< div data-ls-if = "0 == {{project-collection.indexes.length}} && 0 == {{project-collection.indexesInQueue.length}}" >
2021-08-09 03:59:48 +12:00
< h3 class = "margin-bottom-small text-bold" > No Indexes Found< / h3 >
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-09 19:08:49 +12:00
< table class = "vertical" data-ls-if = "0 < {{project-collection.indexes.length}} || 0 < {{project-collection.indexesInQueue.length}}" >
2021-08-09 03:59:48 +12:00
< thead >
< tr >
2021-08-09 19:08:49 +12:00
< th width = "120" > < / th >
2021-08-09 03:59:48 +12:00
< th width = "140" > Index ID< / th >
< 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 >
< td data-title = "Status" >
2021-08-09 19:08:49 +12:00
< span class = "text-size-small text-success" > < i class = "icon-ok-circled" > < / i > Available < / span >
2021-08-09 03:59:48 +12:00
< / td >
< td data-title = "Index ID: " >
< span class = "text-size-small" data-ls-bind = "{{index.$id}}" > < / span > < span class = "text-size-small" data-ls-if = "{{index.size}}" data-ls-bind = "({{index.size}})" > < / span >
< / 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:" >
< span class = "text-size-small" data-ls-bind = "{{index.attributes}}" > < / span >
2021-08-09 03:59:48 +12:00
< / td >
< td data-title = "" >
< span class = "text-size-small text-danger" data-ls-if = "{{index.required}}" > Required *< / span >
< / td >
< td data-title = "" >
< form class = "pull-end"
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}}" / >
< input type = "hidden" name = "attributeId" data-ls-bind = "{{attribute.$id}}" / >
< button class = "danger small" > Delete< / button >
< / form >
< / td >
< / tr >
< / tbody >
< / table >
< hr data-ls-if = "0 < {{project-collection.indexesInQueue.length}}" / >
< table class = "vertical" data-ls-if = "0 < {{project-collection.indexesInQueue.length}}" >
< tbody data-ls-loop = "project-collection.indexesInQueue" data-ls-as = "index" >
< tr >
2021-08-09 19:08:49 +12:00
< td width = "120" data-title = "Status" >
< span class = "text-size-small text-info" > < i class = "icon-dot-circled" > < / i > Creating < / span >
< / td >
< td width = "140" data-title = "Index ID: " >
< span class = "text-size-small" data-ls-bind = "{{index.$id}}" > < / span > < span class = "text-size-small" data-ls-if = "{{index.size}}" data-ls-bind = "({{index.size}})" > < / span >
< / td >
< td width = "100" 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 >
< td width = "180" data-title = "Attributes:" >
< span class = "text-size-small" data-ls-bind = "{{index.attributes}}" > < / span >
< / td >
< td data-title = "" >
< span class = "text-size-small text-danger" data-ls-if = "{{index.required}}" > Required *< / span >
< / td >
< td width = "80" data-title = "" >
< / td >
2021-08-09 03:59:48 +12:00
< / 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 >
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}}"
2020-05-31 17:56:13 +12:00
data-success="alert,trigger,redirect"
2020-03-09 08:27:21 +13:00
data-success-param-alert-text="Updated collection successfully"
data-success-param-trigger-events="database.updateCollection"
2020-05-31 17:56:13 +12:00
data-success-param-redirect-url="/console/database/collection/settings?id={{serviceData.$id}}& project={{router.params.project}}"
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">
< 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" / >
2020-06-13 23:13:53 +12:00
< div class = "toggle margin-bottom margin-top" data-ls-ui-open data-button-aria = "Open Permissions" >
2020-03-09 08:27:21 +13:00
< i class = "icon-plus pull-end margin-top-tiny" > < / i >
< i class = "icon-minus pull-end margin-top-tiny" > < / i >
< h3 class = "margin-bottom-large" > Permissions< / h3 >
2020-06-13 23:13:53 +12:00
< 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 >
2020-03-09 08:27:21 +13:00
< input type = "hidden" id = "collection-read" name = "read" data-forms-tags data-cast-to = "json" data-ls-bind = "{{project-collection.$permissions.read}}" placeholder = "User ID, Team ID or Role" / >
2020-05-30 22:21:36 +12:00
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Add * for wildcard access< / div >
2020-03-09 08:27:21 +13:00
2020-06-13 23:13:53 +12:00
< 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 >
2020-03-09 08:27:21 +13:00
< input type = "hidden" id = "collection-write" name = "write" data-forms-tags data-cast-to = "json" data-ls-bind = "{{project-collection.$permissions.write}}" placeholder = "User ID, Team ID or Role" / >
2020-05-30 22:21:36 +12:00
< div class = "text-fade text-size-xs margin-top-negative-small margin-bottom" > Add * for wildcard access< / div >
2020-03-09 08:27:21 +13:00
< / div >
< button > Update< / button >
< / 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" / >
< / div >
< ul class = "margin-bottom-large text-fade text-size-small" >
2020-04-21 20:12:06 +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" > View as JSON< / button > < / li >
2020-07-15 23:22:38 +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.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 >
2020-03-09 08:27:21 +13:00
< / ul >
< 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">
< button type = "submit" class = "danger fill" > Delete Collection< / button >
< / form >
< / div >
< / div >
2020-03-15 17:54:55 +13:00
< / li >
2020-03-09 08:27:21 +13:00
< / ul >
2019-08-07 02:28:42 +12:00
< / div >
2021-08-09 03:59:48 +12: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 19:08:49 +12:00
< h1 > Add String Attribute< / h1 >
2021-08-09 03:59:48 +12:00
< form
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">
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
< label for = "string-attributeId" > Attribute ID< / label >
< input type = "text" class = "full-width" name = "attributeId" required autocomplete = "off" maxlength = "128" / >
< 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" / >
< div class = "margin-bottom" >
< input name = "required" type = "hidden" data-forms-switch data-cast-to = "boolean" / > 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 name = "array" type = "hidden" data-forms-switch data-cast-to = "boolean" / > 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 = "string-default" > Default Value< / label >
2021-08-09 19:08:49 +12:00
< input id = "string-default" name = "default" type = "text" class = "margin-bottom-large" autocomplete = "off" >
2021-08-09 03:59:48 +12:00
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Back< / button >
< / footer >
< / form >
< / div >
2021-08-09 19:08:49 +12:00
< div data-ui-modal class = "modal box close sticky-footer" data-button-alias = ".new-attribute-integer" >
2021-08-09 03:59:48 +12:00
< 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
< h1 > Add Integer Attribute< / h1 >
2021-08-09 03:59:48 +12:00
< form
2021-08-09 19:08:49 +12:00
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">
< input type = "hidden" name = "projectId" data-ls-bind = "{{router.params.project}}" / >
< input type = "hidden" name = "collectionId" data-ls-bind = "{{router.params.id}}" / >
< label for = "integer-attributeId" > Attribute ID< / label >
< input type = "text" class = "full-width" name = "attributeId" required autocomplete = "off" maxlength = "128" / >
< div class = "margin-bottom" >
< input name = "required" type = "hidden" data-forms-switch data-cast-to = "boolean" / > 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 name = "array" type = "hidden" data-forms-switch data-cast-to = "boolean" / > Array < span class = "tooltip" data-tooltip = "Mark whether this attribute should act as an array" > < i class = "icon-info-circled" > < / i > < / span >
< / div >
< div class = "row responsive thin" >
< div class = "col span-6 margin-bottom-small" >
< label for = "integer-min" > Min< / label >
< input type = "text" class = "full-width" name = "number" value = "0" required autocomplete = "off" / >
< / div >
< div class = "col span-6 margin-bottom-small" >
< label for = "integer-min" > Max< / label >
< input type = "text" class = "full-width" name = "number" value = "0" required autocomplete = "off" / >
< / div >
< / div >
< label for = "integer-default" > Default Value< / label >
< input id = "integer-default" name = "default" type = "number" value = "0" class = "margin-bottom-large" autocomplete = "off" >
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Back< / button >
< / footer >
< / form >
< / div >
< 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 >
< h1 > Add Index< / h1 >
< div data-ls-if = "0 == {{project-collection.attributes.length}}" >
< div class = "info margin-top margin-bottom" >
< h2 > No Attributes Found< / h2 >
< p > Please add your first attribute before adding your first index.< / p >
< / div >
< button data-ui-modal-close = "" type = "button" class = "reverse" > Back< / button >
< / div >
< form data-ls-if = "0 < {{project-collection.attributes.length}}"
2021-08-09 03:59:48 +12:00
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}}" / >
< label for = "index-indexId" > Index ID< / label >
< input id = "index-indexId" type = "text" class = "full-width" name = "indexId" required autocomplete = "off" maxlength = "128" / >
< 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 >
2021-08-09 19:08:49 +12:00
< div id = "attributes-section" > < / div >
2021-08-09 03:59:48 +12:00
< div class = "margin-bottom" >
2021-08-09 19:08:49 +12:00
< div data-forms-clone = "" data-label = "Add Attribute" data-target = "attributes-section" data-first = "1" >
2021-08-09 03:59:48 +12:00
< 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.$id}}" data-ls-bind = "{{option.$id}}" > < / 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 >
< / div >
< / div >
< / div >
< / div >
< footer >
< button type = "submit" > Create< / button > < button data-ui-modal-close = "" type = "button" class = "reverse" > Back< / button >
< / footer >
< / form >
< / div >
2020-04-04 08:27:18 +13:00
< / div >
2021-08-08 00:45:44 +12:00
< div class = "margin-top"
data-service="database.listCollections"
data-event="load,database.createCollection,database.updateCollection,database.deleteCollection"
data-scope="sdk"
data-name="project-collections">
< / div >