|
|
|
|
@@ -2,10 +2,12 @@
|
|
|
|
|
using DDUtilityApp.LOGPARSER.DATA;
|
|
|
|
|
using DDUtilityApp.SECS;
|
|
|
|
|
using FluentFTP;
|
|
|
|
|
using FluentFTP.Helpers;
|
|
|
|
|
using JWH;
|
|
|
|
|
using JWH.CONTROL;
|
|
|
|
|
using JWH.DATA;
|
|
|
|
|
using JWH.NETWORK;
|
|
|
|
|
using Org.BouncyCastle.Tls.Crypto;
|
|
|
|
|
using Renci.SshNet.Sftp;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
@@ -221,7 +223,7 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
if (grid != null)
|
|
|
|
|
{
|
|
|
|
|
//grid.AutoBinding(GetSftplogFiles(rtnObj));
|
|
|
|
|
grid.AutoBinding(GetFtpslogFiles(rtnObj));
|
|
|
|
|
grid.AutoBinding(GetLogFiles(rtnObj));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -329,6 +331,7 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
dicColumnText.Add("PMDate", "PM Date");
|
|
|
|
|
dicColumnText.Add("PlcType", "PLC Type");
|
|
|
|
|
|
|
|
|
|
#region [저장된 컬럼순서 적용]
|
|
|
|
|
string columnNames = GlobalVariable.Instance.FrmEqSelector_GridEquipmentHeader;
|
|
|
|
|
string columnText = string.Empty;
|
|
|
|
|
if (string.IsNullOrEmpty(columnNames) == false)
|
|
|
|
|
@@ -352,9 +355,10 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
if (string.IsNullOrEmpty(dicColumnText[columnName]) == false) columnText = dicColumnText[columnName];
|
|
|
|
|
grid.AddColumn(columnName, columnText).IsVisible = false;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
grid.AddContextMenu("");
|
|
|
|
|
grid.AddContextMenu("Open Windows", GridEquipments_OpenWindows);
|
|
|
|
|
grid.AddContextMenu("Open Windows", this.GridEquipments_OpenWindows);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
@@ -403,6 +407,147 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region [ LogFiles ]
|
|
|
|
|
|
|
|
|
|
if (logServer.NetworkAccount.ContainsKey(equipment.LogServerIP) == false) return;
|
|
|
|
|
{
|
|
|
|
|
Account account = logServer.NetworkAccount[equipment.LogServerIP];
|
|
|
|
|
switch (account.Access)
|
|
|
|
|
{
|
|
|
|
|
case Account.AccessType.SMB:
|
|
|
|
|
{
|
|
|
|
|
// Checking Local IP-Address
|
|
|
|
|
bool isLocal = false;
|
|
|
|
|
foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
|
|
|
|
|
foreach (UnicastIPAddressInformation ip in nic.GetIPProperties().UnicastAddresses)
|
|
|
|
|
if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
|
|
|
|
|
if (ip.Address.ToString() == account.IPAddress) { isLocal = true; break; }
|
|
|
|
|
|
|
|
|
|
if (this.chkUseSMB.Checked)
|
|
|
|
|
{
|
|
|
|
|
if (isLocal) path=$@"{equipment.LogPath}\{equipment.EquipmentID}";
|
|
|
|
|
else return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (isLocal) path = $@"{equipment.LogPath}\{equipment.EquipmentID}";
|
|
|
|
|
else path = $@"\\{account.IPAddress}\{account.DefaultPath}{equipment.EquipmentID}\";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int result = ExtensionAPI.ConnectRemoteServer(account.IPAddress, account.UserID, account.Password);
|
|
|
|
|
if (result != 0 && result != 1219) { MessageBox.Show($@"네트워크 접근에 실패하였습니다. (Code:{result})"); return; }
|
|
|
|
|
|
|
|
|
|
DirectoryInfo directory = new DirectoryInfo(path);
|
|
|
|
|
if (directory.Exists == false) { MessageBox.Show($@"폴더가 존재하지 않습니다" + Environment.NewLine + Environment.NewLine + $@"Path: {path}"); return; }
|
|
|
|
|
|
|
|
|
|
LogFile[] logFiles = directory.GetFiles().ToClass<LogFile>().OrderByDescending(x => x.Name).ToArray();
|
|
|
|
|
this.gridLogFiles.AutoBinding(logFiles);
|
|
|
|
|
this.rstatus1.Text = $"Path={path}";
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case Account.AccessType.FTPS:
|
|
|
|
|
{
|
|
|
|
|
FtpsClient.Initialize(account.IPAddress, account.UserID, account.Password);
|
|
|
|
|
FtpsClient.Connect();
|
|
|
|
|
|
|
|
|
|
path = $"/{account.DefaultPath}/{equipment.EquipmentID}";
|
|
|
|
|
FtpListItem[] ftpFiles = FtpsClient.GetFtpsList(path);
|
|
|
|
|
if (ftpFiles != null) this.gridLogFiles.AutoBinding(this.GetLogFiles(ftpFiles));
|
|
|
|
|
this.rstatus1.Text = $"Path={account.IPAddress}{path}";
|
|
|
|
|
|
|
|
|
|
if (FtpsClient.IsDirExists($"{path}/THiRA_SECSGEM/HSMS"))
|
|
|
|
|
{ if (!tabControl1.TabPages.Contains(tabPage4)) tabControl1.TabPages.Add(tabPage4); }
|
|
|
|
|
else
|
|
|
|
|
{ if (tabControl1.TabPages.Contains(tabPage4)) tabControl1.TabPages.Remove(tabPage4); }
|
|
|
|
|
|
|
|
|
|
FtpsClient.Disconnect();
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case Account.AccessType.SFTP:
|
|
|
|
|
{
|
|
|
|
|
StpClientWrap.Initialize(account.IPAddress, account.UserID, account.Password);
|
|
|
|
|
StpClientWrap.Connect();
|
|
|
|
|
|
|
|
|
|
path = $"/{account.DefaultPath}/{equipment.EquipmentID}";
|
|
|
|
|
ISftpFile[] ftpFiles = (ISftpFile[])StpClientWrap.GetSftpList(path);
|
|
|
|
|
if (ftpFiles != null) this.gridLogFiles.AutoBinding(this.GetLogFiles(ftpFiles));
|
|
|
|
|
this.rstatus1.Text = $"Path={account.IPAddress}{path}";
|
|
|
|
|
|
|
|
|
|
if (StpClientWrap.IsDirExists($"{path}/THiRA_SECSGEM/HSMS"))
|
|
|
|
|
{ if (!tabControl1.TabPages.Contains(tabPage4)) tabControl1.TabPages.Add(tabPage4); }
|
|
|
|
|
else
|
|
|
|
|
{ if (tabControl1.TabPages.Contains(tabPage4)) tabControl1.TabPages.Remove(tabPage4); }
|
|
|
|
|
|
|
|
|
|
StpClientWrap.Disconnect();
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case Account.AccessType.FTP:
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
XLogger.Instance.Fatal(ex, true);
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
this.Cursor = Cursors.Default;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// [CheckPoint] 선택된 설비의 로그파일 목록을 표시한다.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
private void xGridEquipments_SelectionChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (this.gridEquipments.SelectedRows.Count < 1) return;
|
|
|
|
|
this.gridLogFiles.DataSource = null;
|
|
|
|
|
this.gridModelDetail.DataSource = null;
|
|
|
|
|
|
|
|
|
|
EisEquipment equipment = this.gridEquipments.SelectedRows[0].DataBoundItem as EisEquipment;
|
|
|
|
|
if (equipment == null) return;
|
|
|
|
|
|
|
|
|
|
this.Cursor = Cursors.WaitCursor;
|
|
|
|
|
this.Equipment = equipment;
|
|
|
|
|
LogServer logServer = this.cboxServer.SelectedItem as LogServer;
|
|
|
|
|
string path = string.Empty;
|
|
|
|
|
|
|
|
|
|
#region [ Model Details ]
|
|
|
|
|
// 모델 버전 정보
|
|
|
|
|
EisModelDetails[] modelDetails = this.GetModelDetails(equipment);
|
|
|
|
|
this.gridModelDetail.AutoBinding(modelDetails);
|
|
|
|
|
this.gridModelDetail.SetRowForeColor("LockState", $"LockState = 'BLOCKED'", Color.LightGray);
|
|
|
|
|
foreach (GridViewRowInfo row in this.gridModelDetail.Rows)
|
|
|
|
|
{
|
|
|
|
|
EisModelDetails item = row.DataBoundItem as EisModelDetails;
|
|
|
|
|
if (item == null) continue;
|
|
|
|
|
if (item.Version == equipment.Version)
|
|
|
|
|
{
|
|
|
|
|
row.IsSelected = true;
|
|
|
|
|
row.IsCurrent = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 모델 정보
|
|
|
|
|
EisModelInfo[] modelInfo = this.GetModelInfo(equipment);
|
|
|
|
|
if (modelInfo?.Length > 0)
|
|
|
|
|
{
|
|
|
|
|
this.tboxModelDescription.Text = modelInfo[0].Description;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region [ LogFiles ]
|
|
|
|
|
if (logServer.NetworkAccount.ContainsKey(equipment.LogServerIP)) //jhlim 20250202 jj
|
|
|
|
|
{
|
|
|
|
|
@@ -568,13 +713,14 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
if (e.KeyCode == Keys.Enter) this.BtnOK_Click(this.btnOK, null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void GridLogFiles_OpenWindows(object sender, params object[] args)
|
|
|
|
|
private void GridEquipments_OpenWindows(object sender, params object[] args)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (this.gridEquipments.SelectedRows.Count < 1) return;
|
|
|
|
|
string serverID = this.cboxServer.Text;
|
|
|
|
|
string equipmentID = this.gridEquipments.SelectedRows[0].Cells["EquipmentID"].Value.ToString();
|
|
|
|
|
//this.gridLogFiles.SelectedRows;
|
|
|
|
|
|
|
|
|
|
ProcessStartInfo processStartInfo = new ProcessStartInfo();
|
|
|
|
|
processStartInfo.FileName = Application.ExecutablePath;
|
|
|
|
|
@@ -638,29 +784,9 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
if (e.KeyCode == Keys.Enter) this.BtnOK_Click(this.btnOK, null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void GridEquipments_OpenWindows(object sender, params object[] args)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (this.gridEquipments.SelectedRows.Count < 1) return;
|
|
|
|
|
string serverID = this.cboxServer.Text;
|
|
|
|
|
string equipmentID = this.gridEquipments.SelectedRows[0].Cells["EquipmentID"].Value.ToString();
|
|
|
|
|
//this.gridLogFiles.SelectedRows;
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
ProcessStartInfo processStartInfo = new ProcessStartInfo();
|
|
|
|
|
processStartInfo.FileName = Application.ExecutablePath;
|
|
|
|
|
processStartInfo.WorkingDirectory = Environment.CurrentDirectory;
|
|
|
|
|
processStartInfo.Arguments = $"FrmLogParser {serverID} {equipmentID}";
|
|
|
|
|
Process process = Process.Start(processStartInfo);
|
|
|
|
|
|
|
|
|
|
//this.DialogResult = DialogResult.Cancel;
|
|
|
|
|
//this.Close();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
XLogger.Instance.Fatal(ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#region [ Grid Worflow & HSMS ] ----------------------------------------------
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Workflow, HSMS 파일목록 Grid
|
|
|
|
|
@@ -686,6 +812,7 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
((GridDataCellElement)sender)?.RowElement?.GridControl : (GridViewEx)sender;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
List<string> downfiles = new List<string>();
|
|
|
|
|
foreach (GridViewRowInfo row in gd.SelectedRows)
|
|
|
|
|
{
|
|
|
|
|
LogFile item = row.DataBoundItem as LogFile;
|
|
|
|
|
@@ -695,9 +822,14 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
if (System.IO.Directory.Exists(destPath) == false) System.IO.Directory.CreateDirectory(destPath);
|
|
|
|
|
string destFileName = $@"{destPath}{System.IO.Path.GetFileName(fullPath)}";
|
|
|
|
|
FtpsClient.DownloadFtpsFile(fullPath, destFileName);
|
|
|
|
|
downfiles.Add(destFileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MessageBox.Show($"{gd.SelectedRows.Count}개의 파일을 저장하였습니다.");
|
|
|
|
|
|
|
|
|
|
//System.Diagnostics.Process.Start($"explorer.exe", $"/select,{argument}");
|
|
|
|
|
foreach(string command in downfiles)
|
|
|
|
|
System.Diagnostics.Process.Start(command);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
@@ -705,6 +837,29 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void GridLogFiles_OpenWindows(object sender, params object[] args)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (this.gridEquipments.SelectedRows.Count < 1) return;
|
|
|
|
|
string serverID = this.cboxServer.Text;
|
|
|
|
|
string equipmentID = this.gridEquipments.SelectedRows[0].Cells["EquipmentID"].Value.ToString();
|
|
|
|
|
|
|
|
|
|
ProcessStartInfo processStartInfo = new ProcessStartInfo();
|
|
|
|
|
processStartInfo.FileName = Application.ExecutablePath;
|
|
|
|
|
processStartInfo.WorkingDirectory = Environment.CurrentDirectory;
|
|
|
|
|
processStartInfo.Arguments = $"FrmLogParser {serverID} {equipmentID}";
|
|
|
|
|
Process process = Process.Start(processStartInfo);
|
|
|
|
|
|
|
|
|
|
//this.DialogResult = DialogResult.Cancel;
|
|
|
|
|
//this.Close();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
XLogger.Instance.Fatal(ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region [ GridModelDetail ] -------------------------------------------
|
|
|
|
|
@@ -775,53 +930,6 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sftp Log Files jhlim 20250202
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="obj"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private LogFile[] GetlogFiles(object obj)
|
|
|
|
|
{
|
|
|
|
|
LogFile[] logFiles = ((List<ISftpFile>)obj).Where(item => !item.IsDirectory && item.Name != "." && item.Name != "..") //
|
|
|
|
|
.Select(item => new LogFile
|
|
|
|
|
{
|
|
|
|
|
Name = Path.GetFileNameWithoutExtension(item.Name),
|
|
|
|
|
FullName = item.FullName,
|
|
|
|
|
Extension = Path.GetExtension(item.Name),
|
|
|
|
|
Length = item.Length,
|
|
|
|
|
CreationTime = item.LastAccessTime,
|
|
|
|
|
LastAccessTime = item.LastAccessTime,
|
|
|
|
|
LastWriteTime = item.LastWriteTime
|
|
|
|
|
})
|
|
|
|
|
.OrderByDescending(x => x.Name)
|
|
|
|
|
.ToArray();
|
|
|
|
|
|
|
|
|
|
return logFiles;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ftps Log Files jhlim 20250202
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="obj"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private LogFile[] GetFtpslogFiles(object obj)
|
|
|
|
|
{
|
|
|
|
|
LogFile[] logFiles = ((FtpListItem[])obj).Where(item => item.Type == FtpFileSystemObjectType.File)
|
|
|
|
|
.Select(item => new LogFile
|
|
|
|
|
{
|
|
|
|
|
Name = Path.GetFileNameWithoutExtension(item.Name),
|
|
|
|
|
FullName = item.FullName,
|
|
|
|
|
Extension = Path.GetExtension(item.Name),
|
|
|
|
|
Length = item.Size,
|
|
|
|
|
CreationTime = item.Modified,
|
|
|
|
|
LastAccessTime = item.Modified,
|
|
|
|
|
LastWriteTime = item.Modified
|
|
|
|
|
})
|
|
|
|
|
.OrderByDescending(x => x.Name)
|
|
|
|
|
.ToArray();
|
|
|
|
|
|
|
|
|
|
return logFiles;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region [ Method ] ----------------------------------------------------
|
|
|
|
|
@@ -895,38 +1003,37 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
logServer.DBGetModelDetails = sbModelDetails.ToString();
|
|
|
|
|
logServer.DBGetModelInfo = sbModelInfo.ToString();
|
|
|
|
|
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.214", new Account("192.168.7.214", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.215", new Account("192.168.7.215", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.216", new Account("192.168.7.216", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.217", new Account("192.168.7.217", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.218", new Account("192.168.7.218", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.219", new Account("192.168.7.219", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.214", new Account("192.168.7.214", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.215", new Account("192.168.7.215", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.216", new Account("192.168.7.216", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.217", new Account("192.168.7.217", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.218", new Account("192.168.7.218", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.219", new Account("192.168.7.219", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.214", new Account("192.168.7.214", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.215", new Account("192.168.7.215", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.216", new Account("192.168.7.216", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.217", new Account("192.168.7.217", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.218", new Account("192.168.7.218", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.219", new Account("192.168.7.219", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.150", new Account("192.168.7.150", "test", "daeduck!1", @"EIS서버"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.214", new Account("192.168.7.214", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.215", new Account("192.168.7.215", "test", "daeduck!1", @"EISLog", Account.AccessType.FTPS));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.216", new Account("192.168.7.216", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.217", new Account("192.168.7.217", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.218", new Account("192.168.7.218", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.219", new Account("192.168.7.219", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.214", new Account("192.168.7.214", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.215", new Account("192.168.7.215", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.216", new Account("192.168.7.216", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.217", new Account("192.168.7.217", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.218", new Account("192.168.7.218", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.235.219", new Account("192.168.7.219", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.214", new Account("192.168.7.214", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.215", new Account("192.168.7.215", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.216", new Account("192.168.7.216", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.217", new Account("192.168.7.217", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.218", new Account("192.168.7.218", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.115.219", new Account("192.168.7.219", "DDECAdmin", "kL5QLMRxMXzrV#", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.7.150", new Account("192.168.7.150", "T001084@DAEDUCK.COM", "daeduck!1", @"Vol2\EIS서버\"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.113.231", new Account("192.168.113.231", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.113.232", new Account("192.168.113.232", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.113.233", new Account("192.168.113.233", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.113.236", new Account("192.168.113.236", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.143.231", new Account("192.168.143.231", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.143.232", new Account("192.168.143.232", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.143.233", new Account("192.168.143.233", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.143.235", new Account("192.168.143.235", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.233.231", new Account("192.168.233.231", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.233.232", new Account("192.168.233.232", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.233.233", new Account("192.168.233.233", "test", "daeduck!1", @"EISLog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.113.231", new Account("192.168.113.231", "serviceadmin", "daeduck!1", @"d\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.113.232", new Account("192.168.113.232", "serviceadmin", "daeduck!1", @"d\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.113.233", new Account("192.168.113.233", "serviceadmin", "daeduck!1", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.113.236", new Account("192.168.113.236", "serviceadmin", "daeduck!1", @"d\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.143.231", new Account("192.168.143.231", "serviceadmin", "daeduck!1", @"d\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.143.232", new Account("192.168.143.232", "serviceadmin", "daeduck!1", @"d\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.143.233", new Account("192.168.143.233", "serviceadmin", "daeduck!1", @"d\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.143.235", new Account("192.168.143.235", "serviceadmin", "daeduck!1", @"d\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.233.231", new Account("192.168.233.231", "serviceadmin", "daeduck!1", @"d\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.233.232", new Account("192.168.233.232", "serviceadmin", "daeduck!1", @"e\EISLog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.233.233", new Account("192.168.233.233", "serviceadmin", "daeduck!1", @"d\EISLog\"));
|
|
|
|
|
|
|
|
|
|
logServer.FTPAddress = "192.168.7.208";
|
|
|
|
|
logServer.FTPPort = 7000;
|
|
|
|
|
@@ -943,9 +1050,9 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
logServer.DBGetEquipments = sbEquipments.ToString();
|
|
|
|
|
logServer.DBGetModelDetails = sbModelDetails.ToString();
|
|
|
|
|
logServer.DBGetModelInfo = sbModelInfo.ToString();
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.8.215", new Account("192.168.8.215", "test", "daeduck!1", @"eisap01_eislog\log"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.8.216", new Account("192.168.8.216", "test", "daeduck!1", "eisap02_eislog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.8.217", new Account("192.168.8.217", "test", "daeduck!1", "eisap03_eislog"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.8.215", new Account("192.168.8.215", "DDB2EISLOG", "SJwmseYUExFAP%^", @"eisap01_eislog\log\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.8.216", new Account("192.168.8.216", "DDB2EISLOG", "SJwmseYUExFAP%^", @"eisap02_eislog\"));
|
|
|
|
|
logServer.NetworkAccount.Add("192.168.8.217", new Account("192.168.8.217", "DDB2EISLOG", "SJwmseYUExFAP%^", @"eisap03_eislog\"));
|
|
|
|
|
logServer.FTPAddress = "192.168.8.217";
|
|
|
|
|
logServer.FTPPort = 21;
|
|
|
|
|
logServer.FTPUserID = "anonymous";
|
|
|
|
|
@@ -1133,6 +1240,9 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
return ((LogServer)this.cboxServer.SelectedItem)?.NetworkAccount[logserverIP];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// DB에서 GEM 정보 수집
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void GetGEMSetting()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
@@ -1160,6 +1270,10 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// MES DB에서 설비정보 수집
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private DataTable GetMesEquipment()
|
|
|
|
|
{
|
|
|
|
|
SqlConnection sqlConnection = null;
|
|
|
|
|
@@ -1230,6 +1344,78 @@ namespace DDUtilityApp.LOGPARSER
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sftp Log Files
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fileItems"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private LogFile[] GetLogFiles(object fileItems)
|
|
|
|
|
{
|
|
|
|
|
LogFile[] logFiles = ((List<ISftpFile>)fileItems).Where(item => !item.IsDirectory && item.Name != "." && item.Name != "..")
|
|
|
|
|
.Select(item => new LogFile
|
|
|
|
|
{
|
|
|
|
|
Name = Path.GetFileNameWithoutExtension(item.Name),
|
|
|
|
|
FullName = item.FullName,
|
|
|
|
|
Extension = Path.GetExtension(item.Name),
|
|
|
|
|
Length = item.Length,
|
|
|
|
|
CreationTime = item.LastAccessTime,
|
|
|
|
|
LastAccessTime = item.LastAccessTime,
|
|
|
|
|
LastWriteTime = item.LastWriteTime
|
|
|
|
|
})
|
|
|
|
|
.OrderByDescending(x => x.Name)
|
|
|
|
|
.ToArray();
|
|
|
|
|
|
|
|
|
|
return logFiles;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ftps Log Files
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fileItems"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private LogFile[] GetLogFiles(FtpListItem[] fileItems)
|
|
|
|
|
{
|
|
|
|
|
LogFile[] logFiles = fileItems.Where(item => item.Type == FtpFileSystemObjectType.File)
|
|
|
|
|
.Select(item => new LogFile
|
|
|
|
|
{
|
|
|
|
|
Name = Path.GetFileNameWithoutExtension(item.Name),
|
|
|
|
|
FullName = item.FullName,
|
|
|
|
|
Extension = Path.GetExtension(item.Name),
|
|
|
|
|
Length = item.Size,
|
|
|
|
|
CreationTime = item.Modified,
|
|
|
|
|
LastAccessTime = item.Modified,
|
|
|
|
|
LastWriteTime = item.Modified
|
|
|
|
|
})
|
|
|
|
|
.OrderByDescending(x => x.Name)
|
|
|
|
|
.ToArray();
|
|
|
|
|
|
|
|
|
|
return logFiles;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ftps Log Files jhlim 20250202
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fileItems"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private LogFile[] GetFtpslogFiles(object fileItems)
|
|
|
|
|
{
|
|
|
|
|
LogFile[] logFiles = ((FtpListItem[])fileItems).Where(item => item.Type == FtpFileSystemObjectType.File)
|
|
|
|
|
.Select(item => new LogFile
|
|
|
|
|
{
|
|
|
|
|
Name = Path.GetFileNameWithoutExtension(item.Name),
|
|
|
|
|
FullName = item.FullName,
|
|
|
|
|
Extension = Path.GetExtension(item.Name),
|
|
|
|
|
Length = item.Size,
|
|
|
|
|
CreationTime = item.Modified,
|
|
|
|
|
LastAccessTime = item.Modified,
|
|
|
|
|
LastWriteTime = item.Modified
|
|
|
|
|
})
|
|
|
|
|
.OrderByDescending(x => x.Name)
|
|
|
|
|
.ToArray();
|
|
|
|
|
|
|
|
|
|
return logFiles;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|