Merge branch '20250203_SFTP' of https://git.e1soft.co.kr/T001084/DDUtility into 20250203_SFTP
# Conflicts: # DDUtilityApp/Program.cs
This commit is contained in:
@@ -403,20 +403,6 @@
|
|||||||
<Compile Include="LOGPARSER\FrmEqSelector.Designer.cs">
|
<Compile Include="LOGPARSER\FrmEqSelector.Designer.cs">
|
||||||
<DependentUpon>FrmEqSelector.cs</DependentUpon>
|
<DependentUpon>FrmEqSelector.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="MESDOWNLOADER\ProgressForm.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="MESDOWNLOADER\ProgressForm.Designer.cs">
|
|
||||||
<DependentUpon>ProgressForm.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="MESDOWNLOADER\ServerLog.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="MESDOWNLOADER\ServerLog.Designer.cs">
|
|
||||||
<DependentUpon>ServerLog.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="MESDOWNLOADER\Utili.cs" />
|
|
||||||
<Compile Include="MESDOWNLOADER\XmlToDsConverter.cs" />
|
|
||||||
<Compile Include="MONGO\FDCMongoDB.cs" />
|
<Compile Include="MONGO\FDCMongoDB.cs" />
|
||||||
<Compile Include="MONGO\FrmFDCMongo.cs">
|
<Compile Include="MONGO\FrmFDCMongo.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
|
|||||||
7
DDUtilityApp/LOGPARSER/FrmEqSelector.Designer.cs
generated
7
DDUtilityApp/LOGPARSER/FrmEqSelector.Designer.cs
generated
@@ -240,9 +240,9 @@
|
|||||||
this.chkUseSMB.AutoSize = true;
|
this.chkUseSMB.AutoSize = true;
|
||||||
this.chkUseSMB.Location = new System.Drawing.Point(802, 6);
|
this.chkUseSMB.Location = new System.Drawing.Point(802, 6);
|
||||||
this.chkUseSMB.Name = "chkUseSMB";
|
this.chkUseSMB.Name = "chkUseSMB";
|
||||||
this.chkUseSMB.Size = new System.Drawing.Size(148, 16);
|
this.chkUseSMB.Size = new System.Drawing.Size(118, 16);
|
||||||
this.chkUseSMB.TabIndex = 5;
|
this.chkUseSMB.TabIndex = 5;
|
||||||
this.chkUseSMB.Text = "Use SMB(Only Local)";
|
this.chkUseSMB.Text = "Use SMB(Local)";
|
||||||
this.chkUseSMB.UseVisualStyleBackColor = true;
|
this.chkUseSMB.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// flowLayoutPanel1
|
// flowLayoutPanel1
|
||||||
@@ -548,7 +548,7 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
this.radStatusStrip1.RootElement.ControlBounds = new System.Drawing.Rectangle(0, 0, 300, 24);
|
this.radStatusStrip1.RootElement.ControlBounds = new System.Drawing.Rectangle(3, 574, 300, 24);
|
||||||
this.radStatusStrip1.RootElement.StretchVertically = true;
|
this.radStatusStrip1.RootElement.StretchVertically = true;
|
||||||
this.radStatusStrip1.Size = new System.Drawing.Size(1014, 26);
|
this.radStatusStrip1.Size = new System.Drawing.Size(1014, 26);
|
||||||
this.radStatusStrip1.TabIndex = 1;
|
this.radStatusStrip1.TabIndex = 1;
|
||||||
@@ -556,7 +556,6 @@
|
|||||||
// rstatus1
|
// rstatus1
|
||||||
//
|
//
|
||||||
this.rstatus1.Name = "rstatus1";
|
this.rstatus1.Name = "rstatus1";
|
||||||
this.radStatusStrip1.SetSpring(this.rstatus1, false);
|
|
||||||
this.rstatus1.Text = "";
|
this.rstatus1.Text = "";
|
||||||
this.rstatus1.TextWrap = true;
|
this.rstatus1.TextWrap = true;
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -2,10 +2,12 @@
|
|||||||
using DDUtilityApp.LOGPARSER.DATA;
|
using DDUtilityApp.LOGPARSER.DATA;
|
||||||
using DDUtilityApp.SECS;
|
using DDUtilityApp.SECS;
|
||||||
using FluentFTP;
|
using FluentFTP;
|
||||||
|
using FluentFTP.Helpers;
|
||||||
using JWH;
|
using JWH;
|
||||||
using JWH.CONTROL;
|
using JWH.CONTROL;
|
||||||
using JWH.DATA;
|
using JWH.DATA;
|
||||||
using JWH.NETWORK;
|
using JWH.NETWORK;
|
||||||
|
using Org.BouncyCastle.Tls.Crypto;
|
||||||
using Renci.SshNet.Sftp;
|
using Renci.SshNet.Sftp;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -221,7 +223,7 @@ namespace DDUtilityApp.LOGPARSER
|
|||||||
if (grid != null)
|
if (grid != null)
|
||||||
{
|
{
|
||||||
//grid.AutoBinding(GetSftplogFiles(rtnObj));
|
//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("PMDate", "PM Date");
|
||||||
dicColumnText.Add("PlcType", "PLC Type");
|
dicColumnText.Add("PlcType", "PLC Type");
|
||||||
|
|
||||||
|
#region [저장된 컬럼순서 적용]
|
||||||
string columnNames = GlobalVariable.Instance.FrmEqSelector_GridEquipmentHeader;
|
string columnNames = GlobalVariable.Instance.FrmEqSelector_GridEquipmentHeader;
|
||||||
string columnText = string.Empty;
|
string columnText = string.Empty;
|
||||||
if (string.IsNullOrEmpty(columnNames) == false)
|
if (string.IsNullOrEmpty(columnNames) == false)
|
||||||
@@ -352,9 +355,10 @@ namespace DDUtilityApp.LOGPARSER
|
|||||||
if (string.IsNullOrEmpty(dicColumnText[columnName]) == false) columnText = dicColumnText[columnName];
|
if (string.IsNullOrEmpty(dicColumnText[columnName]) == false) columnText = dicColumnText[columnName];
|
||||||
grid.AddColumn(columnName, columnText).IsVisible = false;
|
grid.AddColumn(columnName, columnText).IsVisible = false;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
grid.AddContextMenu("");
|
grid.AddContextMenu("");
|
||||||
grid.AddContextMenu("Open Windows", GridEquipments_OpenWindows);
|
grid.AddContextMenu("Open Windows", this.GridEquipments_OpenWindows);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -403,6 +407,147 @@ namespace DDUtilityApp.LOGPARSER
|
|||||||
}
|
}
|
||||||
#endregion
|
#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 ]
|
#region [ LogFiles ]
|
||||||
if (logServer.NetworkAccount.ContainsKey(equipment.LogServerIP)) //jhlim 20250202 jj
|
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);
|
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
|
try
|
||||||
{
|
{
|
||||||
if (this.gridEquipments.SelectedRows.Count < 1) return;
|
if (this.gridEquipments.SelectedRows.Count < 1) return;
|
||||||
string serverID = this.cboxServer.Text;
|
string serverID = this.cboxServer.Text;
|
||||||
string equipmentID = this.gridEquipments.SelectedRows[0].Cells["EquipmentID"].Value.ToString();
|
string equipmentID = this.gridEquipments.SelectedRows[0].Cells["EquipmentID"].Value.ToString();
|
||||||
|
//this.gridLogFiles.SelectedRows;
|
||||||
|
|
||||||
ProcessStartInfo processStartInfo = new ProcessStartInfo();
|
ProcessStartInfo processStartInfo = new ProcessStartInfo();
|
||||||
processStartInfo.FileName = Application.ExecutablePath;
|
processStartInfo.FileName = Application.ExecutablePath;
|
||||||
@@ -638,29 +784,9 @@ namespace DDUtilityApp.LOGPARSER
|
|||||||
if (e.KeyCode == Keys.Enter) this.BtnOK_Click(this.btnOK, null);
|
if (e.KeyCode == Keys.Enter) this.BtnOK_Click(this.btnOK, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GridEquipments_OpenWindows(object sender, params object[] args)
|
#endregion
|
||||||
{
|
|
||||||
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();
|
#region [ Grid Worflow & HSMS ] ----------------------------------------------
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Workflow, HSMS 파일목록 Grid
|
/// Workflow, HSMS 파일목록 Grid
|
||||||
@@ -686,6 +812,7 @@ namespace DDUtilityApp.LOGPARSER
|
|||||||
((GridDataCellElement)sender)?.RowElement?.GridControl : (GridViewEx)sender;
|
((GridDataCellElement)sender)?.RowElement?.GridControl : (GridViewEx)sender;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
List<string> downfiles = new List<string>();
|
||||||
foreach (GridViewRowInfo row in gd.SelectedRows)
|
foreach (GridViewRowInfo row in gd.SelectedRows)
|
||||||
{
|
{
|
||||||
LogFile item = row.DataBoundItem as LogFile;
|
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);
|
if (System.IO.Directory.Exists(destPath) == false) System.IO.Directory.CreateDirectory(destPath);
|
||||||
string destFileName = $@"{destPath}{System.IO.Path.GetFileName(fullPath)}";
|
string destFileName = $@"{destPath}{System.IO.Path.GetFileName(fullPath)}";
|
||||||
FtpsClient.DownloadFtpsFile(fullPath, destFileName);
|
FtpsClient.DownloadFtpsFile(fullPath, destFileName);
|
||||||
|
downfiles.Add(destFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageBox.Show($"{gd.SelectedRows.Count}개의 파일을 저장하였습니다.");
|
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)
|
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
|
#endregion
|
||||||
|
|
||||||
#region [ GridModelDetail ] -------------------------------------------
|
#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
|
#endregion
|
||||||
|
|
||||||
#region [ Method ] ----------------------------------------------------
|
#region [ Method ] ----------------------------------------------------
|
||||||
@@ -895,38 +1003,37 @@ namespace DDUtilityApp.LOGPARSER
|
|||||||
logServer.DBGetModelDetails = sbModelDetails.ToString();
|
logServer.DBGetModelDetails = sbModelDetails.ToString();
|
||||||
logServer.DBGetModelInfo = sbModelInfo.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.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"));
|
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", "test", "daeduck!1", @"EISLog"));
|
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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"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", "test", "daeduck!1", @"EIS서버"));
|
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", "serviceadmin", "daeduck!1", @"d\EISLog\"));
|
||||||
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", "serviceadmin", "daeduck!1", @"d\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", "serviceadmin", "daeduck!1", @"e\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", "serviceadmin", "daeduck!1", @"d\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", "serviceadmin", "daeduck!1", @"d\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", "serviceadmin", "daeduck!1", @"d\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", "serviceadmin", "daeduck!1", @"d\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", "serviceadmin", "daeduck!1", @"d\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", "serviceadmin", "daeduck!1", @"d\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", "serviceadmin", "daeduck!1", @"e\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", "serviceadmin", "daeduck!1", @"d\EISLog\"));
|
||||||
logServer.NetworkAccount.Add("192.168.233.233", new Account("192.168.233.233", "test", "daeduck!1", @"EISLog"));
|
|
||||||
|
|
||||||
logServer.FTPAddress = "192.168.7.208";
|
logServer.FTPAddress = "192.168.7.208";
|
||||||
logServer.FTPPort = 7000;
|
logServer.FTPPort = 7000;
|
||||||
@@ -943,9 +1050,9 @@ namespace DDUtilityApp.LOGPARSER
|
|||||||
logServer.DBGetEquipments = sbEquipments.ToString();
|
logServer.DBGetEquipments = sbEquipments.ToString();
|
||||||
logServer.DBGetModelDetails = sbModelDetails.ToString();
|
logServer.DBGetModelDetails = sbModelDetails.ToString();
|
||||||
logServer.DBGetModelInfo = sbModelInfo.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.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", "test", "daeduck!1", "eisap02_eislog"));
|
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", "test", "daeduck!1", "eisap03_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.FTPAddress = "192.168.8.217";
|
||||||
logServer.FTPPort = 21;
|
logServer.FTPPort = 21;
|
||||||
logServer.FTPUserID = "anonymous";
|
logServer.FTPUserID = "anonymous";
|
||||||
@@ -1133,6 +1240,9 @@ namespace DDUtilityApp.LOGPARSER
|
|||||||
return ((LogServer)this.cboxServer.SelectedItem)?.NetworkAccount[logserverIP];
|
return ((LogServer)this.cboxServer.SelectedItem)?.NetworkAccount[logserverIP];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DB에서 GEM 정보 수집
|
||||||
|
/// </summary>
|
||||||
private void GetGEMSetting()
|
private void GetGEMSetting()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -1160,6 +1270,10 @@ namespace DDUtilityApp.LOGPARSER
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MES DB에서 설비정보 수집
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
private DataTable GetMesEquipment()
|
private DataTable GetMesEquipment()
|
||||||
{
|
{
|
||||||
SqlConnection sqlConnection = null;
|
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
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ namespace DDUtilityApp.DATA
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public Account(string ipAddress, string uid, string pwd, string defaultPath = "", AccessType access = AccessType.FTPS)
|
public Account(string ipAddress, string uid, string pwd, string defaultPath = "", AccessType access = AccessType.SMB)
|
||||||
{
|
{
|
||||||
this.IPAddress = ipAddress;
|
this.IPAddress = ipAddress;
|
||||||
this.UserID = uid;
|
this.UserID = uid;
|
||||||
|
|||||||
@@ -70,15 +70,14 @@ namespace DDUtilityApp
|
|||||||
|
|
||||||
#region [ 버튼 생성 정보 ]
|
#region [ 버튼 생성 정보 ]
|
||||||
frmMain.Buttons.Add("EIS Log Viewer", new EisParser0());
|
frmMain.Buttons.Add("EIS Log Viewer", new EisParser0());
|
||||||
frmMain.Buttons.Add("MES Log Download", typeof(MESDOWNLOADER.ServerLog)); // 위치
|
frmMain.Buttons.Add("MES Log Download", typeof(SPECDOCUMENT.FrmSpecDocument));
|
||||||
frmMain.Buttons.Add("MIS Log Viewer", new AgvParser()); // 제거
|
//frmMain.Buttons.Add("MIS Log Viewer", new AgvParser()); // 제거
|
||||||
frmMain.Buttons.Add("FDC Mongo Viewer", typeof(MONGO.FrmFDCMongo));
|
frmMain.Buttons.Add("FDC Mongo Viewer", typeof(MONGO.FrmFDCMongo));
|
||||||
frmMain.Buttons.Add("TIB Simulator", typeof(TIBRENDEZVOUS.FrmSimulator01));
|
|
||||||
frmMain.Buttons.Add("HSMS Converter", typeof(LOGPARSER.FrmHsmsViewer));
|
frmMain.Buttons.Add("HSMS Converter", typeof(LOGPARSER.FrmHsmsViewer));
|
||||||
|
frmMain.Buttons.Add("TIB Simulator", typeof(TIBRENDEZVOUS.FrmSimulator01));
|
||||||
frmMain.Buttons.Add("TibcoConfig.Xml", typeof(ETC.FrmTIbcoConfig));
|
frmMain.Buttons.Add("TibcoConfig.Xml", typeof(ETC.FrmTIbcoConfig));
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
frmMain.Buttons.Add("FTP Test", typeof(SPECDOCUMENT.FrmSpecDocument));
|
frmMain.Buttons.Add("FTP Test", typeof(SPECDOCUMENT.FrmSpecDocument));
|
||||||
// frmMain.Buttons.Add("MES Log Download", typeof(MESDOWNLOADER.ServerLog));
|
|
||||||
#endif
|
#endif
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -89,7 +88,7 @@ namespace DDUtilityApp
|
|||||||
if (frmMain.SelectedObject is Type)
|
if (frmMain.SelectedObject is Type)
|
||||||
{
|
{
|
||||||
Type frmType = frmMain.SelectedObject as Type;
|
Type frmType = frmMain.SelectedObject as Type;
|
||||||
// 관리자 권한으로 실행
|
// 목록에 등록된 클래스는 관리자 권한으로 실행
|
||||||
if (new string[] { "FRMTIBCOCONFIG" }.Contains(frmType.Name.ToUpper()))
|
if (new string[] { "FRMTIBCOCONFIG" }.Contains(frmType.Name.ToUpper()))
|
||||||
{
|
{
|
||||||
if (IsAdministrator() == false)
|
if (IsAdministrator() == false)
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
|
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
|
||||||
// 지정되도록 할 수 있습니다.
|
// 지정되도록 할 수 있습니다.
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2025.01.07.0")]
|
[assembly: AssemblyVersion("2025.02.28.0")]
|
||||||
[assembly: AssemblyFileVersion("2025.01.07.0")]
|
[assembly: AssemblyFileVersion("2025.02.28.0")]
|
||||||
|
|||||||
Reference in New Issue
Block a user