Match TFS Changeset 303362
This commit is contained in:
15
EDA Viewer/Models/AppSettings.cs
Normal file
15
EDA Viewer/Models/AppSettings.cs
Normal file
@ -0,0 +1,15 @@
|
||||
namespace EDAViewer.Models
|
||||
{
|
||||
public class AppSettings
|
||||
{
|
||||
public string Company { get; set; }
|
||||
public string ECEDADatabasePassword { get; set; }
|
||||
public string EncryptedPassword { get; set; }
|
||||
public string IFXEDADatabasePassword { get; set; }
|
||||
public string MonARessource { get; set; }
|
||||
public string Server { get; set; }
|
||||
public string ServiceUser { get; set; }
|
||||
public string URLs { get; set; }
|
||||
public string WorkingDirectoryName { get; set; }
|
||||
}
|
||||
}
|
52
EDA Viewer/Models/EdaHtmlDiff.cs
Normal file
52
EDA Viewer/Models/EdaHtmlDiff.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using EDAViewer.Models;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace EDAViewer.Models
|
||||
{
|
||||
|
||||
public class EdaHtmlDiff : WithEnvironment
|
||||
{
|
||||
|
||||
public string Paths { get; set; }
|
||||
public string CurrentPath { get; set; }
|
||||
public string PathAndFileName { get; set; }
|
||||
|
||||
[Display(Name = "FileName")]
|
||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||
[Required(ErrorMessage = "Please select an file name", AllowEmptyStrings = false)]
|
||||
public string FileName { get; set; }
|
||||
|
||||
public EdaHtmlDiff()
|
||||
{
|
||||
Common(path: string.Empty);
|
||||
}
|
||||
|
||||
public EdaHtmlDiff(WithEnvironment withEnvironment, string path)
|
||||
{
|
||||
Common(path);
|
||||
if (string.IsNullOrEmpty(withEnvironment.user_name))
|
||||
user_name = "AUTO";
|
||||
else
|
||||
user_name = withEnvironment.user_name;
|
||||
if (string.IsNullOrEmpty(withEnvironment.machine_name))
|
||||
machine_name = "IFX";
|
||||
else
|
||||
machine_name = withEnvironment.machine_name;
|
||||
if (withEnvironment.now_ticks == 0)
|
||||
now_ticks = DateTime.Now.Ticks;
|
||||
else
|
||||
now_ticks = withEnvironment.now_ticks;
|
||||
message = withEnvironment.message;
|
||||
}
|
||||
|
||||
private void Common(string path)
|
||||
{
|
||||
Paths = string.Empty;
|
||||
CurrentPath = path;
|
||||
FileName = string.Empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
9
EDA Viewer/Models/ErrorViewModel.cs
Normal file
9
EDA Viewer/Models/ErrorViewModel.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace EDAViewer.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
46
EDA Viewer/Models/IBackground.cs
Normal file
46
EDA Viewer/Models/IBackground.cs
Normal file
@ -0,0 +1,46 @@
|
||||
namespace EDAViewer.Models
|
||||
{
|
||||
|
||||
public interface IBackground
|
||||
{
|
||||
void EdaDataCollectionPlansCallback();
|
||||
// public void EdaDataCollectionPlans()
|
||||
// {
|
||||
// long ticks = DateTime.Now.Ticks;
|
||||
// Logic2021Q1 logic2021Q1 = new Logic2021Q1(_Log);
|
||||
// string server = GetServer(debugIsNotEC: false);
|
||||
// string cSharpFormat = "yyyy-MM-dd_hh:mm:ss tt";
|
||||
// string oracleFormat = "yyyy-MM-dd_hh:mi:ss AM";
|
||||
// string edaDataCollectionPlansLastRun = "2020-07-02_10:45:01 AM";
|
||||
// logic2021Q1.EdaDataCollectionPlans(server, server.Contains("_ec_"), edaDataCollectionPlansLastRun, cSharpFormat, oracleFormat);
|
||||
// _Log.Debug(string.Concat("Took ", new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds, " second(s)"));
|
||||
// }
|
||||
void EDAOutputArchiveCallback();
|
||||
// public void EDAOutputArchive()
|
||||
// {
|
||||
// long ticks = DateTime.Now.Ticks;
|
||||
// string server = GetServer(debugIsNotEC: true);
|
||||
// string sourceDirectory = string.Concat(@"\\", server, @"\ec_eda\Staging\Traces");
|
||||
// if (!Directory.Exists(sourceDirectory))
|
||||
// _Log.Debug(string.Concat("// Source directory <", sourceDirectory, "> doesn't exist."));
|
||||
// else
|
||||
// {
|
||||
// Logic2019Q4 logic2019Q4 = new Logic2019Q4(_Log);
|
||||
// logic2019Q4.EDAOutputArchive(sourceDirectory);
|
||||
// }
|
||||
// _Log.Debug(string.Concat("Took ", new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds, " second(s)"));
|
||||
// }
|
||||
void LogPathCleanUpByWeekCallback();
|
||||
// public void LogPathCleanUpByWeek()
|
||||
// {
|
||||
// long ticks = DateTime.Now.Ticks;
|
||||
// string server = GetServer(debugIsNotEC: true);
|
||||
// Logic2019Q3 logic2019Q3 = new Logic2019Q3(_Log);
|
||||
// logic2019Q3.LogPathCleanUpByWeek(server, isEDA: true);
|
||||
// logic2019Q3.LogPathCleanUpByWeek(server, isEAFLog: true);
|
||||
// _Log.Debug(string.Concat("Took ", new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds, " second(s)"));
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
}
|
17
EDA Viewer/Models/IHomeController.cs
Normal file
17
EDA Viewer/Models/IHomeController.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace EDAViewer.Models
|
||||
{
|
||||
public interface IHomeController
|
||||
{
|
||||
IActionResult Background(bool? message_clear = null, bool? exceptions_clear = null, bool? set_is_primary_instance = null, int? invoke_eda_dcp = null);
|
||||
IActionResult Encode(string value = null);
|
||||
IActionResult Error();
|
||||
IActionResult Index();
|
||||
IActionResult Privacy();
|
||||
IActionResult ViewEdaHtmlDiff(WithEnvironment withEnvironment = null);
|
||||
ActionResult<IEnumerable<SelectListItem>> GetDirectoriesOrFiles(string path = null, bool? upDirectory = null, string filter = null);
|
||||
}
|
||||
}
|
14
EDA Viewer/Models/WithEnvironment.cs
Normal file
14
EDA Viewer/Models/WithEnvironment.cs
Normal file
@ -0,0 +1,14 @@
|
||||
namespace EDAViewer.Models
|
||||
{
|
||||
|
||||
public class WithEnvironment
|
||||
{
|
||||
|
||||
public string message { get; set; }
|
||||
public string user_name { get; set; }
|
||||
public string machine_name { get; set; }
|
||||
public long now_ticks { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user