Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GetScheduledTasksGQI/DataHelpers/Arguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
private readonly GQIStringArgument nameFilter = new GQIStringArgument("Name Filter") { IsRequired = false, DefaultValue = ".*" };
private readonly GQIDateTimeArgument start = new GQIDateTimeArgument("Start") { IsRequired = true };
private readonly GQIDateTimeArgument end = new GQIDateTimeArgument("End") { IsRequired = true };
private readonly GQIIntArgument duration = new GQIIntArgument("Duration (s)") { IsRequired = true };
private readonly GQIIntArgument duration = new GQIIntArgument("Scheduled Duration (s)") { IsRequired = true };
private readonly GQIStringArgument scriptParameterInputs = new GQIStringArgument("Script Parameter Inputs") { IsRequired = false };

public string NameFilter { get; private set; }
Expand Down Expand Up @@ -45,7 +45,7 @@
if (parts.Length == 2)
{
// Try to parse the second part as an integer
if (int.TryParse(parts[1], out int id))

Check warning on line 48 in GetScheduledTasksGQI/DataHelpers/Arguments.cs

View workflow job for this annotation

GitHub Actions / CI / Skyline Quality Gate

Merge this if statement with the enclosing one. (https://rules.sonarsource.com/csharp/RSPEC-1066)
{
scriptDates.Add(new ScriptRunData
{
Expand Down
2 changes: 1 addition & 1 deletion GetScheduledTasksGQI/GetScheduledTasksGQI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
/// Represents a data source.
/// See: https://aka.dataminer.services/gqi-external-data-source for a complete example.
/// </summary>
[GQIMetaData(Name = "SLC - GQI - Scheduled - Tasks - Occurrences")]
[GQIMetaData(Name = "SLC - Get Scheduled Tasks Occurrences")]
Comment thread
SaraGlu marked this conversation as resolved.
public class GetScheduledTasksGQI : IGQIDataSource, IGQIInputArguments, IGQIOnInit, IGQIOnPrepareFetch

Check warning on line 18 in GetScheduledTasksGQI/GetScheduledTasksGQI.cs

View workflow job for this annotation

GitHub Actions / CI / Skyline Quality Gate

Rename class 'GetScheduledTasksGQI' to match pascal case naming rules, consider using 'GetScheduledTasksGqi'. (https://rules.sonarsource.com/csharp/RSPEC-101)
{
private readonly Arguments arguments = new Arguments();
private readonly List<GQIRow> rows = new List<GQIRow>();
Expand Down Expand Up @@ -102,7 +102,7 @@
return result;
}

private void ProcessScheduledTasks()

Check warning on line 105 in GetScheduledTasksGQI/GetScheduledTasksGQI.cs

View workflow job for this annotation

GitHub Actions / CI / Skyline Quality Gate

Refactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed. (https://rules.sonarsource.com/csharp/RSPEC-3776)
{
var rangeStart = arguments.Start;
var rangeEnd = arguments.End;
Expand Down
4 changes: 2 additions & 2 deletions GetScheduledTasksGQI/GetScheduledTasksGQI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Type>Automation</Type>
<Author>Skyline Communications</Author>
<CheckSets>FALSE</CheckSets>
<Folder>DataMiner Catalog/General/Get Scheduled Tasks/Ad Hoc Data Sources/SLC - GQI - Scheduled - Tasks - Occurrences</Folder>
<Folder>DataMiner Catalog/Ad Hoc Data Sources</Folder>

<Protocols>
</Protocols>
Expand All @@ -23,4 +23,4 @@
<Param type="libraryName">GetScheduledTasksGQI</Param>
</Exe>
</Script>
</DMSScript>
</DMSScript>
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions SchedulerTasks/CatalogInformation/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## About

This package consists of two ad hoc data sources, **SLC - GQI - Scheduled - Tasks** and **SLC - GQI - Scheduled - Tasks - Occurrences**, that retrieve information about scheduled tasks in a DataMiner System. By implementing these ad hoc data sources in low-code apps and/or dashboards, you can visualize data from the Scheduler module in a custom way.
This package consists of two ad hoc data sources, **SLC - Get Scheduled Tasks** and **SLC - Get Scheduled Tasks Occurrences**, that retrieve information about scheduled tasks in a DataMiner System. By implementing these ad hoc data sources in low-code apps and/or dashboards, you can visualize data from the Scheduler module in a custom way.

**SLC - GQI - Scheduled - Tasks** provides a list of scheduled tasks from the DataMiner Scheduler module, while **SLC - GQI - Scheduled - Tasks - Occurrences** provides a list of the scheduled task occurrences based on the user's input in a specific period of time. This way, a customizable overview of tasks is provided.
**SLC - Get Scheduled Tasks** provides a list of scheduled tasks from the DataMiner Scheduler module, while **SLC - Get Scheduled Tasks Occurrences** provides a list of the scheduled task occurrences based on the user's input in a specific period of time. This way, a customizable overview of tasks is provided.

## Key Features

Expand All @@ -23,19 +23,19 @@ The versatility of the package lends itself to a broad range of applications, in

## Configuration

After the package has been deployed, two ad hoc data sources, **SLC - GQI - Scheduled - Tasks** and **SLC - GQI - Scheduled - Tasks - Occurrences**, will be available for use in GQI queries. For more information about GQI, refer to [Generic Query Interface](https://aka.dataminer.services/About_GQI).
After the package has been deployed, two ad hoc data sources, **SLC - Get Scheduled Tasks** and **SLC - Get Scheduled Tasks Occurrences**, will be available for use in GQI queries. For more information about GQI, refer to [Generic Query Interface](https://aka.dataminer.services/About_GQI).

### SLC - GQI - Scheduled - Tasks
### SLC Get Scheduled Tasks

While implementing **SLC - GQI - Scheduled - Tasks**, you can optionally specify the **Name Filter** input parameter. This regular expression (regex) pattern will be used to match the task name. If no name filter is specified, `.*` is used instead.
While implementing **SLC - Get Scheduled Tasks**, you can optionally specify the **Name Filter** input parameter. This regular expression (regex) pattern will be used to match the task name. If no name filter is specified, `.*` is used instead.

![SchedulerTasks](./Images/Scheduler_Tasks_75pct.png)

As a result, the GQI will retrieve the name, description, and type of the task, the ID of the Agent on which the task was executed, the result of the last run of the task, and the task's interval.

### SLC - GQI - Scheduled - Tasks - Occurrences
### SLC - GQI Scheduled Tasks Occurrences

While implementing **SLC - GQI - Scheduled - Tasks - Occurrences**, you should specify the following input parameters:
While implementing **SLC - Get Scheduled Tasks Occurrences**, you should specify the following input parameters:

- **Name Filter**: Optional. Regular expression (regex) to match the task name. If no name filter is specified, `.*` is used instead.
- **Start**: The beginning of the time frame during which task occurrences should be recorded.
Expand Down
2 changes: 1 addition & 1 deletion SchedulerTasksGetter/SchedulerTasksGetter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace SchedulerTasksGetter
using SchedulerTask = Skyline.DataMiner.Net.Messages.SchedulerTask;

/// <summary> Represents a data source. See: https://aka.dataminer.services/gqi-external-data-source for a complete example. </summary>
[GQIMetaData(Name = "SLC - GQI - Scheduled - Tasks")]
[GQIMetaData(Name = "SLC - Get Scheduled Tasks")]
public sealed class SchedulerTasksGetter : IGQIDataSource, IGQIOnPrepareFetch, IGQIOnInit, IGQIInputArguments
{
private readonly GQIStringArgument nameFilterArgument = new GQIStringArgument("Name Filter") { IsRequired = false, DefaultValue = ".*" };
Expand Down
4 changes: 2 additions & 2 deletions SchedulerTasksGetter/SchedulerTasksGetter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Type>Automation</Type>
<Author>SkylineCommunications</Author>
<CheckSets>FALSE</CheckSets>
<Folder>DataMiner Catalog/General/Get Scheduled Tasks/Ad Hoc Data Sources/SLC - GQI - Scheduled - Tasks</Folder>
<Folder>DataMiner Catalog/Ad Hoc Data Sources</Folder>

<Protocols>
</Protocols>
Expand All @@ -23,4 +23,4 @@
<Param type="libraryName">SchedulerTasksGetter</Param>
</Exe>
</Script>
</DMSScript>
</DMSScript>
Loading