Skip to content

Commit a7ab33c

Browse files
Minor stability updates
Metric naming Removed calls to populate worksheets individually
1 parent c953261 commit a7ab33c

File tree

4 files changed

+35
-31
lines changed

4 files changed

+35
-31
lines changed

DataObjects/ObsMetric.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public class ObsMetric : ObsObject
77
public string datasetId { get; set; } = String.Empty;
88
public string datasetPackage { get; set; } = String.Empty;
99
public string datasetName { get; set; } = String.Empty;
10+
public string nameWithPath { get; set; } = String.Empty;
1011
public string type { get; set; }
1112
public string unit { get; set; }
1213
public string rollup { get; set; }
@@ -121,6 +122,7 @@ public ObsMetric(JObject entityObject)
121122
if (metricObject != null)
122123
{
123124
this.name = JSONHelper.getStringValueFromJToken(metricObject, "name");
125+
this.nameWithPath = JSONHelper.getStringValueFromJToken(metricObject, "nameWithPath");
124126
this.type = JSONHelper.getStringValueFromJToken(metricObject, "type");
125127
this.unit = JSONHelper.getStringValueFromJToken(metricObject, "unit");
126128
this.description = JSONHelper.getStringValueFromJToken(metricObject, "description");
@@ -146,7 +148,7 @@ public ObsMetric(JObject entityObject)
146148
}
147149
}
148150

149-
this.id = String.Format("{0}/{1}", this.datasetId, this.name);
151+
this.id = String.Format("{0}/{1}", this.datasetId, this.nameWithPath);
150152
}
151153

152154
public void AddSupportingDataset(Dictionary<string, ObsDataset> allDatasetsDict)

InventoryModel/ObserveEnvironment.cs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -135,32 +135,32 @@ public ObserveEnvironment(AuthenticatedUser currentUser, HttpContext httpContext
135135

136136
// Looks like for some environments query.worksheetSearch does not return stages, but the query.worksheet does.
137137
// If we see no stages, maybe that's what's going on? So retrieve it again and sub out the raw data
138-
List<ObsWorksheet> allWorksheetsWithoutStages = allWorksheets.Where(w => w.NumStages == 0).ToList();
139-
var allWorksheetsWithoutStagesChunks = allWorksheetsWithoutStages.Chunk(10);
140-
Parallel.ForEach<ObsWorksheet[], int>(
141-
allWorksheetsWithoutStagesChunks,
142-
new ParallelOptions(),
143-
() => {
144-
// init
145-
return 0;
146-
},
147-
(chunkOfWorksheets, loopState, subtotal) => {
148-
// Body
149-
for (int i = 0; i <= chunkOfWorksheets.Length - 1; i++)
150-
{
151-
ObsWorksheet worksheet = chunkOfWorksheets[i];
152-
ObsWorksheet worksheetSingle = getWorksheet(currentUser, worksheet.id);
153-
if (worksheetSingle != null)
154-
{
155-
worksheet._raw = worksheetSingle._raw;
156-
}
157-
}
158-
return 0;
159-
},
160-
c => {
161-
// Finally
162-
}
163-
);
138+
// List<ObsWorksheet> allWorksheetsWithoutStages = allWorksheets.Where(w => w.NumStages == 0).ToList();
139+
// var allWorksheetsWithoutStagesChunks = allWorksheetsWithoutStages.Chunk(10);
140+
// Parallel.ForEach<ObsWorksheet[], int>(
141+
// allWorksheetsWithoutStagesChunks,
142+
// new ParallelOptions(),
143+
// () => {
144+
// // init
145+
// return 0;
146+
// },
147+
// (chunkOfWorksheets, loopState, subtotal) => {
148+
// // Body
149+
// for (int i = 0; i <= chunkOfWorksheets.Length - 1; i++)
150+
// {
151+
// ObsWorksheet worksheet = chunkOfWorksheets[i];
152+
// ObsWorksheet worksheetSingle = getWorksheet(currentUser, worksheet.id);
153+
// if (worksheetSingle != null)
154+
// {
155+
// worksheet._raw = worksheetSingle._raw;
156+
// }
157+
// }
158+
// return 0;
159+
// },
160+
// c => {
161+
// // Finally
162+
// }
163+
// );
164164
},
165165
() => // Metrics
166166
{

Views/Details/Metric.cshtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@
5151
<tr>
5252
<td>Name</td>
5353
<td>
54-
@Model.CurrentMetric.name in @Model.CurrentMetric.datasetName (@Model.CurrentMetric.datasetId)
54+
@Model.CurrentMetric.name
55+
<br/>
56+
@Model.CurrentMetric.nameWithPath in @Model.CurrentMetric.datasetName (@Model.CurrentMetric.datasetId)
5557
<br/>
5658
<code id="searchQuery" class="language-json">"@Model.CurrentMetric.name"</code>
5759
</td>

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.9.18.0</Version>
11-
<FileVersion>2025.9.18.0</FileVersion>
12-
<AssemblyVersion>2025.9.18.0</AssemblyVersion>
10+
<Version>2025.11.4.0</Version>
11+
<FileVersion>2025.11.4.0</FileVersion>
12+
<AssemblyVersion>2025.11.4.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)