Enhance logging in FdsSqlOptions and related classes
- Updated FdsSqlOptions to accept an optional ILogger parameter for improved error logging. - Modified FdsMfr and FdsMfrClient classes to pass the logger instance to FdsSqlOptions. - Added detailed error logging in various methods to capture SQL execution issues and file handling errors. - Improved documentation for FdsSqlOptions to clarify logging behavior. - Updated Archive class to log compression errors, enhancing traceability of failures. - Adjusted project configuration to suppress specific warnings related to transitive dependencies. - Added NuGet.config to define package sources for dependency management. - Updated submodule references for OCORE and related projects.
This commit is contained in:
@@ -228,4 +228,45 @@ $fis.ov = function () {
|
||||
});
|
||||
}, loading: ovf
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
$fis.notifications = {
|
||||
connection: null,
|
||||
init: function () {
|
||||
if (typeof signalR === 'undefined' || this.connection !== null || !$ocms.auth.useraccount_id) {
|
||||
return;
|
||||
}
|
||||
this.ensureFrame();
|
||||
this.connection = new signalR.HubConnectionBuilder()
|
||||
.withUrl('/notifications')
|
||||
.withAutomaticReconnect()
|
||||
.build();
|
||||
this.connection.on('notification', (notification) => {
|
||||
this.push(notification);
|
||||
});
|
||||
this.connection.start().catch(() => {
|
||||
this.connection = null;
|
||||
});
|
||||
},
|
||||
ensureFrame: function () {
|
||||
if ($('#notification_frame').length < 1) {
|
||||
$('<div/>', { id: 'notification_frame' }).appendTo($('footer:first').length ? 'footer:first' : 'body');
|
||||
}
|
||||
},
|
||||
push: function (notification) {
|
||||
this.ensureFrame();
|
||||
notification = notification || {};
|
||||
let item = $('<div/>', { class: 'notification_item' })
|
||||
.addClass((notification.severity || 'info').toLowerCase())
|
||||
.append($('<button/>', { type: 'button', class: 'notification_close', text: '×' }))
|
||||
.append($('<div/>', { class: 'notification_title', text: notification.title || 'Info' }))
|
||||
.append($('<div/>', { class: 'notification_message', text: notification.message || '' }));
|
||||
item.find('.notification_close').on('click', function () {
|
||||
item.remove();
|
||||
});
|
||||
$('#notification_frame').prepend(item);
|
||||
setTimeout(function () {
|
||||
item.fadeOut(150, function () { item.remove(); });
|
||||
}, 9000);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
$(document).ready(function () {
|
||||
$fis.notifications.init();
|
||||
$fis.ov();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user