Skip to content

Commit

Permalink
Add debug logging for database operations and update feature table wi…
Browse files Browse the repository at this point in the history
…th new items
  • Loading branch information
simlarsen committed Nov 25, 2024
1 parent e4beb13 commit 14c9174
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 46 deletions.
25 changes: 23 additions & 2 deletions Common/Server/Services/AnalyticsDatabaseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ export default class AnalyticsDatabaseService<
findStatement.statement,
);

logger.debug(`${this.model.tableName} Find Statement executed`);
logger.debug(findStatement.statement);

const strResult: string = await StreamUtil.convertStreamToText(
dbResult.stream,
);
Expand Down Expand Up @@ -686,7 +689,13 @@ export default class AnalyticsDatabaseService<
(select as any)[tenantColumnName] = true;
}

await this.execute(this.toDeleteStatement(beforeDeleteBy));
const deleteStatement: Statement = this.toDeleteStatement(beforeDeleteBy);

await this.execute(deleteStatement);

logger.debug(`${this.model.tableName} Delete Statement executed`);
logger.debug(deleteStatement);

} catch (error) {
await this.onDeleteError(error as Exception);
throw this.getException(error as Exception);
Expand Down Expand Up @@ -737,9 +746,17 @@ export default class AnalyticsDatabaseService<
(select as any)[tenantColumnName] = true;
}

const statement: Statement = this.statementGenerator.toUpdateStatement(
beforeUpdateBy,
);

await this.execute(
this.statementGenerator.toUpdateStatement(beforeUpdateBy),
statement,
);

logger.debug(`${this.model.tableName} Update Statement executed`);
logger.debug(statement);

} catch (error) {
await this.onUpdateError(error as Exception);
throw this.getException(error as Exception);
Expand Down Expand Up @@ -924,6 +941,10 @@ export default class AnalyticsDatabaseService<

await this.execute(insertStatement);


logger.debug(`${this.model.tableName} Create Statement executed`);
logger.debug(insertStatement);

if (!createBy.props.ignoreHooks) {
for (let i: number = 0; i < items.length; i++) {
if (!items[i]) {
Expand Down
105 changes: 61 additions & 44 deletions Home/Views/features-table.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -75,33 +75,43 @@
<%- include('./Partials/tick-icon') %>
<span class="text-sm text-gray-500">Scheduled Maintenance</span>
</li>
</ul>
<h3 class="text-sm font-medium text-gray-900 mt-8">Coming soon</h3>
<ul role="list" class="mt-6 space-y-4">
<li class="flex space-x-3">

<%- include('./Partials/comingsoon-icon') %>



<span class="text-sm text-gray-500">Show status of dependencies</span>
<li class="flex space-x-3">
<!-- Heroicon name: mini/check -->
<%- include('./Partials/tick-icon') %>
<span class="text-sm text-gray-500">Private Status Page</span>
</li>

<li class="flex space-x-3">
<!-- Heroicon name: mini/check -->
<%- include('./Partials/comingsoon-icon') %>

<%- include('./Partials/tick-icon') %>
<span class="text-sm text-gray-500">Status Page with SSO</span>
</li>

<span class="text-sm text-gray-500">SLA Certificates</span>
<li class="flex space-x-3">
<!-- Heroicon name: mini/check -->
<%- include('./Partials/tick-icon') %>
<span class="text-sm text-gray-500">RSS Feeds</span>
</li>

<li class="flex space-x-3">
<!-- Heroicon name: mini/check -->
<%- include('./Partials/comingsoon-icon') %>
<%- include('./Partials/tick-icon') %>
<span class="text-sm text-gray-500">Reports</span>
</li>

<li class="flex space-x-3">
<!-- Heroicon name: mini/check -->
<%- include('./Partials/tick-icon') %>
<span class="text-sm text-gray-500">Reports</span>
</li>

<span class="text-sm text-gray-500">RSS Feeds</span>
<li class="flex space-x-3">
<!-- Heroicon name: mini/check -->
<%- include('./Partials/tick-icon') %>
<span class="text-sm text-gray-500">API Access &amp; Integrations</span>
</li>

</ul>

</div>
Expand Down Expand Up @@ -183,7 +193,7 @@
<li class="flex space-x-3">
<!-- Heroicon name: mini/check -->
<%- include('./Partials/tick-icon') %>
<span class="text-sm text-gray-500">5000+ integrations</span>
<span class="text-sm text-gray-500">5000+ Integrations</span>
</li>


Expand Down Expand Up @@ -323,43 +333,50 @@
<span class="text-sm text-gray-500">Monitor VM's &amp; Servers</span>
</li>

<li class="flex space-x-3">

<%- include('./Partials/tick-icon') %>



</ul>
<h3 class="text-sm font-medium text-gray-900 mt-5">Coming soon</h3>
<ul role="list" class="mt-6 space-y-4">
<span class="text-sm text-gray-500">Monitor Docker Containers</span>
</li>

<li class="flex space-x-3">

<%- include('./Partials/tick-icon') %>



<span class="text-sm text-gray-500">Monitor your Network</span>
</li>

<li class="flex space-x-3">

<%- include('./Partials/comingsoon-icon') %>
<%- include('./Partials/tick-icon') %>



<span class="text-sm text-gray-500">Monitor Docker Containers</span>
<span class="text-sm text-gray-500">Monitor Kubernetes Clusters</span>
</li>


<li class="flex space-x-3">

<%- include('./Partials/comingsoon-icon') %>
<%- include('./Partials/tick-icon') %>



<span class="text-sm text-gray-500">Monitor Kubernetes Clusters</span>
<span class="text-sm text-gray-500">Monitor User Journeys</span>
</li>

<li class="flex space-x-3">

<%- include('./Partials/comingsoon-icon') %>
<%- include('./Partials/tick-icon') %>



<span class="text-sm text-gray-500">Monitor your Network</span>
<span class="text-sm text-gray-500">Monitor any Metric</span>
</li>


Expand Down Expand Up @@ -407,6 +424,8 @@
<span class="text-sm text-gray-500">Phone Alerts</span>
</li>



<li class="flex space-x-3">

<!-- Heroicon name: mini/check -->
Expand Down Expand Up @@ -434,80 +453,78 @@



<span class="text-sm text-gray-500">On-Call Escalation</span>
<span class="text-sm text-gray-500">Push Notification Alerts</span>
</li>


<li class="flex space-x-3">

<!-- Heroicon name: mini/check -->
<%- include('./Partials/tick-icon') %>



<span class="text-sm text-gray-500">On-Call Rotation</span>
<span class="text-sm text-gray-500">Webhook Alerts</span>
</li>


<li class="flex space-x-3">

<!-- Heroicon name: mini/check -->
<%- include('./Partials/tick-icon') %>



<span class="text-sm text-gray-500">Integrates with Slack / Team</span>
<span class="text-sm text-gray-500">On-Call Escalation</span>
</li>
<li class="flex space-x-3">

<%- include('./Partials/tick-icon') %>



<span class="text-sm text-gray-500">Advanced Workflows</span>
</li>
<li class="flex space-x-3">

<%- include('./Partials/tick-icon') %>



<span class="text-sm text-gray-500">On-Call Logs and Reports</span>
<span class="text-sm text-gray-500">On-Call Rotation</span>
</li>

<h3 class="text-sm font-medium text-gray-900">Coming soon</h3>

<li class="flex space-x-3">

<%- include('./Partials/comingsoon-icon') %>
<%- include('./Partials/tick-icon') %>



<span class="text-sm text-gray-500">Webhook Alerts</span>
<span class="text-sm text-gray-500">Integrates with Slack / Team</span>
</li>
<li class="flex space-x-3">

<%- include('./Partials/tick-icon') %>




<span class="text-sm text-gray-500">Advanced Workflows</span>
</li>
<li class="flex space-x-3">

<%- include('./Partials/comingsoon-icon') %>
<%- include('./Partials/tick-icon') %>



<span class="text-sm text-gray-500">Vacation and OOO Policy</span>
<span class="text-sm text-gray-500">On-Call Logs and Reports</span>
</li>



<li class="flex space-x-3">

<%- include('./Partials/comingsoon-icon') %>
<%- include('./Partials/tick-icon') %>



<span class="text-sm text-gray-500">On-Call Pay</span>
<span class="text-sm text-gray-500">On Call Policy</span>
</li>



</ul>

</div>
Expand Down

0 comments on commit 14c9174

Please sign in to comment.