1
0
Fork 0
mirror of synced 2024-07-03 13:41:01 +12:00
appwrite/app/views/console/webhooks/index.phtml

67 lines
2.6 KiB
PHTML
Raw Normal View History

2019-08-05 16:47:52 +12:00
<?php
2022-04-28 23:40:59 +12:00
$events = $this->getParam('events', []);
2022-05-04 22:54:34 +12:00
$patterns = [];
2022-04-28 23:40:59 +12:00
foreach ($events as $name => $event) {
foreach ($event as $key => $value) {
if (!\str_starts_with($key, '$')) {
if (!($value['$resource'] ?? false)) {
$patterns[] = "{$name}.{$key}";
} else {
foreach ($value as $key2 => $value2) {
if (!\str_starts_with($key2, '$')) {
if (!($value2['$resource'] ?? false)) {
$patterns[] = "{$key}.{$key2}";
}
}
}
}
}
}
}
2019-08-05 16:47:52 +12:00
?>
2022-04-28 23:40:59 +12:00
2019-08-05 17:51:02 +12:00
<div class="cover margin-bottom-large">
2020-02-28 06:44:03 +13:00
<h1 class="zone xl margin-bottom-large">
2020-06-10 02:43:24 +12:00
<a data-ls-attrs="href=/console/home?project={{router.params.project}}" class="back text-size-small link-return-animation--start"><i class="icon-left-open"></i> Home</a>
2020-02-28 06:44:03 +13:00
<br />
<span>Webhooks</span>
2019-08-05 17:51:02 +12:00
</h1>
</div>
2019-08-05 16:47:52 +12:00
2019-08-08 06:10:53 +12:00
<div class="zone xl"
data-service="projects.listWebhooks"
data-scope="console"
2020-01-31 09:58:49 +13:00
data-event="load,projects.createWebhook,projects.updateWebhook,projects.deleteWebhook"
2019-08-08 06:10:53 +12:00
data-name="console-webhooks"
data-param-project-id="{{router.params.project}}"
data-success="trigger"
2020-01-31 09:58:49 +13:00
data-success-param-trigger-events="projects.listWebhooks">
2019-08-05 16:47:52 +12:00
2022-02-28 22:25:38 +13:00
<div data-ls-if="0 == {{console-webhooks.total}} || undefined == {{console-webhooks.total}}" class="box margin-top margin-bottom">
2020-02-25 02:47:35 +13:00
<h3 class="margin-bottom-small text-bold">No Webhooks Found</h3>
2019-08-05 16:47:52 +12:00
<p class="margin-bottom-no">You haven't created any webhooks for your project yet.</p>
</div>
2022-02-28 22:25:38 +13:00
<div class="box margin-bottom" data-ls-if="0 != {{console-webhooks.total}}">
2020-10-31 08:53:27 +13:00
<ul data-ls-loop="console-webhooks.webhooks" data-ls-as="webhook" class="list">
2019-08-05 16:47:52 +12:00
<li class="clear">
2022-05-04 23:29:50 +12:00
<a data-ls-attrs="href=/console/webhooks/webhook?project={{router.params.project}}&id={{webhook.$id}}" class="button reverse pull-end margin-end">Manage</a>
2019-08-05 16:47:52 +12:00
<span data-ls-bind="{{webhook.name}}"></span> &nbsp; (<span data-ls-bind="{{webhook.events.length}}"></span> events)
2020-10-30 09:11:16 +13:00
<span data-ls-if="false === {{webhook.security}}">
2019-08-24 07:07:17 +12:00
&nbsp; <small class="text-danger">(SSL/TLS Disabled)</small>
2019-08-05 16:47:52 +12:00
</span>
2019-08-09 18:05:45 +12:00
<div class="margin-top-tiny">
<a data-ls-attrs="href={{webhook.url}}" data-ls-bind="{{webhook.url}}" target="_blank" class="text-one-liner"></a>
</div>
2019-08-05 16:47:52 +12:00
</li>
</ul>
</div>
2022-05-06 20:49:37 +12:00
<a data-ls-attrs="href=/console/webhooks/webhook/new?project={{router.params.project}}" class="button">Add Webhook</a>
2020-06-10 02:43:24 +12:00
</div>