Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 32 additions & 26 deletions src/Umbraco.Core/Constants-Icons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public static partial class Constants
public static class Icons
{
/// <summary>
/// System default icon
/// System default icon.
/// </summary>
public const string DefaultIcon = Content;

Expand All @@ -15,37 +15,37 @@ public static class Icons
public const string Blueprint = "icon-blueprint";

/// <summary>
/// System content icon
/// System content icon.
/// </summary>
public const string Content = "icon-document";

/// <summary>
/// System content type icon
/// System content type icon.
/// </summary>
public const string ContentType = "icon-item-arrangement";

/// <summary>
/// System data type icon
/// System data type icon.
/// </summary>
public const string DataType = "icon-autofill";

/// <summary>
/// System dictionary icon
/// System dictionary icon.
/// </summary>
public const string Dictionary = "icon-book-alt";

/// <summary>
/// System generic folder icon
/// System generic folder icon.
/// </summary>
public const string Folder = "icon-folder";

/// <summary>
/// System language icon
/// System language icon.
/// </summary>
public const string Language = "icon-globe";

/// <summary>
/// System logviewer icon
/// System logviewer icon.
/// </summary>
public const string LogViewer = "icon-box-alt";

Expand All @@ -55,12 +55,12 @@ public static class Icons
public const string ListView = "icon-thumbnail-list";

/// <summary>
/// System macro icon
/// System macro icon.
/// </summary>
public const string Macro = "icon-settings-alt";

/// <summary>
/// System media file icon
/// System media file icon.
/// </summary>
public const string MediaFile = "icon-document";

Expand All @@ -70,7 +70,7 @@ public static class Icons
public const string MediaVideo = "icon-video";

/// <summary>
/// System media audio icon
/// System media audio icon.
/// </summary>
public const string MediaAudio = "icon-sound-waves";

Expand All @@ -80,12 +80,12 @@ public static class Icons
public const string MediaArticle = "icon-article";

/// <summary>
/// System media vector icon
/// System media vector icon.
/// </summary>
public const string MediaVectorGraphics = "icon-picture";

/// <summary>
/// System media folder icon
/// System media folder icon.
/// </summary>
public const string MediaFolder = "icon-folder";

Expand All @@ -95,17 +95,17 @@ public static class Icons
public const string MediaImage = "icon-picture";

/// <summary>
/// System media type icon
/// System media type icon.
/// </summary>
public const string MediaType = "icon-thumbnails";

/// <summary>
/// System member icon
/// System member icon.
/// </summary>
public const string Member = "icon-user";

/// <summary>
/// System member group icon
/// System member group icon.
/// </summary>
public const string MemberGroup = "icon-users-alt";

Expand All @@ -115,8 +115,14 @@ public static class Icons
public const string MemberType = "icon-users";

/// <summary>
/// System packages icon
/// System package icon.
/// </summary>
public const string Package = "icon-box";

/// <summary>
/// System packages icon.
/// </summary>
[Obsolete("Use Package icon instead.")]
public const string Packages = "icon-box";

/// <summary>
Expand All @@ -125,43 +131,43 @@ public static class Icons
public const string PartialView = "icon-article";

/// <summary>
/// System property editor icon
/// System property editor icon.
/// </summary>
public const string PropertyEditor = "icon-autofill";

/// <summary>
/// Relation type icon
/// Relation type icon.
/// </summary>
public const string RelationType = "icon-trafic";

/// <summary>
/// Script type icon
/// Script type icon.
/// </summary>
public const string Script = "icon-script";

/// <summary>
/// Stylesheet type icon
/// Stylesheet type icon.
/// </summary>
public const string Stylesheet = "icon-brackets";

/// <summary>
/// System member icon
/// System member icon.
/// </summary>
public const string Template = "icon-layout";

/// <summary>
/// System user icon
/// System user icon.
/// </summary>
public const string User = "icon-user";

/// <summary>
/// System user group icon
/// System user group icon.
/// </summary>
public const string UserGroup = "icon-users";

/// <summary>
/// Webhooks icon
/// Webhook icon.
/// </summary>
public const string Webhooks = "icon-directions-alt";
public const string Webhook = "icon-webhook";
}
}
1 change: 1 addition & 0 deletions src/Umbraco.Core/EmbeddedResources/Lang/da.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,7 @@ Mange hilsner fra Umbraco robotten
<key alias="settingsGroup">Indstillinger</key>
<key alias="templatingGroup">Design og layout</key>
<key alias="thirdPartyGroup">Tredjepart</key>
<key alias="webhooks">Webhooks</key>
</area>
<area alias="update">
<key alias="updateAvailable">Ny opdatering er klar</key>
Expand Down
1 change: 1 addition & 0 deletions src/Umbraco.Core/EmbeddedResources/Lang/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2033,6 +2033,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="settingsGroup">Settings</key>
<key alias="templatingGroup">Templating</key>
<key alias="thirdPartyGroup">Third Party</key>
<key alias="webhooks">Webhooks</key>
</area>
<area alias="update">
<key alias="updateAvailable">New update ready</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.BackOffice/Trees/PackagesTreeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public PackagesTreeController(
{
// This will load in a custom UI instead of the dashboard for the root node
root.RoutePath = $"{Constants.Applications.Packages}/{Constants.Trees.Packages}/repo";
root.Icon = Constants.Icons.Packages;
root.Icon = Constants.Icons.Package;

root.HasChildren = false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Umbraco.Web.BackOffice/Trees/WebhooksTreeController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core;
Expand Down Expand Up @@ -52,7 +52,7 @@ protected override ActionResult<MenuItemCollection> GetMenuForNode(string id, Fo
{
// This will load in a custom UI instead of the dashboard for the root node
root.RoutePath = $"{Constants.Applications.Settings}/{Constants.Trees.Webhooks}/overview";
root.Icon = Constants.Icons.Webhooks;
root.Icon = Constants.Icons.Webhook;
root.HasChildren = false;
root.MenuUrl = null;
}
Expand Down
4 changes: 4 additions & 0 deletions src/Umbraco.Web.UI.Client/src/assets/icons/icon-webhook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 22 additions & 8 deletions src/Umbraco.Web.UI.Client/src/views/webhooks/logs.controller.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
(function () {
(function () {
"use strict";

function WebhookLogController($q,$scope, webhooksResource, notificationsService, overlayService) {
var vm = this;
function WebhookLogController($q, webhooksResource, overlayService) {

const vm = this;

vm.logs = [];
vm.openLogOverlay = openLogOverlay;
vm.isChecked = isChecked;

function loadLogs (){
function init() {
vm.loading = true;

let promises = [];

promises.push(loadLogs());

$q.all(promises).then(function () {
vm.loading = false;
});
}

function loadLogs() {
return webhooksResource.getLogs()
.then((data) => {
.then(data => {
vm.logs = data.items;
});
}

function openLogOverlay (log) {
function openLogOverlay(log) {
overlayService.open({
view: "views/webhooks/overlays/details.html",
title: 'Details',
Expand All @@ -27,11 +41,11 @@
});
}

function isChecked (log) {
function isChecked(log) {
return log.statusCode === "OK";
}

loadLogs();
init();
}

angular.module("umbraco").controller("Umbraco.Editors.Webhooks.WebhookLogController", WebhookLogController);
Expand Down
63 changes: 23 additions & 40 deletions src/Umbraco.Web.UI.Client/src/views/webhooks/logs.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,30 @@
<div ng-controller="Umbraco.Editors.Webhooks.WebhookLogController as vm">
<div ng-controller="Umbraco.Editors.Webhooks.WebhookLogController as vm">
<table class="table table-hover" ng-if="!vm.loading">
<thead>
<tr>
<th></th>
<th>Webhook key</th>
<th>Date</th>
<th>Url</th>
<th>Event</th>
<th>RetryCount</th>
</tr>
<tr>
<th></th>
<th>Webhook key</th>
<th>Date</th>
<th>Url</th>
<th>Event</th>
<th>Retry count</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="log in vm.logs track by log.key" ng-click="vm.openLogOverlay(log)" style="cursor: pointer;">
<td style="width: 20px;">
<umb-checkmark ng-if="vm.isChecked(log)"
checked="vm.isChecked(log)"
size="xs">
</umb-checkmark>

</td>
<td>
{{ log.webhookKey}}
</td>
<td>
{{ log.date}}
</td>
<td>
{{ log.url }}
</td>
<td>
{{ log.eventName }}
</td>
<td>
{{ log.retryCount}}
</td>
<td style="text-align: right;">
<umb-button type="button"
action="vm.deleteWebhook(webhook)"
size="xxs"
label="Details">
</umb-button>
</td>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It had a column too much and there shouldn't be a delete webhook button in log entry :)

</tr>
<tr ng-repeat="log in vm.logs track by log.key" ng-click="vm.openLogOverlay(log)" style="cursor: pointer;">
<td style="width: 20px;">
<umb-checkmark
ng-if="vm.isChecked(log)"
checked="vm.isChecked(log)"
size="xs">
</umb-checkmark>
</td>
<td>{{ log.webhookKey }}</td>
<td>{{ log.date }}</td>
<td>{{ log.url }}</td>
<td>{{ log.eventName }}</td>
<td>{{ log.retryCount }}</td>
</tr>
</tbody>
</table>
</div>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="headless-webhook-log-entry-details-overlay" style="margin-top: 20px;">
<div class="headless-webhook-log-entry-details-overlay" style="margin-top: 20px;">
<div class="control-group">
<div class="flex items-center">
<div class="flx-g0 flx-s0" style="flex-basis: 40px;">
<umb-checkmark checked="true" size="m" style="cursor: default"></umb-checkmark>
<i class="icon-wrong umb-checkmark umb-checkmark--m" style="cursor: default;" ng-if="model.webhookLogEntry.response.isSuccess === false"></i>
<umb-icon icon="icon-wrong" class="umb-checkmark umb-checkmark--m" style="cursor: default;" ng-if="model.webhookLogEntry.response.isSuccess === false"></umb-icon>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't have any logs, but we should use <umb-icon> instead of the <i> element :)

</div>
<div class="flx-g1 flx-s1 flx-b2" ng-if="model.webhookLogEntry.responseStatus.description || model.webhookLogEntry.response.statusCode">{{model.webhookLogEntry.response.statusDescription}} ({{model.webhookLogEntry.response.statusCode}})</div>
</div>
Expand All @@ -17,7 +17,7 @@
<div class="controls controls-row">{{model.log.url}}</div>
</div>
<div class="control-group">
<span class="bold">Status Code</span>
<span class="bold">Status code</span>
<div class="controls controls-row">{{model.log.statusCode}}</div>
</div>
<div class="control-group">
Expand Down
Loading