Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved Settings and Error Icon #57

Merged
merged 8 commits into from
Dec 30, 2024
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,6 @@ readme.txt
**/src/OpenSEE/DynamicAssemblies
**/src/OpenSEE/Logs
**/src/OpenSEE/NUglify.dll
**/src/OpenSEE/web.config.backup
**/src/OpenSEE/web.config.backup

**/src/OpenSee/scripts/*.js
20 changes: 10 additions & 10 deletions src/OpenSEE/CSVDownload.ashx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ public void ExportToPQDS(Stream returnStream, NameValueCollection requestParamet
{
int eventID = int.Parse(requestParameters["eventID"]);

using (AdoDataConnection connection = new AdoDataConnection("dbOpenXDA"))
using (AdoDataConnection connection = new AdoDataConnection("systemSettings"))
{
Event evt = (new TableOperations<Event>(connection)).QueryRecordWhere("ID = {0}", eventID);
Meter meter = new TableOperations<Meter>(connection).QueryRecordWhere("ID = {0}", evt.MeterID);
meter.ConnectionFactory = () => new AdoDataConnection("dbOpenXDA");
meter.ConnectionFactory = () => new AdoDataConnection("systemSettings");

// only get Single Voltage and Single Current Data for This....
List<PQDS.DataSeries> data = new List<PQDS.DataSeries>();
Expand Down Expand Up @@ -280,7 +280,7 @@ public void ExportToPQDS(Stream returnStream, NameValueCollection requestParamet

Asset asset;
double systemFrequency;
using (AdoDataConnection connection = new AdoDataConnection("dbOpenXDA"))
using (AdoDataConnection connection = new AdoDataConnection("systemSettings"))
{
asset = (new TableOperations<Asset>(connection)).QueryRecordWhere("ID = {0}", evt.AssetID);
systemFrequency = connection.ExecuteScalar<double?>("SELECT Value FROM Setting WHERE Name = 'SystemFrequency'") ?? 60.0;
Expand Down Expand Up @@ -397,7 +397,7 @@ private PQDS.DataSeries PQDSSeries(DataSeries data, string label)
public void ExportStatsToCSV(Stream returnStream, NameValueCollection requestParameters)
{
int eventId = int.Parse(requestParameters["eventId"]);
using (AdoDataConnection connection = new AdoDataConnection("dbOpenXDA"))
using (AdoDataConnection connection = new AdoDataConnection("systemSettings"))
using (StreamWriter writer = new StreamWriter(returnStream))
{
DataTable dataTable = connection.RetrieveData("SELECT * FROM OpenSEEScalarStatView WHERE EventID = {0}", eventId);
Expand All @@ -416,7 +416,7 @@ public void ExportCorrelatedSagsToCSV(Stream returnStream, NameValueCollection r
{
int eventID = int.Parse(requestParameters["eventId"]);

using (AdoDataConnection connection = new AdoDataConnection("dbOpenXDA"))
using (AdoDataConnection connection = new AdoDataConnection("systemSettings"))
using (StreamWriter writer = new StreamWriter(returnStream))
{
double timeTolerance = connection.ExecuteScalar<double>("SELECT Value FROM Setting WHERE Name = 'TimeTolerance'");
Expand Down Expand Up @@ -454,15 +454,15 @@ public void ExportFFTToCSV(Stream returnStream, NameValueCollection requestParam
{
int eventId = int.Parse(requestParameters["eventID"]);

using (AdoDataConnection connection = new AdoDataConnection("dbOpenXDA"))
using (AdoDataConnection connection = new AdoDataConnection("systemSettings"))
using (StreamWriter writer = new StreamWriter(returnStream))
{
double startTime = requestParameters["startDate"] == null ? 0.0 : double.Parse(requestParameters["startDate"]);
int cycles = requestParameters["cycles"] == null ? 0 : int.Parse(requestParameters["cycles"]);

Event evt = (new TableOperations<Event>(connection)).QueryRecordWhere("ID = {0}", eventId);
Meter meter = new TableOperations<Meter>(connection).QueryRecordWhere("ID = {0}", evt.MeterID);
meter.ConnectionFactory = () => new AdoDataConnection("dbOpenXDA");
meter.ConnectionFactory = () => new AdoDataConnection("systemSettings");

AnalyticController ctrl = new AnalyticController();

Expand Down Expand Up @@ -493,7 +493,7 @@ public void ExportFFTToCSV(Stream returnStream, NameValueCollection requestParam
public void ExportHarmonicsToCSV(Stream returnStream, NameValueCollection requestParameters)
{
int eventId = int.Parse(requestParameters["eventId"]);
using (AdoDataConnection connection = new AdoDataConnection("dbOpenXDA"))
using (AdoDataConnection connection = new AdoDataConnection("systemSettings"))
using (StreamWriter writer = new StreamWriter(returnStream))
{
DataTable dataTable = connection.RetrieveData(@"
Expand Down Expand Up @@ -557,11 +557,11 @@ public List<D3Series> BuildDataSeries(NameValueCollection requestParameters)
int harmonic = requestParameters["harmonic"] == null ? 1 : int.Parse(requestParameters["harmonic"]);
List<string> displayAnalytics = requestParameters["displayAnalytics"] == null ? new List<string>() : requestParameters["displayAnalytics"].Split(',').ToList();

using (AdoDataConnection connection = new AdoDataConnection("dbOpenXDA"))
using (AdoDataConnection connection = new AdoDataConnection("systemSettings"))
{
Event evt = (new TableOperations<Event>(connection)).QueryRecordWhere("ID = {0}", eventID);
Meter meter = new TableOperations<Meter>(connection).QueryRecordWhere("ID = {0}", evt.MeterID);
meter.ConnectionFactory = () => new AdoDataConnection("dbOpenXDA");
meter.ConnectionFactory = () => new AdoDataConnection("systemSettings");

IEnumerable<D3Series> returnList = new List<D3Series>();
if (displayVolt)
Expand Down
Loading