1
0
Fork 0
mirror of synced 2024-06-03 11:24:48 +12:00
appwrite/app/views/console/settings/index.phtml

913 lines
59 KiB
PHTML

<?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-service="projects.get"
data-scope="console"
data-name="console-project"
data-event="load"
data-param-project-id="{{router.params.project}}"
data-success="render,trigger"
data-error="render"
data-success-rerender=""
data-error-rerender=""
data-success-triggers="project.load">
<div class="zone xl">
<ul class="phases clear" data-ui-phases data-selected="{{router.params.tab}}">
<li data-state="/console/settings?project={{router.params.project}}">
<h2><?php echo Locale::getText('console.settings.section.overview.title'); ?></h2>
<form data-service="projects.update"
data-scope="console"
data-event="submit"
data-param-project-id="{{router.params.project}}"
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">
<input name="$uid" type="hidden" data-ls-bind="{{console-project.$uid}}" />
<div class="row">
<div class="col span-9">
<div class="box">
<label for="name">Name</label>
<input name="name" id="name" type="text" autocomplete="off" data-ls-bind="{{console-project.name}}" data-forms-text-direction required>
<label for="name">Project ID</label>
<div class="input-copy">
<input data-forms-copy type="text" disabled data-ls-bind="{{router.params.project}}" />
</div>
<label for="description">Description &nbsp;<small>(optional)</small></label>
<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>
<label for="url">Website &nbsp;<small>(optional)</small></label>
<input name="url" id="url" type="url" class="full-width" autocomplete="off" placeholder="https://acme-corp.com" data-ls-bind="{{console-project.url}}">
<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">
<input name="clients" type="url" class="full-width" autocomplete="off" placeholder="https://acme-corp.com" data-ls-bind="{{client}}" 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>
<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>
<input name="legalName" id="legalName" type="text" autocomplete="off" data-ls-bind="{{console-project.legalName}}" data-forms-text-direction>
<div data-ls-rerender="geo-countries-load">
<label for="legalCountry">Country</label>
<select id="legalCountry" name="legalCountry" data-ls-options="{{geo-countries}}" data-ls-bind="{{console-project.legalCountry}}"></select>
</div>
<label for="legalCity">City</label>
<input name="legalCity" id="legalCity" type="text" autocomplete="off" data-ls-bind="{{console-project.legalCity}}" data-forms-text-direction>
</div>
<div class="col span-6">
<label for="legalTaxId">Tax ID</label>
<input name="legalTaxId" id="legalTaxId" type="text" autocomplete="off" data-ls-bind="{{console-project.legalTaxId}}" data-forms-text-direction>
<label for="legalState">State</label>
<input name="legalState" id="legalState" type="text" autocomplete="off" data-ls-bind="{{console-project.legalState}}" data-forms-text-direction>
<label for="legalAddress">Address</label>
<input name="legalAddress" id="legalAddress" type="text" autocomplete="off" data-ls-bind="{{console-project.legalAddress}}" data-forms-text-direction>
</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">
<input type="hidden" name="logo" data-ls-bind="{{console-project.logo}}"
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>
<li data-state="/console/settings/keys?project={{router.params.project}}">
<h2><?php echo Locale::getText('console.settings.section.keys.title'); ?></h2>
<div class="zone xl"
data-service="projects.keys.list"
data-scope="console"
data-event="load"
data-name="console-keys"
data-param-project-id="{{router.params.project}}"
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-service="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">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="keyId" data-ls-bind="{{key.$uid}}">
<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}}" />
<label data-ls-attrs="for=scopes-{{key.$uid}}">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" data-ls-bind="<?php echo $scope; ?>" data-default="{{key.scopes}}" /> <?php echo $scope; ?>
</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> &nbsp; <button data-ls-trigger="modal-close" type="button" class="reverse">Cancel</button>
</div>
</form>
</div>
<form class="pull-end margin-end"
data-service="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">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="keyId" data-ls-bind="{{key.$uid}}">
<button class="reverse danger">Delete</button>
</form>
<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>
<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">
<textarea disabled style="height: 130px; line-height: 26px" data-forms-copy data-ls-bind="{{key.secret}}"></textarea>
</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-service="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">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<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> &nbsp; <button data-ls-trigger="modal-close" type="button" class="reverse">Cancel</button>
</div>
</form>
</div>
</div>
</div>
</li>
<li data-state="/console/settings/webhooks?project={{router.params.project}}">
<h2><?php echo Locale::getText('console.settings.section.webhooks.title'); ?></h2>
<div class="zone xl"
data-service="projects.webhooks.list"
data-scope="console"
data-event="load"
data-name="console-webhooks"
data-param-project-id="{{router.params.project}}"
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-service="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">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="webhookId" data-ls-bind="{{webhook.$uid}}">
<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}}" />
<label data-ls-attrs="for=events-{{webhook.$uid}}">Events</label>
<div class="row thin margin-bottom">
<?php foreach ($events as $i => $event): ?>
<div class="col span-6">
<input type="checkbox" name="events" data-ls-bind="<?php echo $event; ?>" data-default="{{webhook.events}}" /> <?php echo $event; ?>
</div>
<?php if(($i+1) % 2 === 0): ?>
</div>
<div class="row thin margin-bottom">
<?php endif; ?>
<?php endforeach; ?>
</div>
<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}}" />
<label data-ls-attrs="for=secure-{{webhook.$uid}}">SSL / TLS</label>
<p class="note">Certificate verification</p>
<input name="security" data-ls-attrs="id=secure-yes-{{webhook.$uid}}" type="radio" required data-ls-bind="1" data-default="{{webhook.security}}" /> &nbsp; <span>Enabled</span>
&nbsp;&nbsp;
<input name="security" data-ls-attrs="id=secure-no-{{webhook.$uid}}" type="radio" required data-ls-bind="0" data-default="{{webhook.security}}" /> &nbsp; <span>Disabled</span>
<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> &nbsp;<small>(optional)</small></h3>
<div class="row thin">
<div class="col span-6">
<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}}" />
</div>
<div class="col span-6">
<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}}" />
</div>
</div>
<br />
<div>
<button type="submit">Save</button> &nbsp; <button data-ls-trigger="modal-close" type="button" class="reverse">Cancel</button>
</div>
</form>
</div>
<form class="pull-end margin-end"
data-service="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">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="webhookId" data-ls-bind="{{webhook.$uid}}">
<button class="danger reverse">Delete</button>
</form>
<span data-ls-bind="{{webhook.name}}"></span> &nbsp; (<span data-ls-bind="{{webhook.events.length}}"></span> events)
<span data-ls-if="0 == {{webhook.security}}" style="display: none;">
&nbsp; <span class="note text-danger">(SSL/TLS Disabled)</span>
</span>
<p class="note margin-bottom-no margin-top-small"><span class="tag green">POST</span> <span data-ls-bind="{{webhook.url}}"></span></p>
</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-service="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">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<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>
<input name="security" data-ls-attrs="id=secure-yes" type="radio" value="1" checked="checked" required /> &nbsp; <span>Enabled</span>
&nbsp;&nbsp;
<input name="security" data-ls-attrs="id=secure-no" type="radio" value="0" required /> &nbsp; <span>Disabled</span>
<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> &nbsp;<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> &nbsp; <button data-ls-trigger="modal-close" type="button" class="reverse">Cancel</button>
</div>
</form>
</div>
</div>
</div>
</li>
<li data-state="/console/settings/tasks?project={{router.params.project}}">
<h2><?php echo Locale::getText('console.settings.section.tasks.title'); ?></h2>
<div class="zone xl"
data-service="projects.tasks.list"
data-scope="console"
data-event="load"
data-name="console-tasks"
data-param-project-id="{{router.params.project}}"
data-success="render,trigger"
data-success-rerender="task.new,task.update,task.delete"
data-success-triggers="project.load"
data-error="render"
data-error-rerender="">
<div data-ls-if="0 === {{console-tasks.length}} || undefined === {{console-tasks.length}}" class="box margin-top margin-bottom" style="display: none;">
<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">
<span data-ls-bind="{{task.name}}"></span>
<span data-ls-if="0 === {{task.security}}" style="display: none;">
&nbsp; <span class="text-danger">SSL/TLS Disabled</span>
</span>
<span data-ls-if="0 !== {{task.failures}}" style="display: none;">
&nbsp; <span class="text-danger" data-ls-bind="({{task.failures}} errors)"></span>
</span>
</div>
<a data-ls-attrs="href={{task.httpUrl}}" data-ls-bind="{{task.httpUrl}}" target="_blank" class="text-one-liner"></a>
</td>
<td style="vertical-align: middle">
<span data-ls-if="'play' === {{task.status}}" style="display: none;">
<span class="tag green"><i class="icon-play"></i> Running &nbsp;</span>
</span>
<span data-ls-if="'play' !== {{task.status}}" style="display: none;">
<span class="tag red"><i class="icon-pause"></i> Paused &nbsp;</span>
</span>
</td>
<td style="vertical-align: middle">
<span data-ls-bind="{{task.next|date-time}}" class="note"></span>
</td>
<td style="vertical-align: middle">
<div data-ls-if="'undefined' !== {{task.previous}}" class="note">
<span data-ls-bind="{{task.previous|date-time}}"></span>
<div data-ls-if="'undefined' !== {{task.delay}} && 59 < {{task.delay}}" class="note text-danger margin-top-tiny">
<span data-ls-bind="({{task.delay|ms2hum}} Delay)"></span>
</div>
</div>
<div data-ls-if="'undefined' === {{task.previous}}" class="note">
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-service="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">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="taskId" data-ls-bind="{{task.$uid}}">
<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}}" />
<label data-ls-attrs="for=status-{{task.$uid}}" class="margin-bottom">Status
<div class="margin-top-small">
<input name="status" type="radio" checked="checked" required data-ls-bind="play" data-default="{{task.status}}" /> &nbsp; <span>Play</span>
<input name="status" type="radio" required data-ls-bind="pause" data-default="{{task.status}}" /> &nbsp; <span>Pause</span>
</div>
</label>
<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}}" />
<div class="row thin">
<div class="col span-4">
<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}}">
<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 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}}" />
</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">
<input type="hidden" name="httpHeaders" data-forms-headers data-ls-bind="{{header}}" 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 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 data-ls-attrs="for=security-{{task.$uid}}" class="margin-bottom">SSL / TLS
<p class="note">Certificate verification</p>
<input name="security" type="radio" required data-ls-bind="1" data-default="{{task.security}}" /> &nbsp; <span>Enabled</span>
<input name="security" type="radio" required data-ls-bind="0" data-default="{{task.security}}" /> &nbsp; <span>Disabled</span>
</label>
<p class="note margin-bottom"><span class="tag red">Warning</span> &nbsp; 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> &nbsp;<small>(optional)</small></h3>
<div class="row thin">
<div class="col span-6">
<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}}" />
</div>
<div class="col span-6">
<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}}" />
</div>
</div>
<div>
<button type="submit">Update</button> &nbsp; <button data-ls-trigger="modal-close" type="button" class="reverse">Cancel</button>
</div>
</form>
<form class="margin-top"
data-service="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">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<input type="hidden" name="taskId" data-ls-bind="{{task.$uid}}">
<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-service="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">
<input type="hidden" name="projectId" data-ls-bind="{{console-project.$uid}}">
<label for="name">Name</label>
<input type="text" class="full-width" id="name" name="name" required autocomplete="off" />
<label data-ls-attrs="for=status" class="margin-bottom">Status
<div class="margin-top-small">
<input name="status" type="radio" value="play" checked="checked" required /> &nbsp; <span>Play</span>
<input name="status" type="radio" value="pause" required /> &nbsp; <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>
<input name="security" data-ls-attrs="id=secure-yes" type="radio" value="1" checked="checked" required /> &nbsp; <span>Enabled</span>
<input name="security" data-ls-attrs="id=secure-no" type="radio" value="0" required /> &nbsp; <span>Disabled</span>
</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> &nbsp;<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> &nbsp; <button data-ls-trigger="modal-close" type="button" class="reverse">Cancel</button>
</div>
</form>
</div>
</div>
</div>
</li>
<li data-state="/console/settings/members?project={{router.params.project}}">
<h2><?php echo Locale::getText('console.settings.section.members.title'); ?></h2>
<div class="zone xl"
data-service="teams.getMembers"
data-scope="console"
data-event="load,auth.invite,auth.leave"
data-name="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-service="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'); ?>">
<input name="inviteId" id="inviteId" type="hidden" data-ls-bind="{{member.inviteId}}">
<button class="danger"><?php echo Locale::getText('console.settings.section.members.labels.leave'); ?></button>
</form>
<div data-ls-if="false === {{member.confirm}}" class="pull-end margin-end" style="display: none;">
<form
data-service="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'); ?>">
<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}}" />
<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">
<span data-ls-bind="{{member.name}}"></span> &nbsp;&nbsp;<span class="tag" data-ls-bind="{{member.roles.0|id2role}}"></span> &nbsp;&nbsp;<span data-ls-if="false === {{member.confirm}}" class="tag red" style="display: none;"><?php echo Locale::getText('console.settings.section.members.labels.pending'); ?></span>
</div>
<span class="note" data-ls-bind="{{member.email}}"></span>
</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-service="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'); ?>">
<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}}" />
<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>
&nbsp; <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>