Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • System Architecture
      • DataMiner Releases & Updates
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

How can I achieve this design in LCA and what type will be GQI data?

330 views21st January 2025GQI LCA
4
Apurva Tandon [DevOps Advocate]1.61K 17th January 2025 0 Comments

How can I achieve this design in LCA and what type will be GQI data?
Actually this group per service for view and aggregate count of alarms per service,
this should be dynamic when return from GQI script…I was able to get on table but how can I achiev the desired format in second image.

Gilles Bara [SLC] [DevOps Enabler] Answered question 17th January 2025

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
5
Gilles Bara [SLC] [DevOps Enabler]6.80K Posted 17th January 2025 5 Comments

You can achieve this by changing the column appearance. It allows you to fully customize the look and feel of each cell, and the nice thing is that you can access all values from your row inside a single cell template. So in this use case I would

  1. Add a new column through GQI which is the concatenation of all state columns and name it ‘Alarm state’.
  2. Hide all the individual severity columns by dragging the ‘Name’ and ‘Alarm state’ column from the query to the table.
  3. Customize the Alarm state column to show the individual severity columns in their corresponding colored shape.

If you are new to the template editor, I would recommend this nice tutorial on how to style a table.

Applied on your use case:

When needed, you could conditionally style it a bit more to get rid of any 0 counters:

Gilles Bara [SLC] [DevOps Enabler] Edited answer 21st January 2025
Apurva Tandon [DevOps Advocate] commented 20th January 2025

Hi thanks,
but I am unable to find how can I concatenate my severity types will be DYNAMIC ALWAYS in one column and apply layout based on what filter
Just sending my code here where in for now I have both concatination of columns to alarm state as well as separate too, need to show the severity type and count in that

var columns = new List<GQIColumn>
{
new GQIStringColumn("Service Name"),
new GQIStringColumn("Alarm State"),
};
if (_severityTypes != null && _severityTypes.Any())
{
columns.AddRange(_severityTypes.Select(severity => new GQIStringColumn($"{severity}")));
}

return columns.ToArray();

public GQIPage GetNextPage(GetNextPageInputArgs args)
{
var rowsToReturn = new List<GQIRow>();
List<string> servicesName = new List<string>();
DmsAgent agent = new DmsAgent();
var services = GetServices().Select(x => x.Name).Distinct().ToList();
GetActiveAlarmsMessage getActiveAlarmsRequest = new GetActiveAlarmsMessage(agent.ID);
var res = _dms.SendMessage(getActiveAlarmsRequest) as ActiveAlarmsResponseMessage;
var activeAlarms = res.ActiveAlarms.WhereNotNull().ToList();
var filteredAlarms = activeAlarms
.Where(alarm => alarm.ViewImpactInfo.Any(x => x.Name == _view))
.ToList();
filteredAlarms.Select(alarm => alarm.Severity).Distinct();
var alarmServicePairs = new List<(string ServiceName, string Severity)>();

foreach (var alarm in filteredAlarms.OrderBy(x => x.Severity))
{
if (alarm.Services != null && alarm.Services.Length > 0)
{
servicesName.Clear();
foreach (var service in alarm.Services)
{
var request = new GetServiceByIDMessage(service);
if (_dms.SendMessage(request) is ServiceInfoEventMessage serviceInfo && services.Contains(serviceInfo.Name))
{
string serviceName = serviceInfo.Name;
servicesName.Add(serviceName);
}
}

foreach (var serviceName in servicesName)
{
alarmServicePairs.Add((serviceName, alarm.Severity));
}
}
}

var groupedByService = alarmServicePairs
.GroupBy(x => x.ServiceName)
.Select(serviceGroup => new
{
ServiceName = serviceGroup.Key,
Severities = serviceGroup.GroupBy(x => x.Severity),
});

foreach (var service in groupedByService)
{
var cells = new List<GQICell>
{
new GQICell { Value = service.ServiceName },
};

var severityCounts = service.Severities.ToDictionary(sg => sg.Key, sg => sg.Count());
var alarmState = string.Join(", ", severityCounts.Select(sc => $"{sc.Key}: {sc.Value}"));

cells.Add(new GQICell { Value = alarmState });

foreach (var severity in _severityTypes)
{
if (severityCounts.TryGetValue(severity, out var count))
{
cells.Add(new GQICell { Value = count.ToString() });
}
else
{
cells.Add(new GQICell { Value = "0" });
}
}

var key = $"{service.ServiceName}";
rowsToReturn.Add(new GQIRow(key, cells.ToArray()));
}

return new GQIPage(rowsToReturn.ToArray());

Apurva Tandon [DevOps Advocate] commented 20th January 2025

The reason for Dynamic columns is one service can have 3 severity only so no need to show
But if tow services -> one has and one doesnt say for eg. timeout then for one it will show value and for other as 0.
So, how can I concatenate {0}/{1} and have column apperance thing done there.

Gilles Bara [SLC] [DevOps Enabler] commented 20th January 2025

Hi, I added a gif how I would do it

Apurva Tandon [DevOps Advocate] commented 20th January 2025

Hi thanks,
Its really helpful, but as I mentioned I have dynamic columns so it will problem to select on concatenation as per my previous comment as there can be 4 and for next 5…I think this only possible if I fix these are only gonna come, like Critical, Major, Minor then we can concatenate

Gilles Bara [SLC] [DevOps Enabler] commented 21st January 2025

Yes, it would indeed be safer to provide all possible severity columns up front. It's in general not a good idea to let a GQI return a dynamic amount of columns, because LCA rely heavily on those column IDs when you start creating interaction with the table, and a dynamic result could mess up these configurations.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs