From 4ee4de87f1d999d9fd8fc38db2f7182a44f9962c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Fri, 3 Nov 2017 23:17:19 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30686 --- .../Maestro/ArchiveMetadataForm.Designer.cs | 72 +++++++++--------- .../Configuration/configuration-editor.json | 5 +- .../configuration-nexio-ingest.json | 52 +++++++++++++ .../configuration-playout-ingest.json | 60 +++++++++++++++ .../Configuration/configuration-playout.json | 4 +- client/Maestro/Maestro.csproj | 6 ++ client/Maestro/MaestroForm.Designer.cs | 50 ++++++------ client/Maestro/MaestroForm.Metadata.cs | 23 +++--- client/Maestro/MaestroForm.Source.cs | 4 +- client/Maestro/MaestroForm.cs | 16 ---- client/Maestro/Properties/AssemblyInfo.cs | 4 +- .../installforge-installer-project.ifp | Bin 3576 -> 3576 bytes client/OctopusClient/OctopusAPI.cs | 4 +- .../OctopusIDSelector.Designer.cs | 1 - client/OctopusClient/OctopusIDSelector.cs | 16 +--- client/OctopusClient/OctopusIDSelector.resx | 6 -- client/PlanAIRClient/TrafficAPI.cs | 28 +++---- .../TrafficIDSelector.Designer.cs | 46 ++++++----- client/PlanAIRClient/TrafficIDSelector.cs | 33 ++++---- .../PlanAIRClient/Workers/MaterialWorker.cs | 36 +++++++-- .../steps/OutputPathAndNameSelectorStep.java | 7 +- .../org.eclipse.core.resources.prefs | 1 - .../pages/index.zul | 5 +- .../user.jobengine.osgi.server/pages/menu.zul | 26 ++----- .../user/jobengine/zk/model/MenuModel.java | 8 ++ 25 files changed, 297 insertions(+), 216 deletions(-) create mode 100644 client/Maestro/Configuration/configuration-nexio-ingest.json create mode 100644 client/Maestro/Configuration/configuration-playout-ingest.json diff --git a/client/Maestro/ArchiveMetadataForm.Designer.cs b/client/Maestro/ArchiveMetadataForm.Designer.cs index 2c644bc2..ffd26be7 100644 --- a/client/Maestro/ArchiveMetadataForm.Designer.cs +++ b/client/Maestro/ArchiveMetadataForm.Designer.cs @@ -47,7 +47,7 @@ // label_stuffID // this.label_stuffID.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label_stuffID.Location = new System.Drawing.Point(8, 12); + this.label_stuffID.Location = new System.Drawing.Point(8, 5); this.label_stuffID.Name = "label_stuffID"; this.label_stuffID.Size = new System.Drawing.Size(87, 13); this.label_stuffID.TabIndex = 0; @@ -56,7 +56,7 @@ // label_stuffDescription // this.label_stuffDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label_stuffDescription.Location = new System.Drawing.Point(8, 92); + this.label_stuffDescription.Location = new System.Drawing.Point(8, 83); this.label_stuffDescription.Name = "label_stuffDescription"; this.label_stuffDescription.Size = new System.Drawing.Size(66, 13); this.label_stuffDescription.TabIndex = 2; @@ -65,7 +65,7 @@ // label_mediaID // this.label_mediaID.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label_mediaID.Location = new System.Drawing.Point(8, 166); + this.label_mediaID.Location = new System.Drawing.Point(8, 205); this.label_mediaID.Name = "label_mediaID"; this.label_mediaID.Size = new System.Drawing.Size(86, 13); this.label_mediaID.TabIndex = 3; @@ -75,7 +75,7 @@ // this.label_mediaTitle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label_mediaTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.label_mediaTitle.Location = new System.Drawing.Point(8, 206); + this.label_mediaTitle.Location = new System.Drawing.Point(8, 244); this.label_mediaTitle.Name = "label_mediaTitle"; this.label_mediaTitle.Size = new System.Drawing.Size(57, 13); this.label_mediaTitle.TabIndex = 4; @@ -85,7 +85,7 @@ // this.label_mediaDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label_mediaDescription.AutoSize = true; - this.label_mediaDescription.Location = new System.Drawing.Point(8, 246); + this.label_mediaDescription.Location = new System.Drawing.Point(8, 283); this.label_mediaDescription.Name = "label_mediaDescription"; this.label_mediaDescription.Size = new System.Drawing.Size(65, 13); this.label_mediaDescription.TabIndex = 5; @@ -94,62 +94,62 @@ // textBox_itemID // this.textBox_itemID.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBox_itemID.Location = new System.Drawing.Point(8, 28); + this.textBox_itemID.Location = new System.Drawing.Point(8, 21); this.textBox_itemID.Name = "textBox_itemID"; this.textBox_itemID.ReadOnly = true; - this.textBox_itemID.Size = new System.Drawing.Size(549, 20); + this.textBox_itemID.Size = new System.Drawing.Size(532, 20); this.textBox_itemID.TabIndex = 6; // // textBox_itemTitle // this.textBox_itemTitle.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBox_itemTitle.Location = new System.Drawing.Point(8, 68); + this.textBox_itemTitle.Location = new System.Drawing.Point(8, 60); this.textBox_itemTitle.Name = "textBox_itemTitle"; - this.textBox_itemTitle.Size = new System.Drawing.Size(549, 20); + this.textBox_itemTitle.Size = new System.Drawing.Size(532, 20); this.textBox_itemTitle.TabIndex = 7; // // textBox_itemDescription // this.textBox_itemDescription.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBox_itemDescription.Location = new System.Drawing.Point(8, 108); + this.textBox_itemDescription.Location = new System.Drawing.Point(8, 99); this.textBox_itemDescription.Multiline = true; this.textBox_itemDescription.Name = "textBox_itemDescription"; this.textBox_itemDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.textBox_itemDescription.Size = new System.Drawing.Size(549, 48); + this.textBox_itemDescription.Size = new System.Drawing.Size(532, 103); this.textBox_itemDescription.TabIndex = 8; // // textBox_mediaID // this.textBox_mediaID.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBox_mediaID.Location = new System.Drawing.Point(8, 182); + this.textBox_mediaID.Location = new System.Drawing.Point(8, 221); this.textBox_mediaID.Name = "textBox_mediaID"; this.textBox_mediaID.ReadOnly = true; - this.textBox_mediaID.Size = new System.Drawing.Size(549, 20); + this.textBox_mediaID.Size = new System.Drawing.Size(532, 20); this.textBox_mediaID.TabIndex = 9; // // textBox_mediaTitle // this.textBox_mediaTitle.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBox_mediaTitle.Location = new System.Drawing.Point(8, 222); + this.textBox_mediaTitle.Location = new System.Drawing.Point(8, 260); this.textBox_mediaTitle.Name = "textBox_mediaTitle"; - this.textBox_mediaTitle.Size = new System.Drawing.Size(549, 20); + this.textBox_mediaTitle.Size = new System.Drawing.Size(532, 20); this.textBox_mediaTitle.TabIndex = 10; // // textBox_mediaDescription // this.textBox_mediaDescription.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBox_mediaDescription.Location = new System.Drawing.Point(8, 262); + this.textBox_mediaDescription.Location = new System.Drawing.Point(8, 299); this.textBox_mediaDescription.Multiline = true; this.textBox_mediaDescription.Name = "textBox_mediaDescription"; this.textBox_mediaDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.textBox_mediaDescription.Size = new System.Drawing.Size(549, 87); + this.textBox_mediaDescription.Size = new System.Drawing.Size(532, 216); this.textBox_mediaDescription.TabIndex = 11; // // label_stuffTitle // this.label_stuffTitle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label_stuffTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.label_stuffTitle.Location = new System.Drawing.Point(8, 52); + this.label_stuffTitle.Location = new System.Drawing.Point(8, 44); this.label_stuffTitle.Name = "label_stuffTitle"; this.label_stuffTitle.Size = new System.Drawing.Size(58, 13); this.label_stuffTitle.TabIndex = 1; @@ -160,16 +160,16 @@ this.groupBox1.Controls.Add(this.btnOk); this.groupBox1.Controls.Add(this.btnCancel); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox1.Location = new System.Drawing.Point(0, 357); + this.groupBox1.Location = new System.Drawing.Point(0, 523); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(565, 48); + this.groupBox1.Size = new System.Drawing.Size(548, 48); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; // // btnOk // this.btnOk.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.btnOk.Location = new System.Drawing.Point(484, 16); + this.btnOk.Location = new System.Drawing.Point(467, 16); this.btnOk.Name = "btnOk"; this.btnOk.Size = new System.Drawing.Size(75, 23); this.btnOk.TabIndex = 1; @@ -181,7 +181,7 @@ // this.btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Right; this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(405, 16); + this.btnCancel.Location = new System.Drawing.Point(388, 16); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(75, 23); this.btnCancel.TabIndex = 0; @@ -210,19 +210,19 @@ this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(5); this.tableLayoutPanel1.RowCount = 12; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 54F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 54F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(565, 357); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.Size = new System.Drawing.Size(548, 523); this.tableLayoutPanel1.TabIndex = 3; // // ArchiveMetadataForm @@ -231,7 +231,7 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(565, 405); + this.ClientSize = new System.Drawing.Size(548, 571); this.Controls.Add(this.tableLayoutPanel1); this.Controls.Add(this.groupBox1); this.Icon = global::Maestro.Properties.Resources.AppIcon; diff --git a/client/Maestro/Configuration/configuration-editor.json b/client/Maestro/Configuration/configuration-editor.json index e410558d..67d782db 100644 --- a/client/Maestro/Configuration/configuration-editor.json +++ b/client/Maestro/Configuration/configuration-editor.json @@ -1,8 +1,7 @@ - -{ +{ "title": "Szerkesztő", "active": false, - "startInTray": false, + "startInTray": true, "enableCustomMetadataId": true, "player": { "enabled": true, diff --git a/client/Maestro/Configuration/configuration-nexio-ingest.json b/client/Maestro/Configuration/configuration-nexio-ingest.json new file mode 100644 index 00000000..596cbe60 --- /dev/null +++ b/client/Maestro/Configuration/configuration-nexio-ingest.json @@ -0,0 +1,52 @@ +{ + "title": "NEXIO betöltő", + "active": true, + "startInTray": false, + "enableCustomMetadataId": true, + "player": { + "enabled": true, + "autoStart": false, + "segmentEditor": true + }, + "source": { + "$type": "UNCSource", + "filter": "avi,wav,mxf", + "local": { + "address": "file://c:/x" + } + }, + "metadatas": [ + { + "$type": "OctopusMetadata", + "server": { + "address": "http://10.10.1.27/services/rest/octopus/", + "timeout": 1000 + } + }, + { + "$type": "MediaCubeMetadata", + "server": { + "address": "http://10.10.1.27/services/rest/jobengine/", + "timeout": 1000 + } + } + ], + "targets": [ + { + "label": "Stúdióba küldés", + "processor": "FTPTargetProcessor", + "outputFormat": "%ID%", + "tag": "Betöltés", + "nexioServer": true, + "killDateDays": 7, + "disableFileVersioning": true, + "agency": "HÍRADÓ TEST", + "remote": { + "address": "ftp://10.10.1.55:2098", + "userName": "administrator", + "password": "+QtkeQdCTiOvZOgK/kUND4pO4/D+//r7ZIyluwMMdiqMEgO8iJErAG10ooWhPfiljQeXrdeyMzo7gWEZtcWpNSomGeDIbdMyQwtpqmMo1VEM3A27ZfzigY09YD46ECRh", + "timeout": 1000 + } + } + ] +} diff --git a/client/Maestro/Configuration/configuration-playout-ingest.json b/client/Maestro/Configuration/configuration-playout-ingest.json new file mode 100644 index 00000000..bb755209 --- /dev/null +++ b/client/Maestro/Configuration/configuration-playout-ingest.json @@ -0,0 +1,60 @@ +{ + "title": "Lebony betöltő", + "active": true, + "startInTray": false, + "enableCustomMetadataId": true, + "player": { + "enabled": true, + "autoStart": false, + "segmentEditor": true + }, + "source": { + "$type": "UNCSource", + "local": { + "address": "file://10.10.1.100/BRAAVOS/READY", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + }, + "remote": { + "address": "ftp://10.10.1.100/READY", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + }, + "metadatas": [ + { + "$type": "TrafficMetadata", + "server": { + "address": "Data Source=10.10.1.45\\sql16;Initial Catalog=PA_Echo;Persist Security Info=True;", + "userName": "MAM", + "password": "7RKZYBzumKjL40SJwuwiFCvX57xuCN8zay6OttUm2wbrgImyYZBHyZTUUYrXX31Ge2Uwew07HYsqh2uzdJeDBDwcVntxaHg3nIpv9Dyq/odVoiC4tUF/K+lgvKWANcrZ", + "timeout": 1000 + } + }, + { + "$type": "MediaCubeMetadata", + "server": { + "address": "http://10.10.1.27/services/rest/jobengine/", + "timeout": 1000 + } + } + ], + "targets": [ + { + "label": "Adáskész", + "processor": "FXPTargetProcessor", + "outputFormat": "%ID%", + "saveSegments": true, + "tag": "Adáskész", + "disableFileVersioning": true, + "remote": { + "address": "ftp://10.10.1.100/PLAYOUT/IceGateway", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + } + ] +} diff --git a/client/Maestro/Configuration/configuration-playout.json b/client/Maestro/Configuration/configuration-playout.json index abf37876..9a542e42 100644 --- a/client/Maestro/Configuration/configuration-playout.json +++ b/client/Maestro/Configuration/configuration-playout.json @@ -1,6 +1,6 @@ { "title": "Adáslebony", - "active": true, + "active": false, "startInTray": true, "enableCustomMetadataId": true, "player": { @@ -43,7 +43,7 @@ { "$type": "MediaCubeMetadata", "server": { - "address": "http://10.10.1.28/services/rest/jobengine/", + "address": "http://10.10.1.27/services/rest/jobengine/", "timeout": 1000 } } diff --git a/client/Maestro/Maestro.csproj b/client/Maestro/Maestro.csproj index a956c42f..5ff8fe44 100644 --- a/client/Maestro/Maestro.csproj +++ b/client/Maestro/Maestro.csproj @@ -248,12 +248,18 @@ Form + + PreserveNewest + PreserveNewest PreserveNewest + + PreserveNewest + diff --git a/client/Maestro/MaestroForm.Designer.cs b/client/Maestro/MaestroForm.Designer.cs index 0fc4654f..546aa09d 100644 --- a/client/Maestro/MaestroForm.Designer.cs +++ b/client/Maestro/MaestroForm.Designer.cs @@ -54,7 +54,7 @@ namespace Maestro { this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer3 = new System.Windows.Forms.SplitContainer(); this.groupMetadata = new System.Windows.Forms.GroupBox(); - this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabMetadata = new System.Windows.Forms.TabControl(); this.tpOctopus = new System.Windows.Forms.TabPage(); this.octopusIDSelector = new OctopusClient.OctopusIDSelector(); this.tpTraffic = new System.Windows.Forms.TabPage(); @@ -86,10 +86,10 @@ namespace Maestro { this.dataGridMessages = new System.Windows.Forms.DataGridView(); this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.systemMessageBindingSource = new System.Windows.Forms.BindingSource(this.components); - this.metadataInfoBindingSource = new System.Windows.Forms.BindingSource(this.components); this.timeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.messageDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.systemMessageBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.metadataInfoBindingSource = new System.Windows.Forms.BindingSource(this.components); this.groupSource.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit(); @@ -104,7 +104,7 @@ namespace Maestro { this.splitContainer3.Panel2.SuspendLayout(); this.splitContainer3.SuspendLayout(); this.groupMetadata.SuspendLayout(); - this.tabControl1.SuspendLayout(); + this.tabMetadata.SuspendLayout(); this.tpOctopus.SuspendLayout(); this.tpTraffic.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); @@ -318,7 +318,7 @@ namespace Maestro { // groupMetadata // this.groupMetadata.BackColor = System.Drawing.Color.Transparent; - this.groupMetadata.Controls.Add(this.tabControl1); + this.groupMetadata.Controls.Add(this.tabMetadata); this.groupMetadata.Controls.Add(this.tableLayoutPanel1); this.groupMetadata.Dock = System.Windows.Forms.DockStyle.Fill; this.groupMetadata.Location = new System.Drawing.Point(0, 0); @@ -331,17 +331,17 @@ namespace Maestro { this.groupMetadata.Enter += new System.EventHandler(this.groupBox_Enter); this.groupMetadata.Leave += new System.EventHandler(this.groupBox_Leave); // - // tabControl1 + // tabMetadata // - this.tabControl1.Controls.Add(this.tpOctopus); - this.tabControl1.Controls.Add(this.tpTraffic); - this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControl1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.tabControl1.Location = new System.Drawing.Point(10, 23); - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(286, 376); - this.tabControl1.TabIndex = 1; + this.tabMetadata.Controls.Add(this.tpOctopus); + this.tabMetadata.Controls.Add(this.tpTraffic); + this.tabMetadata.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.tabMetadata.Location = new System.Drawing.Point(10, 23); + this.tabMetadata.Name = "tabMetadata"; + this.tabMetadata.SelectedIndex = 0; + this.tabMetadata.Size = new System.Drawing.Size(286, 376); + this.tabMetadata.TabIndex = 1; // // tpOctopus // @@ -787,14 +787,6 @@ namespace Maestro { this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; this.dataGridViewTextBoxColumn2.ReadOnly = true; // - // systemMessageBindingSource - // - this.systemMessageBindingSource.DataSource = typeof(Maestro.SystemMessage); - // - // metadataInfoBindingSource - // - this.metadataInfoBindingSource.DataSource = typeof(Maestro.Metadata.MetadataInfo); - // // timeDataGridViewTextBoxColumn // this.timeDataGridViewTextBoxColumn.DataPropertyName = "Time"; @@ -811,6 +803,14 @@ namespace Maestro { this.messageDataGridViewTextBoxColumn.ReadOnly = true; this.messageDataGridViewTextBoxColumn.Width = 83; // + // systemMessageBindingSource + // + this.systemMessageBindingSource.DataSource = typeof(Maestro.SystemMessage); + // + // metadataInfoBindingSource + // + this.metadataInfoBindingSource.DataSource = typeof(Maestro.Metadata.MetadataInfo); + // // MaestroForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -840,7 +840,7 @@ namespace Maestro { ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); this.splitContainer3.ResumeLayout(false); this.groupMetadata.ResumeLayout(false); - this.tabControl1.ResumeLayout(false); + this.tabMetadata.ResumeLayout(false); this.tpOctopus.ResumeLayout(false); this.tpTraffic.ResumeLayout(false); this.tpTraffic.PerformLayout(); @@ -883,7 +883,7 @@ namespace Maestro { private System.Windows.Forms.GroupBox groupActions; private System.Windows.Forms.DataGridView dataGridJobs; private System.Windows.Forms.BindingSource bindingSourceJobs; - private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabControl tabMetadata; private System.Windows.Forms.TabPage tpOctopus; private OctopusClient.OctopusIDSelector octopusIDSelector; private System.Windows.Forms.TabPage tpTraffic; diff --git a/client/Maestro/MaestroForm.Metadata.cs b/client/Maestro/MaestroForm.Metadata.cs index 94de2c79..5e74d6ef 100644 --- a/client/Maestro/MaestroForm.Metadata.cs +++ b/client/Maestro/MaestroForm.Metadata.cs @@ -51,8 +51,10 @@ namespace Maestro { private void InitializeTrafficSelector() { TrafficMetadata metadata = Configuration.GetMetadataProvider(); - if (metadata == null) + if (metadata == null) { + tabMetadata.TabPages.Remove(tpTraffic); return; + } trafficIDSelector.Configuration = new TrafficConfiguration() { Address = metadata.Server.Address, UserName = metadata.Server.UserName, @@ -65,8 +67,10 @@ namespace Maestro { private void InitializeOctopusSelector() { OctopusMetadata metadata = Configuration.GetMetadataProvider(); - if (metadata == null) + if (metadata == null) { + tabMetadata.TabPages.Remove(tpOctopus); return; + } octopusIDSelector.Configuration = new OctopusConfiguration() { Address = metadata.Server.Address, UserName = metadata.Server.UserName, @@ -248,15 +252,10 @@ namespace Maestro { if (String.IsNullOrEmpty(id)) return null; OctopusAPI api = octopusIDSelector.GetClient(); - IEnumerable storyEnum = api.GetStoriesById(id); - if (storyEnum != null) - FillModelFromStories(result, storyEnum.ToList(), api); - else { - IEnumerable storiesEnum = api.GetStoriesByPlaceHolderId(id); - if (storiesEnum != null) { - List stories = storiesEnum.ToList(); - FillModelFromStories(result, stories, api); - } + IEnumerable storiesEnum = api.GetStoriesByPlaceHolderId(id); + if (storiesEnum != null) { + List stories = storiesEnum.ToList(); + FillModelFromStories(result, stories, api); } return result; } @@ -265,7 +264,7 @@ namespace Maestro { if (stories == null || stories.Count == 0) return; Story story = stories[0]; - if (story.StoryFolders != null) { + if (story.StoryFolders != null && story.StoryFolders.Length > 0) { IEnumerable storyFoldersEnum = api.GetStoryFoldersByStoryID(story.ID); if (storyFoldersEnum == null) return; diff --git a/client/Maestro/MaestroForm.Source.cs b/client/Maestro/MaestroForm.Source.cs index 5c7ab370..8745a84b 100644 --- a/client/Maestro/MaestroForm.Source.cs +++ b/client/Maestro/MaestroForm.Source.cs @@ -158,6 +158,8 @@ namespace Maestro { } private string GetPrefix(string name) { + if (String.IsNullOrEmpty(name)) + return null; string[] byHyphen = name.Replace('_', '-').Replace('.', '-').Split('-'); return byHyphen.Length > 0 ? byHyphen[0] : null; } @@ -172,7 +174,7 @@ namespace Maestro { if (selectionPrefix == null) selectionPrefix = currentPrefix; else - selectionPrefix = currentPrefix.Equals(selectionPrefix) ? selectionPrefix : null; + selectionPrefix = selectionPrefix.Equals(currentPrefix) ? selectionPrefix : null; } SelectedSource = new SourceInfo() { Name = selectedNames, diff --git a/client/Maestro/MaestroForm.cs b/client/Maestro/MaestroForm.cs index da25cc5e..5845a393 100644 --- a/client/Maestro/MaestroForm.cs +++ b/client/Maestro/MaestroForm.cs @@ -80,7 +80,6 @@ namespace Maestro { InitializeMetadata(); InitializeTarget(); InitializeJobs(); - //InitializeMessages(); InitializeControlTexts(); } @@ -94,21 +93,6 @@ namespace Maestro { } - private void InitializeMessages() { - //dataGridMessages.Columns.AddRange( - // new DataGridViewTextBoxColumn() { - // AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells, - // DataPropertyName = "Time", - // HeaderText = StringResources.IDO - // }, - // new DataGridViewTextBoxColumn() { - // AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells, - // DataPropertyName = "Message", - // HeaderText = StringResources.UZENET - // } - //); - } - private void InitializeJobs() { bindingSourceJobs.DataSource = jobs; foreach (DataGridViewColumn column in dataGridJobs.Columns) { diff --git a/client/Maestro/Properties/AssemblyInfo.cs b/client/Maestro/Properties/AssemblyInfo.cs index f8ce90b3..08ceaa4d 100644 --- a/client/Maestro/Properties/AssemblyInfo.cs +++ b/client/Maestro/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.9.3.0")] -[assembly: AssemblyFileVersion("1.9.3.0")] +[assembly: AssemblyVersion("1.9.4.0")] +[assembly: AssemblyFileVersion("1.9.4.0")] diff --git a/client/Maestro/Resources/installforge-installer-project.ifp b/client/Maestro/Resources/installforge-installer-project.ifp index ef230307baed3572002fb489d606a9ac057acb9d..9115e9bd1312bb5206178f96b77eb1069fbe3b14 100644 GIT binary patch delta 19 bcmew%{X=>}CZoy5tZOWcCYv2uw{rjhQQ!wR delta 19 bcmew%{X=>}CZqAjtZOWc#+w~kw{rjhQO*Z7 diff --git a/client/OctopusClient/OctopusAPI.cs b/client/OctopusClient/OctopusAPI.cs index 1123ee7c..7e4f8eaa 100644 --- a/client/OctopusClient/OctopusAPI.cs +++ b/client/OctopusClient/OctopusAPI.cs @@ -495,8 +495,8 @@ namespace OctopusClient { Name = d["name"].ToString(), MosObjects = objs.ToArray() }; - if (d["script"] != null) { - r.Script = d["script"].ToString(); + if (d["script_content"] != null) { + r.Script = d["script_content"].ToString(); } if (d["story_folder"] != null) r.StoryFolders = GetStoryFolderFromStory(d).ToArray(); diff --git a/client/OctopusClient/OctopusIDSelector.Designer.cs b/client/OctopusClient/OctopusIDSelector.Designer.cs index f5c9aa33..5da9be3b 100644 --- a/client/OctopusClient/OctopusIDSelector.Designer.cs +++ b/client/OctopusClient/OctopusIDSelector.Designer.cs @@ -46,7 +46,6 @@ this.dateScheduled.Format = System.Windows.Forms.DateTimePickerFormat.Short; this.dateScheduled.Location = new System.Drawing.Point(6, 6); this.dateScheduled.Name = "dateScheduled"; - this.dateScheduled.ShowUpDown = true; this.dateScheduled.Size = new System.Drawing.Size(82, 20); this.dateScheduled.TabIndex = 0; this.dateScheduled.ValueChanged += new System.EventHandler(this.dateScheduled_ValueChanged); diff --git a/client/OctopusClient/OctopusIDSelector.cs b/client/OctopusClient/OctopusIDSelector.cs index 319fc497..abf2ab5f 100644 --- a/client/OctopusClient/OctopusIDSelector.cs +++ b/client/OctopusClient/OctopusIDSelector.cs @@ -110,7 +110,7 @@ namespace OctopusClient { private void refreshRundowns() { ClearSelection(); Cursor.Current = Cursors.WaitCursor; - IEnumerable rundowns = client.GetRundowns(dateScheduled.Value)?.ToArray(); + IEnumerable rundowns = client.GetRundowns(dateScheduled.Value.Date)?.ToArray(); if (rundowns == null) { bindingRundown.DataSource = null; Cursor.Current = Cursors.Default; @@ -219,23 +219,11 @@ namespace OctopusClient { else IDChangedEvent?.Invoke(null, null); } - - public void IDSelectedFromOutside(string id) { - this.id = id; - if (tabControl1.SelectedIndex == 0) { - refreshStoryFolders(); - refreshRundowns(); - } else { - refreshRundowns(); - refreshStoryFolders(); - } - } - + public OctopusAPI GetClient() { return client; } - private const int TVIF_STATE = 0x8; private const int TVIS_STATEIMAGEMASK = 0xF000; private const int TV_FIRST = 0x1100; diff --git a/client/OctopusClient/OctopusIDSelector.resx b/client/OctopusClient/OctopusIDSelector.resx index 0518ece7..f50ab11f 100644 --- a/client/OctopusClient/OctopusIDSelector.resx +++ b/client/OctopusClient/OctopusIDSelector.resx @@ -120,12 +120,6 @@ 17, 17 - - 17, 17 - - - 155, 17 - 155, 17 diff --git a/client/PlanAIRClient/TrafficAPI.cs b/client/PlanAIRClient/TrafficAPI.cs index 31b75237..7730eb74 100644 --- a/client/PlanAIRClient/TrafficAPI.cs +++ b/client/PlanAIRClient/TrafficAPI.cs @@ -13,37 +13,37 @@ namespace TrafficClient { private CliFSPReader cliFSPReader; private SqlConnection connection; private static Logger logger = LogManager.GetCurrentClassLogger(); - private MaterialWorker broadcastWorker; + private MaterialWorker materialWorker; private PromoWorker promoWorker; private ADWorker adWorker; private SegmentWorker segmentWorker; public TrafficAPI(string connString, string user, string password, int timeout, IMessageBus messageBus) { - connectionString = String.Format("{0};User ID={1};Password={2};Connection Timeout={3}", connString, user, password, timeout/1000); + connectionString = String.Format("{0};User ID={1};Password={2};Connection Timeout={3}", connString, user, password, timeout / 1000); connection = new SqlConnection(connectionString); cliFSPReader = new CliFSPReader(); - broadcastWorker = new MaterialWorker(connection, cliFSPReader, messageBus); + materialWorker = new MaterialWorker(connection, cliFSPReader, messageBus); promoWorker = new PromoWorker(connection, cliFSPReader, messageBus); adWorker = new ADWorker(connection, cliFSPReader, messageBus); segmentWorker = new SegmentWorker(connection, cliFSPReader, messageBus); } public List GetMaterials(string strParam, bool problematic, DateTime? from = null, DateTime? to = null) { - return broadcastWorker.GetMaterials(strParam, problematic, from, to); + return materialWorker.GetMaterials(strParam, problematic, from, to); } public List GetMaterialMetadata(string strParam) { - return broadcastWorker.GetMaterialArchiveMetadata(strParam); + return materialWorker.GetMaterialArchiveMetadata(strParam); } public void UpdateTrafficInformation(int itemID, bool ready, TrafficMetadataType kind, List segments) { switch (kind) { case TrafficMetadataType.TrafficMaterial: { - broadcastWorker.SetMaterialOK(itemID, false); + materialWorker.SetMaterialOK(itemID, false); segmentWorker.DeleteMaterialSegments(itemID); foreach (Segment actualSegment in segments) segmentWorker.AddMaterialSegment(itemID, actualSegment); - broadcastWorker.SetMaterialOK(itemID, ready); + materialWorker.SetMaterialOK(itemID, ready); break; } case TrafficMetadataType.TrafficAD: { @@ -89,16 +89,8 @@ namespace TrafficClient { return segmentWorker.GetADSegments(strParam); } - //public void DeleteMaterialSegments(int itemID) { - // segmentWorker.DeleteMaterialSegments(itemID); - //} - - //public void DeleteMaterialSegment(int itemID, int segmentID) { - // segmentWorker.DeleteMaterialSegment(itemID, segmentID); - //} - - //public void AddMaterialSegment(int itemID, Segment segment) { - // segmentWorker.AddMaterialSegment(itemID, segment); - //} + public string CreateMaterialVersion(string episodeID) { + return materialWorker.CreateMaterialVersion(episodeID); + } } } diff --git a/client/PlanAIRClient/TrafficIDSelector.Designer.cs b/client/PlanAIRClient/TrafficIDSelector.Designer.cs index 726e25e5..c27e6369 100644 --- a/client/PlanAIRClient/TrafficIDSelector.Designer.cs +++ b/client/PlanAIRClient/TrafficIDSelector.Designer.cs @@ -29,9 +29,9 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); this.trafficAPIBindingSource = new System.Windows.Forms.BindingSource(this.components); this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); this.backgroundWorker2 = new System.ComponentModel.BackgroundWorker(); @@ -76,22 +76,22 @@ this.dgTraffic.BackgroundColor = System.Drawing.Color.White; this.dgTraffic.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dgTraffic.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.Raised; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgTraffic.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Gainsboro; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgTraffic.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgTraffic.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); + dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.Gainsboro; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgTraffic.DefaultCellStyle = dataGridViewCellStyle5; this.dgTraffic.Dock = System.Windows.Forms.DockStyle.Fill; this.dgTraffic.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dgTraffic.EnableHeadersVisualStyles = false; @@ -99,8 +99,8 @@ this.dgTraffic.MultiSelect = false; this.dgTraffic.Name = "dgTraffic"; this.dgTraffic.RowHeadersVisible = false; - dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); - this.dgTraffic.RowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); + this.dgTraffic.RowsDefaultCellStyle = dataGridViewCellStyle6; this.dgTraffic.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); this.dgTraffic.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgTraffic.Size = new System.Drawing.Size(263, 217); @@ -116,8 +116,7 @@ this.scheduledDate.Location = new System.Drawing.Point(3, 38); this.scheduledDate.Name = "scheduledDate"; this.scheduledDate.ShowCheckBox = true; - this.scheduledDate.ShowUpDown = true; - this.scheduledDate.Size = new System.Drawing.Size(101, 20); + this.scheduledDate.Size = new System.Drawing.Size(103, 20); this.scheduledDate.TabIndex = 3; // // textBox1 @@ -225,7 +224,6 @@ this.tableLayoutPanelSearch.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 42.1875F)); this.tableLayoutPanelSearch.Size = new System.Drawing.Size(263, 62); this.tableLayoutPanelSearch.TabIndex = 10; - this.tableLayoutPanelSearch.Paint += new System.Windows.Forms.PaintEventHandler(this.tableLayoutPanelSearch_Paint); // // pSearch // diff --git a/client/PlanAIRClient/TrafficIDSelector.cs b/client/PlanAIRClient/TrafficIDSelector.cs index d7a8741f..8ff4e0e7 100644 --- a/client/PlanAIRClient/TrafficIDSelector.cs +++ b/client/PlanAIRClient/TrafficIDSelector.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; using LinkDotNet.MessageHandling.Contracts; +using System.ComponentModel; namespace TrafficClient { public delegate void OnSelectedIDChanged(string ID, int variantID); @@ -49,27 +50,21 @@ namespace TrafficClient { DateTime? scheduledDate = null; if (this.scheduledDate.Checked) scheduledDate = this.scheduledDate.Value.Date; - - List items = null; + + BindingList items = null; dgTraffic.Columns.Clear(); if (rbMaterial.Checked) { dgTraffic.Columns.AddRange(GetMaterialColumns()); - items = trafficAPI.GetMaterials(searchText, chkProblematic.Checked, scheduledDate, scheduledDate); + items = new BindingList(trafficAPI.GetMaterials(searchText, chkProblematic.Checked, scheduledDate, scheduledDate)); } else if (rbAD.Checked) { dgTraffic.Columns.AddRange(GetADColumns()); - items = trafficAPI.GetADs(searchText, chkProblematic.Checked, scheduledDate, scheduledDate); + items = new BindingList(trafficAPI.GetADs(searchText, chkProblematic.Checked, scheduledDate, scheduledDate)); } else if (rbPromo.Checked) { dgTraffic.Columns.AddRange(GetPromoColumns()); - items = trafficAPI.GetPromos(searchText, chkProblematic.Checked, scheduledDate, scheduledDate); - } - if (items == null) { - dgTraffic.DataSource = null; - Cursor.Current = Cursors.Default; - return; + items = new BindingList(trafficAPI.GetPromos(searchText, chkProblematic.Checked, scheduledDate, scheduledDate)); } - //if (CanSort(list)) - // list.Sort((x, y) => DateTime.Compare(x.NextBroadcastDate.Value, y.NextBroadcastDate.Value)); - dgTraffic.DataSource = items; + trafficAPIBindingSource.DataSource = items; + dgTraffic.DataSource = trafficAPIBindingSource; Cursor.Current = Cursors.Default; } @@ -87,11 +82,6 @@ namespace TrafficClient { RefreshDataGridSource(); } - private void tableLayoutPanelSearch_Paint(object sender, PaintEventArgs e) { - //var rectangle = e.ClipRectangle; - //ControlPaint.DrawBorder(e.Graphics, rectangle, Color.LightGray, ButtonBorderStyle.Dotted); // dotted border - } - private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0 || e.ColumnIndex != 0) return; @@ -103,8 +93,11 @@ namespace TrafficClient { private void OnSelectionChanged(DataGridViewRow actualRow) { TrafficItem res = actualRow.DataBoundItem as TrafficItem; - if (String.IsNullOrEmpty(res.MediaID)) - return; + if (String.IsNullOrEmpty(res.MediaID)) { + res.MediaID = trafficAPI.CreateMaterialVersion(res.EpisodeID); + if (String.IsNullOrEmpty(res.MediaID)) + return; + } DataGridViewCheckBoxCell actualCell = actualRow.Cells[0] as DataGridViewCheckBoxCell; if (!actualCell.Equals(selectedCell)) { ClearSelection(); diff --git a/client/PlanAIRClient/Workers/MaterialWorker.cs b/client/PlanAIRClient/Workers/MaterialWorker.cs index 3dd77503..a27e55e7 100644 --- a/client/PlanAIRClient/Workers/MaterialWorker.cs +++ b/client/PlanAIRClient/Workers/MaterialWorker.cs @@ -47,12 +47,7 @@ namespace TrafficClient.Workers { TryConnect(); using (SqlCommand cmd = new SqlCommand("dbo.clIFsp_EC_MAM", connection)) { cmd.CommandType = CommandType.StoredProcedure; -// cmd.Parameters.AddWithValue("@Operation", 1001); cmd.Parameters.AddWithValue("@Operation", 1002); - //if (problematic) - // cmd.Parameters.AddWithValue("@@@Options", 8); - //else - // cmd.Parameters.AddWithValue("@@@Options", 0); if (problematic) cmd.Parameters.AddWithValue("@@@Options", 1); else @@ -87,7 +82,6 @@ namespace TrafficClient.Workers { public List GetMaterialArchiveMetadata(string strParam) { - List sqlResult = null; List result = null; try { TryConnect(); @@ -117,6 +111,36 @@ namespace TrafficClient.Workers { return result; } + public string CreateMaterialVersion(string episodeID) { + string result = null; + try { + TryConnect(); + using (SqlCommand cmd = new SqlCommand("dbo.clIFsp_EC_MAM", connection)) { + cmd.CommandType = CommandType.StoredProcedure; + cmd.Parameters.AddWithValue("@Operation", 1105); + cmd.Parameters.AddWithValue("@@@Options", DBNull.Value); + cmd.Parameters.AddWithValue("@@IntParam1", 1); + cmd.Parameters.AddWithValue("@@ItemID", DBNull.Value); + cmd.Parameters.AddWithValue("@@StrParam1", episodeID); + cmd.Parameters.AddWithValue("@@StrParam2", DBNull.Value); + + using (SqlDataReader reader = cmd.ExecuteReader()) { + if (reader.Read()) { + if (!reader.IsDBNull(1)) + result = reader.GetString(1); + } + } + } + } + catch (Exception e) { + OnError(logger, e); + } + finally { + connection.Close(); + } + return result; + } + public void SetMaterialOK(int itemID, bool ok) { try { TryConnect(); diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/OutputPathAndNameSelectorStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/OutputPathAndNameSelectorStep.java index a758ae77..323c7e74 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/OutputPathAndNameSelectorStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/OutputPathAndNameSelectorStep.java @@ -25,8 +25,7 @@ public class OutputPathAndNameSelectorStep extends JobStep { private static final Logger logger = LogManager.getLogger(); private static final String REGEXP_TRAFFIC = "^[MRP]{1}[0-9]{6}[A-Z]{1}$"; - private static final String REGEXP_OCTOPUSPLACEHOLDERID = "^[0-9]+_[0-9]+$"; - private static final String REGEXP_OCTOPUSPLACEHOLDERVERSIONEDID = "^[0-9]+_[0-9]+-[0-9]{3}$"; + private static final String REGEXP_OCTOPUSID = "^[0-9]+$"; private void check(String trafficOutputPath, String octopusOutputPath, String genericOutputPath, String houseId) { if (StringUtils.isBlank(trafficOutputPath)) { @@ -90,9 +89,7 @@ public class OutputPathAndNameSelectorStep extends JobStep { private MetadataType GuessMetadataType(String id) { if (id.matches(REGEXP_TRAFFIC)) return MetadataType.TRAFFIC; - if (id.matches(REGEXP_OCTOPUSPLACEHOLDERID)) - return MetadataType.OCTOPUS; - if (id.matches(REGEXP_OCTOPUSPLACEHOLDERVERSIONEDID)) + if (id.matches(REGEXP_OCTOPUSID)) return MetadataType.OCTOPUS; return MetadataType.GENERIC; } diff --git a/server/user.jobengine.osgi.server/.settings/org.eclipse.core.resources.prefs b/server/user.jobengine.osgi.server/.settings/org.eclipse.core.resources.prefs index f05a3733..b482124a 100644 --- a/server/user.jobengine.osgi.server/.settings/org.eclipse.core.resources.prefs +++ b/server/user.jobengine.osgi.server/.settings/org.eclipse.core.resources.prefs @@ -1,3 +1,2 @@ eclipse.preferences.version=1 -encoding//pages/menu.zul=ISO-8859-2 encoding//src/user/jobengine/server/JobRuntime.java=UTF-8 diff --git a/server/user.jobengine.osgi.server/pages/index.zul b/server/user.jobengine.osgi.server/pages/index.zul index 27399a55..927d5442 100644 --- a/server/user.jobengine.osgi.server/pages/index.zul +++ b/server/user.jobengine.osgi.server/pages/index.zul @@ -52,11 +52,12 @@
- +
- + +
diff --git a/server/user.jobengine.osgi.server/pages/menu.zul b/server/user.jobengine.osgi.server/pages/menu.zul index 8086e0f5..f97e93bc 100644 --- a/server/user.jobengine.osgi.server/pages/menu.zul +++ b/server/user.jobengine.osgi.server/pages/menu.zul @@ -1,4 +1,4 @@ - +