fix: C#5 compat - remove GetPluginDataDirectory, use direct path
This commit is contained in:
@@ -22,19 +22,12 @@ namespace Disco.Plugins.ServiceTracker.ConfigurationHandler
|
||||
{
|
||||
try
|
||||
{
|
||||
var dataPath = GetPluginDataDirectory(
|
||||
controller.HttpContext.Application["Disco.Plugins.ServiceTracker"] as Plugin
|
||||
?? new ServiceTrackerPlugin());
|
||||
if (string.IsNullOrEmpty(dataPath))
|
||||
{
|
||||
dataPath = System.IO.Path.Combine(
|
||||
AppDomain.CurrentDomain.BaseDirectory, "App_Data", "Plugins", "Disco.Plugins.ServiceTracker");
|
||||
}
|
||||
var dataPath = System.IO.Path.Combine(
|
||||
AppDomain.CurrentDomain.BaseDirectory, "App_Data", "Plugins", "Disco.Plugins.ServiceTracker");
|
||||
|
||||
var dataStore = new ServiceTrackerDataStore(dataPath);
|
||||
var config = dataStore.LoadConfig();
|
||||
|
||||
// Update simple settings
|
||||
var refreshStr = form["refreshSeconds"];
|
||||
int refresh;
|
||||
if (int.TryParse(refreshStr, out refresh) && refresh >= 10)
|
||||
@@ -50,7 +43,6 @@ namespace Disco.Plugins.ServiceTracker.ConfigurationHandler
|
||||
if (!string.IsNullOrEmpty(defaultLocation))
|
||||
config.DefaultLocationId = defaultLocation;
|
||||
|
||||
// Parse priorities JSON if provided
|
||||
var prioritiesJson = form["prioritiesJson"];
|
||||
if (!string.IsNullOrEmpty(prioritiesJson))
|
||||
{
|
||||
@@ -60,10 +52,9 @@ namespace Disco.Plugins.ServiceTracker.ConfigurationHandler
|
||||
if (priorities != null && priorities.Count > 0)
|
||||
config.Priorities = priorities;
|
||||
}
|
||||
catch { /* keep existing */ }
|
||||
catch { }
|
||||
}
|
||||
|
||||
// Parse locations JSON if provided
|
||||
var locationsJson = form["locationsJson"];
|
||||
if (!string.IsNullOrEmpty(locationsJson))
|
||||
{
|
||||
@@ -73,10 +64,9 @@ namespace Disco.Plugins.ServiceTracker.ConfigurationHandler
|
||||
if (locations != null && locations.Count > 0)
|
||||
config.Locations = locations;
|
||||
}
|
||||
catch { /* keep existing */ }
|
||||
catch { }
|
||||
}
|
||||
|
||||
// Parse status options
|
||||
var statusOptionsRaw = form["statusOptions"];
|
||||
if (!string.IsNullOrEmpty(statusOptionsRaw))
|
||||
{
|
||||
@@ -104,26 +94,6 @@ namespace Disco.Plugins.ServiceTracker.ConfigurationHandler
|
||||
<p>Enhanced service/support tracking with priority management, location tracking,
|
||||
tile dashboard, and SLA monitoring for Disco ICT jobs.</p>
|
||||
<hr />
|
||||
|
||||
<h4>Features</h4>
|
||||
<ul>
|
||||
<li><strong>Priority Levels</strong> — Configurable priorities with SLA timeframes (Critical=4h, High=8h, Medium=24h, etc.)</li>
|
||||
<li><strong>Device Location Tracking</strong> — Track where each device currently is (IT Office, With User, At Repairer, etc.)</li>
|
||||
<li><strong>Tile Dashboard</strong> — Visual card-based overview of all open jobs, sorted by due date or priority</li>
|
||||
<li><strong>SLA Monitoring</strong> — Automatic breach detection with visual alerts</li>
|
||||
<li><strong>Activity Notes</strong> — Add timestamped notes and updates to each ticket</li>
|
||||
<li><strong>Tech Workload</strong> — See job distribution across technicians</li>
|
||||
<li><strong>CSV Export</strong> — Export all open tickets with metadata</li>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
<h4>Configuration</h4>
|
||||
<p>Priority levels, locations, SLA timeframes, and status options can be customised by editing
|
||||
the <code>config.json</code> file in the plugin data directory, or by posting JSON data via the configuration form.</p>
|
||||
<p>Default configuration is created on install with 5 priority levels (Critical through Scheduled) and
|
||||
6 location options.</p>
|
||||
|
||||
<hr />
|
||||
<p>
|
||||
<a href='/Plugin/Disco.Plugins.ServiceTracker/Dashboard' class='btn btn-primary btn-lg'>
|
||||
<i class='fa fa-dashboard'></i> Open Service Tracker Dashboard
|
||||
|
||||
Reference in New Issue
Block a user