Skip to content

Commit a5ce1b1

Browse files
Added support for direct write content
Type of the direct write datasets Graphing of direct write datasets and datastreams
1 parent 4e41373 commit a5ce1b1

File tree

5 files changed

+101
-13
lines changed

5 files changed

+101
-13
lines changed

DataObjects/ObsDataset.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ public ObsDataset(JObject entityObject) : base (entityObject)
114114
this.OriginType = ObsObjectOriginType.ReferenceUpload;
115115
break;
116116

117+
case "system/KubernetesContent":
118+
case "system/Tracing Content":
119+
case "system/HostExplorerContent":
120+
this.OriginType = ObsObjectOriginType.DirectContent;
121+
break;
122+
117123
default:
118124
this.OriginType = ObsObjectOriginType.Unknown;
119125
break;

DataObjects/ObsDatastream.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,32 @@ public ObsDatastream(JObject entityObject) : base (entityObject)
5555
{
5656
this.OriginType = ObsObjectOriginType.User;
5757
}
58+
switch (name)
59+
{
60+
case "DemoData":
61+
case "GCP":
62+
case "GitHub":
63+
case "Kubernetes":
64+
case "Observe Usage reporting":
65+
case "OpenTelemetry":
66+
this.OriginType = ObsObjectOriginType.App;
67+
break;
68+
69+
default:
70+
break;
71+
}
72+
if (name.StartsWith("Kubernetes Explorer/"))
73+
{
74+
this.OriginType = ObsObjectOriginType.DirectContent;
75+
}
76+
else if (name.StartsWith("Tracing/"))
77+
{
78+
this.OriginType = ObsObjectOriginType.DirectContent;
79+
}
80+
else if (name.StartsWith("Host Explorer/"))
81+
{
82+
this.OriginType = ObsObjectOriginType.DirectContent;
83+
}
5884

5985
string state = JSONHelper.getStringValueFromJToken(entityObject, "state");
6086
switch (state)

DataObjects/base/ObsObjectOriginType.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public enum ObsObjectOriginType
1010
DataStream,
1111
External,
1212
ReferenceUpload,
13-
SAML
13+
SAML,
14+
DirectContent
1415
}
1516
}

InventoryModel/ObserveEnvironment.cs

Lines changed: 64 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ public ObserveEnvironment(AuthenticatedUser currentUser, HttpContext httpContext
8585
List<ObsCreditsMonitor> monitorUsage1hList = new List<ObsCreditsMonitor>();
8686
List<ObsCreditsMonitor> monitorUsage1dList = new List<ObsCreditsMonitor>();
8787
List<ObsCreditsMonitor> monitorUsage1wList = new List<ObsCreditsMonitor>();
88-
List<ObsCreditsQuery> queryUsage1hList = new List<ObsCreditsQuery>();
89-
List<ObsCreditsQuery> queryUsage1dList = new List<ObsCreditsQuery>();
90-
List<ObsCreditsQuery> queryUsage1wList = new List<ObsCreditsQuery>();
88+
List<ObsCreditsQuery> queryUsage1hList = new List<ObsCreditsQuery>();
89+
List<ObsCreditsQuery> queryUsage1dList = new List<ObsCreditsQuery>();
90+
List<ObsCreditsQuery> queryUsage1wList = new List<ObsCreditsQuery>();
9191

9292
List<ObsCreditsTransform> transformUsage1hList = getUsageTransform(currentUser, 1);
9393
List<ObsCreditsTransform> transformUsage1dList = getUsageTransform(currentUser, 24);
@@ -779,6 +779,18 @@ public string RenderGraphOfRelationships(ObsObject interestingObject, List<Objec
779779

780780
break;
781781

782+
case ObsObjectOriginType.DirectContent:
783+
sb.AppendLine(" subgraph cluster_ds_direct_content {");
784+
sb.AppendFormat(" label=\"{0} Direct Content ({1})\" style=\"filled\" fillcolor=\"cyan\"", iconForGroup, allDatasetsInGroup.Count).AppendLine();
785+
foreach(ObsDataset dataset in allDatasetsInGroup)
786+
{
787+
if (dataset == interestingObject) continue;
788+
sb.AppendFormat(" {0}", getGraphVizNodeDefinition(dataset)).AppendLine();
789+
}
790+
sb.AppendLine(" }");
791+
792+
break;
793+
782794
default:
783795
break;
784796
}
@@ -2016,7 +2028,12 @@ internal string getIconMonitorType(ObsCompositeObjectType objectType)
20162028
{
20172029
return objectType switch
20182030
{
2019-
ObsCompositeObjectType.MetricThresholdMonitor => "📈", ObsCompositeObjectType.LogThresholdMonitor => "📜", ObsCompositeObjectType.ResourceCountThresholdMonitor => "🍫", ObsCompositeObjectType.PromotionMonitor => "🕙", ObsCompositeObjectType.ResourceTextValueMonitor => "🏆", _ => "❓"
2031+
ObsCompositeObjectType.MetricThresholdMonitor => "📈",
2032+
ObsCompositeObjectType.LogThresholdMonitor => "📜",
2033+
ObsCompositeObjectType.ResourceCountThresholdMonitor => "🍫",
2034+
ObsCompositeObjectType.PromotionMonitor => "🕙",
2035+
ObsCompositeObjectType.ResourceTextValueMonitor => "🏆",
2036+
_ => "❓"
20202037
};
20212038
}
20222039

@@ -2029,7 +2046,16 @@ internal string getIconOriginType(ObsObjectOriginType obsObjectOriginType)
20292046
{
20302047
return obsObjectOriginType switch
20312048
{
2032-
ObsObjectOriginType.System => "⚙️", ObsObjectOriginType.App => "📊", ObsObjectOriginType.User => "👋", ObsObjectOriginType.DataStream => "🎏", ObsObjectOriginType.Terraform => "🛤️", ObsObjectOriginType.External => "❄️", ObsObjectOriginType.ReferenceUpload => "⏫", ObsObjectOriginType.SAML => "🏢", _ => "❓"
2049+
ObsObjectOriginType.System => "⚙️",
2050+
ObsObjectOriginType.App => "📊",
2051+
ObsObjectOriginType.User => "👋",
2052+
ObsObjectOriginType.DataStream => "🎏",
2053+
ObsObjectOriginType.Terraform => "🛤️",
2054+
ObsObjectOriginType.External => "❄️",
2055+
ObsObjectOriginType.ReferenceUpload => "⏫",
2056+
ObsObjectOriginType.SAML => "🏢",
2057+
ObsObjectOriginType.DirectContent => "🔖",
2058+
_ => "❓"
20332059
};
20342060
}
20352061

@@ -2071,7 +2097,12 @@ internal string getIconUserStatus(ObsUser obsUser)
20712097
{
20722098
return obsUser.status switch
20732099
{
2074-
"UserStatusActive" => "✅", "UserStatusDisabled" => "❌", "UserStatusIdpDisabled" => "🚫", "UserStatusCreated" => "🔆", "Deleted" => "📛", _ => "❓"
2100+
"UserStatusActive" => "✅",
2101+
"UserStatusDisabled" => "❌",
2102+
"UserStatusIdpDisabled" => "🚫",
2103+
"UserStatusCreated" => "🔆",
2104+
"Deleted" => "📛",
2105+
_ => "❓"
20752106
};
20762107
}
20772108

@@ -2111,23 +2142,47 @@ internal string getIconWidgetType(ObsStage obsStage)
21112142
{
21122143
return obsStage.type switch
21132144
{
2114-
"table" => "📑", "timeseries" => "📉", "bar" => "📊", "circular" => "🥧", "stacked_area" => "🗻", "singlevalue" => "#️⃣", "list" => "📜", "valueovertime" => "⏳", "gantt" => "📐", "flame" => "🔥", _ => ""
2145+
"table" => "📑",
2146+
"timeseries" => "📉",
2147+
"bar" => "📊",
2148+
"circular" => "🥧",
2149+
"stacked_area" => "🗻",
2150+
"singlevalue" => "#️⃣",
2151+
"list" => "📜",
2152+
"valueovertime" => "⏳",
2153+
"gantt" => "📐",
2154+
"flame" => "🔥",
2155+
_ => "❓"
21152156
};
21162157
}
21172158

21182159
internal string getIconParameterType(ObsParameter obsParameter)
21192160
{
21202161
return obsParameter.viewType switch
21212162
{
2122-
"resource-input" => "🛆", "single-select" => "⛛", "text" => "🔤", "numeric" => "#️⃣", "input" => "🌫️", _ => "❓"
2163+
"resource-input" => "🛆",
2164+
"single-select" => "⛛",
2165+
"text" => "🔤",
2166+
"numeric" => "#️⃣",
2167+
"input" => "🌫️",
2168+
_ => "❓"
21232169
};
21242170
}
21252171

21262172
internal string getIconFieldType(ObsFieldDefinition obsFieldDefinition)
21272173
{
21282174
return obsFieldDefinition.type switch
21292175
{
2130-
"timestamp" => "🕘", "duration" => "⏰", "string" => "📝", "int64" => "⑽", "float64" => "⒑", "object" => "🎛", "variant" => "💫", "array" => "🔢", "bool" => "❓", _ => " "
2176+
"timestamp" => "🕘",
2177+
"duration" => "⏰",
2178+
"string" => "📝",
2179+
"int64" => "⑽",
2180+
"float64" => "⒑",
2181+
"object" => "🎛",
2182+
"variant" => "💫",
2183+
"array" => "🔢",
2184+
"bool" => "❓",
2185+
_ => " "
21312186
};
21322187
}
21332188

observe-entity-explorer.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<RootNamespace>Observe.EntityExplorer</RootNamespace>
88
<ApplicationIcon>AppIcon.ico</ApplicationIcon>
99

10-
<Version>2025.4.28.0</Version>
11-
<FileVersion>2025.4.28.0</FileVersion>
12-
<AssemblyVersion>2025.4.28.0</AssemblyVersion>
10+
<Version>2025.6.3.0</Version>
11+
<FileVersion>2025.6.3.0</FileVersion>
12+
<AssemblyVersion>2025.6.3.0</AssemblyVersion>
1313
<Authors>Daniel Odievich ([email protected])</Authors>
1414
<Company>Observe Inc.</Company>
1515
<Product>Observe Entity Explorer</Product>

0 commit comments

Comments
 (0)