2019-05-09 18:54:39 +12:00
<?php
use Utopia\Locale\Locale;
$events = [
'database.documents.create',
'database.documents.patch',
'database.documents.delete',
'auth.register',
'auth.confirm',
'auth.login',
'auth.logout',
'account.update-name',
'account.update-email',
'account.update-password',
];
$scopes = [ // TODO sync with project list
'users.read',
'users.write',
'teams.read',
'teams.write',
'database.read',
'database.write',
'storage.files.read',
'storage.files.write',
//'billing.vaults.read',
//'billing.vaults.write',
//'billing.plans.read',
//'billing.plans.write',
//'billing.subscriptions.read',
//'billing.subscriptions.write',
//'billing.invoices.read',
//'projects.read',
//'projects.write',
//'locale.read',
//'health.read',
];
?>
< div class = "cover" >
< h1 class = "zone xl margin-bottom-large margin-top" >
<?php echo Locale :: getText ( 'console.settings.title' ); ?>
< / h1 >
< / div >
< div class = "zone xl"
data-appwrite="projects.get"
data-scope="console"
data-service="console-project"
data-event="load"
2019-05-09 20:23:22 +12:00
data-param-project-id="{{router.params.project}}"
2019-05-09 18:54:39 +12:00
data-success="render,trigger"
data-error="render"
data-success-rerender=""
data-error-rerender=""
data-success-triggers="project.load">
< div class = "zone xl" >
2019-05-09 20:23:22 +12:00
< ul class = "phases clear" data-ui-phases data-selected = "{{router.params.tab}}" >
< li data-state = "/console/settings?project={{router.params.project}}" >
2019-05-09 18:54:39 +12:00
< h2 > <?php echo Locale :: getText ( 'console.settings.section.overview.title' ); ?> </ h2 >
< form data-appwrite = "projects.update"
data-scope="console"
data-event="submit"
2019-05-09 20:23:22 +12:00
data-param-project-id="{{router.params.project}}"
2019-05-09 18:54:39 +12:00
data-success="alert,trigger"
data-success-alert="Saved project successfully"
data-success-triggers="project.update"
data-error="alert"
data-error-alert="Failed to update project">
2019-05-10 04:15:51 +12:00
< input name = "$uid" type = "hidden" data-ls-bind = "{{console-project.$uid}}" / >
2019-05-09 18:54:39 +12:00
< div class = "row" >
< div class = "col span-9" >
< div class = "box" >
< label for = "name" > Name< / label >
2019-05-10 04:15:51 +12:00
< input name = "name" id = "name" type = "text" autocomplete = "off" data-ls-bind = "{{console-project.name}}" data-forms-text-direction required >
2019-05-09 18:54:39 +12:00
< label for = "name" > Project ID< / label >
< div class = "input-copy" >
2019-05-10 04:15:51 +12:00
< input data-forms-copy type = "text" disabled data-ls-bind = "{{router.params.project}}" / >
2019-05-09 18:54:39 +12:00
< / div >
< label for = "description" > Description < small > (optional)< / small > < / label >
2019-05-10 04:15:51 +12:00
< textarea name = "description" id = "description" autocomplete = "off" placeholder = "Help us make the world a better place" data-ls-bind = "{{console-project.description}}" data-forms-text-direction data-forms-text-count > < / textarea >
2019-05-09 18:54:39 +12:00
< label for = "url" > Website < small > (optional)< / small > < / label >
2019-05-10 04:15:51 +12:00
< input name = "url" id = "url" type = "url" class = "full-width" autocomplete = "off" placeholder = "https://acme-corp.com" data-ls-bind = "{{console-project.url}}" >
2019-05-09 18:54:39 +12:00
< hr / >
< h3 > Clients< / h3 >
< input name = "clients" type = "hidden" data-cast-to = "array-empty" >
< div data-ls-loop = "console-project.clients" data-ls-as = "client" style = "overflow: hidden" >
< div class = "margin-bottom-small" >
< div data-forms-remove class = "row thin" >
< div class = "col span-9" >
2019-05-10 04:15:51 +12:00
< input name = "clients" type = "url" class = "full-width" autocomplete = "off" placeholder = "https://acme-corp.com" data-ls-bind = "{{client}}" data-cast-to = "array" >
2019-05-09 18:54:39 +12:00
< / div >
< div class = "col span-3" >
< button type = "button" data-remove class = "reverse danger pull-end" > < i class = "icon-cancel" > < / i > < / button >
< / div >
< / div >
< / div >
< / div >
< div data-forms-clone = "" data-first = "0" >
< div class = "margin-bottom-small" >
< div data-forms-remove class = "row thin" >
< div class = "col span-9" >
< input name = "clients" type = "url" class = "full-width" autocomplete = "off" placeholder = "https://acme-corp.com" data-cast-to = "array" >
< / div >
< div class = "col span-3" >
< button type = "button" data-remove class = "reverse danger pull-end" > < i class = "icon-cancel" > < / i > < / button >
< / div >
< / div >
< / div >
< / div >
< hr / >
< h3 > Legal Information< / h3 >
< div class = "row thin" >
< div class = "col span-6" >
< label for = "legalName" > Legal Name< / label >
2019-05-10 04:15:51 +12:00
< input name = "legalName" id = "legalName" type = "text" autocomplete = "off" data-ls-bind = "{{console-project.legalName}}" data-forms-text-direction >
2019-05-09 18:54:39 +12:00
< div data-ls-rerender = "geo-countries-load" >
< label for = "legalCountry" > Country< / label >
2019-05-10 04:15:51 +12:00
< select id = "legalCountry" name = "legalCountry" data-ls-options = "{{geo-countries}}" data-ls-bind = "{{console-project.legalCountry}}" > < / select >
2019-05-09 18:54:39 +12:00
< / div >
< label for = "legalCity" > City< / label >
2019-05-10 04:15:51 +12:00
< input name = "legalCity" id = "legalCity" type = "text" autocomplete = "off" data-ls-bind = "{{console-project.legalCity}}" data-forms-text-direction >
2019-05-09 18:54:39 +12:00
< / div >
< div class = "col span-6" >
< label for = "legalTaxId" > Tax ID< / label >
2019-05-10 04:15:51 +12:00
< input name = "legalTaxId" id = "legalTaxId" type = "text" autocomplete = "off" data-ls-bind = "{{console-project.legalTaxId}}" data-forms-text-direction >
2019-05-09 18:54:39 +12:00
< label for = "legalState" > State< / label >
2019-05-10 04:15:51 +12:00
< input name = "legalState" id = "legalState" type = "text" autocomplete = "off" data-ls-bind = "{{console-project.legalState}}" data-forms-text-direction >
2019-05-09 18:54:39 +12:00
< label for = "legalAddress" > Address< / label >
2019-05-10 04:15:51 +12:00
< input name = "legalAddress" id = "legalAddress" type = "text" autocomplete = "off" data-ls-bind = "{{console-project.legalAddress}}" data-forms-text-direction >
2019-05-09 18:54:39 +12:00
< / div >
< / div >
< div >
< button class = "" type = "submit" > Save< / button >
< / div >
< / div >
< / div >
< div class = "col span-3 box-aside" >
< label for = "name" > Logo< / label >
< div class = "text-center clear" >
2019-05-10 04:15:51 +12:00
< input type = "hidden" name = "logo" data-ls-bind = "{{console-project.logo}}"
2019-05-09 18:54:39 +12:00
data-read="<?php echo $this -> escape ( json_encode ([ '*' ])); ?> "
data-write="<?php echo $this -> escape ( json_encode ([ 'team:{{console-project.teamId}}' ])); ?> "
data-accept="image/*"
data-forms-upload="" data-scope="console" data-default="">
< / div >
< / div >
< / div >
< / form >
< / li >
2019-05-09 20:23:22 +12:00
< li data-state = "/console/settings/keys?project={{router.params.project}}" >
2019-05-09 18:54:39 +12:00
< h2 > <?php echo Locale :: getText ( 'console.settings.section.keys.title' ); ?> </ h2 >
< div class = "zone xl"
data-appwrite="projects.keys.list"
data-scope="console"
data-event="load"
data-service="console-keys"
2019-05-09 20:23:22 +12:00
data-param-project-id="{{router.params.project}}"
2019-05-09 18:54:39 +12:00
data-success="render,trigger"
data-success-rerender="key.new,key.update,key.delete"
data-success-triggers="project.load"
data-error="render"
data-error-rerender="">
< div data-ls-if = "0 == {{console-keys.length}} || undefined == {{console-keys.length}}" class = "box margin-top margin-bottom" style = "display: none;" >
< h3 > No API Keys Found< / h3 >
< p class = "margin-bottom-no" > You haven't created any API keys to your project yet.< / p >
< / div >
< div class = "box margin-bottom" data-ls-if = "0 != {{console-keys.length}}" style = "display: none;" >
< ul data-ls-loop = "console-keys" data-ls-as = "key" class = "list" >
< li class = "clear" >
< div data-ui-modal class = "modal close" data-button-text = "Update" data-button-class = "pull-end" >
< button type = "button" class = "close pull-end" data-ls-trigger = "modal-close" > < i class = "icon-cancel" > < / i > < / button >
< h1 > Update API Key< / h1 >
< form data-appwrite = "projects.keys.update"
data-scope="console"
data-event="submit"
data-success="alert,trigger,reset"
data-success-alert="Updated API key successfully"
data-success-triggers="key.update,modal-close"
data-error="alert"
data-error-alert="Failed to update API key">
2019-05-10 04:15:51 +12:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{console-project.$uid}}" >
< input type = "hidden" name = "keyId" data-ls-bind = "{{key.$uid}}" >
2019-05-09 18:54:39 +12:00
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=name-{{key.$uid}}" > Name< / label >
< input type = "text" class = "full-width" data-ls-attrs = "id=name-{{key.$uid}}" name = "name" required autocomplete = "off" data-ls-bind = "{{key.name}}" / >
2019-05-09 18:54:39 +12:00
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=scopes-{{key.$uid}}" > Scopes (< a href = "/docs/keys" target = "_blank" > Learn More< / a > )< / label >
2019-05-09 18:54:39 +12:00
< div class = "row thin margin-bottom" >
<?php foreach ( $scopes as $i => $scope ) : ?>
< div class = "col span-6" >
2019-05-10 04:15:51 +12:00
< input type = "checkbox" name = "scopes" data-ls-bind = " <?php echo $scope ; ?> " data-default = "{{key.scopes}}" /> <?php echo $scope ; ?>
2019-05-09 18:54:39 +12:00
< / div >
<?php if (( $i + 1 ) % 2 === 0 ) : ?>
< / div >
< div class = "row thin margin-bottom" >
<?php endif ; ?>
<?php endforeach ; ?>
< / div >
< div >
< button type = "submit" > Save< / button > < button data-ls-trigger = "modal-close" type = "button" class = "reverse" > Cancel< / button >
< / div >
< / form >
< / div >
< form class = "pull-end margin-end"
data-appwrite="projects.keys.delete"
data-scope="console"
data-event="submit"
data-confirm="Are you sure you want to delete this API key?"
data-success="alert,trigger"
data-success-alert="Deleted API key successfully"
data-success-triggers="key.delete"
data-error="alert"
data-error-alert="Failed to delete API key">
2019-05-10 04:15:51 +12:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{console-project.$uid}}" >
< input type = "hidden" name = "keyId" data-ls-bind = "{{key.$uid}}" >
2019-05-09 18:54:39 +12:00
< button class = "reverse danger" > Delete< / button >
< / form >
2019-05-10 04:15:51 +12:00
< div class = "margin-bottom-tiny" > < span data-ls-bind = "{{key.name}}" > < / span > < span class = "note" > (< span data-ls-bind = "{{key.scopes.length}}" > < / span > scopes granted)< / span > < / div >
2019-05-09 18:54:39 +12:00
< div data-ui-modal class = "modal close" data-button-text = "Show Secret" data-button-class = "link margin-top-small" data-button-icon = "icon-right-open" >
< button type = "button" class = "close pull-end" data-ls-trigger = "modal-close" > < i class = "icon-cancel" > < / i > < / button >
< h1 > API Key Secret< / h1 >
< form >
< div class = "input-copy" >
2019-05-10 04:15:51 +12:00
< textarea disabled style = "height: 130px; line-height: 26px" data-forms-copy data-ls-bind = "{{key.secret}}" > < / textarea >
2019-05-09 18:54:39 +12:00
< / div >
< div >
< button data-ls-trigger = "modal-close" type = "button" class = "reverse" > Cancel< / button >
< / div >
< / form >
< / div >
< / li >
< / ul >
< / div >
< div class = "clear" >
< div data-ui-modal class = "modal close" data-button-text = "Add API Key" >
< button type = "button" class = "close pull-end" data-ls-trigger = "modal-close" > < i class = "icon-cancel" > < / i > < / button >
< h1 > Add API Keys< / h1 >
< form data-appwrite = "projects.keys.create"
data-scope="console"
data-event="submit"
data-success="alert,trigger,reset"
data-success-alert="Created API key successfully"
data-success-triggers="key.new,modal-close"
data-error="alert"
data-error-alert="Failed to create API key">
2019-05-10 04:15:51 +12:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{console-project.$uid}}" >
2019-05-09 18:54:39 +12:00
< label for = "name" > Name< / label >
< input type = "text" class = "full-width" id = "name" name = "name" required autocomplete = "off" / >
< label for = "scopes" > Scopes (< a href = "/docs/keys" target = "_blank" > Learn More< / a > )< / label >
< div class = "row thin margin-bottom" >
<?php foreach ( $scopes as $i => $scope ) : ?>
< div class = "col span-6" >
< input type = "checkbox" name = "scopes" value = " <?php echo $scope ; ?> " /> <?php echo $scope ; ?>
< / div >
<?php if (( $i + 1 ) % 2 === 0 ) : ?>
< / div >
< div class = "row thin margin-bottom" >
<?php endif ; ?>
<?php endforeach ; ?>
< / div >
< br / >
< div >
< button type = "submit" > Create< / button > < button data-ls-trigger = "modal-close" type = "button" class = "reverse" > Cancel< / button >
< / div >
< / form >
< / div >
< / div >
< / div >
< / li >
2019-05-09 20:23:22 +12:00
< li data-state = "/console/settings/webhooks?project={{router.params.project}}" >
2019-05-09 18:54:39 +12:00
< h2 > <?php echo Locale :: getText ( 'console.settings.section.webhooks.title' ); ?> </ h2 >
< div class = "zone xl"
data-appwrite="projects.webhooks.list"
data-scope="console"
data-event="load"
data-service="console-webhooks"
2019-05-09 20:23:22 +12:00
data-param-project-id="{{router.params.project}}"
2019-05-09 18:54:39 +12:00
data-success="render,trigger"
data-success-rerender="webhook.new,webhook.update,webhook.delete"
data-success-triggers="project.load"
data-error="render"
data-error-rerender="">
< div data-ls-if = "0 == {{console-webhooks.length}} || undefined == {{console-webhooks.length}}" class = "box margin-top margin-bottom" style = "display: none;" >
< h3 > No Webhooks Found< / h3 >
< p class = "margin-bottom-no" > You haven't created any webhooks to your project yet.< / p >
< / div >
< div class = "box margin-bottom" data-ls-if = "0 != {{console-webhooks.length}}" style = "display: none;" >
< ul data-ls-loop = "console-webhooks" data-ls-as = "webhook" class = "list" >
< li class = "clear" >
< div data-ui-modal class = "modal close" data-button-text = "Update" data-button-class = "pull-end" >
< button type = "button" class = "close pull-end" data-ls-trigger = "modal-close" > < i class = "icon-cancel" > < / i > < / button >
< h1 > Update Webhook< / h1 >
< form data-appwrite = "projects.webhooks.update"
data-scope="console"
data-event="submit"
data-success="alert,trigger,reset"
data-success-alert="Updated webhook successfully"
data-success-triggers="webhook.update,modal-close"
data-error="alert"
data-error-alert="Failed to update webhook">
2019-05-10 04:15:51 +12:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{console-project.$uid}}" >
< input type = "hidden" name = "webhookId" data-ls-bind = "{{webhook.$uid}}" >
2019-05-09 18:54:39 +12:00
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=name-{{webhook.$uid}}" > Name< / label >
< input type = "text" class = "full-width" data-ls-attrs = "id=name-{{webhook.$uid}}" name = "name" required autocomplete = "off" data-ls-bind = "{{webhook.name}}" / >
2019-05-09 18:54:39 +12:00
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=events-{{webhook.$uid}}" > Events< / label >
2019-05-09 18:54:39 +12:00
< div class = "row thin margin-bottom" >
<?php foreach ( $events as $i => $event ) : ?>
< div class = "col span-6" >
2019-05-10 04:15:51 +12:00
< input type = "checkbox" name = "events" data-ls-bind = " <?php echo $event ; ?> " data-default = "{{webhook.events}}" /> <?php echo $event ; ?>
2019-05-09 18:54:39 +12:00
< / div >
<?php if (( $i + 1 ) % 2 === 0 ) : ?>
< / div >
< div class = "row thin margin-bottom" >
<?php endif ; ?>
<?php endforeach ; ?>
< / div >
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=url-{{webhook.$uid}}" > POST URL< / label >
< input type = "url" class = "full-width" data-ls-attrs = "id=url-{{webhook.$uid}}" name = "url" required autocomplete = "off" placeholder = "https://example.com/callback" data-ls-bind = "{{webhook.url}}" / >
2019-05-09 18:54:39 +12:00
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=secure-{{webhook.$uid}}" > SSL / TLS< / label >
2019-05-09 18:54:39 +12:00
< p class = "note" > Certificate verification< / p >
2019-05-10 08:29:23 +12:00
< input name = "security" data-ls-attrs = "id=secure-yes-{{webhook.$uid}}" type = "radio" required data-ls-bind = "1" data-default = "{{webhook.security}}" / > < span > Enabled< / span >
2019-05-09 18:54:39 +12:00
2019-05-10 08:29:23 +12:00
< input name = "security" data-ls-attrs = "id=secure-no-{{webhook.$uid}}" type = "radio" required data-ls-bind = "0" data-default = "{{webhook.security}}" / > < span > Disabled< / span >
2019-05-09 18:54:39 +12:00
< br / >
< br / >
< p class = "note margin-bottom" > < span class = "tag red" > Warning< / span > Untrusted or self-signed certificates may not be secure.
< a href = "https://en.wikipedia.org/wiki/Self-signed_certificate" target = "_blank" rel = "noopener" > Learn more< i class = "icon-link-ext" > < / i > < / a >
< / p >
< h3 > HTTP Authentication < span class = "tooltip" data-tooltip = "Use to secure your endpoint from untrusted sources" > < i class = "icon-question" > < / i > < / span > < small > (optional)< / small > < / h3 >
< div class = "row thin" >
< div class = "col span-6" >
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=httpUser-{{webhook.$uid}}" > User< / label >
< input type = "text" class = "full-width" data-ls-attrs = "id=httpUser-{{webhook.$uid}}" name = "httpUser" autocomplete = "off" data-ls-bind = "{{webhook.httpUser}}" / >
2019-05-09 18:54:39 +12:00
< / div >
< div class = "col span-6" >
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=httpPass-{{webhook.$uid}}" > Password< / label >
< input type = "password" class = "full-width" data-ls-attrs = "id=httpPass-{{webhook.$uid}}" name = "httpPass" autocomplete = "off" data-ls-bind = "{{webhook.httpPass}}" / >
2019-05-09 18:54:39 +12:00
< / div >
< / div >
< br / >
< div >
< button type = "submit" > Save< / button > < button data-ls-trigger = "modal-close" type = "button" class = "reverse" > Cancel< / button >
< / div >
< / form >
< / div >
< form class = "pull-end margin-end"
data-appwrite="projects.webhooks.delete"
data-scope="console"
data-event="submit"
data-confirm="Are you sure you want to delete this webhook?"
data-success="alert,trigger"
data-success-alert="Deleted webhook successfully"
data-success-triggers="webhook.delete"
data-error="alert"
data-error-alert="Failed to delete webhook">
2019-05-10 04:15:51 +12:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{console-project.$uid}}" >
< input type = "hidden" name = "webhookId" data-ls-bind = "{{webhook.$uid}}" >
2019-05-09 18:54:39 +12:00
< button class = "danger reverse" > Delete< / button >
< / form >
2019-05-10 04:15:51 +12:00
< span data-ls-bind = "{{webhook.name}}" > < / span > (< span data-ls-bind = "{{webhook.events.length}}" > < / span > events)
2019-05-09 18:54:39 +12:00
< span data-ls-if = "0 == {{webhook.security}}" style = "display: none;" >
< span class = "note text-danger" > (SSL/TLS Disabled)< / span >
< / span >
2019-05-10 04:15:51 +12:00
< p class = "note margin-bottom-no margin-top-small" > < span class = "tag green" > POST< / span > < span data-ls-bind = "{{webhook.url}}" > < / span > < / p >
2019-05-09 18:54:39 +12:00
< / li >
< / ul >
< / div >
< div class = "clear" >
< div data-ui-modal class = "modal close" data-button-text = "Add Webhook" >
< button type = "button" class = "close pull-end" data-ls-trigger = "modal-close" > < i class = "icon-cancel" > < / i > < / button >
< h1 > Add Webhook< / h1 >
< form data-appwrite = "projects.webhooks.create"
data-scope="console"
data-event="submit"
data-success="alert,trigger,reset"
data-success-alert="Created webhook successfully"
data-success-triggers="webhook.new,modal-close"
data-error="alert"
data-error-alert="Failed to create webhook">
2019-05-10 04:15:51 +12:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{console-project.$uid}}" >
2019-05-09 18:54:39 +12:00
< label for = "name" > Name< / label >
< input type = "text" class = "full-width" id = "name" name = "name" required autocomplete = "off" / >
< label for = "events" > Events< / label >
< div class = "row thin margin-bottom" >
<?php foreach ( $events as $i => $event ) : ?>
< div class = "col span-6" >
< input type = "checkbox" name = "events" value = " <?php echo $event ; ?> " /> <?php echo $event ; ?>
< / div >
<?php if (( $i + 1 ) % 2 === 0 ) : ?>
< / div >
< div class = "row thin margin-bottom" >
<?php endif ; ?>
<?php endforeach ; ?>
< / div >
< label for = "url" > POST URL< / label >
< input type = "url" class = "full-width" id = "url" name = "url" required autocomplete = "off" placeholder = "https://example.com/callback" / >
< label for = "secure" > SSL / TLS< / label >
< p class = "note" > Certificate verification< / p >
2019-05-10 08:29:23 +12:00
< input name = "security" data-ls-attrs = "id=secure-yes" type = "radio" value = "1" checked = "checked" required / > < span > Enabled< / span >
2019-05-09 18:54:39 +12:00
2019-05-10 08:29:23 +12:00
< input name = "security" data-ls-attrs = "id=secure-no" type = "radio" value = "0" required / > < span > Disabled< / span >
2019-05-09 18:54:39 +12:00
< br / >
< br / >
< p class = "note margin-bottom" > < span class = "tag red" > Warning< / span > Untrusted or self-signed certificates may not be secure.
< a href = "https://en.wikipedia.org/wiki/Self-signed_certificate" target = "_blank" rel = "noopener" > Learn more< i class = "icon-link-ext" > < / i > < / a >
< / p >
< h3 > HTTP Authentication < span class = "tooltip" data-tooltip = "Use to secure your endpoint from untrusted sources" > < i class = "icon-question" > < / i > < / span > < small > (optional)< / small > < / h3 >
< div class = "row thin" >
< div class = "col span-6" >
< label for = "httpUser" > User< / label >
< input type = "text" class = "full-width" id = "httpUser" name = "httpUser" autocomplete = "off" / >
< / div >
< div class = "col span-6" >
< label for = "httpPass" > Password< / label >
< input type = "password" class = "full-width" id = "httpPass" name = "httpPass" autocomplete = "off" / >
< / div >
< / div >
< br / >
< div >
< button type = "submit" > Create< / button > < button data-ls-trigger = "modal-close" type = "button" class = "reverse" > Cancel< / button >
< / div >
< / form >
< / div >
< / div >
< / div >
< / li >
2019-05-09 20:23:22 +12:00
< li data-state = "/console/settings/tasks?project={{router.params.project}}" >
2019-05-09 18:54:39 +12:00
< h2 > <?php echo Locale :: getText ( 'console.settings.section.tasks.title' ); ?> </ h2 >
< div class = "zone xl"
data-appwrite="projects.tasks.list"
data-scope="console"
data-event="load"
data-service="console-tasks"
2019-05-09 20:23:22 +12:00
data-param-project-id="{{router.params.project}}"
2019-05-09 18:54:39 +12:00
data-success="render,trigger"
data-success-rerender="task.new,task.update,task.delete"
data-success-triggers="project.load"
data-error="render"
data-error-rerender="">
2019-05-12 03:26:03 +12:00
< div data-ls-if = "0 === {{console-tasks.length}} || undefined === {{console-tasks.length}}" class = "box margin-top margin-bottom" style = "display: none;" >
2019-05-09 18:54:39 +12:00
< h3 > No Tasks Found< / h3 >
< p class = "margin-bottom-no" > You haven't created any task to your project yet.< / p >
< / div >
< div class = "box y-scroll margin-bottom" data-ls-if = "0 != {{console-tasks.length}}" style = "display: none;" >
< table class = "full" >
< thead >
< tr >
< th width = "220" > Name< / th >
< th > < / th >
< th width = "140" > Next Run< / th >
< th width = "140" > Prev. Run< / th >
< th > < / th >
< / tr >
< / thead >
< tbody data-ls-loop = "console-tasks" data-ls-as = "task" class = "list" >
< tr >
< td >
< div class = "margin-bottom-tiny text-one-liner" >
2019-05-10 04:15:51 +12:00
< span data-ls-bind = "{{task.name}}" > < / span >
2019-05-09 18:54:39 +12:00
< span data-ls-if = "0 === {{task.security}}" style = "display: none;" >
< span class = "text-danger" > SSL/TLS Disabled< / span >
< / span >
< span data-ls-if = "0 !== {{task.failures}}" style = "display: none;" >
2019-05-10 04:15:51 +12:00
< span class = "text-danger" data-ls-bind = "({{task.failures}} errors)" > < / span >
2019-05-09 18:54:39 +12:00
< / span >
< / div >
2019-05-10 04:15:51 +12:00
< a data-ls-attrs = "href={{task.httpUrl}}" data-ls-bind = "{{task.httpUrl}}" target = "_blank" class = "text-one-liner" > < / a >
2019-05-09 18:54:39 +12:00
< / td >
< td style = "vertical-align: middle" >
2019-05-12 03:26:03 +12:00
< span data-ls-if = "'play' === {{task.status}}" style = "display: none;" >
2019-05-09 18:54:39 +12:00
< span class = "tag green" > < i class = "icon-play" > < / i > Running < / span >
< / span >
2019-05-12 03:26:03 +12:00
< span data-ls-if = "'play' !== {{task.status}}" style = "display: none;" >
2019-05-09 18:54:39 +12:00
< span class = "tag red" > < i class = "icon-pause" > < / i > Paused < / span >
< / span >
< / td >
< td style = "vertical-align: middle" >
2019-05-10 04:15:51 +12:00
< span data-ls-bind = "{{task.next|date-time}}" class = "note" > < / span >
2019-05-09 18:54:39 +12:00
< / td >
< td style = "vertical-align: middle" >
2019-05-12 03:26:03 +12:00
< div data-ls-if = "'undefined' !== {{task.previous}}" class = "note" >
2019-05-10 04:15:51 +12:00
< span data-ls-bind = "{{task.previous|date-time}}" > < / span >
2019-05-09 18:54:39 +12:00
2019-05-12 03:26:03 +12:00
< div data-ls-if = "'undefined' !== {{task.delay}} && 59 < {{task.delay}}" class = "note text-danger margin-top-tiny" >
2019-05-10 04:15:51 +12:00
< span data-ls-bind = "({{task.delay|ms2hum}} Delay)" > < / span >
2019-05-09 18:54:39 +12:00
< / div >
< / div >
2019-05-12 03:26:03 +12:00
< div data-ls-if = "'undefined' === {{task.previous}}" class = "note" >
2019-05-09 18:54:39 +12:00
None.
< / div >
< / td >
< td >
< div data-ui-modal class = "modal close" data-button-text = "" data-button-class = "pull-end reverse round" data-button-icon = "icon-cog" >
< button type = "button" class = "close pull-end" data-ls-trigger = "modal-close" > < i class = "icon-cancel" > < / i > < / button >
< h1 > Update Task< / h1 >
< form data-appwrite = "projects.tasks.update"
data-scope="console"
data-event="submit"
data-success="alert,trigger,reset"
data-success-alert="Updated task successfully"
data-success-triggers="task.update,modal-close"
data-error="alert"
data-error-alert="Failed to update task">
2019-05-10 04:15:51 +12:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{console-project.$uid}}" >
< input type = "hidden" name = "taskId" data-ls-bind = "{{task.$uid}}" >
2019-05-09 18:54:39 +12:00
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=name-{{task.$uid}}" > Name< / label >
< input type = "text" class = "full-width" data-ls-attrs = "id=name-{{task.$uid}}" name = "name" required autocomplete = "off" data-ls-bind = "{{task.name}}" / >
2019-05-09 18:54:39 +12:00
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=status-{{task.$uid}}" class = "margin-bottom" > Status
2019-05-09 18:54:39 +12:00
< div class = "margin-top-small" >
2019-05-10 04:15:51 +12:00
< input name = "status" type = "radio" checked = "checked" required data-ls-bind = "play" data-default = "{{task.status}}" / > < span > Play< / span >
< input name = "status" type = "radio" required data-ls-bind = "pause" data-default = "{{task.status}}" / > < span > Pause< / span >
2019-05-09 18:54:39 +12:00
< / div >
< / label >
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=schedule-{{task.$uid}}" > Schedule (CRON Syntax)< / label >
< input type = "text" class = "full-width" data-ls-attrs = "id=schedule-{{task.$uid}}" name = "schedule" required autocomplete = "off" data-ls-bind = "{{task.schedule}}" / >
2019-05-09 18:54:39 +12:00
< div class = "row thin" >
< div class = "col span-4" >
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=httpMethod-{{task.$uid}}" > HTTP Method< / label >
< select data-ls-attrs = "id=httpMethod-{{task.$uid}}" name = "httpMethod" required data-ls-bind = "{{task.httpMethod}}" >
2019-05-09 18:54:39 +12:00
< option value = "POST" > POST< / option >
< option value = "GET" > GET< / option >
< option value = "PUT" > PUT< / option >
< option value = "PATCH" > PATCH< / option >
< option value = "DELETE" > DELETE< / option >
< option value = "CONNECT" > CONNECT< / option >
< option value = "HEAD" > HEAD< / option >
< option value = "TRACE" > TRACE< / option >
< option value = "OPTIONS" > OPTIONS< / option >
< / select >
< / div >
< div class = "col span-8" >
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=httpUrl-{{task.$uid}}" > HTTP URL< / label >
< input type = "url" class = "full-width" data-ls-attrs = "id=httpUrl-{{task.$uid}}" name = "httpUrl" required autocomplete = "off" placeholder = "https://example.com/callback" data-ls-bind = "{{task.httpUrl}}" / >
2019-05-09 18:54:39 +12:00
< / div >
< / div >
< label for = "httpHeaders" > HTTP Headers< / label >
< div class = "margin-bottom-small" >
< div data-ls-loop = "task.httpHeaders" data-ls-as = "header" style = "overflow: hidden" >
< div class = "margin-bottom-small" >
< div data-forms-remove class = "row thin" >
< div class = "col span-10" >
2019-05-10 04:15:51 +12:00
< input type = "hidden" name = "httpHeaders" data-forms-headers data-ls-bind = "{{header}}" data-cast-to = "array" / >
2019-05-09 18:54:39 +12:00
< / div >
< div class = "col span-2" >
< button type = "button" data-remove class = "reverse danger round pull-end" > < i class = "icon-cancel" > < / i > < / button >
< / div >
< / div >
< / div >
< / div >
< div data-forms-clone = "" data-label = "Add Header" data-first = "0" >
< div class = "" >
< div data-forms-remove class = "row thin margin-bottom-small" >
< div class = "col span-10" >
< input type = "hidden" name = "httpHeaders" data-forms-headers data-cast-to = "array" / >
< / div >
< div class = "col span-2" >
< button type = "button" data-remove class = "reverse danger round pull-end" > < i class = "icon-cancel" > < / i > < / button >
< / div >
< / div >
< / div >
< / div >
< / div >
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=security-{{task.$uid}}" class = "margin-bottom" > SSL / TLS
2019-05-09 18:54:39 +12:00
< p class = "note" > Certificate verification< / p >
2019-05-10 04:15:51 +12:00
< input name = "security" type = "radio" required data-ls-bind = "1" data-default = "{{task.security}}" / > < span > Enabled< / span >
< input name = "security" type = "radio" required data-ls-bind = "0" data-default = "{{task.security}}" / > < span > Disabled< / span >
2019-05-09 18:54:39 +12:00
< / label >
< p class = "note margin-bottom" > < span class = "tag red" > Warning< / span > Untrusted or self-signed certificates may not be secure.
< a href = "https://en.wikipedia.org/wiki/Self-signed_certificate" target = "_blank" rel = "noopener" > Learn more< i class = "icon-link-ext" > < / i > < / a >
< / p >
< h3 > HTTP Authentication < span class = "tooltip" data-tooltip = "Use to secure your endpoint from untrusted sources" > < i class = "icon-question" > < / i > < / span > < small > (optional)< / small > < / h3 >
< div class = "row thin" >
< div class = "col span-6" >
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=httpUser-{{task.$uid}}" > User< / label >
< input type = "text" class = "full-width" data-ls-attrs = "id=httpUser-{{task.$uid}}" name = "httpUser" autocomplete = "off" data-ls-bind = "{{task.httpUser}}" / >
2019-05-09 18:54:39 +12:00
< / div >
< div class = "col span-6" >
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=httpPass-{{task.$uid}}" > Password< / label >
< input type = "password" class = "full-width" data-ls-attrs = "id=httpPass-{{task.$uid}}" name = "httpPass" autocomplete = "off" data-ls-bind = "{{task.httpPass}}" / >
2019-05-09 18:54:39 +12:00
< / div >
< / div >
< div >
< button type = "submit" > Update< / button > < button data-ls-trigger = "modal-close" type = "button" class = "reverse" > Cancel< / button >
< / div >
< / form >
< form class = "margin-top"
data-appwrite="projects.tasks.delete"
data-scope="console"
data-event="submit"
data-confirm="Are you sure you want to delete this task?"
data-success="alert,trigger"
data-success-alert="Deleted task successfully"
data-success-triggers="task.delete,modal.close"
data-error="alert"
data-error-alert="Failed to delete task">
2019-05-10 04:15:51 +12:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{console-project.$uid}}" >
< input type = "hidden" name = "taskId" data-ls-bind = "{{task.$uid}}" >
2019-05-09 18:54:39 +12:00
< button class = "danger fill" > Delete< / button >
< / form >
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "clear" >
< div data-ui-modal class = "modal close" data-button-text = "Add Task" >
< button type = "button" class = "close pull-end" data-ls-trigger = "modal-close" > < i class = "icon-cancel" > < / i > < / button >
< h1 > Add Task< / h1 >
< form data-appwrite = "projects.tasks.create"
data-scope="console"
data-event="submit"
data-success="alert,trigger,reset"
data-success-alert="Created task successfully"
data-success-triggers="task.new,modal-close"
data-error="alert"
data-error-alert="Failed to create task">
2019-05-10 04:15:51 +12:00
< input type = "hidden" name = "projectId" data-ls-bind = "{{console-project.$uid}}" >
2019-05-09 18:54:39 +12:00
< label for = "name" > Name< / label >
< input type = "text" class = "full-width" id = "name" name = "name" required autocomplete = "off" / >
2019-05-10 08:29:23 +12:00
< label data-ls-attrs = "for=status-{{task.$uid}}" class = "margin-bottom" > Status
2019-05-09 18:54:39 +12:00
< div class = "margin-top-small" >
< input name = "status" type = "radio" value = "play" checked = "checked" required / > < span > Play< / span >
< input name = "status" type = "radio" value = "pause" required / > < span > Pause< / span >
< / div >
< / label >
< label for = "schedule" > Schedule (CRON Syntax)< / label >
< input type = "text" class = "full-width" id = "schedule" name = "schedule" required autocomplete = "off" / >
< div class = "row thin" >
< div class = "col span-4" >
< label for = "httpMethod" > HTTP Method< / label >
< select id = "httpMethod" name = "httpMethod" required >
< option value = "POST" > POST< / option >
< option value = "GET" > GET< / option >
< option value = "PUT" > PUT< / option >
< option value = "PATCH" > PATCH< / option >
< option value = "DELETE" > DELETE< / option >
< option value = "CONNECT" > CONNECT< / option >
< option value = "HEAD" > HEAD< / option >
< option value = "TRACE" > TRACE< / option >
< option value = "OPTIONS" > OPTIONS< / option >
< / select >
< / div >
< div class = "col span-8" >
< label for = "httpUrl" > HTTP URL< / label >
< input type = "url" class = "full-width" id = "httpUrl" name = "httpUrl" required autocomplete = "off" placeholder = "https://example.com/callback" / >
< / div >
< / div >
< label for = "httpHeaders" > HTTP Headers< / label >
< div class = "margin-bottom-small" >
< div data-forms-clone = "" data-label = "Add Header" data-first = "0" >
< div class = "" >
< div data-forms-remove class = "row thin margin-bottom-small" >
< div class = "col span-10" >
< input type = "hidden" name = "httpHeaders" data-forms-headers data-cast-to = "array" / >
< / div >
< div class = "col span-2" >
< button type = "button" data-remove class = "reverse danger round pull-end" > < i class = "icon-cancel" > < / i > < / button >
< / div >
< / div >
< / div >
< / div >
< / div >
< label for = "secure" class = "margin-bottom" > SSL / TLS
< p class = "note" > Certificate verification< / p >
2019-05-10 08:29:23 +12:00
< input name = "security" data-ls-attrs = "id=secure-yes" type = "radio" value = "1" checked = "checked" required / > < span > Enabled< / span >
< input name = "security" data-ls-attrs = "id=secure-no" type = "radio" value = "0" required / > < span > Disabled< / span >
2019-05-09 18:54:39 +12:00
< / label >
< p class = "note margin-bottom" > < span class = "tag red" > Warning< / span > Untrusted or self-signed certificates may not be secure.
< a href = "https://en.wikipedia.org/wiki/Self-signed_certificate" target = "_blank" rel = "noopener" > Learn more< i class = "icon-link-ext" > < / i > < / a >
< / p >
< h3 > HTTP Authentication < span class = "tooltip" data-tooltip = "Use to secure your endpoint from untrusted sources" > < i class = "icon-question" > < / i > < / span > < small > (optional)< / small > < / h3 >
< div class = "row thin" >
< div class = "col span-6" >
< label for = "httpUser" > User< / label >
< input type = "text" class = "full-width" id = "httpUser" name = "httpUser" autocomplete = "off" / >
< / div >
< div class = "col span-6" >
< label for = "httpPass" > Password< / label >
< input type = "password" class = "full-width" id = "httpPass" name = "httpPass" autocomplete = "off" / >
< / div >
< / div >
< div >
< button type = "submit" > Create< / button > < button data-ls-trigger = "modal-close" type = "button" class = "reverse" > Cancel< / button >
< / div >
< / form >
< / div >
< / div >
< / div >
< / li >
2019-05-12 18:59:49 +12:00
< li data-state = "/console/settings/members?project={{router.params.project}}" >
2019-05-09 18:54:39 +12:00
< h2 > <?php echo Locale :: getText ( 'console.settings.section.members.title' ); ?> </ h2 >
< div class = "zone xl"
data-appwrite="teams.getMembers"
data-scope="console"
data-event="load,auth.invite,auth.leave"
data-service="members"
data-param-team-id="{{console-project.teamId}}"
data-success="render,trigger"
data-success-triggers="members.load"
data-error="render"
data-error-rerender="">
< div class = "box margin-bottom" >
< ul data-ls-loop = "members" data-ls-as = "member" class = "list" >
< li class = "clear" >
< form class = "pull-end"
data-appwrite="auth.leave"
data-scope="console"
data-event="submit"
data-success="alert,trigger"
data-success-alert="<?php echo Locale :: getText ( 'console.settings.section.members.leave.success' ); ?> "
data-success-triggers="auth.leave,project.update"
data-error="alert"
data-error-alert="<?php echo Locale :: getText ( 'console.settings.section.members.leave.failure' ); ?> ">
2019-05-10 04:15:51 +12:00
< input name = "inviteId" id = "inviteId" type = "hidden" data-ls-bind = "{{member.inviteId}}" >
2019-05-09 18:54:39 +12:00
< button class = "danger" > <?php echo Locale :: getText ( 'console.settings.section.members.labels.leave' ); ?> </ button >
< / form >
2019-05-12 03:26:03 +12:00
< div data-ls-if = "false === {{member.confirm}}" class = "pull-end margin-end" style = "display: none;" >
2019-05-09 18:54:39 +12:00
< form
data-appwrite="auth.inviteResend"
data-scope="console"
data-event="submit"
data-success="alert,trigger"
data-success-alert="<?php echo Locale :: getText ( 'console.settings.section.members.invite.success' ); ?> "
data-success-triggers="auth.invite"
data-error="alert"
data-error-alert="<?php echo Locale :: getText ( 'console.settings.section.members.invite.failure' ); ?> ">
2019-05-10 04:15:51 +12:00
< input name = "inviteId" id = "inviteId" type = "hidden" data-ls-bind = "{{member.inviteId}}" >
< input name = "redirect" type = "hidden" data-ls-bind = "https://{{env.DOMAIN}}/auth/join?project={{router.params.project}}" / >
2019-05-09 18:54:39 +12:00
< button class = "reverse" > <?php echo Locale :: getText ( 'console.settings.section.members.labels.resend' ); ?> </ button >
< / form >
< / div >
< img src = "" data-ui-gravatar = "{{member.email}}" data-name = "{{member.name}}" data-size = "100" alt = "User Avatar" class = "avatar pull-start margin-end" / >
< div class = "margin-bottom-small" >
2019-05-12 03:26:03 +12:00
< span data-ls-bind = "{{member.name}}" ></ span > < span class = "tag" data-ls-bind = "{{member.roles.0|id2role}}" ></ span > < span data-ls-if = "false === {{member.confirm}}" class = "tag red" style = "display: none;" > <?php echo Locale :: getText ( 'console.settings.section.members.labels.pending' ); ?> </ span >
2019-05-09 18:54:39 +12:00
< / div >
2019-05-10 04:15:51 +12:00
< span class = "note" data-ls-bind = "{{member.email}}" > < / span >
2019-05-09 18:54:39 +12:00
< / li >
< / ul >
< / div >
< div data-ui-modal class = "modal close width-small" data-button-text = " <?php echo Locale :: getText ( 'console.settings.section.members.labels.invite' ); ?> " data-button-class = "" >
< button type = "button" class = "close pull-end" data-ls-trigger = "modal-close" > < i class = "icon-cancel" > < / i > < / button >
< h1 > <?php echo Locale :: getText ( 'console.settings.section.members.labels.invite' ); ?> </ h1 >
< form name = "auth.invite"
data-appwrite="auth.invite"
data-scope="console"
data-event="submit"
data-success="alert,trigger,reset"
data-success-alert="<?php echo Locale :: getText ( 'console.settings.section.members.invite.success' ); ?> "
data-success-triggers="auth.invite,modal-close"
data-error="alert"
data-error-alert="<?php echo Locale :: getText ( 'console.settings.section.members.invite.failure' ); ?> ">
2019-05-10 04:15:51 +12:00
< input name = "team" id = "team" type = "hidden" data-ls-bind = "{{console-project.teamId}}" >
< input name = "redirect" type = "hidden" data-ls-bind = "https://{{env.DOMAIN}}/auth/join?project={{router.params.project}}" / >
2019-05-09 18:54:39 +12:00
< label for = "name" > <?php echo Locale :: getText ( 'console.settings.section.members.labels.name' ); ?> < small > (<?php echo Locale :: getText ( 'general.optional' ); ?> )</ small ></ label >
< input name = "name" id = "name" type = "text" autocomplete = "name" >
< label for = "email" > <?php echo Locale :: getText ( 'console.settings.section.members.labels.email' ); ?> </ label >
< input name = "email" id = "email" type = "email" autocomplete = "email" required >
< label for = "roles" > <?php echo Locale :: getText ( 'console.settings.section.members.labels.role' ); ?> </ label >
< select id = "roles" name = "roles" required data-ls-options = "{{env.ROLES}}" data-cast-to = "array" > < / select >
< div class = "clear" >
< button > <?php echo Locale :: getText ( 'console.settings.section.members.labels.send' ); ?> </ button >
< button data-ls-trigger = "modal-close" type = "button" class = "reverse" > <?php echo Locale :: getText ( 'console.settings.section.members.labels.cancel' ); ?> </ button >
< / div >
< / form >
< / div >
< / div >
< / li >
< / ul >
< / div >
< / div >