angular.module("umbraco").controller("CustomWelcomeDashboardController", function ($scope, userService, logResource) {
var vm = this;
vm.UserName = "guest";
vm.UserLogHistory = [];
var user = userService.getCurrentUser().then(function (user) {
console.log(user);
vm.UserName = user.name;
});
var userLogOptions = {
pageSize: 10,
pageNumber: 1,
orderDirection: "Descending",
sinceDate: new Date(2018, 0, 1)
};
logResource.getPagedUserLog(userLogOptions)
.then(function (response) {
console.log(response);
vm.UserLogHistory = response;
});
});
this is my view file
<div class="welcome-dashboard" ng-controller="CustomWelcomeDashboardController as vm">
<h1>Welcome {{vm.UserName}} to Umbraco</h1>
<h2>We know what you edited last week...</h2>
<ul>
<li ng-repeat="logEntry in vm.UserLogHistory.items">{{logEntry.nodeId}} - {{logEntry.logType}} - {{logEntry.timestamp | date:'medium'}}</li>
</ul>
</div>
when viewing console.log to view console.log(response); the array is empty.
Im not sure what i am doing wrong ? anyone come across this and able to resolve ?
logResource not returning content
Dear Umbarco Team
Trying to create custom dashboard in v8.64 following this tutorial on out Umbraco [I know what you did last Tuesday]
this is my controller file
this is my view file
when viewing console.log to view console.log(response); the array is empty. Im not sure what i am doing wrong ? anyone come across this and able to resolve ?
Issue to be fixed in v8.7 https://github.com/umbraco/Umbraco-CMS/issues/7503
is working on a reply...