Skip to content

Commit

Permalink
Model fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnmbond committed Dec 7, 2023
1 parent 02e12af commit 387cfd7
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 2 deletions.
6 changes: 6 additions & 0 deletions LogicMonitor.Api/Dashboards/CustomGraphWidgetDataPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ public class CustomGraphWidgetDataPoint : IdentifiedItem
[DataMember(Name = "deviceGroupFullPath")]
public StringSpecification DeviceGroupFullPath { get; set; } = new();

/// <summary>
/// The instanceName
/// </summary>
[DataMember(Name = "instanceId")]
public int? DataSourceInstanceId { get; set; } = new();

/// <summary>
/// The instanceName
/// </summary>
Expand Down
12 changes: 12 additions & 0 deletions LogicMonitor.Api/LogicModules/DataPointConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public class DataPointConfiguration : IdentifiedItem
[DataMember(Name = "alertTransitionInterval")]
public int AlertTransitionInterval { get; set; }

/// <summary>
/// The Alert clear transition interval
/// </summary>
[DataMember(Name = "alertClearTransitionInterval")]
public int AlertClearTransitionInterval { get; set; }

/// <summary>
/// The Alerting disabled on
/// </summary>
Expand Down Expand Up @@ -183,6 +189,12 @@ public class DataPointConfiguration : IdentifiedItem
[DataMember(Name = "parentInstanceGroupAlertExpr")]
public string ParentInstanceGroupAlertExpression { get; set; } = string.Empty;

/// <summary>
/// Alert for no data
/// </summary>
[DataMember(Name = "alertForNoData")]
public int AlertForNoData { get; set; }

/// <inheritdoc />
public override string ToString()
=> $"{DataPointName} : Expression:{AlertExpression} GlobalExpression: {GlobalAlertExpr}{(DisableAlerting ? " (Disabled)" : string.Empty)}";
Expand Down
10 changes: 8 additions & 2 deletions LogicMonitor.Api/Settings/AccountSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,20 +237,26 @@ public class AccountSettings : IHasSingletonEndpoint
/// numOfMongoDBAtlasDevices
/// </summary>
[DataMember(Name = "numOfMongoDBAtlasDevices")]
public int NumOfMongoDBAtlasDevices { get; set; }
public int MongoDbAtlasDeviceCount { get; set; }

/// <summary>
/// numberOfCommittedCloudDevices
/// </summary>
[DataMember(Name = "numberOfCommittedCloudDevices")]
public int NumberOfCommittedCloudDevices { get; set; }
public int CommittedCloudDeviceCount { get; set; }

/// <summary>
/// The account balance in USD
/// </summary>
[DataMember(Name = "zuoraInvoiceDetails")]
public InvoiceDetails InvoiceDetails { get; set; } = new();

/// <summary>
/// Kubernetes device stats
/// </summary>
[DataMember(Name = "kubernetesDevices")]
public KubernetesDeviceStats KubernetesDeviceStats { get; set; } = new();

/// <summary>
/// The Kubernetes device count
/// </summary>
Expand Down
6 changes: 6 additions & 0 deletions LogicMonitor.Api/Settings/HttpIntegration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ public class HttpIntegration : Integration
[DataMember(Name = "ackUsername")]
public string AckUsername { get; set; } = string.Empty;

/// <summary>
/// The ACK OAuth version
/// </summary>
[DataMember(Name = "ackOAuthVersion")]
public string? AckOAuthVersion { get; set; } = string.Empty;

/// <summary>
/// The OAuth version
/// </summary>
Expand Down
164 changes: 164 additions & 0 deletions LogicMonitor.Api/Settings/KubernetesDeviceStats.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
namespace LogicMonitor.Api.Settings;

/// <summary>
/// KubernetesDeviceStats
/// </summary>
[DataContract]
public class KubernetesDeviceStats
{
/// <summary>
/// Storage Class count
/// </summary>
[DataMember(Name = "Storage Classes")]
public int StorageClassCount { get; set; }

/// <summary>
/// Pod disruption budget count
/// </summary>
[DataMember(Name = "Pod Disruption Budgets")]
public int PodDisruptionBudgetCount { get; set; }

/// <summary>
/// Secret count
/// </summary>
[DataMember(Name = "Secrets")]
public int SecretCount { get; set; }

/// <summary>
/// Config map count
/// </summary>
[DataMember(Name = "ConfigMaps")]
public int ConfigMapCount { get; set; }

/// <summary>
/// Pod count
/// </summary>
[DataMember(Name = "Pods")]
public int PodCount { get; set; }

/// <summary>
/// Deployment count
/// </summary>
[DataMember(Name = "Deployments")]
public int DeploymentCount { get; set; }

/// <summary>
/// Custom resource definition count
/// </summary>
[DataMember(Name = "Custom Resource Definitions")]
public int CustomResourceDefinitionCount { get; set; }

/// <summary>
/// Replica set count
/// </summary>
[DataMember(Name = "ReplicaSets")]
public int ReplicaSetCount { get; set; }

/// <summary>
/// Endpoint count
/// </summary>
[DataMember(Name = "Endpoints")]
public int EndpointCount { get; set; }

/// <summary>
/// Job count
/// </summary>
[DataMember(Name = "Jobs")]
public int JobCount { get; set; }

/// <summary>
/// Resource quota count
/// </summary>
[DataMember(Name = "Resource Quotas")]
public int ResourceQuotaCount { get; set; }

/// <summary>
/// Role binding count
/// </summary>
[DataMember(Name = "Role Bindings")]
public int RoleBindingCount { get; set; }

/// <summary>
/// Persistent volume count
/// </summary>
[DataMember(Name = "Persistent Volumes")]
public int PersistentVolumeCount { get; set; }

/// <summary>
/// Service account count
/// </summary>
[DataMember(Name = "Service Accounts")]
public int ServiceAccountCount { get; set; }

/// <summary>
/// Cluster role count
/// </summary>
[DataMember(Name = "Cluster Roles")]
public int ClusterRoleCount { get; set; }

/// <summary>
/// Role count
/// </summary>
[DataMember(Name = "Roles")]
public int RoleCount { get; set; }

/// <summary>
/// Node count
/// </summary>
[DataMember(Name = "Nodes")]
public int NodeCount { get; set; }

/// <summary>
/// Persistent volume claim count
/// </summary>
[DataMember(Name = "Persistent Volume Claims")]
public int PersistentVolumeClaimCount { get; set; }

/// <summary>
/// Priority class count
/// </summary>
[DataMember(Name = "Priority Classes")]
public int PriorityClasseCount { get; set; }

/// <summary>
/// Service count
/// </summary>
[DataMember(Name = "Services")]
public int ServiceCount { get; set; }

/// <summary>
/// Cron job count
/// </summary>
[DataMember(Name = "CronJobs")]
public int CronJobCount { get; set; }

/// <summary>
/// Ingress count
/// </summary>
[DataMember(Name = "Ingresses")]
public int IngressCount { get; set; }

/// <summary>
/// DaemonSet count
/// </summary>
[DataMember(Name = "DaemonSets")]
public int DaemonSetCount { get; set; }

/// <summary>
/// Network Policy count
/// </summary>
[DataMember(Name = "Network Policies")]
public int NetworkPolicyCount { get; set; }

/// <summary>
/// Cluster Role Binding count
/// </summary>
[DataMember(Name = "Cluster Role Bindings")]
public int ClusterRoleBindingCount { get; set; }

/// <summary>
/// StatefulSet count
/// </summary>
[DataMember(Name = "StatefulSets")]
public int StatefulSetCount { get; set; }
}
7 changes: 7 additions & 0 deletions LogicMonitor.Api/Users/ViewPermission.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ public class ViewPermission
[DataMember(Name = "OnlyNewUI")]
public bool? OnlyNewUi { get; set; }

/// <summary>
/// Recommendations view permission
/// </summary>
[DataMember(Name = "Recommendations")]
public bool Recommendations { get; set; }

/// <summary>
/// Reports view permission
/// </summary>
Expand Down Expand Up @@ -81,6 +87,7 @@ public class ViewPermission
/// <inheritdoc />
public override string ToString() =>
$"{nameof(Dashboards)}={Dashboards};" +
$"{nameof(Recommendations)}={Recommendations};" +
$"{nameof(Reports)}={Reports};" +
$"{nameof(Websites)}={Websites};" +
$"{nameof(Settings)}={Settings};" +
Expand Down

0 comments on commit 387cfd7

Please sign in to comment.