// octopusIDSelector1\r
// \r
this.octopusIDSelector1.BackColor = System.Drawing.Color.White;\r
- this.octopusIDSelector1.ErrorReporter = null;\r
this.octopusIDSelector1.IDChangedEvent = null;\r
this.octopusIDSelector1.Location = new System.Drawing.Point(7, 8);\r
this.octopusIDSelector1.Margin = new System.Windows.Forms.Padding(10);\r
this.settings = settings;\r
this.mainForm = mainForm;\r
octopusIDSelector1.IDChangedEvent = IdChangedEvent;\r
- octopusIDSelector1.Configuration = new OctopusConfiguration() { Address = settings.getAddress(), Password = settings.getPassword(), UserName = settings.getUserName(), Timeout = settings.getTimeout() };\r
+ octopusIDSelector1.Configuration = new OctopusConfiguration() {\r
+ Address = settings.getAddress(),\r
+ Password = settings.getPassword(),\r
+ UserName = settings.getUserName(),\r
+ Timeout = settings.getTimeout()\r
+ };\r
}\r
\r
private void IdChangedEvent(string id, string name) {\r
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
</PropertyGroup>\r
<ItemGroup>\r
+ <Reference Include="LinkDotNet.MessageHandling.Contracts, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">\r
+ <HintPath>..\packages\LinkDotNet.MessageBus.Contracts.0.1.1\lib\LinkDotNet.MessageHandling.Contracts.dll</HintPath>\r
+ </Reference>\r
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">\r
<HintPath>..\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>\r
</Reference>\r
using Microsoft.VisualStudio.TestTools.UnitTesting;\r
-using JobEngineClient;\r
+using MediaCubeClient;\r
using System.Net;\r
using Model;\r
using System;\r
\r
[TestMethod]\r
public void TestCreate() {\r
- MediaCubeApi client = new MediaCubeApi("http://localhost:8080/services/rest/jobengine/", null, null, 100);\r
+ MediaCubeApi client = new MediaCubeApi("http://localhost:8080/services/rest/jobengine/", null, null, 100, null);\r
\r
WorkflowAction item = new WorkflowAction();\r
item.description = "description";\r
\r
[TestMethod]\r
public void TestCreateMasterId() {\r
- MediaCubeApi client = new MediaCubeApi("http://10.10.1.28/services/rest/jobengine/", null, null, 100);\r
+ MediaCubeApi client = new MediaCubeApi("http://10.10.1.28/services/rest/jobengine/", null, null, 100, null);\r
MasterId masterId = client.Create<MasterId>(new MasterId());\r
Assert.IsTrue(masterId.id > 0);\r
}\r
\r
[TestMethod]\r
public void TestCreateMany() {\r
- MediaCubeApi client = new MediaCubeApi("http://localhost:8080/services/rest/jobengine/", null, null, 100);\r
+ MediaCubeApi client = new MediaCubeApi("http://localhost:8080/services/rest/jobengine/", null, null, 100, null);\r
\r
for (int i = 0; i < 10; i++) {\r
WorkflowAction item = new WorkflowAction();\r
\r
[TestMethod]\r
public void TestItem() {\r
- MediaCubeApi client = new MediaCubeApi("http://localhost:8080/services/rest/jobengine/", null, null, 100);\r
+ MediaCubeApi client = new MediaCubeApi("http://localhost:8080/services/rest/jobengine/", null, null, 100, null);\r
client.Item();\r
}\r
\r
[TestMethod]\r
public void TestNotify() {\r
- MediaCubeApi client = new MediaCubeApi("http://localhost:8080/services/rest/jobengine/", null, null, 100);\r
+ MediaCubeApi client = new MediaCubeApi("http://localhost:8080/services/rest/jobengine/", null, null, 100, null);\r
client.Notify("vasay@elgekko.net", "Újravágást kérek!");\r
}\r
\r
testRegex("44444S", exp, false);\r
}\r
\r
+ [TestMethod]\r
+ public void TestOctopusPlaceholderRegex() {\r
+ const string exp = "^[0-9]+_[0-9]+$";\r
+ testRegex("1111_1", exp, true);\r
+ testRegex("11112222_1222", exp, true);\r
+ testRegex("1111_1.", exp, false);\r
+ testRegex("11111", exp, false);\r
+ }\r
+\r
+ [TestMethod]\r
+ public void TestOctopusPlaceholderVersionedRegex() {\r
+ const string exp = "^[0-9]+_[0-9]+-[0-9]{3}$";\r
+ testRegex("1111_1-111", exp, true);\r
+ testRegex("11112222_1222-121", exp, true);\r
+ testRegex("1111_1-1111", exp, false);\r
+ testRegex("1111_1.-11", exp, false);\r
+ testRegex("11111", exp, false);\r
+ }\r
+\r
[TestMethod]\r
public void TestFTPTarget() {\r
Target configuration = new Target() {\r
[TestMethod]\r
public void GetSegmentReadyTest() {\r
//Exercise\r
- List<Segment> actual = sut.GetBroadcastSegments(ITEM_ID);\r
+ List<Segment> actual = sut.GetMaterialSegments(ITEM_ID);\r
\r
//Verify\r
Assert.IsTrue(actual.Count > 0);\r
}\r
\r
- [TestMethod]\r
- public void AddSegmentToKopiaTest() {\r
- //Fixture\r
- Segment segment = new Segment() { Comment = "Test", Optional = true, TCIn = 1000, TCOut = 2000 };\r
-\r
- //Fixture\r
- sut.AddSegmentToCopia(ITEM_ID, segment);\r
- }\r
-\r
- [TestMethod]\r
- public void DeletesegmentsTest() {\r
-\r
- //Exercise\r
- sut.DeleteSegments(ITEM_ID);\r
- }\r
-\r
- [TestMethod]\r
- public void DeleteSegmentTest() {\r
- //Fixture\r
- const int segmentID = 82454;\r
-\r
- //Exercise\r
- sut.DeleteSegment(ITEM_ID, segmentID);\r
- }\r
-\r
[TestMethod]\r
public void SearchPromotionalsTest() {\r
//Fixture\r
<?xml version="1.0" encoding="utf-8"?>\r
<packages>\r
+ <package id="LinkDotNet.MessageBus.Contracts" version="0.1.1" targetFramework="net461" />\r
<package id="MongoDB.Bson" version="2.4.4" targetFramework="net461" />\r
<package id="MongoDB.Driver" version="2.4.4" targetFramework="net461" />\r
<package id="MongoDB.Driver.Core" version="2.4.4" targetFramework="net461" />\r
model.mediaHouseId = textBox_mediaID.Text;\r
model.mediaTitle = textBox_mediaTitle.Text;\r
model.mediaDescription = textBox_mediaDescription.Text;\r
+ DialogResult = DialogResult.OK;\r
Close();\r
}\r
\r
private void OnCancelClick(object sender, System.EventArgs e) {\r
+ DialogResult = DialogResult.Cancel;\r
Close();\r
}\r
}\r
\r
{\r
"title": "Szerkesztő",\r
- "active": true,\r
+ "active": false,\r
"startInTray": false,\r
"enableCustomMetadataId": true,\r
"player": {\r
"tag": "Betöltés",\r
"nexioServer": true,\r
"killDateDays": 7,\r
+ "disableFileVersioning": true,\r
"agency": "MAESTRO-EDITOR",\r
"reference": "Hír nyersanyag betöltés",\r
"remote": {\r
- "address": "ftp://10.10.1.56:2098",\r
+ "address": "ftp://10.10.1.55:2098",\r
"userName": "administrator",\r
"password": "+QtkeQdCTiOvZOgK/kUND4pO4/D+//r7ZIyluwMMdiqMEgO8iJErAG10ooWhPfiljQeXrdeyMzo7gWEZtcWpNSomGeDIbdMyQwtpqmMo1VEM3A27ZfzigY09YD46ECRh",\r
"timeout": 1000\r
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();\r
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();\r
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();\r
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();\r
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();\r
this.groupSource = new System.Windows.Forms.GroupBox();\r
this.dataGridSource = new System.Windows.Forms.DataGridView();\r
this.bindingSource = new System.Windows.Forms.BindingSource(this.components);\r
this.textSelectedSource = new System.Windows.Forms.TextBox();\r
this.label1 = new System.Windows.Forms.Label();\r
this.buttonMetadata = new System.Windows.Forms.Button();\r
- this.panel2 = new System.Windows.Forms.Panel();\r
- this.buttonDeleteFilter = new System.Windows.Forms.Button();\r
- this.txtSorceFilter = new System.Windows.Forms.TextBox();\r
this.lbSourceTitle = new System.Windows.Forms.Label();\r
this.ctxmActions = new System.Windows.Forms.ContextMenuStrip(this.components);\r
this.ctxiDefineSegments = new System.Windows.Forms.ToolStripMenuItem();\r
this.btnExecute = new System.Windows.Forms.Button();\r
this.splitContainer2 = new System.Windows.Forms.SplitContainer();\r
this.groupActions = new System.Windows.Forms.GroupBox();\r
- this.tabControl2 = new System.Windows.Forms.TabControl();\r
+ this.tabSystem = new System.Windows.Forms.TabControl();\r
this.tabPage1 = new System.Windows.Forms.TabPage();\r
this.dataGridJobs = new System.Windows.Forms.DataGridView();\r
this.columnLabel = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
this.bindingSourceJobs = new System.Windows.Forms.BindingSource(this.components);\r
this.tabPage2 = new System.Windows.Forms.TabPage();\r
this.dataGridMessages = new System.Windows.Forms.DataGridView();\r
- this.timeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
- this.Level = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
- this.messageDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
+ this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
+ this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
this.systemMessageBindingSource = new System.Windows.Forms.BindingSource(this.components);\r
this.metadataInfoBindingSource = new System.Windows.Forms.BindingSource(this.components);\r
+ this.timeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
+ this.messageDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
this.groupSource.SuspendLayout();\r
((System.ComponentModel.ISupportInitialize)(this.dataGridSource)).BeginInit();\r
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit();\r
this.tableLayoutPanel2.SuspendLayout();\r
- this.panel2.SuspendLayout();\r
this.ctxmActions.SuspendLayout();\r
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();\r
this.splitContainer1.Panel1.SuspendLayout();\r
this.splitContainer2.Panel2.SuspendLayout();\r
this.splitContainer2.SuspendLayout();\r
this.groupActions.SuspendLayout();\r
- this.tabControl2.SuspendLayout();\r
+ this.tabSystem.SuspendLayout();\r
this.tabPage1.SuspendLayout();\r
((System.ComponentModel.ISupportInitialize)(this.dataGridJobs)).BeginInit();\r
((System.ComponentModel.ISupportInitialize)(this.bindingSourceJobs)).BeginInit();\r
this.groupSource.BackColor = System.Drawing.Color.Transparent;\r
this.groupSource.Controls.Add(this.dataGridSource);\r
this.groupSource.Controls.Add(this.tableLayoutPanel2);\r
- this.groupSource.Controls.Add(this.panel2);\r
this.groupSource.Controls.Add(this.lbSourceTitle);\r
this.groupSource.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.groupSource.Location = new System.Drawing.Point(0, 0);\r
this.groupSource.Name = "groupSource";\r
this.groupSource.Padding = new System.Windows.Forms.Padding(10);\r
- this.groupSource.Size = new System.Drawing.Size(414, 471);\r
+ this.groupSource.Size = new System.Drawing.Size(367, 471);\r
this.groupSource.TabIndex = 0;\r
this.groupSource.TabStop = false;\r
this.groupSource.Text = "Source file";\r
this.dataGridSource.DefaultCellStyle = dataGridViewCellStyle2;\r
this.dataGridSource.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.dataGridSource.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;\r
- this.dataGridSource.Location = new System.Drawing.Point(10, 56);\r
+ this.dataGridSource.EnableHeadersVisualStyles = false;\r
+ this.dataGridSource.Location = new System.Drawing.Point(10, 36);\r
this.dataGridSource.Name = "dataGridSource";\r
this.dataGridSource.RowHeadersVisible = false;\r
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
this.dataGridSource.RowsDefaultCellStyle = dataGridViewCellStyle3;\r
this.dataGridSource.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
this.dataGridSource.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
- this.dataGridSource.Size = new System.Drawing.Size(394, 343);\r
+ this.dataGridSource.Size = new System.Drawing.Size(347, 363);\r
this.dataGridSource.TabIndex = 0;\r
this.dataGridSource.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.sourceGridView_CellContentClick);\r
this.dataGridSource.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridSource_CellEnter);\r
this.tableLayoutPanel2.RowCount = 2;\r
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
- this.tableLayoutPanel2.Size = new System.Drawing.Size(394, 62);\r
+ this.tableLayoutPanel2.Size = new System.Drawing.Size(347, 62);\r
this.tableLayoutPanel2.TabIndex = 12;\r
// \r
// textSelectedSource\r
this.textSelectedSource.Location = new System.Drawing.Point(3, 28);\r
this.textSelectedSource.Name = "textSelectedSource";\r
this.textSelectedSource.ReadOnly = true;\r
- this.textSelectedSource.Size = new System.Drawing.Size(292, 26);\r
+ this.textSelectedSource.Size = new System.Drawing.Size(245, 26);\r
this.textSelectedSource.TabIndex = 10;\r
// \r
// label1\r
this.label1.Location = new System.Drawing.Point(3, 0);\r
this.label1.Name = "label1";\r
this.label1.Padding = new System.Windows.Forms.Padding(0, 5, 0, 5);\r
- this.label1.Size = new System.Drawing.Size(388, 25);\r
+ this.label1.Size = new System.Drawing.Size(341, 25);\r
this.label1.TabIndex = 13;\r
this.label1.Text = "Selected source";\r
// \r
this.buttonMetadata.Enabled = false;\r
this.buttonMetadata.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
this.buttonMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);\r
- this.buttonMetadata.Location = new System.Drawing.Point(301, 28);\r
+ this.buttonMetadata.Location = new System.Drawing.Point(254, 28);\r
this.buttonMetadata.Name = "buttonMetadata";\r
this.buttonMetadata.Size = new System.Drawing.Size(90, 26);\r
this.buttonMetadata.TabIndex = 14;\r
this.buttonMetadata.UseVisualStyleBackColor = false;\r
this.buttonMetadata.Click += new System.EventHandler(this.buttonMetadata_Click);\r
// \r
- // panel2\r
- // \r
- this.panel2.Controls.Add(this.buttonDeleteFilter);\r
- this.panel2.Controls.Add(this.txtSorceFilter);\r
- this.panel2.Dock = System.Windows.Forms.DockStyle.Top;\r
- this.panel2.Location = new System.Drawing.Point(10, 36);\r
- this.panel2.Name = "panel2";\r
- this.panel2.Size = new System.Drawing.Size(394, 20);\r
- this.panel2.TabIndex = 14;\r
- // \r
- // buttonDeleteFilter\r
- // \r
- this.buttonDeleteFilter.Dock = System.Windows.Forms.DockStyle.Right;\r
- this.buttonDeleteFilter.Location = new System.Drawing.Point(374, 0);\r
- this.buttonDeleteFilter.Name = "buttonDeleteFilter";\r
- this.buttonDeleteFilter.Size = new System.Drawing.Size(20, 20);\r
- this.buttonDeleteFilter.TabIndex = 3;\r
- this.buttonDeleteFilter.Text = "button1";\r
- this.buttonDeleteFilter.UseVisualStyleBackColor = true;\r
- this.buttonDeleteFilter.Visible = false;\r
- this.buttonDeleteFilter.Click += new System.EventHandler(this.buttonDeleteFilter_Click);\r
- // \r
- // txtSorceFilter\r
- // \r
- this.txtSorceFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
- this.txtSorceFilter.Dock = System.Windows.Forms.DockStyle.Fill;\r
- this.txtSorceFilter.Location = new System.Drawing.Point(0, 0);\r
- this.txtSorceFilter.Name = "txtSorceFilter";\r
- this.txtSorceFilter.Size = new System.Drawing.Size(394, 20);\r
- this.txtSorceFilter.TabIndex = 13;\r
- this.txtSorceFilter.Visible = false;\r
- this.txtSorceFilter.KeyUp += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyUp);\r
- // \r
// lbSourceTitle\r
// \r
this.lbSourceTitle.Dock = System.Windows.Forms.DockStyle.Top;\r
this.lbSourceTitle.Location = new System.Drawing.Point(10, 23);\r
this.lbSourceTitle.Name = "lbSourceTitle";\r
- this.lbSourceTitle.Size = new System.Drawing.Size(394, 13);\r
+ this.lbSourceTitle.Size = new System.Drawing.Size(347, 13);\r
this.lbSourceTitle.TabIndex = 15;\r
this.lbSourceTitle.Text = "source";\r
// \r
// \r
this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);\r
this.splitContainer1.Size = new System.Drawing.Size(1022, 471);\r
- this.splitContainer1.SplitterDistance = 414;\r
+ this.splitContainer1.SplitterDistance = 367;\r
this.splitContainer1.TabIndex = 1;\r
// \r
// splitContainer3\r
// splitContainer3.Panel2\r
// \r
this.splitContainer3.Panel2.Controls.Add(this.groupTarget);\r
- this.splitContainer3.Size = new System.Drawing.Size(604, 471);\r
- this.splitContainer3.SplitterDistance = 284;\r
+ this.splitContainer3.Size = new System.Drawing.Size(651, 471);\r
+ this.splitContainer3.SplitterDistance = 306;\r
this.splitContainer3.TabIndex = 2;\r
// \r
// groupMetadata\r
this.groupMetadata.Location = new System.Drawing.Point(0, 0);\r
this.groupMetadata.Name = "groupMetadata";\r
this.groupMetadata.Padding = new System.Windows.Forms.Padding(10);\r
- this.groupMetadata.Size = new System.Drawing.Size(284, 471);\r
+ this.groupMetadata.Size = new System.Drawing.Size(306, 471);\r
this.groupMetadata.TabIndex = 1;\r
this.groupMetadata.TabStop = false;\r
this.groupMetadata.Text = "Metadata";\r
this.tabControl1.Location = new System.Drawing.Point(10, 23);\r
this.tabControl1.Name = "tabControl1";\r
this.tabControl1.SelectedIndex = 0;\r
- this.tabControl1.Size = new System.Drawing.Size(264, 376);\r
+ this.tabControl1.Size = new System.Drawing.Size(286, 376);\r
this.tabControl1.TabIndex = 1;\r
// \r
// tpOctopus\r
this.tpOctopus.Location = new System.Drawing.Point(4, 24);\r
this.tpOctopus.Name = "tpOctopus";\r
this.tpOctopus.Padding = new System.Windows.Forms.Padding(3);\r
- this.tpOctopus.Size = new System.Drawing.Size(256, 348);\r
+ this.tpOctopus.Size = new System.Drawing.Size(278, 348);\r
this.tpOctopus.TabIndex = 0;\r
this.tpOctopus.Text = "Octopus";\r
this.tpOctopus.UseVisualStyleBackColor = true;\r
// \r
this.octopusIDSelector.BackColor = System.Drawing.Color.White;\r
this.octopusIDSelector.Dock = System.Windows.Forms.DockStyle.Fill;\r
- this.octopusIDSelector.ErrorReporter = null;\r
this.octopusIDSelector.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
this.octopusIDSelector.IDChangedEvent = null;\r
this.octopusIDSelector.Location = new System.Drawing.Point(3, 3);\r
this.octopusIDSelector.MinimumSize = new System.Drawing.Size(200, 300);\r
this.octopusIDSelector.Name = "octopusIDSelector";\r
this.octopusIDSelector.Padding = new System.Windows.Forms.Padding(6);\r
- this.octopusIDSelector.Size = new System.Drawing.Size(250, 342);\r
+ this.octopusIDSelector.Size = new System.Drawing.Size(272, 342);\r
this.octopusIDSelector.TabIndex = 1;\r
// \r
// tpTraffic\r
this.tpTraffic.Location = new System.Drawing.Point(4, 24);\r
this.tpTraffic.Name = "tpTraffic";\r
this.tpTraffic.Padding = new System.Windows.Forms.Padding(3);\r
- this.tpTraffic.Size = new System.Drawing.Size(256, 348);\r
+ this.tpTraffic.Size = new System.Drawing.Size(278, 348);\r
this.tpTraffic.TabIndex = 1;\r
this.tpTraffic.Text = "Traffic";\r
this.tpTraffic.UseVisualStyleBackColor = true;\r
this.trafficIDSelector.AutoSize = true;\r
this.trafficIDSelector.BackColor = System.Drawing.Color.White;\r
this.trafficIDSelector.Dock = System.Windows.Forms.DockStyle.Fill;\r
- this.trafficIDSelector.ErrorReporter = null;\r
this.trafficIDSelector.IDChangedEvent = null;\r
this.trafficIDSelector.Location = new System.Drawing.Point(3, 3);\r
this.trafficIDSelector.Margin = new System.Windows.Forms.Padding(4);\r
this.trafficIDSelector.Name = "trafficIDSelector";\r
this.trafficIDSelector.Padding = new System.Windows.Forms.Padding(6);\r
- this.trafficIDSelector.Size = new System.Drawing.Size(250, 342);\r
+ this.trafficIDSelector.Size = new System.Drawing.Size(272, 342);\r
this.trafficIDSelector.TabIndex = 0;\r
// \r
// tableLayoutPanel1\r
this.tableLayoutPanel1.RowCount = 2;\r
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
- this.tableLayoutPanel1.Size = new System.Drawing.Size(264, 62);\r
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(286, 62);\r
this.tableLayoutPanel1.TabIndex = 4;\r
// \r
// labelSelectedMetadata\r
this.labelSelectedMetadata.Location = new System.Drawing.Point(3, 0);\r
this.labelSelectedMetadata.Name = "labelSelectedMetadata";\r
this.labelSelectedMetadata.Padding = new System.Windows.Forms.Padding(0, 5, 0, 5);\r
- this.labelSelectedMetadata.Size = new System.Drawing.Size(258, 25);\r
+ this.labelSelectedMetadata.Size = new System.Drawing.Size(280, 25);\r
this.labelSelectedMetadata.TabIndex = 13;\r
this.labelSelectedMetadata.Text = "Selected metadata";\r
// \r
this.textSelectedMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
this.textSelectedMetadata.Location = new System.Drawing.Point(3, 28);\r
this.textSelectedMetadata.Name = "textSelectedMetadata";\r
- this.textSelectedMetadata.Size = new System.Drawing.Size(162, 26);\r
+ this.textSelectedMetadata.Size = new System.Drawing.Size(184, 26);\r
this.textSelectedMetadata.TabIndex = 12;\r
this.textSelectedMetadata.TextChanged += new System.EventHandler(this.OnMetadataIDChanged);\r
// \r
this.menuButtonActions.Dock = System.Windows.Forms.DockStyle.Top;\r
this.menuButtonActions.FlatStyle = System.Windows.Forms.FlatStyle.Popup;\r
this.menuButtonActions.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- this.menuButtonActions.Location = new System.Drawing.Point(171, 28);\r
+ this.menuButtonActions.Location = new System.Drawing.Point(193, 28);\r
this.menuButtonActions.Menu = this.ctxmActions;\r
this.menuButtonActions.Name = "menuButtonActions";\r
this.menuButtonActions.Size = new System.Drawing.Size(90, 27);\r
this.groupTarget.Location = new System.Drawing.Point(0, 0);\r
this.groupTarget.Name = "groupTarget";\r
this.groupTarget.Padding = new System.Windows.Forms.Padding(10);\r
- this.groupTarget.Size = new System.Drawing.Size(316, 471);\r
+ this.groupTarget.Size = new System.Drawing.Size(341, 471);\r
this.groupTarget.TabIndex = 0;\r
this.groupTarget.TabStop = false;\r
this.groupTarget.Text = "Target action";\r
this.panelActions.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);\r
this.panelActions.RowCount = 1;\r
this.panelActions.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
- this.panelActions.Size = new System.Drawing.Size(296, 376);\r
+ this.panelActions.Size = new System.Drawing.Size(321, 376);\r
this.panelActions.TabIndex = 4;\r
this.panelActions.MouseClick += new System.Windows.Forms.MouseEventHandler(this.OnTargetPanelsMouseClick);\r
// \r
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;\r
this.panel1.Location = new System.Drawing.Point(10, 399);\r
this.panel1.Name = "panel1";\r
- this.panel1.Size = new System.Drawing.Size(296, 62);\r
+ this.panel1.Size = new System.Drawing.Size(321, 62);\r
this.panel1.TabIndex = 5;\r
this.panel1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.OnTargetPanelsMouseClick);\r
// \r
this.btnExecute.BackColor = System.Drawing.SystemColors.ActiveCaption;\r
this.btnExecute.Dock = System.Windows.Forms.DockStyle.Right;\r
this.btnExecute.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- this.btnExecute.Location = new System.Drawing.Point(164, 0);\r
+ this.btnExecute.Location = new System.Drawing.Point(189, 0);\r
this.btnExecute.Margin = new System.Windows.Forms.Padding(3, 20, 3, 3);\r
this.btnExecute.Name = "btnExecute";\r
this.btnExecute.Size = new System.Drawing.Size(132, 62);\r
// groupActions\r
// \r
this.groupActions.BackColor = System.Drawing.Color.Transparent;\r
- this.groupActions.Controls.Add(this.tabControl2);\r
+ this.groupActions.Controls.Add(this.tabSystem);\r
this.groupActions.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.groupActions.Location = new System.Drawing.Point(0, 0);\r
this.groupActions.Name = "groupActions";\r
this.groupActions.Enter += new System.EventHandler(this.groupBox_Enter);\r
this.groupActions.Leave += new System.EventHandler(this.groupBox_Leave);\r
// \r
- // tabControl2\r
+ // tabSystem\r
// \r
- this.tabControl2.Controls.Add(this.tabPage1);\r
- this.tabControl2.Controls.Add(this.tabPage2);\r
- this.tabControl2.Dock = System.Windows.Forms.DockStyle.Fill;\r
- this.tabControl2.Location = new System.Drawing.Point(10, 23);\r
- this.tabControl2.Name = "tabControl2";\r
- this.tabControl2.SelectedIndex = 0;\r
- this.tabControl2.Size = new System.Drawing.Size(1002, 124);\r
- this.tabControl2.TabIndex = 1;\r
+ this.tabSystem.Controls.Add(this.tabPage1);\r
+ this.tabSystem.Controls.Add(this.tabPage2);\r
+ this.tabSystem.Dock = System.Windows.Forms.DockStyle.Fill;\r
+ this.tabSystem.Location = new System.Drawing.Point(10, 23);\r
+ this.tabSystem.Name = "tabSystem";\r
+ this.tabSystem.SelectedIndex = 0;\r
+ this.tabSystem.Size = new System.Drawing.Size(1002, 124);\r
+ this.tabSystem.TabIndex = 1;\r
// \r
// tabPage1\r
// \r
this.columnOutput,\r
this.columnKillDate});\r
this.dataGridJobs.DataSource = this.bindingSourceJobs;\r
- dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;\r
+ dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window;\r
dataGridViewCellStyle7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText;\r
this.dataGridJobs.DefaultCellStyle = dataGridViewCellStyle7;\r
this.dataGridJobs.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.dataGridJobs.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;\r
+ this.dataGridJobs.EnableHeadersVisualStyles = false;\r
+ this.dataGridJobs.GridColor = System.Drawing.Color.White;\r
this.dataGridJobs.Location = new System.Drawing.Point(3, 3);\r
this.dataGridJobs.Name = "dataGridJobs";\r
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
// dataGridMessages\r
// \r
this.dataGridMessages.AllowUserToAddRows = false;\r
- this.dataGridMessages.AllowUserToOrderColumns = true;\r
this.dataGridMessages.AllowUserToResizeRows = false;\r
this.dataGridMessages.AutoGenerateColumns = false;\r
this.dataGridMessages.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;\r
this.dataGridMessages.BackgroundColor = System.Drawing.Color.White;\r
this.dataGridMessages.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
- dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window;\r
- dataGridViewCellStyle10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
+ dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;\r
+ dataGridViewCellStyle10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;\r
- dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.Transparent;\r
- dataGridViewCellStyle10.SelectionForeColor = System.Drawing.Color.Transparent;\r
+ dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;\r
+ dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;\r
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
this.dataGridMessages.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;\r
this.dataGridMessages.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;\r
this.dataGridMessages.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {\r
+ this.dataGridViewTextBoxColumn1,\r
+ this.dataGridViewTextBoxColumn2,\r
this.timeDataGridViewTextBoxColumn,\r
- this.Level,\r
this.messageDataGridViewTextBoxColumn});\r
this.dataGridMessages.DataSource = this.systemMessageBindingSource;\r
- dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
- dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window;\r
- dataGridViewCellStyle11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText;\r
- dataGridViewCellStyle11.SelectionBackColor = System.Drawing.Color.Transparent;\r
- dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText;\r
- dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
- this.dataGridMessages.DefaultCellStyle = dataGridViewCellStyle11;\r
+ dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+ dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window;\r
+ dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ dataGridViewCellStyle12.ForeColor = System.Drawing.Color.Red;\r
+ dataGridViewCellStyle12.NullValue = null;\r
+ dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
+ dataGridViewCellStyle12.SelectionForeColor = System.Drawing.Color.Red;\r
+ dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
+ this.dataGridMessages.DefaultCellStyle = dataGridViewCellStyle12;\r
this.dataGridMessages.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.dataGridMessages.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;\r
+ this.dataGridMessages.EnableHeadersVisualStyles = false;\r
+ this.dataGridMessages.GridColor = System.Drawing.Color.White;\r
this.dataGridMessages.Location = new System.Drawing.Point(3, 3);\r
this.dataGridMessages.Name = "dataGridMessages";\r
- dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
- dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;\r
- dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
- dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;\r
- dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Control;\r
- dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.WindowText;\r
- dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
- this.dataGridMessages.RowHeadersDefaultCellStyle = dataGridViewCellStyle12;\r
+ this.dataGridMessages.ReadOnly = true;\r
+ dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+ dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control;\r
+ dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText;\r
+ dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight;\r
+ dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;\r
+ dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
+ this.dataGridMessages.RowHeadersDefaultCellStyle = dataGridViewCellStyle13;\r
this.dataGridMessages.RowHeadersVisible = false;\r
- dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
- this.dataGridMessages.RowsDefaultCellStyle = dataGridViewCellStyle13;\r
- this.dataGridMessages.RowTemplate.DefaultCellStyle.BackColor = System.Drawing.Color.Transparent;\r
- this.dataGridMessages.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
- this.dataGridMessages.RowTemplate.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.Transparent;\r
+ dataGridViewCellStyle14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ this.dataGridMessages.RowsDefaultCellStyle = dataGridViewCellStyle14;\r
+ this.dataGridMessages.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
this.dataGridMessages.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
this.dataGridMessages.Size = new System.Drawing.Size(988, 92);\r
- this.dataGridMessages.TabIndex = 0;\r
- this.dataGridMessages.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridMessages_RowsAdded);\r
- // \r
- // timeDataGridViewTextBoxColumn\r
- // \r
- this.timeDataGridViewTextBoxColumn.DataPropertyName = "Time";\r
- this.timeDataGridViewTextBoxColumn.HeaderText = "Idő";\r
- this.timeDataGridViewTextBoxColumn.Name = "timeDataGridViewTextBoxColumn";\r
- this.timeDataGridViewTextBoxColumn.Width = 49;\r
+ this.dataGridMessages.TabIndex = 1;\r
// \r
- // Level\r
+ // dataGridViewTextBoxColumn1\r
// \r
- this.Level.DataPropertyName = "Level";\r
- this.Level.HeaderText = "LogLevel";\r
- this.Level.Name = "Level";\r
- this.Level.Width = 82;\r
+ this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;\r
+ this.dataGridViewTextBoxColumn1.DataPropertyName = "Time";\r
+ this.dataGridViewTextBoxColumn1.HeaderText = "Időpont";\r
+ this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";\r
+ this.dataGridViewTextBoxColumn1.ReadOnly = true;\r
+ this.dataGridViewTextBoxColumn1.Width = 73;\r
// \r
- // messageDataGridViewTextBoxColumn\r
+ // dataGridViewTextBoxColumn2\r
// \r
- this.messageDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;\r
- this.messageDataGridViewTextBoxColumn.DataPropertyName = "message";\r
- this.messageDataGridViewTextBoxColumn.HeaderText = "Üzenet";\r
- this.messageDataGridViewTextBoxColumn.MinimumWidth = 71;\r
- this.messageDataGridViewTextBoxColumn.Name = "messageDataGridViewTextBoxColumn";\r
+ this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;\r
+ this.dataGridViewTextBoxColumn2.DataPropertyName = "Message";\r
+ dataGridViewCellStyle11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle11;\r
+ this.dataGridViewTextBoxColumn2.HeaderText = "Üzenet";\r
+ this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";\r
+ this.dataGridViewTextBoxColumn2.ReadOnly = true;\r
// \r
// systemMessageBindingSource\r
// \r
// \r
this.metadataInfoBindingSource.DataSource = typeof(Maestro.Metadata.MetadataInfo);\r
// \r
+ // timeDataGridViewTextBoxColumn\r
+ // \r
+ this.timeDataGridViewTextBoxColumn.DataPropertyName = "Time";\r
+ this.timeDataGridViewTextBoxColumn.HeaderText = "Time";\r
+ this.timeDataGridViewTextBoxColumn.Name = "timeDataGridViewTextBoxColumn";\r
+ this.timeDataGridViewTextBoxColumn.ReadOnly = true;\r
+ this.timeDataGridViewTextBoxColumn.Width = 60;\r
+ // \r
+ // messageDataGridViewTextBoxColumn\r
+ // \r
+ this.messageDataGridViewTextBoxColumn.DataPropertyName = "Message";\r
+ this.messageDataGridViewTextBoxColumn.HeaderText = "Message";\r
+ this.messageDataGridViewTextBoxColumn.Name = "messageDataGridViewTextBoxColumn";\r
+ this.messageDataGridViewTextBoxColumn.ReadOnly = true;\r
+ this.messageDataGridViewTextBoxColumn.Width = 83;\r
+ // \r
// MaestroForm\r
// \r
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).EndInit();\r
this.tableLayoutPanel2.ResumeLayout(false);\r
this.tableLayoutPanel2.PerformLayout();\r
- this.panel2.ResumeLayout(false);\r
- this.panel2.PerformLayout();\r
this.ctxmActions.ResumeLayout(false);\r
this.splitContainer1.Panel1.ResumeLayout(false);\r
this.splitContainer1.Panel2.ResumeLayout(false);\r
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();\r
this.splitContainer2.ResumeLayout(false);\r
this.groupActions.ResumeLayout(false);\r
- this.tabControl2.ResumeLayout(false);\r
+ this.tabSystem.ResumeLayout(false);\r
this.tabPage1.ResumeLayout(false);\r
((System.ComponentModel.ISupportInitialize)(this.dataGridJobs)).EndInit();\r
((System.ComponentModel.ISupportInitialize)(this.bindingSourceJobs)).EndInit();\r
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;\r
private TrafficClient.TrafficIDSelector trafficIDSelector;\r
private System.Windows.Forms.Button buttonMetadata;\r
- private System.Windows.Forms.TabControl tabControl2;\r
+ private System.Windows.Forms.TabControl tabSystem;\r
private System.Windows.Forms.TabPage tabPage1;\r
private System.Windows.Forms.TabPage tabPage2;\r
- private System.Windows.Forms.DataGridView dataGridMessages;\r
private System.Windows.Forms.BindingSource systemMessageBindingSource;\r
- private System.Windows.Forms.Panel panel2;\r
- private System.Windows.Forms.Button buttonDeleteFilter;\r
- private System.Windows.Forms.TextBox txtSorceFilter;\r
- private System.Windows.Forms.DataGridViewTextBoxColumn timeDataGridViewTextBoxColumn;\r
- private System.Windows.Forms.DataGridViewTextBoxColumn Level;\r
- private System.Windows.Forms.DataGridViewTextBoxColumn messageDataGridViewTextBoxColumn;\r
private System.Windows.Forms.Label lbSourceTitle;\r
+ private System.Windows.Forms.DataGridView dataGridMessages;\r
+ private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;\r
+ private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;\r
private System.Windows.Forms.DataGridViewTextBoxColumn columnLabel;\r
private System.Windows.Forms.DataGridViewTextBoxColumn columnID;\r
private Commons.DataGridViewProgressColumn Progress;\r
private System.Windows.Forms.DataGridViewTextBoxColumn columnInput;\r
private System.Windows.Forms.DataGridViewTextBoxColumn columnOutput;\r
private System.Windows.Forms.DataGridViewTextBoxColumn columnKillDate;\r
+ private System.Windows.Forms.DataGridViewTextBoxColumn timeDataGridViewTextBoxColumn;\r
+ private System.Windows.Forms.DataGridViewTextBoxColumn messageDataGridViewTextBoxColumn;\r
}\r
}\r
\r
using System.Collections.Generic;\r
using System.ComponentModel;\r
using System.Text.RegularExpressions;\r
-using JobEngineClient;\r
+using MediaCubeClient;\r
using Model;\r
\r
namespace Maestro {\r
private const string REGEXP_TRAFFICMATERIALID = "^M{1}[0-9]{6}[A-Z]{1}$";\r
private const string REGEXP_TRAFFICADID = "^R{1}[0-9]{6}[A-Z]{1}$";\r
private const string REGEXP_TRAFFICPROMOID = "^P{1}[0-9]{6}[A-Z]{1}$";\r
- private const string REGEXP_OCTOPUSID = "^[0-9]+$";\r
+ private const string REGEXP_OCTOPUSPLACEHOLDERID = "^[0-9]+_[0-9]+$";\r
+ private const string REGEXP_OCTOPUSPLACEHOLDERVERSIONEDID = "^[0-9]+_[0-9]+-[0-9]{3}$";\r
+\r
private MetadataInfo selectedMetadata;\r
private List<Segment> segments;\r
private MediaCubeApi mediaCubeApi;\r
UserName = metadata.Server.UserName,\r
Password = metadata.Server.Password,\r
Timeout = metadata.Server.Timeout,\r
- ErrorReporter = ReportError\r
+ MessageBus = errorMessageBus\r
};\r
trafficIDSelector.IDChangedEvent += OnTrafficIDSelected;\r
}\r
Address = metadata.Server.Address,\r
UserName = metadata.Server.UserName,\r
Password = metadata.Server.Password,\r
- Timeout = metadata.Server.Timeout\r
+ Timeout = metadata.Server.Timeout,\r
+ MessageBus = errorMessageBus\r
};\r
octopusIDSelector.IDChangedEvent += OnOctopusIDSelected;\r
}\r
\r
private void InitializeMediaCubeApi() {\r
- MediaCubeMetadata metadata = Configuration.Metadatas.Where(m => { return m is MediaCubeMetadata; }).FirstOrDefault() as MediaCubeMetadata;\r
+ MediaCubeMetadata metadata = Configuration.GetMetadataProvider<MediaCubeMetadata>();\r
if (metadata == null)\r
return;\r
- mediaCubeApi = new MediaCubeApi(metadata.Server.Address.ToString(), metadata.Server.UserName, metadata.Server.Password, metadata.Server.Timeout) { ErrorReporter = ReportError };\r
+ mediaCubeApi = new MediaCubeApi(metadata.Server.Address.ToString(), metadata.Server.UserName, metadata.Server.Password, metadata.Server.Timeout, errorMessageBus);\r
}\r
\r
private void ModifyArchiveMetadataClick(object sender, EventArgs e) {\r
if (archiveMetadata == null)\r
archiveMetadata = GetArchiveMetadata();\r
ArchiveMetadataForm form = new ArchiveMetadataForm(archiveMetadata);\r
- form.ShowDialog();\r
+ DialogResult result = form.ShowDialog();\r
+ if (result == DialogResult.OK && String.IsNullOrEmpty(textSelectedMetadata.Text))\r
+ textSelectedMetadata.Text = archiveMetadata.itemHouseId;\r
}\r
\r
private MetadataType GuessMetadataType(string id) {\r
if (match.Success)\r
return MetadataType.TrafficAD;\r
\r
- match = Regex.Match(id, REGEXP_OCTOPUSID);\r
+ match = Regex.Match(id, REGEXP_OCTOPUSPLACEHOLDERID);\r
+ if (match.Success)\r
+ return MetadataType.OctopusPlaceHolder;\r
+\r
+ match = Regex.Match(id, REGEXP_OCTOPUSPLACEHOLDERVERSIONEDID);\r
if (match.Success)\r
return MetadataType.OctopusPlaceHolder;\r
\r
private BindingList<MovieSegment> GetMovieSegmentsFromSegments() {\r
BindingList<MovieSegment> result = new BindingList<MovieSegment>();\r
TrafficAPI trafficApi = trafficIDSelector.trafficAPI;\r
- List<Segment> segments = trafficApi.GetBroadcastSegments(selectedMetadata.VariantID);\r
+ List<Segment> segments = trafficApi.GetMaterialSegments(selectedMetadata.VariantID);\r
if (segments != null)\r
foreach (Segment segment in segments) {\r
MovieSegment movieSegment = segmentConverter.ConvertToMovieSegment(segment);\r
Cursor.Current = Cursors.WaitCursor;\r
MetadataType metadataType = GuessMetadataType(textSelectedMetadata.Text);\r
switch (metadataType) {\r
+ case MetadataType.None:\r
case MetadataType.MediaCube:\r
result = GetMediaCubeMetadata();\r
- textSelectedMetadata.Text = result.itemHouseId;\r
break;\r
case MetadataType.OctopusPlaceHolder:\r
result = GetOctopusMetadata();\r
trafficResult = api.GetMaterialMetadata(id);\r
break;\r
case MetadataType.TrafficPromo:\r
- trafficResult = api.GetPromoMetadata(id);\r
+ trafficResult = api.GetPromoArchiveMetadata(id);\r
break;\r
case MetadataType.TrafficAD:\r
- trafficResult = api.GetADMetadata(id);\r
+ trafficResult = api.GetADArchiveMetadata(id);\r
break;\r
}\r
if (trafficResult == null)\r
}\r
SelectedMetadata = new MetadataInfo() {\r
Kind = MetadataType.OctopusPlaceHolder,\r
- ID = id,\r
+ ID = name,\r
VariantID = int.Parse(id)\r
};\r
}\r
\r
private void UpdateEditArchiveMetadataEnabled() {\r
// ctxiModifyArchiveMetadata.Enabled = !String.IsNullOrEmpty(textSelectedMetadata.Text);\r
- ctxiModifyArchiveMetadata.Enabled = SelectedSource != null && SelectedMetadata != null;\r
+ ctxiModifyArchiveMetadata.Enabled = SelectedSource != null;\r
}\r
\r
private void UpdateDefineSegmentEnabled() {\r
}\r
if (Configuration?.Source is NEXIOSource) {\r
logger.Debug("NEXIO source initialization");\r
- source = new NexioRESTSource(this, MessageBus, ReportError, Configuration.Source.Filter);\r
+ source = new NexioRESTSource(this, MessageBus, Configuration.Source.Filter);\r
logger.Debug("NEXIO source created");\r
}\r
\r
LookupOctopus();\r
break;\r
}\r
+ trafficIDSelector.ClearSelection();\r
+ octopusIDSelector.ClearSelection();\r
+\r
Cursor.Current = Cursors.Default;\r
}\r
\r
MessageBox.Show(this, StringResources.NINCS_TALALAT);\r
return;\r
}\r
- if (result.Count == 1) {\r
- trafficMetadataSelected?.Invoke(result[0].MediaID, result[0].VariantID);\r
- UpdateEditArchiveMetadataEnabled();\r
- textSelectedMetadata.Text = result[0].MediaID;\r
- } else {\r
- TrafficLookupResultSelector lookupResult = new TrafficLookupResultSelector(result, trafficMetadataSelected);\r
+ if (result.Count == 1)\r
+ OnTrafficIDSelected(result[0].MediaID, result[0].VariantID);\r
+ else {\r
+ TrafficLookupResultSelector lookupResult = new TrafficLookupResultSelector(result, OnTrafficIDSelected);\r
lookupResult.ShowDialog();\r
}\r
}\r
MessageBox.Show(this, StringResources.NINCS_TALALAT);\r
return;\r
}\r
- List<MosObject> list = mosIDs.ToList();\r
- if (list == null || list.Count == 0) {\r
+ List<MosObject> mosObjects = mosIDs.ToList();\r
+ if (mosObjects == null || mosObjects.Count == 0) {\r
MessageBox.Show(this, StringResources.NINCS_TALALAT);\r
return;\r
}\r
- if (list.Count == 1) {\r
- UpdateEditArchiveMetadataEnabled();\r
- textSelectedMetadata.Text = list[0].ID;\r
- octopusMetadataSelected?.Invoke(list[0].ID, null);\r
- } else {\r
- OctopusLookupResultSelector box = new OctopusLookupResultSelector(list, octopusMetadataSelected);\r
+ if (mosObjects.Count == 1)\r
+ OnOctopusIDSelected(mosObjects[0].ID, mosObjects[0].ObjID);\r
+ else {\r
+ OctopusLookupResultSelector box = new OctopusLookupResultSelector(mosObjects, OnOctopusIDSelected);\r
box.ShowDialog();\r
}\r
}\r
using Maestro.Metadata;\r
using System.Collections.Generic;\r
using TrafficClient;\r
-using JobEngineClient;\r
+using MediaCubeClient;\r
\r
namespace Maestro {\r
\r
if (selectedMetadata?.VariantID != null && selectedMetadata?.VariantID != 0)\r
switch (selectedMetadata.Kind) {\r
case MetadataType.TrafficMaterial: {\r
- segments = trafficIDSelector.trafficAPI.GetBroadcastSegments(selectedMetadata.VariantID);\r
+ segments = trafficIDSelector.trafficAPI.GetMaterialSegments(selectedMetadata.VariantID);\r
if (segments == null) {\r
MessageBox.Show(String.Format("A {0} folyamat nem futtatható szegmens adatok nélkül.", target.Label));\r
return false;\r
break;\r
}\r
case MetadataType.TrafficAD: {\r
- segments = trafficIDSelector.trafficAPI.GetAdvertisementSegments(selectedMetadata.ID);\r
+ segments = trafficIDSelector.trafficAPI.GetADSegments(selectedMetadata.ID);\r
if (segments == null) {\r
MessageBox.Show(String.Format("A {0} folyamat nem futtatható szegmens adatok nélkül.", target.Label));\r
return false;\r
ClearSelectedProcessors();\r
if (processorWorker == null)\r
CreateJobsQueueWorker();\r
- ActivateTabOnTabControl2(0);\r
+ ActivateTab(0);\r
}\r
\r
\r
using TrafficClient;\r
using OctopusClient;\r
using System.IO;\r
+using MediaCubeClient;\r
+using LinkDotNet.MessageHandling;\r
\r
namespace Maestro {\r
\r
- public delegate void Clear();\r
+ //public delegate void Clear();\r
\r
public partial class MaestroForm : Form {\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
private BlockingCollection<ITargetProcessor> jobsQueue = new BlockingCollection<ITargetProcessor>();\r
private BackgroundWorker processorWorker;\r
public IMessageBus MessageBus { get; set; }\r
+ private IMessageBus errorMessageBus = new MessageBus();\r
+\r
private ConfigurationInfo configuration;\r
public ConfigurationInfo Configuration {\r
get { return configuration; }\r
InitializeSource();\r
}\r
}\r
- private TraficMetadataSelected trafficMetadataSelected;\r
- private OctopusMetadataSelected octopusMetadataSelected;\r
- private Color newMSGColor;\r
-\r
- public Clear clear;\r
\r
public bool CanExecute {\r
get {\r
\r
public MaestroForm() {\r
InitializeComponent();\r
- //trafficIDSelector.clearCheckBox = octopusIDSelector.ClearEveryCheckBox;\r
- //octopusIDSelector.ClearCheckBox = trafficIDSelector.ClearSelection;\r
- octopusIDSelector.ErrorReporter = ReportError;\r
groups = new GroupBox[] { groupSource, groupMetadata, groupTarget, groupActions };\r
- trafficMetadataSelected = OnTrafficIDSelected;\r
- octopusMetadataSelected = OnOctopusIDSelected;\r
}\r
\r
private void InitializeControlTexts() {\r
}\r
\r
private void InitializeComponents() {\r
+ dataGridMessages.AutoGenerateColumns = false;\r
+ errorMessageBus.Subscribe<OctopusAPIMessage>(OnMessage);\r
+ errorMessageBus.Subscribe<TrafficAPIMessage>(OnMessage);\r
+ errorMessageBus.Subscribe<MediaCubeMessage>(OnMessage);\r
+\r
InitializeMetadata();\r
InitializeTarget();\r
InitializeJobs();\r
InitializeControlTexts();\r
}\r
\r
+ private void OnMessage(IMessage message) {\r
+ var pi = message.GetType().GetProperty("Content");\r
+ string text = pi.GetValue(message) as string;\r
+ ObjectExtensions.SafeCall(dataGridMessages, () => {\r
+ systemMessageBindingSource.Insert(0, new SystemMessage() { Time = DateTime.Now, Message = text });\r
+ ActivateTab(1);\r
+ });\r
+\r
+ }\r
+\r
private void InitializeMessages() {\r
- dataGridMessages.Columns.AddRange(new DataGridViewTextBoxColumn() {\r
- AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells,\r
- DataPropertyName = "Time",\r
- HeaderText = StringResources.IDO\r
- },\r
- new DataGridViewTextBoxColumn() {\r
- AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells,\r
- DataPropertyName = "Message",\r
- HeaderText = StringResources.UZENET\r
- });\r
+ //dataGridMessages.Columns.AddRange(\r
+ // new DataGridViewTextBoxColumn() {\r
+ // AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells,\r
+ // DataPropertyName = "Time",\r
+ // HeaderText = StringResources.IDO\r
+ // },\r
+ // new DataGridViewTextBoxColumn() {\r
+ // AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells,\r
+ // DataPropertyName = "Message",\r
+ // HeaderText = StringResources.UZENET\r
+ // }\r
+ //);\r
}\r
\r
private void InitializeJobs() {\r
InitializeComponents();\r
}\r
\r
- private void textBox1_KeyUp(object sender, KeyEventArgs e) {\r
- if (e.KeyCode != Keys.Return)\r
- return;\r
- if (String.IsNullOrEmpty(txtSorceFilter.Text))\r
- bindingSource.RemoveFilter();\r
- else {\r
- bindingSource.Filter = txtSorceFilter.Text;\r
- }\r
- }\r
-\r
- public void ReportError(DateTime time, String level, String message, Color color) {\r
- ObjectExtensions.SafeCall(tabControl2, () => {\r
- systemMessageBindingSource.Insert(0, new SystemMessage() { Time = time, message = message, Level = level });\r
- });\r
- newMSGColor = color;\r
- ActivateTabOnTabControl2(1);\r
- //ObjectExtensions.SafeCall(dataGridMessages, UpdateDataGridMessagesChanged);\r
- }\r
-\r
- private void ActivateTabOnTabControl2(int index) {\r
- ObjectExtensions.SafeCall(tabControl2, () => { tabControl2.SelectedIndex = index; });\r
- }\r
+ //private void textBox1_KeyUp(object sender, KeyEventArgs e) {\r
+ // if (e.KeyCode != Keys.Return)\r
+ // return;\r
+ // if (String.IsNullOrEmpty(txtSorceFilter.Text))\r
+ // bindingSource.RemoveFilter();\r
+ // else {\r
+ // bindingSource.Filter = txtSorceFilter.Text;\r
+ // }\r
+ //}\r
\r
- private void UpdateDataGridMessagesChanged() {\r
- dataGridMessages.DataSource = null;\r
- dataGridMessages.DataSource = systemMessageBindingSource;\r
+ private void ActivateTab(int index) {\r
+ tabSystem.SelectedIndex = index;\r
}\r
\r
- private void dataGridMessages_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e) {\r
- SystemMessage actual = systemMessageBindingSource.Current as SystemMessage;\r
- if (actual == null)\r
- return;\r
- if (actual.Level.Equals("Error")) {\r
- dataGridMessages.Rows[e.RowIndex].DefaultCellStyle.ForeColor = newMSGColor;\r
- dataGridMessages.Rows[e.RowIndex].DefaultCellStyle.SelectionForeColor = newMSGColor;\r
- }\r
- }\r
+ //private void UpdateDataGridMessagesChanged() {\r
+ // dataGridMessages.DataSource = null;\r
+ // dataGridMessages.DataSource = systemMessageBindingSource;\r
+ //}\r
\r
- private void buttonDeleteFilter_Click(object sender, EventArgs e) {\r
- if (!String.IsNullOrEmpty(txtSorceFilter.Text)) {\r
- bindingSource.RemoveFilter();\r
- txtSorceFilter.Text = string.Empty;\r
- }\r
- }\r
+ //private void buttonDeleteFilter_Click(object sender, EventArgs e) {\r
+ // if (!String.IsNullOrEmpty(txtSorceFilter.Text)) {\r
+ // bindingSource.RemoveFilter();\r
+ // txtSorceFilter.Text = string.Empty;\r
+ // }\r
+ //}\r
\r
private void dataGridJobs_MouseClick(object sender, MouseEventArgs e) {\r
if (e.Button == MouseButtons.Right && dataGridJobs.SelectedRows.Count == 1) {\r
<metadata name="bindingSourceJobs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<value>154, 17</value>\r
</metadata>\r
- <metadata name="Level.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+ <metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+ <value>True</value>\r
+ </metadata>\r
+ <metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
<value>True</value>\r
</metadata>\r
<metadata name="systemMessageBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
using Maestro.Configuration;\r
using Maestro.Sources.Messages;\r
using System;\r
-using System.Threading.Tasks;\r
using System.Windows.Forms;\r
\r
namespace Maestro {\r
CreateForm(file);\r
}\r
if (forms.Count == 0) {\r
- MessageBox.Show("Hiányos konfiguráció!");\r
- TerminateApplication();\r
+ MessageBox.Show(new Form() { TopMost = true }, "Nincs aktív konfiguráció!");\r
+ //TerminateApplication();\r
}\r
}\r
\r
foreach (MeastroFormNotifyIcon form in forms) {\r
form.CloseForm();\r
}\r
- trayIcon.Visible = false;\r
- trayIcon.Dispose();\r
+ if (trayIcon != null) {\r
+ trayIcon.Visible = false;\r
+ trayIcon.Dispose();\r
+ }\r
Application.Exit();\r
}\r
}\r
// You can specify all the values or you can default the Build and Revision Numbers\r
// by using the '*' as shown below:\r
// [assembly: AssemblyVersion("1.0.*")]\r
-[assembly: AssemblyVersion("1.9.0.0")]\r
-[assembly: AssemblyFileVersion("1.9.0.0")]\r
+[assembly: AssemblyVersion("1.9.3.0")]\r
+[assembly: AssemblyFileVersion("1.9.3.0")]\r
\r
\r
public bool CanHandle(List<String> extensions) {\r
- if (extensions == null || extensions.Count < 1)\r
+ if (extensions == null || extensions.Count < 1)\r
return true;\r
- if (extensions.Contains(fileInfo.Extension.Substring(1).ToLower()) || extensions.Contains(fileInfo.Extension.Substring(1).ToUpper()))\r
+ if (fileInfo == null || String.IsNullOrEmpty(fileInfo.Extension))\r
+ return false;\r
+ if (extensions.Contains(fileInfo.Extension.Replace(".", "").ToUpper()))\r
return true;\r
return false;\r
}\r
\r
private void SetAcceptableExtensions(string fileExtensionFilter) {\r
if (fileExtensionFilter != null)\r
- acceptableExtensions = fileExtensionFilter.Split(',')?.ToList();\r
+ acceptableExtensions = fileExtensionFilter.Split(',')?.Select(i => i.ToUpper().Trim()).ToList();\r
}\r
\r
public void Startup(Uri address) {\r
\r
private void InnerStartUp() {\r
createWatch(path);\r
- Task.Run(() => initializeList(path));\r
+ //Task.Run(() => initializeList(path));\r
+ initializeList(path);\r
initialized = true;\r
}\r
\r
private void initializeList(string path) {\r
string[] files = Directory.GetFiles(path);\r
//files.Select(f => CreateItem(new FileInfo(f), false)).Where(x => x.Name.EndsWith("avi")).OrderByDescending(i => i.Created).ToList().ForEach(i => parent.SafeCall(() => Add(i)));\r
- files.Select(f => CreateItem(new FileInfo(f), false)).Where(x => x.CanHandle(acceptableExtensions)).OrderByDescending(i => i.Created).ToList().ForEach(i => parent.SafeCall(() => Add(i)));\r
- cache.AddRange(this);\r
+ var fileSourceItems = files.Select(f => CreateItem(new FileInfo(f), false)).OrderByDescending(i => i.Created);\r
+ fileSourceItems.Where(x => x.CanHandle(acceptableExtensions)).ToList().ForEach(i => parent.SafeCall(() => Add(i)));\r
+ //cache.AddRange(this);\r
}\r
\r
private void createWatch(string path) {\r
using System;\r
using System.Drawing;\r
using NLog;\r
-using JobEngineClient;\r
+using MediaCubeClient;\r
using System.Collections.Generic;\r
using System.Collections.Concurrent;\r
\r
\r
public bool SupportsFiltering => true;\r
\r
- private MediaCubeErrorReporter errorReporter;\r
-\r
- public NexioRESTSource(Control parent, IMessageBus messageBus, MediaCubeErrorReporter errorReporter, String agencyFilter) {\r
+ public NexioRESTSource(Control parent, IMessageBus messageBus, String agencyFilter) {\r
this.parent = parent;\r
this.messageBus = messageBus;\r
- this.errorReporter = errorReporter;\r
SetAcceptableAgencies(agencyFilter);\r
}\r
\r
}\r
\r
private void CreateWatch(string path) {\r
- dataClient = new NexioAPI(path) { ErrorReporter = errorReporter };\r
+ dataClient = new NexioAPI(path, messageBus);\r
dataClient.Open(OnResponse);\r
}\r
\r
\r
Version version = Assembly.GetEntryAssembly().GetName().Version;\r
labelVersion.ForeColor = Color.White;\r
- labelVersion.Text = String.Format("v{0}.{1}.{2}", version.Major, version.Minor, version.Revision);\r
+ labelVersion.Text = String.Format("v{0}.{1}.{2}", version.Major, version.Minor, version.Build);\r
}\r
\r
private void splashTimer_Tick(object sender, EventArgs e) {\r
using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
\r
namespace Maestro {\r
public class SystemMessage {\r
-\r
public DateTime Time { get; set; }\r
- public String message { get; set; }\r
- public String Level { get; set; }\r
+ public String Message { get; set; }\r
}\r
}\r
TerminateClient(targetFTP);\r
}\r
\r
- private void DeleteFile(string currentFile) {\r
+ protected override void DeleteFile(string currentFile) {\r
targetFTP.DeleteFile(currentFile);\r
}\r
\r
OutputName = CreateOutputFileName();\r
OutputName = OutputName.ToUpper();\r
Output = "/".Equals(workingDir) ? OutputName : Path.Combine(workingDir, OutputName);\r
+ Output = Output.Replace(@"\", "/");\r
workFlowAction.source = Input;\r
workFlowAction.destination = Output;\r
Status = "Folyamatban";\r
return result;\r
}\r
\r
- private void DeleteFile(string currentFile) {\r
+ protected virtual void DeleteFile(string currentFile) {\r
File.Delete(currentFile);\r
}\r
\r
CreateMetadata();\r
if (parameters.TargetConfig.SaveSegments && parameters.Segments != null)\r
//eljuthat-e ide a felhasználó, ha a MetadataKind octopus?\r
- parameters.TrafficApi.SetMaterialInformation(parameters.VariantID, true, (TrafficMetadataType)parameters.MetadataKind, parameters.Segments);\r
+ parameters.TrafficApi.UpdateTrafficInformation(parameters.VariantID, true, (TrafficMetadataType)parameters.MetadataKind, parameters.Segments);\r
if (parameters.TargetConfig.SendEmailOnSuccess && !String.IsNullOrEmpty(parameters.TargetConfig.SuccessEmailRecipient) && !String.IsNullOrEmpty(parameters.TargetConfig.SuccessEmailPattern))\r
SendEmail(parameters.TargetConfig.SuccessEmailRecipient, parameters.TargetConfig.SuccessEmailPattern);\r
Status = "Kész";\r
\r
protected String DetermineWorkingDirectory(Connection connection) {\r
string result = null;\r
- if (parameters.TargetConfig.CreateSubFolder)\r
+ if (parameters.TargetConfig.CreateSubFolder) {\r
+ string subDir = ID;\r
+ if (ID.Contains("_"))\r
+ subDir = ID.Split('_')[0];\r
result = Path.Combine(connection.Address.LocalPath, ID);\r
+ }\r
else\r
result = connection.Address.LocalPath;\r
return result;\r
-using Model;\r
using Newtonsoft.Json;\r
using Newtonsoft.Json.Serialization;\r
using NLog;\r
using System.Diagnostics;\r
using System.Net;\r
using System.Runtime.Serialization;\r
-using System.Drawing;\r
+using LinkDotNet.MessageHandling.Contracts;\r
\r
-namespace JobEngineClient {\r
-\r
- public delegate void MediaCubeErrorReporter(DateTime time, String level, String message, Color color);\r
+namespace MediaCubeClient {\r
+ public class MediaCubeMessage : IMessage {\r
+ public MediaCubeMessage(string message) {\r
+ Content = message;\r
+ }\r
+ public string Content { get; set; }\r
+ }\r
\r
public class MediaCubeApi {\r
private const string DATEFORMAT = "yyyy'-'MM'-'dd'T'HH':'mm':'ssK";\r
private JsonSerializerSettings serializerSettings;\r
private string user;\r
private string pwd;\r
- public MediaCubeErrorReporter ErrorReporter { get; set; }\r
+ private IMessageBus messageBus;\r
\r
- public MediaCubeApi(string address, string user, string pwd, int timeout) {\r
+ public MediaCubeApi(string address, string user, string pwd, int timeout, IMessageBus messageBus) {\r
this.user = user;\r
this.pwd = pwd;\r
+ this.messageBus = messageBus;\r
client = new RestClient(address) {\r
Authenticator = new HttpBasicAuthenticator(user, pwd),\r
Timeout = timeout\r
};\r
}\r
\r
-\r
public T Create<T>(object data) {\r
var request = new RestRequest("create", Method.POST);\r
String body = JsonConvert.SerializeObject(data, serializerSettings);\r
request.AddParameter("application/json", body, ParameterType.RequestBody);\r
var response = client.Execute(request);\r
if (response.StatusCode != HttpStatusCode.OK && response.ErrorMessage != null) {\r
- ErrorReporter?.Invoke(DateTime.Now, "Error", String.Format("[MediaCube] {0}", response.ErrorMessage), Color.Red);\r
+ messageBus.Send(new MediaCubeMessage("Sikertelen kapcsolódás a MediaCube rendszerhez."));\r
return default(T);\r
}\r
//Debug.WriteLine(response.Content);\r
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
</PropertyGroup>\r
<ItemGroup>\r
+ <Reference Include="LinkDotNet.MessageHandling.Contracts, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">\r
+ <HintPath>..\packages\LinkDotNet.MessageBus.Contracts.0.1.1\lib\LinkDotNet.MessageHandling.Contracts.dll</HintPath>\r
+ </Reference>\r
<Reference Include="Microsoft.CSharp" />\r
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">\r
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>\r
<ItemGroup>\r
<Compile Include="MediaCubeApi.cs" />\r
<Compile Include="NexioAPI.cs" />\r
- <Compile Include="NotificationMessage.cs" />\r
- <Compile Include="Notifier.cs" />\r
<Compile Include="Properties\AssemblyInfo.cs" />\r
</ItemGroup>\r
<ItemGroup>\r
using System;\r
using System.Diagnostics;\r
using WebSocketSharp;\r
-using JobEngineClient;\r
+using LinkDotNet.MessageHandling.Contracts;\r
+using MediaCubeClient;\r
\r
namespace NexioClient {\r
public class NexioAPI {\r
public const string UPDATE = "update";\r
private WebSocket ws = null;\r
private string path;\r
- public MediaCubeErrorReporter ErrorReporter { get; set; }\r
- public NexioAPI(String path) {\r
+ private IMessageBus messageBus;\r
+\r
+ public NexioAPI(String path, IMessageBus messageBus) {\r
this.path = path;\r
+ this.messageBus = messageBus;\r
}\r
\r
public void Close() {\r
}\r
\r
public void Open(EventHandler<MessageEventArgs> p) {\r
- try\r
- {\r
- ws = new WebSocket(path);\r
-\r
- ws.SslConfiguration.ServerCertificateValidationCallback = (s, c, ch, e) =>\r
- {\r
- return true;\r
- };\r
+ ws = new WebSocket(path);\r
\r
- ws.OnOpen += (sender, e) =>\r
- {\r
- Debug.WriteLine("OnOpen");\r
- };\r
+ ws.SslConfiguration.ServerCertificateValidationCallback = (s, c, ch, e) => {\r
+ return true;\r
+ };\r
\r
- ws.OnMessage += (sender, e) =>\r
- {\r
- Debug.WriteLine("OnMessage: " + e.Data);\r
- };\r
- ws.OnMessage += p;\r
+ ws.OnOpen += (sender, e) => {\r
+ Debug.WriteLine("OnOpen");\r
+ };\r
\r
- ws.OnError += (sender, e) =>\r
- Debug.WriteLine("OnError: " + e.Message);\r
+ ws.OnMessage += (sender, e) => {\r
+ Debug.WriteLine("OnMessage: " + e.Data);\r
+ };\r
+ ws.OnMessage += p;\r
\r
- ws.OnClose += (sender, e) =>\r
- Debug.WriteLine("OnClose: " + e.Reason);\r
+ ws.OnError += (sender, e) =>\r
+ Debug.WriteLine("OnError: " + e.Message);\r
\r
+ ws.OnClose += (sender, e) =>\r
+ Debug.WriteLine("OnClose: " + e.Reason);\r
+ try {\r
ws.Connect();\r
}\r
catch (Exception e) {\r
- ErrorReporter?.Invoke(DateTime.Now, "Error", String.Format("[NexioAPI] {0}", e.Message), System.Drawing.Color.Red);\r
- } \r
+ messageBus.Send(new MediaCubeMessage("Sikertelen kapcsolódás a MediaCube NEXIO szolgáltatásához."));\r
+ }\r
}\r
\r
public void GetListAsync() {\r
ws.Send(data.ToString());\r
}\r
catch (Exception e) {\r
- ErrorReporter?.Invoke(DateTime.Now, "Error", String.Format("[NexioAPI] {0}", e.Message), System.Drawing.Color.Red);\r
+ messageBus.Send(new MediaCubeMessage("Sikertelen inicializálás a MediaCube NEXIO szolgáltatásában."));\r
}\r
}\r
\r
+++ /dev/null
-using System;
-
-namespace NexioClient {
- internal class NotificationMessage
- {
- public string Body {
- get; set;
- }
-
- public string Icon {
- get; set;
- }
-
- public string Summary {
- get; set;
- }
-
- public override string ToString ()
- {
- return String.Format ("{0}: {1}", Summary, Body);
- }
- }
-}
+++ /dev/null
-#if UBUNTU
-using Notifications;
-#endif
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;\r
-using System.Threading;
-
-namespace NexioClient {
- internal class Notifier : IDisposable
- {
- private volatile bool _enabled;
- private ManualResetEvent _exited;
- private Queue<NotificationMessage> _queue;
- private object _sync;
-
- public Notifier ()
- {
- _enabled = true;
- _exited = new ManualResetEvent (false);
- _queue = new Queue<NotificationMessage> ();
- _sync = ((ICollection) _queue).SyncRoot;
-
- ThreadPool.QueueUserWorkItem (
- state => {
- while (_enabled || Count > 0) {
- var msg = dequeue ();
- if (msg != null) {
-#if UBUNTU
- var nf = new Notification (msg.Summary, msg.Body, msg.Icon);
- nf.AddHint ("append", "allowed");
- nf.Show ();
-#else
- Debug.WriteLine (msg);
-
-#endif
- }
- else {
- Thread.Sleep (500);
- }
- }
-
- _exited.Set ();
- }
- );
- }
-
- public int Count {
- get {
- lock (_sync)
- return _queue.Count;
- }
- }
-
- private NotificationMessage dequeue ()
- {
- lock (_sync)
- return _queue.Count > 0 ? _queue.Dequeue () : null;
- }
-
- public void Close ()
- {
- _enabled = false;
- _exited.WaitOne ();
- _exited.Close ();
- }
-
- public void Notify (NotificationMessage message)
- {
- lock (_sync) {
- if (_enabled)
- _queue.Enqueue (message);
- }
- }
-
- void IDisposable.Dispose ()
- {
- Close ();
- }
- }
-}
<?xml version="1.0" encoding="utf-8"?>\r
<packages>\r
+ <package id="LinkDotNet.MessageBus.Contracts" version="0.1.1" targetFramework="net461" />\r
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />\r
<package id="NLog" version="4.4.12" targetFramework="net461" />\r
<package id="RestSharp" version="105.2.3" targetFramework="net461" />\r
-using Newtonsoft.Json.Linq;\r
+using LinkDotNet.MessageHandling.Contracts;\r
+using Newtonsoft.Json.Linq;\r
using NLog;\r
using RestSharp;\r
using RestSharp.Authenticators;\r
}\r
\r
public class OctopusAPI {\r
- public const string UNNAMED = "<Unnamed>";\r
-\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
+ public const string UNNAMED = "<Unnamed>";\r
private RestClient client;\r
private string user;\r
private string pwd;\r
- private OctopusErrorReporterDelegate errorRiporter;\r
+ private IMessageBus messageBus;\r
\r
- public OctopusAPI(string address, string user, string pwd, int timeout, OctopusErrorReporterDelegate errorRiporter) {\r
+ public OctopusAPI(string address, string user, string pwd, int timeout, IMessageBus messageBus) {\r
this.user = user;\r
this.pwd = pwd;\r
client = new RestClient(address) {\r
Authenticator = new HttpBasicAuthenticator(user, pwd),\r
Timeout = timeout\r
};\r
- this.errorRiporter = errorRiporter;\r
+ this.messageBus = messageBus;\r
+ }\r
+\r
+ private void OnError(Exception e) {\r
+ logger.Error(e);\r
+ if (messageBus != null)\r
+ messageBus.Send(new OctopusAPIMessage("Sikertelen kapcsolódás a MediaCube OCTOPUS szolgáltatásához."));\r
}\r
\r
public IEnumerable<Rundown> GetRundowns(DateTime scheduledDate) {\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
- return result;\r
+ OnError(e);\r
}\r
return result;\r
}\r
\r
- public IEnumerable<Story> GetStories(string rundownID) {\r
+ public IEnumerable<Story> GetRundownStories(string rundownID) {\r
IEnumerable<Story> result = null;\r
try {\r
var request = new RestRequest("stories/{rundownID}", Method.GET);\r
Story r = new Story {\r
ID = d["id"].ToString(),\r
Name = d["name"].ToString(),\r
- MosObjects = objs.ToArray()\r
+ MosObjects = objs?.ToArray()\r
};\r
if (d["script"] != null)\r
r.Script = d["script"].ToString();\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
+ OnError(e);\r
}\r
return result;\r
}\r
\r
- public IEnumerable<Story> GetStoriesByStoryFolderID(string storyFolderID) {\r
+ public IEnumerable<Story> GetStoryFolderStories(string storyFolderID) {\r
IEnumerable<Story> result = null;\r
try {\r
var request = new RestRequest("storiesByStoryFolderID/{storyFolderID}", Method.GET);\r
Story r = new Story {\r
ID = d["id"].ToString(),\r
Name = d["name"].ToString(),\r
- MosObjects = objs.ToArray()\r
+ MosObjects = objs?.ToArray()\r
};\r
if (d["script"] != null) {\r
r.Script = d["script"].ToString();\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
+ OnError(e);\r
}\r
return result;\r
}\r
}\r
\r
private List<MosObject> GetMosObjectsFromStory(JToken d) {\r
- JToken[] array = d["mosObjects"].ToArray();\r
+ JToken mosObjects = d["mosObjects"];\r
+ if (mosObjects == null)\r
+ return null;\r
+ JToken[] array = mosObjects.ToArray();\r
List<MosObject> objs = new List<MosObject>();\r
foreach (JToken token in array) {\r
MosObject mosObject = new MosObject() {\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
+ OnError(e);\r
}\r
return result;\r
}\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
+ OnError(e);\r
}\r
return result;\r
}\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
+ OnError(e);\r
}\r
return result;\r
}\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
+ OnError(e);\r
}\r
return result;\r
}\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
+ OnError(e);\r
}\r
return result;\r
}\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
+ OnError(e);\r
}\r
return result;\r
}\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
+ OnError(e);\r
}\r
return result;\r
}\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
+ OnError(e);\r
}\r
return result;\r
}\r
});\r
}\r
catch (Exception e) {\r
- errorRiporter?.Invoke(DateTime.Now, "Error", e.Message, System.Drawing.Color.Red);\r
+ OnError(e);\r
}\r
return result;\r
}\r
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
</PropertyGroup>\r
<ItemGroup>\r
+ <Reference Include="LinkDotNet.MessageHandling.Contracts, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">\r
+ <HintPath>..\packages\LinkDotNet.MessageBus.Contracts.0.1.1\lib\LinkDotNet.MessageHandling.Contracts.dll</HintPath>\r
+ </Reference>\r
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">\r
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>\r
</Reference>\r
-using System;\r
+using LinkDotNet.MessageHandling.Contracts;\r
+using System;\r
\r
namespace OctopusClient {\r
public class OctopusConfiguration {\r
public string UserName { get; set; }\r
public string Password { get; set; }\r
public int Timeout;\r
+ public IMessageBus MessageBus { get; set; }\r
}\r
}\r
using System.Windows.Forms;\r
using System.Collections.Generic;\r
using System.ComponentModel;\r
-using System.Drawing;\r
using System.Runtime.InteropServices;\r
+using LinkDotNet.MessageHandling.Contracts;\r
\r
namespace OctopusClient {\r
public delegate void OnSelectedIDChanged(string id, string name);\r
- public delegate void ClearCheckBox();\r
- public delegate void OctopusErrorReporterDelegate(DateTime time, String level, String message, Color color);\r
-\r
-\r
\r
public partial class OctopusIDSelector : UserControl {\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
private int selectedRundownIndex = -1;\r
private TreeNode selectedNode;\r
private OctopusAPI client;\r
-\r
- public OctopusErrorReporterDelegate ErrorReporter { get; set; }\r
public OnSelectedIDChanged IDChangedEvent { get; set; }\r
\r
public OctopusConfiguration Configuration {\r
set {\r
- client = new OctopusAPI(value.Address.OriginalString, value.UserName, value.Password, value.Timeout, ErrorReporter);\r
- refreshStoryFolders();\r
+ client = new OctopusAPI(value.Address.OriginalString, value.UserName, value.Password, value.Timeout, value.MessageBus);\r
+ //refreshStoryFolders();\r
refreshRundowns();\r
}\r
}\r
InitializeComponent();\r
InitializeControlTexts();\r
treeOctopus.AfterCheck += OnTreeAfterCheck;\r
+\r
+ //treeOctopus.DrawMode = TreeViewDrawMode.OwnerDrawText;\r
+ //treeOctopus.DrawNode += new DrawTreeNodeEventHandler(OnDrawNode);\r
+ }\r
+\r
+ void OnDrawNode(object sender, DrawTreeNodeEventArgs e) {\r
+ //if ((e.State & TreeNodeStates.Selected) == TreeNodeStates.Selected) {\r
+ // Graphics g = e.Graphics;\r
+ // using (SolidBrush brush = new SolidBrush(Color.Gainsboro)) {\r
+ // e.Graphics.FillRectangle(brush, e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height);\r
+ // }\r
+ // TextRenderer.DrawText(e.Graphics, e.Node.Text, treeOctopus.Font, e.Bounds, treeOctopus.ForeColor, TextFormatFlags.Left | TextFormatFlags.Top);\r
+ //} else {\r
+ // e.DrawDefault = true;\r
+ //}\r
+ e.DrawDefault = true;\r
}\r
\r
private void InitializeControlTexts() {\r
if (rundown == null)\r
return;\r
logger.Info("Selected rundown {0} {1}", rundown.ID, rundown.Name);\r
- IEnumerable<Story> stories = client.GetStories(rundown.ID);\r
- if (stories != null)\r
- foreach (var story in stories) {\r
- string name = story.Name == null ? "<UnNamed>" : story.Name;\r
- TreeNode actualNode = treeOctopus.Nodes.Add(story.ID, String.Format($"{story.ID} {story.Name}"));\r
- HideCheckBox(treeOctopus, actualNode);\r
- MosObject[] mosObjects = story.MosObjects;\r
- foreach (MosObject mosObject in mosObjects) {\r
- TreeNode node = actualNode.Nodes.Add(mosObject.ObjID, String.Format($"{mosObject.ID} {mosObject.ObjID}"));\r
- node.Tag = mosObject.ID;\r
- }\r
- }\r
+ IEnumerable<Story> stories = client.GetRundownStories(rundown.ID);\r
+ if (stories == null)\r
+ return;\r
+ AddStories(stories);\r
selectedRundownIndex = comboRudowns.SelectedIndex;\r
}\r
\r
+ private void AddStories(IEnumerable<Story> stories) {\r
+ foreach (var story in stories) {\r
+ string name = story.Name == null ? "<UnNamed>" : story.Name;\r
+ TreeNode actualNode = treeOctopus.Nodes.Add(story.ID, String.Format($"{story.ID} {story.Name}"));\r
+ HideCheckBox(treeOctopus, actualNode);\r
+ MosObject[] mosObjects = story.MosObjects;\r
+ if (mosObjects == null)\r
+ continue;\r
+ foreach (MosObject mosObject in mosObjects) {\r
+ TreeNode node = actualNode.Nodes.Add(mosObject.ObjID, String.Format($"{mosObject.ObjID}"));\r
+ node.Tag = mosObject.ID;\r
+ }\r
+ }\r
+ }\r
+\r
private void comboStoryFolder_SelectedValueChanged(object sender, EventArgs e) {\r
StoryFolder storyFolder = comboStoryFolder.SelectedValue as StoryFolder;\r
if (storyFolder == null)\r
logger.Info("Selected StoryFolder {0} {1}", storyFolder.ID, storyFolder.Name);\r
if (storyFolder.ID.Equals("0"))\r
return;\r
- var stories = client.GetStoriesByStoryFolderID(storyFolder.ID);\r
+ var stories = client.GetStoryFolderStories(storyFolder.ID);\r
if (stories == null)\r
return;\r
- foreach (var story in stories) {\r
- TreeNode actualNode = treeOctopus.Nodes.Add(story.ID, String.Format($"{story.ID} {story.Name}"));\r
- HideCheckBox(treeOctopus, actualNode);\r
- MosObject[] mosObjects = story.MosObjects;\r
- foreach (MosObject mosObject in mosObjects) {\r
- TreeNode node = actualNode.Nodes.Add(mosObject.ObjID, String.Format($"{mosObject.ID} {mosObject.ObjID}"));\r
- node.Tag = mosObject.ID;\r
- }\r
- }\r
+ AddStories(stories);\r
selectedStoryFolderIndex = comboStoryFolder.SelectedIndex;\r
}\r
\r
Cursor.Current = Cursors.WaitCursor;\r
IEnumerable<Rundown> rundowns = client.GetRundowns(dateScheduled.Value)?.ToArray();\r
if (rundowns == null) {\r
- bindingRundown.Remove(Resources.VALASSZON_ELEMET);\r
+ bindingRundown.DataSource = null;\r
Cursor.Current = Cursors.Default;\r
return;\r
}\r
BindingList<Rundown> bindingRundowns = new BindingList<Rundown>();\r
bindingRundowns.Add(new Rundown() { ID = 0.ToString(), Name = Resources.VALASSZON_ELEMET });\r
- if (rundowns == null) {\r
- Cursor.Current = Cursors.Default;\r
- return;\r
- }\r
foreach (Rundown actualRundown in rundowns)\r
bindingRundowns.Add(actualRundown);\r
bindingRundown.DataSource = bindingRundowns;\r
bindingStoryFolders.Add(actualStoryFolder);\r
bindingStoryFolder.DataSource = bindingStoryFolders;\r
comboStoryFolder.SelectedIndex = selectedStoryFolderIndex == -1 ? 0 : selectedStoryFolderIndex;\r
- InitCheckID(treeOctopus.Nodes); \r
+ InitCheckID(treeOctopus.Nodes);\r
}\r
\r
private void InitCheckID(TreeNodeCollection collection) {\r
private void RefreshPlaceHolderIDS(String ID) {\r
treeOctopus.Nodes.Clear();\r
\r
- var stories = client.GetStoriesByStoryFolderID(ID);\r
+ var stories = client.GetStoryFolderStories(ID);\r
if (stories == null)\r
return;\r
foreach (var story in stories)\r
SendMessage(tvw.Handle, TVM_SETITEM, IntPtr.Zero, ref tvi);\r
}\r
}\r
+\r
+ public class OctopusAPIMessage : IMessage {\r
+ public OctopusAPIMessage(string message) {\r
+ Content = message;\r
+ }\r
+ public string Content { get; set; }\r
+ }\r
}\r
<?xml version="1.0" encoding="utf-8"?>\r
<packages>\r
+ <package id="LinkDotNet.MessageBus.Contracts" version="0.1.1" targetFramework="net461" />\r
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />\r
<package id="NLog" version="4.4.12" targetFramework="net461" />\r
<package id="RestSharp" version="105.2.3" targetFramework="net461" />\r
using System.Data.SqlClient;\r
using NLog;\r
using TrafficClient.Workers;\r
+using LinkDotNet.MessageHandling.Contracts;\r
\r
namespace TrafficClient {\r
public class TrafficAPI {\r
private ADWorker adWorker;\r
private SegmentWorker segmentWorker;\r
\r
- public TrafficAPI(string connString, string user, string password, int timeout, TrafficErrorReporterDelegate errorReporter) {\r
+ public TrafficAPI(string connString, string user, string password, int timeout, IMessageBus messageBus) {\r
connectionString = String.Format("{0};User ID={1};Password={2};Connection Timeout={3}", connString, user, password, timeout/1000);\r
connection = new SqlConnection(connectionString);\r
cliFSPReader = new CliFSPReader();\r
- broadcastWorker = new MaterialWorker(connection, cliFSPReader, errorReporter);\r
- promoWorker = new PromoWorker(connection, cliFSPReader, errorReporter);\r
- adWorker = new ADWorker(connection, cliFSPReader, errorReporter);\r
- segmentWorker = new SegmentWorker(connection, cliFSPReader, errorReporter);\r
+ broadcastWorker = new MaterialWorker(connection, cliFSPReader, messageBus);\r
+ promoWorker = new PromoWorker(connection, cliFSPReader, messageBus);\r
+ adWorker = new ADWorker(connection, cliFSPReader, messageBus);\r
+ segmentWorker = new SegmentWorker(connection, cliFSPReader, messageBus);\r
}\r
\r
public List<TrafficItem> GetMaterials(string strParam, bool problematic, DateTime? from = null, DateTime? to = null) {\r
return broadcastWorker.GetMaterialArchiveMetadata(strParam);\r
}\r
\r
- public void SetMaterialInformation(int itemID, bool ready, TrafficMetadataType kind, List<Segment> segments) {\r
+ public void UpdateTrafficInformation(int itemID, bool ready, TrafficMetadataType kind, List<Segment> segments) {\r
switch (kind) {\r
case TrafficMetadataType.TrafficMaterial: {\r
broadcastWorker.SetMaterialOK(itemID, false);\r
segmentWorker.DeleteMaterialSegments(itemID);\r
foreach (Segment actualSegment in segments)\r
- AddSegmentToCopia(itemID, actualSegment);\r
+ segmentWorker.AddMaterialSegment(itemID, actualSegment);\r
broadcastWorker.SetMaterialOK(itemID, ready);\r
break;\r
}\r
case TrafficMetadataType.TrafficAD: {\r
- adWorker.SetADOK(itemID, false);\r
- segmentWorker.DeleteMaterialSegments(itemID);\r
if (segments != null && segments.Count == 1)\r
- AddSegmentToCopia(itemID, segments[0]);\r
- broadcastWorker.SetMaterialOK(itemID, ready);\r
+ segmentWorker.AddADSegment(itemID, segments[0]);\r
+ adWorker.SetADOK(itemID, true);\r
break;\r
}\r
case TrafficMetadataType.TrafficPromo: {\r
- promoWorker.SetPromoOK(itemID, false);\r
- segmentWorker.DeleteMaterialSegments(itemID);\r
- //ensurevisible-be rávizsgálni\r
+ promoWorker.SetPromoOK(itemID, true);\r
if (segments != null && segments.Count == 1)\r
- AddSegmentToCopia(itemID, segments[0]);\r
- broadcastWorker.SetMaterialOK(itemID, ready);\r
+ segmentWorker.AddPromoSegment(itemID, segments[0]);\r
break;\r
}\r
}\r
return promoWorker.GetPromos(search, problematic);\r
}\r
\r
- public List<TrafficItemMetadata> GetPromoMetadata(string strParam) {\r
+ public List<TrafficItemMetadata> GetPromoArchiveMetadata(string strParam) {\r
return promoWorker.GetPromoArchiveMetadata(strParam);\r
}\r
\r
return adWorker.GetADs(search, problematic);\r
}\r
\r
- public List<TrafficItemMetadata> GetADMetadata(string strParam) {\r
+ public List<TrafficItemMetadata> GetADArchiveMetadata(string strParam) {\r
return adWorker.GetADArchiveMetadata(strParam);\r
}\r
\r
- public List<Segment> GetBroadcastSegments(int itemID) {\r
+ public List<Segment> GetMaterialSegments(int itemID) {\r
return segmentWorker.GetMaterialSegments(itemID);\r
}\r
\r
return segmentWorker.GetPromoSegments(strParam);\r
}\r
\r
- public List<Segment> GetAdvertisementSegments(string strParam) {\r
+ public List<Segment> GetADSegments(string strParam) {\r
return segmentWorker.GetADSegments(strParam);\r
}\r
\r
- public void DeleteSegments(int itemID) {\r
- segmentWorker.DeleteMaterialSegments(itemID);\r
- }\r
+ //public void DeleteMaterialSegments(int itemID) {\r
+ // segmentWorker.DeleteMaterialSegments(itemID);\r
+ //}\r
\r
- public void DeleteSegment(int itemID, int segmentID) {\r
- segmentWorker.DeleteMaterialSegment(itemID, segmentID);\r
- }\r
+ //public void DeleteMaterialSegment(int itemID, int segmentID) {\r
+ // segmentWorker.DeleteMaterialSegment(itemID, segmentID);\r
+ //}\r
\r
- public void AddSegmentToCopia(int itemID, Segment segment) {\r
- segmentWorker.AddSegment(itemID, segment);\r
- }\r
+ //public void AddMaterialSegment(int itemID, Segment segment) {\r
+ // segmentWorker.AddMaterialSegment(itemID, segment);\r
+ //}\r
}\r
}\r
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
</PropertyGroup>\r
<ItemGroup>\r
+ <Reference Include="LinkDotNet.MessageHandling.Contracts, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">\r
+ <HintPath>..\packages\LinkDotNet.MessageBus.Contracts.0.1.1\lib\LinkDotNet.MessageHandling.Contracts.dll</HintPath>\r
+ </Reference>\r
<Reference Include="NLog">\r
<HintPath>..\packages\NLog.4.4.11\lib\net45\NLog.dll</HintPath>\r
</Reference>\r
</ItemGroup>\r
<ItemGroup>\r
<None Include="app.config" />\r
+ <None Include="packages.config" />\r
<None Include="Properties\DataSources\TrafficAPI.datasource">\r
<CopyToOutputDirectory>Always</CopyToOutputDirectory>\r
</None>\r
<Generator>SettingsSingleFileGenerator</Generator>\r
<LastGenOutput>Settings.Designer.cs</LastGenOutput>\r
</None>\r
- <Compile Include="TrafficIDSelector.Columns.cs">\r
+ <Compile Include="TrafficIDSelectorColumns.cs">\r
<SubType>UserControl</SubType>\r
</Compile>\r
</ItemGroup>\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
+using LinkDotNet.MessageHandling.Contracts;\r
+using System;\r
\r
-namespace TrafficClient\r
-{\r
- public class TrafficConfiguration\r
- {\r
+namespace TrafficClient {\r
+ public class TrafficConfiguration {\r
public Uri Address { get; set; }\r
public string UserName { get; set; }\r
public string Password { get; set; }\r
public int Timeout;\r
- public TrafficErrorReporterDelegate ErrorReporter { get; set; }\r
+ public IMessageBus MessageBus { get; set; }\r
}\r
}\r
this.dgTraffic.DefaultCellStyle = dataGridViewCellStyle2;\r
this.dgTraffic.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.dgTraffic.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;\r
+ this.dgTraffic.EnableHeadersVisualStyles = false;\r
this.dgTraffic.Location = new System.Drawing.Point(0, 0);\r
this.dgTraffic.MultiSelect = false;\r
this.dgTraffic.Name = "dgTraffic";\r
using System.Windows.Forms;\r
using System;\r
-using System.Drawing;\r
using System.Collections.Generic;\r
using System.Diagnostics;\r
+using LinkDotNet.MessageHandling.Contracts;\r
\r
namespace TrafficClient {\r
public delegate void OnSelectedIDChanged(string ID, int variantID);\r
- public delegate void TrafficErrorReporterDelegate(DateTime time, String level, String message, Color color);\r
\r
public partial class TrafficIDSelector : UserControl {\r
public TrafficAPI trafficAPI { get; private set; }\r
public OnSelectedIDChanged IDChangedEvent { get; set; }\r
private DataGridViewCheckBoxCell selectedCell;\r
- public TrafficErrorReporterDelegate ErrorReporter { get; set; }\r
\r
public TrafficIDSelector() {\r
InitializeComponent();\r
\r
public TrafficConfiguration Configuration {\r
set {\r
- trafficAPI = new TrafficAPI(value.Address.OriginalString, value.UserName, value.Password, value.Timeout, value.ErrorReporter);\r
+ trafficAPI = new TrafficAPI(value.Address.OriginalString, value.UserName, value.Password, value.Timeout, value.MessageBus);\r
}\r
}\r
\r
public string EpisodeDescription { get; set; }\r
public string EpisodeID { get; set; }\r
}\r
+\r
+ public class TrafficAPIMessage : IMessage {\r
+ public TrafficAPIMessage(string message) {\r
+ Content = message;\r
+ }\r
+ public string Content { get; set; }\r
+ }\r
}\r
using System.Data;\r
using System.Data.SqlClient;\r
using NLog;\r
+using LinkDotNet.MessageHandling.Contracts;\r
\r
namespace TrafficClient.Workers {\r
public class ADWorker : TrafficWorker {\r
\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
\r
- public ADWorker(SqlConnection connection, CliFSPReader cliFSPReader, TrafficErrorReporterDelegate errorReporter) :\r
- base(connection, cliFSPReader, errorReporter) {\r
+ public ADWorker(SqlConnection connection, CliFSPReader cliFSPReader, IMessageBus messageBus) :\r
+ base(connection, cliFSPReader, messageBus) {\r
}\r
\r
private TrafficItem ToTrafficItem(clIFsp_EC_MAMAdvertismentResult data) {\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
return result;\r
}\r
\r
+ /*\r
+ -- 3100: Reklámspot adatainak módosítása\r
+ -- ItemID: Reklámspot ID (tbl_CommSpot.t_SpotID)\r
+ -- Options=Null esetén nem módosítja az Options által módosítandó adatokat\r
+ -- Options & 1: Spot adásra kész (t_OKForAir)\r
+ -- IntParam1: TcIn (frame-ben)\r
+ -- IntParam2: TcOut (frame-ben) (Duration-t nem kell megadni, majd számítjuk)\r
+ -- IntParam3 (opcionális): aspect ratio\r
+ -- StrParam1(opcionális): kulcsszavak \r
+ */\r
public void SetADOK(int itemID, bool ok) {\r
try {\r
TryConnect();\r
cmd.Parameters.AddWithValue("@Operation", 3100);\r
cmd.Parameters.AddWithValue("@@ItemID", itemID);\r
cmd.Parameters.AddWithValue("@@@Options", options);\r
+ cmd.Parameters.AddWithValue("@@IntParam1", DBNull.Value);\r
+ cmd.Parameters.AddWithValue("@@IntParam2", DBNull.Value);\r
cmd.ExecuteNonQuery();\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
using System.Data.SqlClient;\r
using NLog;\r
using System.Diagnostics;\r
+using LinkDotNet.MessageHandling.Contracts;\r
\r
namespace TrafficClient.Workers {\r
\r
\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
\r
- public MaterialWorker(SqlConnection connection, CliFSPReader cliFSPReader, TrafficErrorReporterDelegate errorReporter) \r
- : base(connection, cliFSPReader, errorReporter){\r
+ public MaterialWorker(SqlConnection connection, CliFSPReader cliFSPReader, IMessageBus messageBus) \r
+ : base(connection, cliFSPReader, messageBus) {\r
}\r
\r
private TrafficItem ToTrafficItem(clIFsp_EC_MAMBradocastResult data) {\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
using NLog;\r
using System.Drawing;\r
using System.Diagnostics;\r
+using LinkDotNet.MessageHandling.Contracts;\r
\r
namespace TrafficClient.Workers {\r
public class PromoWorker : TrafficWorker {\r
\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
\r
- public PromoWorker(SqlConnection connection, CliFSPReader cliFSPReader, TrafficErrorReporterDelegate errorReporter)\r
- : base(connection, cliFSPReader, errorReporter) {\r
+ public PromoWorker(SqlConnection connection, CliFSPReader cliFSPReader, IMessageBus messageBus)\r
+ : base(connection, cliFSPReader, messageBus) {\r
}\r
\r
private TrafficItem ToTrafficItem(clIFsp_EC_MAMPromotionalResult data) {\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
using System.Data;\r
using System.Data.SqlClient;\r
using NLog;\r
+using LinkDotNet.MessageHandling.Contracts;\r
\r
namespace TrafficClient.Workers {\r
public class SegmentWorker : TrafficWorker {\r
\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
\r
- public SegmentWorker(SqlConnection connection, CliFSPReader cliFSPReader, TrafficErrorReporterDelegate errorReporter) :\r
- base(connection, cliFSPReader, errorReporter) {\r
+ public SegmentWorker(SqlConnection connection, CliFSPReader cliFSPReader, IMessageBus messageBus) :\r
+ base(connection, cliFSPReader, messageBus) {\r
}\r
\r
private Segment ToSegment(clIFsp_EC_MAMPromotionalResult item) {\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
}\r
}\r
\r
- public void AddSegment(int itemID, Segment segment) {\r
+ public void AddMaterialSegment(int itemID, Segment segment) {\r
object strparam = segment.Comment;\r
if (String.IsNullOrEmpty(segment.Comment))\r
strparam = DBNull.Value;\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
+ }\r
+ finally {\r
+ connection.Close();\r
+ }\r
+ }\r
+\r
+ public void AddADSegment(int itemID, Segment segment) {\r
+ object comment = segment.Comment;\r
+ if (String.IsNullOrEmpty(segment.Comment))\r
+ comment = DBNull.Value;\r
+ try {\r
+ TryConnect();\r
+ using (SqlCommand cmd = new SqlCommand("dbo.clIFsp_EC_MAM", connection)) {\r
+ int optionalParam = segment.Optional ? 1 : 0;\r
+ cmd.CommandType = CommandType.StoredProcedure;\r
+ cmd.Parameters.AddWithValue("@Operation", 3100);\r
+ cmd.Parameters.AddWithValue("@@ItemID", itemID);\r
+ cmd.Parameters.AddWithValue("@@@Options", DBNull.Value);\r
+ cmd.Parameters.AddWithValue("@@IntParam1", segment.TCIn);\r
+ cmd.Parameters.AddWithValue("@@IntParam2", segment.TCOut);\r
+ cmd.Parameters.AddWithValue("@@StrParam2", comment);\r
+ cmd.ExecuteNonQuery();\r
+ }\r
+ }\r
+ catch (Exception e) {\r
+ OnError(logger, e);\r
+ }\r
+ finally {\r
+ connection.Close();\r
+ }\r
+ }\r
+\r
+ public void AddPromoSegment(int itemID, Segment segment) {\r
+ object comment = segment.Comment;\r
+ if (String.IsNullOrEmpty(segment.Comment))\r
+ comment = DBNull.Value;\r
+ try {\r
+ TryConnect();\r
+ using (SqlCommand cmd = new SqlCommand("dbo.clIFsp_EC_MAM", connection)) {\r
+ int optionalParam = segment.Optional ? 1 : 0;\r
+ cmd.CommandType = CommandType.StoredProcedure;\r
+ cmd.Parameters.AddWithValue("@Operation", 2100);\r
+ cmd.Parameters.AddWithValue("@@ItemID", itemID);\r
+ cmd.Parameters.AddWithValue("@@@Options", DBNull.Value);\r
+ cmd.Parameters.AddWithValue("@@IntParam1", segment.TCIn);\r
+ cmd.Parameters.AddWithValue("@@IntParam2", segment.TCOut);\r
+ cmd.Parameters.AddWithValue("@@StrParam2", comment);\r
+ cmd.ExecuteNonQuery();\r
+ }\r
+ }\r
+ catch (Exception e) {\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
- errorReporter?.Invoke(DateTime.Now, "Error", String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
+ OnError(logger, e);\r
}\r
finally {\r
connection.Close();\r
-using System.Data;\r
+using LinkDotNet.MessageHandling.Contracts;\r
+using NLog;\r
+using System;\r
+using System.Data;\r
using System.Data.SqlClient;\r
\r
namespace TrafficClient.Workers {\r
public class TrafficWorker {\r
\r
- protected TrafficErrorReporterDelegate errorReporter;\r
+ protected IMessageBus messageBus;\r
protected CliFSPReader cliFSPReader;\r
protected SqlConnection connection;\r
\r
- public TrafficWorker(SqlConnection connection, CliFSPReader cliFSPReader, TrafficErrorReporterDelegate errorReporter) {\r
+ public TrafficWorker(SqlConnection connection, CliFSPReader cliFSPReader, IMessageBus messageBus) {\r
this.connection = connection;\r
this.cliFSPReader = cliFSPReader;\r
- this.errorReporter = errorReporter;\r
+ this.messageBus = messageBus;\r
}\r
+\r
protected void TryConnect() {\r
if (connection.State != ConnectionState.Open) {\r
connection.Close();\r
}\r
}\r
\r
+ protected void OnError(Logger logger, Exception e) {\r
+ logger.Error(e);\r
+ if (messageBus != null)\r
+ messageBus.Send(new TrafficAPIMessage("Sikertelen kapcsolódás a TRAFFIC rendszerhez."));\r
+ }\r
+\r
+\r
}\r
}\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<packages>\r
+ <package id="LinkDotNet.MessageBus.Contracts" version="0.1.1" targetFramework="net461" />\r
+</packages>
\ No newline at end of file
jobengine.jobsteps.root=../user.jobengine.osgi.server/resources/executors\r
jobengine.jobtemplates.root=../user.jobengine.osgi.server/resources/templates\r
jobengine.jobsteps.alternate.root=../user.jobengine.executors/bin/user/jobengine/server/steps\r
-jobengine.db.url=jdbc:db2://10.10.1.28:50000/mc:retrieveMessagesFromServerOnGetMessage=true;\r
+jobengine.db.url=jdbc:db2://10.10.1.27:50000/mc:retrieveMessagesFromServerOnGetMessage=true;\r
jobengine.db.user=db2admin\r
jobengine.db.password=password\r
jobengine.octopus.api.address=http://10.10.1.11/api/v1\r
jobengine.octopus.api.user=mam\r
jobengine.octopus.api.password=napocska\r
-jobengine.nosql.db.url=jdbc:db2://10.10.1.28:50000/mc:retrieveMessagesFromServerOnGetMessage=true;\r
+jobengine.nosql.db.url=jdbc:db2://10.10.1.27:50000/mc:retrieveMessagesFromServerOnGetMessage=true;\r
jobengine.nosql.db.user=db2admin\r
jobengine.nosql.db.password=password\r
jobengine.nexio.db.url=jdbc:sqlserver://10.10.1.59:1433;databaseName=NXDB;\r
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>\r
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
\r
- <remote.address>scp://root:password@10.10.1.28</remote.address>\r
+ <remote.address>scp://root:password@10.10.1.27</remote.address>\r
<remote.hostkey>ssh-ed25519 256 ea:ab:67:70:79:63:2f:6a:34:81:48:e2:b9:dd:ca:d4</remote.hostkey>\r
</properties>\r
\r
<launcherArgs>\r
<programArgs>-consoleLog -console 5555\r
</programArgs>\r
- <vmArgs>-Dfile.encoding=UTF-8\r
--agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888\r
--Djavax.ws.rs.ext.RuntimeDelegate=org.jboss.resteasy.spi.ResteasyProviderFactory\r
-\r
-#System\r
--Djetty.home=/opt/mediacube/configuration/jetty\r
--Dlog4j.configurationFile=/opt/mediacube/configuration/log4j2.xml\r
--Djobengine.jobsteps.root=/opt/mediacube/configuration/executors\r
--Djobengine.jobtemplates.root=/opt/mediacube/configuration/jobtemplates\r
--Djobengine.jobscheduling.config=/opt/mediacube/configuration/scheduledjobs.json\r
-\r
--Dorg.eclipse.equinox.http.jetty.http.port=80\r
--Dorg.eclipse.epp.logging.aeri.skipReports=true \r
--Declipse.ignoreApp=true \r
--Dosgi.noShutdown=true\r
--Djobengine.loglevel=INFO\r
--Djetty.etc.config.urls=etc/user-jetty.xml,etc/user-jetty-ssl.xml,etc/user-jetty-ssl-context.xml,etc/user-jetty-http.xml,etc/user-jetty-https.xml\r
- </vmArgs>\r
- <vmArgsLin>#Database
--Djobengine.db.url=jdbc:db2://localhost:50000/mc:retrieveMessagesFromServerOnGetMessage=true;
--Djobengine.db.user=db2admin
--Djobengine.db.password=password
--Djobengine.nosql.db.url=jdbc:db2://localhost:50000/mc:retrieveMessagesFromServerOnGetMessage=true;
--Djobengine.nosql.db.user=db2admin
--Djobengine.nosql.db.password=password
--Djobengine.nosql.db.schema=test
-
-#Octopus
--Djobengine.octopus.api.address=http://10.10.1.11/api/v1
--Djobengine.octopus.api.user=mam
--Djobengine.octopus.api.password=napocska
+ <vmArgs>-Dfile.encoding=UTF-8
+-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888
+-Djavax.ws.rs.ext.RuntimeDelegate=org.jboss.resteasy.spi.ResteasyProviderFactory
-#Selenio
--Djobengine.selenio.address=http://10.10.1.71:44000/TranscodeMgrWS?wsdl
--Djobengine.selenio.projectfilepath=\\10.10.1.71\Data\Blueprints\MP4_H264_AAC_v4.zenium
+#System
+-Djetty.home=/opt/mediacube/configuration/jetty
+-Dlog4j.configurationFile=/opt/mediacube/configuration/log4j2.xml
+-Djobengine.jobsteps.root=/opt/mediacube/configuration/executors
+-Djobengine.jobtemplates.root=/opt/mediacube/configuration/jobtemplates
+-Djobengine.jobscheduling.config=/opt/mediacube/configuration/scheduledjobs.json
-#Nexio
--Dnexio.host=10.10.1.56\r
+-Dorg.eclipse.equinox.http.jetty.http.port=80
+-Dorg.eclipse.epp.logging.aeri.skipReports=true
+-Declipse.ignoreApp=true
+-Dosgi.noShutdown=true
+-Djobengine.loglevel=INFO
+-Djetty.etc.config.urls=etc/user-jetty.xml,etc/user-jetty-ssl.xml,etc/user-jetty-ssl-context.xml,etc/user-jetty-http.xml,etc/user-jetty-https.xml\r
+ </vmArgs>\r
+ <vmArgsLin>#Database\r
+-Djobengine.db.url=jdbc:db2://localhost:50000/mc:retrieveMessagesFromServerOnGetMessage=true;\r
+-Djobengine.db.user=db2admin\r
+-Djobengine.db.password=password\r
+-Djobengine.nosql.db.url=jdbc:db2://localhost:50000/mc:retrieveMessagesFromServerOnGetMessage=true;\r
+-Djobengine.nosql.db.user=db2admin\r
+-Djobengine.nosql.db.password=password\r
+-Djobengine.nosql.db.schema=test\r
+\r
+#Octopus\r
+-Djobengine.octopus.api.address=http://10.10.1.11/api/v1\r
+-Djobengine.octopus.api.user=mam\r
+-Djobengine.octopus.api.password=napocska\r
+\r
+#Selenio\r
+-Djobengine.selenio.address=http://10.10.1.71:44000/TranscodeMgrWS?wsdl\r
+-Djobengine.selenio.projectfilepath=\\10.10.1.71\Data\Blueprints\MP4_H264_AAC_v4.zenium\r
+\r
+#Nexio\r
+-Dnexio.host=10.10.1.55\r
</vmArgsLin>\r
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts\r
</vmArgsMac>\r
<argument>"open ${remote.address} -hostkey=""${remote.hostkey}"""</argument>\r
<!-- <argument>"call ${remote.location}/stop-mediacube.sh 2>/dev/null"</argument> -->\r
<argument>"call pcs resource disable mediacube_script"</argument>\r
+ <argument>"call sleep 5"</argument>\r
<argument>"call rm -rf ${remote.location}"</argument>\r
<argument>"call mkdir ${remote.location}"</argument>\r
<argument>"lcd ${local.location}"</argument>\r
<argument>"cd ${remote.location}"</argument>\r
<argument>"synchronize remote"</argument>\r
+ <argument>"mkdir log"</argument>\r
<argument>"call chmod +x mediacube"</argument>\r
<argument>"call pcs resource enable mediacube_script"</argument>\r
<!-- <argument>"call chmod +x stop-mediacube.sh"</argument> -->\r
import user.commons.remotestore.ProgressEvent;\r
\r
public class OctopusDataMiner implements Runnable {\r
+ private static final String MOS_ID = "mosId";\r
+ private static final String MOS_OBJECTS = "mosObjects";\r
+ private static final String NAME = "name";\r
private static final String LABEL = "label";\r
private static final String SIMPLE_LINEFEED = "\n";\r
private static final String MOSOBJECT = "Bejátszó: ";\r
private static final String SCRIPT_CONTENT = "script_content";\r
private static final Logger logger = LogManager.getLogger();\r
private static final String SAVING_STORY_ID = "Saving story {}";\r
- private static final String SAVEING_RUNDOWN_D = "Saveing rundown : %d";\r
+ private static final String SAVING_RUNDOWN = "Saving rundown : {} {}";\r
private static final String REF_RUNDOWN = "rundown";\r
private static final String REF_STORYFOLDER = "story_folder";\r
private static final String POSITION = "position";\r
BasicDBObject parent = (BasicDBObject) res.get("parent");\r
if (parent == null || parent.isEmpty())\r
return name;\r
- String parentName = parent.getString("name");\r
- String actualName = actual.getString("name");\r
+ String parentName = parent.getString(NAME);\r
+ String actualName = actual.getString(NAME);\r
String newName = String.format("%s/%s", parentName, actualName);\r
return concatParentsToStoryFolder(parent, newName);\r
}\r
return result;\r
}\r
\r
+ private BasicDBList GetRelevantMOSObjects(BasicDBObject story) {\r
+ BasicDBList result = null;\r
+ List<BasicDBObject> mosObjects = NoSQLUtils.asList(asDBList(story, MOS_OBJECTS));\r
+ for (BasicDBObject mosObject : mosObjects) {\r
+ if (!mosObject.containsKey(MOS_ID))\r
+ continue;\r
+ String mosId = mosObject.getString(MOS_ID);\r
+ if (!"NEXIO.MOS".equals(mosId))\r
+ continue;\r
+ if (result == null)\r
+ result = new BasicDBList();\r
+ result.add(mosObject);\r
+ }\r
+ return result;\r
+ }\r
+\r
private String GetScriptContent(BasicDBObject story) {\r
BasicDBObject script = asDBObject(story, SCRIPT);\r
if (script == null || script.isEmpty())\r
/* teszt */\r
List<BasicDBObject> list = NoSQLUtils.asList(result);\r
for (BasicDBObject actual : list) {\r
- String fullName = concatParentsToStoryFolder(actual, actual.getString("name"));\r
+ String fullName = concatParentsToStoryFolder(actual, actual.getString(NAME));\r
//logger.info("Checking StoryFolder {}", fullName);\r
- actual.remove("name");\r
- actual.append("name", fullName);\r
+ actual.remove(NAME);\r
+ actual.append(NAME, fullName);\r
}\r
\r
logger.trace(EXIT);\r
collection.save(timeObject);\r
}\r
\r
- private void storeRundown(BasicDBObject rundown, Date lastUpdateTime) {\r
- logger.trace(ENTER);\r
- long rundownID = rundown.getLong(ID);\r
-\r
- BasicDBObject rundownWithStories = queryRundown(rundownID);\r
- BasicDBList stories = asDBList(rundownWithStories, SLUGS);\r
- if (stories != null)\r
- storeRundownStories(stories, lastUpdateTime);\r
- rundown.put(SCHEDULED_START, toDate(rundown, SCHEDULED_START));\r
- rundown.put(MODIFIED, toDate(rundown, MODIFIED));\r
- DBCollection collection = db.getCollection(RUNDOWN_COLLECTION_NAME);\r
- if (lastUpdateTime == null || (lastUpdateTime != null && isModified(lastUpdateTime, rundown))) {\r
- logger.info(String.format(SAVEING_RUNDOWN_D, rundownID));\r
- collection.save(rundown);\r
- }\r
- logger.trace(EXIT);\r
- }\r
-\r
// private void insertStoryFoldersToDB2() {\r
// DBCollection collection = db.getCollection(STORY_FOLDER_COLLECTION_NAME);\r
// Set<String> storyKeys = storyFolders.keySet();\r
// storyFolders = converter.convertBasicDBObjectFromJson(result);\r
// }\r
\r
+ private void storeRundown(BasicDBObject rundown, Date lastUpdateTime) {\r
+ logger.trace(ENTER);\r
+ long rundownID = rundown.getLong(ID);\r
+ String name = rundown.containsKey(NAME) ? rundown.getString(NAME) : null;\r
+\r
+ BasicDBObject rundownWithStories = queryRundown(rundownID);\r
+ BasicDBList stories = asDBList(rundownWithStories, SLUGS);\r
+ if (stories != null)\r
+ storeRundownStories(stories, lastUpdateTime);\r
+ rundown.put(SCHEDULED_START, toDate(rundown, SCHEDULED_START));\r
+ rundown.put(MODIFIED, toDate(rundown, MODIFIED));\r
+ DBCollection collection = db.getCollection(RUNDOWN_COLLECTION_NAME);\r
+ if (lastUpdateTime == null || (lastUpdateTime != null && isModified(lastUpdateTime, rundown))) {\r
+ logger.info(SAVING_RUNDOWN, rundownID, name);\r
+ collection.save(rundown);\r
+ }\r
+ logger.trace(EXIT);\r
+ }\r
+\r
private void storeRundowns(BasicDBList rundowns, Date lastUpdateTime) {\r
logger.trace(ENTER);\r
List<BasicDBObject> rundownsList = NoSQLUtils.asList(rundowns);\r
DBCollection collection = db.getCollection(STORY_COLLECTION_NAME);\r
if (lastUpdateTime != null) {\r
BasicDBObject orig = (BasicDBObject) collection.findOne(new BasicDBObject(ID, storyID), new BasicDBObject(ID, 1));\r
- story.put("_id", orig.getID());\r
+ if (orig != null)\r
+ story.put("_id", orig.getID());\r
}\r
if (rundownRef != null)\r
story.put(REF_RUNDOWN, rundownRef);\r
story.put(REF_STORYFOLDER, storyFolderRef);\r
String scriptContent = GetScriptContent(story);\r
story.put(SCRIPT_CONTENT, scriptContent);\r
+ BasicDBList modifiedMOS = GetRelevantMOSObjects(story);\r
+ if (modifiedMOS == null || modifiedMOS.isEmpty()) {\r
+ if (story.containsKey(MOS_OBJECTS))\r
+ story.remove(MOS_OBJECTS);\r
+ } else\r
+ story.put(MOS_OBJECTS, modifiedMOS);\r
logger.info(SAVING_STORY_ID, storyID);\r
collection.save(story);\r
logger.trace(EXIT);\r
<div height="100%" width="100%" style="background: #e3e3e3" align="left">\r
<groupbox height="94%" closable="false">\r
<caption sclass="boldfont" label="Aktív folyamatok" />\r
- <listbox id="lbJobList" model="@load(jlm.jobList)" multiple="true" autopaging="true" mold="default" vflex="true" checkmark="true" \r
+ <listbox id="lbJobList" sizedByContent="false" model="@load(jlm.jobList)" multiple="true" autopaging="true" mold="default" vflex="true" checkmark="true" \r
onSelect="@command('selectJob')" style="border: none; background: #e3e3e3 !important;" oddRowSclass="listbox-odd-style" sclass="listbox-normal-style" >\r
- <listhead>\r
+ <listhead sizable="true">\r
<listheader label="Id" hflex="min" align="left"/>\r
<listheader label="Name" hflex="min" align="left"/>\r
- <listheader label="Priority" hflex="min" sort="auto(priority)" align="left"/>\r
- <listheader label="Status" hflex="min" sort="auto(status)" align="left"/>\r
+ <listheader label="Priority" hflex="min" align="left"/>\r
+ <listheader label="Status" hflex="min" align="left"/>\r
<listheader label="Progress" width="200px" align="left"/>\r
<listheader label="Message" align="left"/>\r
</listhead>\r
if (children == null)
children = new ArrayList<>();
children.add(c);
- Message m = logger.getMessageFactory().newMessage("Child {}. of {}", children.size(), this.getId());
+ Message m = logger.getMessageFactory().newMessage("{} alfolyamata", children.size(), this.getId());
c.setName(m.getFormattedMessage());
c.setParentJobId(this.getId());
}
public Object[] run(IJobEngine jobEngine, IJobRuntime jobRuntime, Object[] inputs) throws Exception {\r
Object[] result = null;\r
this.jobRuntime = jobRuntime;\r
- jobRuntime.setDescription("Current step: " + getClass().getSimpleName());\r
+ jobRuntime.setDescription("Feldolgozás: " + getClass().getSimpleName());\r
jobRuntime.NotifyUpdate();\r
for (Method method : getClass().getDeclaredMethods()) {\r
Annotation annotation = method.getAnnotation(StepEntry.class);\r
for (int i = 0; i < 1; i++) {\r
\r
try {\r
- scheduler.register(scheduledJob);\r
+ if (!scheduledJob.isActive())\r
+ scheduler.register(scheduledJob);\r
scheduler.executeImmediate(scheduledJob.getTemplateName());\r
Thread.sleep(100);\r
} catch (Exception e) {\r
+ //Page not found /pages/MessageBox.zul\r
+ //Messagebox.show(e.getMessage());\r
}\r
}\r
\r
\r
import static org.junit.Assert.assertEquals;\r
\r
+import java.util.concurrent.Semaphore;\r
+\r
import org.junit.Test;\r
\r
import user.jobengine.server.IJobEngine;\r
import user.jobengine.server.JobRuntime;\r
import user.jobengine.server.Program;\r
\r
-public class JobStepTest {\r
+public class JobStepTest {\r
+\r
+ @Test\r
+ public void testBatchRun() throws Exception {\r
+ int c = 2;\r
+ Semaphore barrier = new Semaphore(c);\r
+ for (int i = 0; i < 10; i++) {\r
+ barrier.acquire();\r
+ final int x = i;\r
+ Thread t = new Thread(new Runnable() {\r
+\r
+ @Override\r
+ public void run() {\r
+ System.out.println("Thread start " + x);\r
+ try {\r
+ Thread.sleep(2000);\r
+ } catch (InterruptedException e) {\r
+ e.printStackTrace();\r
+ }\r
+ barrier.release();\r
+ //System.out.println("Thread completed " + x);\r
+ }\r
+\r
+ });\r
+ t.start();\r
+\r
+ }\r
+\r
+ barrier.acquire(c);\r
+ }\r
\r
@Test\r
public void testRun() throws Exception {\r
\r
// Exercise\r
Object[] outputs = sut.run(jobEngine, jobRuntime, inputs);\r
- \r
+\r
// Verify\r
assertEquals(2, sut.getParameters().size());\r
assertEquals(stringValue, sut.getParameters().get(0));\r