From 42b92804d194737e9d304c4bc97c1184f3c04e95 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Wed, 20 Dec 2017 15:39:04 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30817 --- client/DxPlay/Properties/AssemblyInfo.cs | 4 +- ...ation-nle.json => -configuration-nle.json} | 0 ...studio.json => -configuration-studio.json} | 0 ...json => configuration-playout-ingest.json} | 2 +- .../installforge-installer-project.ifp | Bin 4093 -> 4093 bytes client/Maestro/Maestro.csproj | 6 +- client/Maestro/Properties/AssemblyInfo.cs | 4 +- client/MaestroShared/Metadata/Timecode.cs | 6 +- .../debug-mediacube-remote.launch | 2 +- server/-configuration/scheduledjobs.json | 2 +- server/-product/mediacube.product | 34 ++-- .../CopyForArchiveNEXIOMaterialsStep.java | 149 ++++++++++-------- .../server/steps/OctopusDataMiner.java | 16 ++ ....bat => test-deploy-steps-to-bsh-bkup.bat} | 2 +- ...h => test-deploy-steps-to-bsh-bkup.launch} | 2 +- .../test-deploy-steps-to-bsh-main.bat | 32 ++++ .../test-deploy-steps-to-bsh-main.launch | 8 + .../src/user/jobengine/db/Media.java | 4 + .../pages/index.zul | 2 +- .../pages/search_items.zul | 2 + .../osgi/rest/octopus/OctopusRESTService.java | 14 +- 21 files changed, 187 insertions(+), 104 deletions(-) rename client/Maestro/Configuration/{configuration-nle.json => -configuration-nle.json} (100%) rename client/Maestro/Configuration/{configuration-studio.json => -configuration-studio.json} (100%) rename client/Maestro/Configuration/{-configuration-playout-ingest.json => configuration-playout-ingest.json} (95%) rename server/user.jobengine.executors/{deploy-steps-to-bsh-bkup.bat => test-deploy-steps-to-bsh-bkup.bat} (89%) rename server/user.jobengine.executors/{deploy-steps-to-bsh-bkup.launch => test-deploy-steps-to-bsh-bkup.launch} (83%) create mode 100644 server/user.jobengine.executors/test-deploy-steps-to-bsh-main.bat create mode 100644 server/user.jobengine.executors/test-deploy-steps-to-bsh-main.launch diff --git a/client/DxPlay/Properties/AssemblyInfo.cs b/client/DxPlay/Properties/AssemblyInfo.cs index 83b07a22..97fa846a 100644 --- a/client/DxPlay/Properties/AssemblyInfo.cs +++ b/client/DxPlay/Properties/AssemblyInfo.cs @@ -26,7 +26,7 @@ using System.Runtime.CompilerServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.9")] +[assembly: AssemblyVersion("2.0.7.0")] // // In order to sign your assembly you must specify a key to use. Refer to the @@ -56,5 +56,5 @@ using System.Runtime.CompilerServices; [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] -[assembly: AssemblyFileVersion("2.0.6.9")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/client/Maestro/Configuration/configuration-nle.json b/client/Maestro/Configuration/-configuration-nle.json similarity index 100% rename from client/Maestro/Configuration/configuration-nle.json rename to client/Maestro/Configuration/-configuration-nle.json diff --git a/client/Maestro/Configuration/configuration-studio.json b/client/Maestro/Configuration/-configuration-studio.json similarity index 100% rename from client/Maestro/Configuration/configuration-studio.json rename to client/Maestro/Configuration/-configuration-studio.json diff --git a/client/Maestro/Configuration/-configuration-playout-ingest.json b/client/Maestro/Configuration/configuration-playout-ingest.json similarity index 95% rename from client/Maestro/Configuration/-configuration-playout-ingest.json rename to client/Maestro/Configuration/configuration-playout-ingest.json index aa818ef7..04854ee1 100644 --- a/client/Maestro/Configuration/-configuration-playout-ingest.json +++ b/client/Maestro/Configuration/configuration-playout-ingest.json @@ -12,7 +12,7 @@ "$type": "UNCSource", "filter": "avi,wav,mxf", "local": { - "address": "file://10.10.1.100/BRAAVOS/READY", + "address": "file://10.10.1.100/BRAAVOS/PLAYOUT/Video", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 diff --git a/client/Maestro/Installer/installforge-installer-project.ifp b/client/Maestro/Installer/installforge-installer-project.ifp index a59de308abf132099858b570da9dccd62ebb5560..72c89d73dc667034b2ac89be17be32aee41f1dca 100644 GIT binary patch delta 23 ccmew>|5tuOCbPMo!N#0xEFgNbE9(v}0BvXp7ytkO delta 23 ccmew>|5tuOCbOBI<;I+AEFgNbE9(v}0B!^bC;$Ke diff --git a/client/Maestro/Maestro.csproj b/client/Maestro/Maestro.csproj index 16808a97..ee0d9d0b 100644 --- a/client/Maestro/Maestro.csproj +++ b/client/Maestro/Maestro.csproj @@ -279,10 +279,10 @@ Always - + Always - + Always @@ -324,7 +324,7 @@ Always - + Always diff --git a/client/Maestro/Properties/AssemblyInfo.cs b/client/Maestro/Properties/AssemblyInfo.cs index 571031c3..6f5109cc 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("2.0.6.9")] -[assembly: AssemblyFileVersion("2.0.6.9")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/client/MaestroShared/Metadata/Timecode.cs b/client/MaestroShared/Metadata/Timecode.cs index 254c1517..6ef6bd55 100644 --- a/client/MaestroShared/Metadata/Timecode.cs +++ b/client/MaestroShared/Metadata/Timecode.cs @@ -16,8 +16,10 @@ namespace MaestroShared.Metadata { } public Timecode(int frames, float frameRate) { - this.frameRate = frameRate; - Set(frames); + this.frameRate = frameRate; + //Set(frames); + startFrame = frames; + currentFrame = frames; } public Timecode(Timecode tc) { diff --git a/server/-configuration/debug-mediacube-remote.launch b/server/-configuration/debug-mediacube-remote.launch index b715dd61..4a99bae5 100644 --- a/server/-configuration/debug-mediacube-remote.launch +++ b/server/-configuration/debug-mediacube-remote.launch @@ -10,7 +10,7 @@ - + diff --git a/server/-configuration/scheduledjobs.json b/server/-configuration/scheduledjobs.json index 47183e21..092f719c 100644 --- a/server/-configuration/scheduledjobs.json +++ b/server/-configuration/scheduledjobs.json @@ -124,7 +124,7 @@ "parameters": [ {"name": "itemID", "value": 1, "type": "java.lang.Long"} ] }, { - "active": true, + "active": false, "name" : "Teszt folyamat", "template": "fake-noparams.xml", "executeimmediate": false, diff --git a/server/-product/mediacube.product b/server/-product/mediacube.product index 82fbbf90..02f30950 100644 --- a/server/-product/mediacube.product +++ b/server/-product/mediacube.product @@ -9,23 +9,23 @@ -consoleLog -console 5555 - -Xms512m --Xmx1024m --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 - -#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 - --Dorg.eclipse.epp.logging.aeri.skipReports=true --Declipse.ignoreApp=true --Dosgi.noShutdown=true --Djobengine.loglevel=INFO + -Xms512m +-Xmx1024m +-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 + +#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 + +-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 #Database diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/CopyForArchiveNEXIOMaterialsStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/CopyForArchiveNEXIOMaterialsStep.java index 262c54ff..655e8cf8 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/CopyForArchiveNEXIOMaterialsStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/CopyForArchiveNEXIOMaterialsStep.java @@ -75,30 +75,24 @@ public class CopyForArchiveNEXIOMaterialsStep extends JobStep { private void copy(RundownArchive rundownArchive) throws Exception { for (StoryArchive storyArchive : rundownArchive.getStoryArchives()) { for (FileArchive fileArchive : storyArchive.getFileArchives()) { - copyFile(fileArchive, rundownArchive, storyArchive); + try { + copyFile(fileArchive, rundownArchive, storyArchive); + } catch (Exception e) { + logger.error(getMarker(), "A '{}' clip archiválása sikertelen. A rendszer üzenete: {}", fileArchive.getFileName(), e.getMessage()); + } } } } private void copyFile(FileArchive fileArchive, RundownArchive rundownArchive, StoryArchive storyArchive) throws Exception { - String fileName = fileArchive.getFileName(); - //TODO file existance - // targetFtp = ((FtpDirectoryLister) RemoteFileHandler.createLister(targetUri)).connect(); - // int version = 1; - // while (true) { - // targetFtp.listNames(arg0) - // } - // - // if (targetUri != null) - // targetUri.cleanUp(); + String origFileName = fileArchive.getFileName(); + String fileName = String.format("%s-%s", origFileName, rundownArchive.getItemHouseId()); String videoFileName = fileName + MXFEXT; - transferFile(videoFileName); + transferFile(origFileName + MXFEXT, videoFileName); BasicDBObject metadata = createMetadata(rundownArchive, storyArchive, fileArchive); transferMetadata(videoFileName, metadata); - //targetFtp.changeToParentDirectory(); - createSourceKillDateFile(rundownArchive, fileName); - + createSourceKillDateFile(rundownArchive, origFileName); } private BasicDBObject createMetadata(RundownArchive rundownArchive, StoryArchive storyArchive, FileArchive fileArchive) { @@ -127,10 +121,10 @@ public class CopyForArchiveNEXIOMaterialsStep extends JobStep { } private void createSourceKillDateFile(RundownArchive rundownArchive, String fileName) throws Exception { - //sourceFtp = ((FtpDirectoryLister) RemoteFileHandler.createLister(sourceUri)).connect(); + logger.info("Create killdate/agency for {}", fileName); OutputStream outStream = null; try { - sourceFtp.enterLocalActiveMode(); + sourceFtp = ((FtpDirectoryLister) sourceUri.getLister()).connect(); Calendar killDate = CalendarUtils.createCalendar(rundownArchive.getScheduleDate()); killDate.add(Calendar.DAY_OF_YEAR, nexioKillDateDays); byte[] killDateFile = EscortFiles.createNEXIOKillDateFile(fileName, killDate.getTime(), null, nexioAgency); @@ -146,8 +140,7 @@ public class CopyForArchiveNEXIOMaterialsStep extends JobStep { } finally { if (outStream != null) outStream.close(); - // if (sourceUri != null) - // sourceUri.cleanUp(); + sourceUri.cleanUp(); } } @@ -164,16 +157,32 @@ public class CopyForArchiveNEXIOMaterialsStep extends JobStep { return null; } - sourceFtp = ((FtpDirectoryLister) sourceUri.getLister()).connect(); - targetFtp = ((FtpDirectoryLister) targetUri.getLister()).connect(); processRundowns(rundowns); - if (sourceUri != null) - sourceUri.cleanUp(); - if (targetUri != null) - targetUri.cleanUp(); return null; } + // private String getVersionedFileName(String fileName, String extension) throws Exception { + // String result = fileName; + // try { + // targetFtp = ((FtpDirectoryLister) targetUri.getLister()).connect(); + // FTPFile[] listFiles = targetFtp.listFiles(); + // List fileNames = new ArrayList<>(); + // for (FTPFile ftpFile : listFiles) { + // fileNames.add(ftpFile.getName()); + // } + // while (fileNames.contains(result + extension)) { + // + // } + // + // } catch (Exception e) { + // logger.catching(e); + // throw e; + // } finally { + // targetUri.cleanUp(); + // } + // return result; + // } + private FileArchive processMosObject(BasicDBObject rundown, BasicDBObject story, BasicDBObject mosObject) throws Exception { String mosID = mosObject.getString(IOctopusAPI.OBJ_ID); if (MetadataTypeDetector.GuessMetadataType(mosID) != MetadataType.OCTOPUSPLACEHOLDER) { @@ -226,7 +235,9 @@ public class CopyForArchiveNEXIOMaterialsStep extends JobStep { } private void processRundowns(List rundowns) { - db.getCollection(ARCHIVEDRUNDOWNS).drop(); + + //TODO kiveni publikálás előtt + //db.getCollection(ARCHIVEDRUNDOWNS).drop(); List archivedRundowns = queryArchivedRundowns(); int index = 1; @@ -336,6 +347,10 @@ public class CopyForArchiveNEXIOMaterialsStep extends JobStep { sourceUri.setPortNumber(nexioPort); sourceUri.setUserName(nexioUserName); sourceUri.setPassword(nexioPassword); + if (sourceUri == null) { + logger.error(getMarker(), "A forrás nem elérhető."); + throw new NullPointerException("Internal error, missing 'sourceUri'."); + } check(archiveFtp, "archiveFtp"); check(archiveUserName, "archiveUserName"); @@ -344,61 +359,66 @@ public class CopyForArchiveNEXIOMaterialsStep extends JobStep { targetUri = manager.createStoreUri(new URI(archiveFtp)); targetUri.setUserName(archiveUserName); targetUri.setPassword(archivePassword); + if (targetUri == null) { + logger.error(getMarker(), "A cél nem elérhető."); + throw new NullPointerException("Internal error, missing 'targetUri'."); + } } - private void transferFile(String fileName) throws Exception { + private void transferFile(String sourceFileName, String targetFileName) throws Exception { int reply = 0; - // sourceFtp = ((FtpDirectoryLister) RemoteFileHandler.createLister(sourceUri)).connect(); - // targetFtp = ((FtpDirectoryLister) RemoteFileHandler.createLister(targetUri)).connect(); - // if (sourceUri != null) - // sourceUri.cleanUp(); - // if (targetUri != null) - // targetUri.cleanUp(); - - if (!targetFtp.enterRemotePassiveMode()) - throw new Exception("!PASV"); + logger.info("Transfer clip {}", sourceFileName); + try { + sourceFtp = ((FtpDirectoryLister) sourceUri.getLister()).connect(); + targetFtp = ((FtpDirectoryLister) targetUri.getLister()).connect(); + if (!targetFtp.enterRemotePassiveMode()) + throw new Exception("!PASV"); - reply = sourceFtp.port(InetAddress.getByName(targetFtp.getPassiveHost()), targetFtp.getPassivePort()); - if (!FTPReply.isPositiveCompletion(reply)) - throw new Exception("!PORT"); + reply = sourceFtp.port(InetAddress.getByName(targetFtp.getPassiveHost()), targetFtp.getPassivePort()); + if (!FTPReply.isPositiveCompletion(reply)) + throw new Exception("PORT parancs válasza: " + sourceFtp.getReplyString()); - if (!sourceFtp.setFileType(FTP.BINARY_FILE_TYPE)) - throw new Exception("!SOURCE TYPE"); + if (!sourceFtp.setFileType(FTP.BINARY_FILE_TYPE)) + throw new Exception("!SOURCE TYPE"); - sourceFtp.retr(fileName); + reply = sourceFtp.retr(sourceFileName); + if (!FTPReply.isPositivePreliminary(reply)) + throw new Exception("RETR parancs válasza: " + sourceFtp.getReplyString()); - if (!targetFtp.setFileType(FTP.BINARY_FILE_TYPE)) - throw new Exception("!TARGET TYPE"); + if (!targetFtp.setFileType(FTP.BINARY_FILE_TYPE)) + throw new Exception("!TARGET TYPE"); - targetFtp.stor(fileName); + reply = targetFtp.stor(targetFileName); + if (!FTPReply.isPositivePreliminary(reply)) + throw new Exception("STOR parancs válasza: " + sourceFtp.getReplyString()); - while (true) { - reply = sourceFtp.stat(); - if (!FTPReply.isPositiveCompletion(reply)) - throw new Exception("!STAT"); + while (true) { + reply = sourceFtp.stat(); + if (!FTPReply.isPositiveCompletion(reply)) + throw new Exception("STAT parancs válasza: " + sourceFtp.getReplyString()); - //String replyText = sourceFtp.getReplyString(); - //logger.info("Status: {}", replyText); - if (reply == 226) { - break; + logger.info("Status: {}", sourceFtp.getReplyString()); + if (reply == 226) { + break; + } + Thread.sleep(1000); } - Thread.sleep(100); + } catch (Exception e) { + logger.catching(e); + throw e; + } finally { + sourceUri.cleanUp(); + targetUri.cleanUp(); } - // if (sourceUri != null) - // sourceUri.cleanUp(); - // if (targetUri != null) - // targetUri.cleanUp(); - } private void transferMetadata(String fileName, BasicDBObject metadata) throws Exception { + logger.info("Transfer metadata {}", fileName); OutputStream outStream = null; - if (targetUri != null) - targetUri.cleanUp(); - targetFtp = ((FtpDirectoryLister) targetUri.getLister()).connect(); try { + targetFtp = ((FtpDirectoryLister) targetUri.getLister()).connect(); if (!targetFtp.changeWorkingDirectory(EscortFiles.STATUSFOLDER)) { targetFtp.makeDirectory(EscortFiles.STATUSFOLDER); if (!targetFtp.changeWorkingDirectory(EscortFiles.STATUSFOLDER)) @@ -411,15 +431,14 @@ public class CopyForArchiveNEXIOMaterialsStep extends JobStep { } outStream.write(metadata.toString().getBytes(UTF_8)); outStream.flush(); - targetFtp.changeToParentDirectory(); + //targetFtp.changeToParentDirectory(); } catch (Exception e) { logger.catching(e); throw e; } finally { if (outStream != null) outStream.close(); - // if (targetUri != null) - // targetUri.cleanUp(); + targetUri.cleanUp(); } } diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/OctopusDataMiner.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/OctopusDataMiner.java index 6a65db58..307b8dbb 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/OctopusDataMiner.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/OctopusDataMiner.java @@ -6,6 +6,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import javax.swing.event.EventListenerList; @@ -180,6 +181,18 @@ public class OctopusDataMiner { return concatParentsToStoryFolder(parent, newName); } + private void deleteDiff(Set oldIDs, Set newIDs, String collectionName) { + if (oldIDs == null || oldIDs.size() == 0) + return; + if (newIDs != null && newIDs.size() > 0) + oldIDs.removeAll(newIDs); + DBCollection collection = db.getCollection(collectionName); + for (long id : oldIDs) { + logger.info("Deleting {} from {}", id, collectionName); + collection.remove(new BasicDBObject(IOctopusAPI.ID, id)); + } + } + private void deleteOrphanRundowns() { try { DBCollection collection = db.getCollection(RUNDOWN_COLLECTION); @@ -270,6 +283,9 @@ public class OctopusDataMiner { processRundowns(rundowns); processStoryFolders(storyFolders); + deleteDiff(currentRundowns.keySet(), storyRundowns.keySet(), RUNDOWN_COLLECTION); + deleteDiff(currentFolder.keySet(), storyStoryFolders.keySet(), RUNDOWN_COLLECTION); + deleteDiff(currentStories.keySet(), storyIDs, RUNDOWN_COLLECTION); // deleteOrphanRundowns(); // deleteOrphanStoryFolders(); // deleteOrphanStories(); diff --git a/server/user.jobengine.executors/deploy-steps-to-bsh-bkup.bat b/server/user.jobengine.executors/test-deploy-steps-to-bsh-bkup.bat similarity index 89% rename from server/user.jobengine.executors/deploy-steps-to-bsh-bkup.bat rename to server/user.jobengine.executors/test-deploy-steps-to-bsh-bkup.bat index 8235a562..4e1ba9cc 100644 --- a/server/user.jobengine.executors/deploy-steps-to-bsh-bkup.bat +++ b/server/user.jobengine.executors/test-deploy-steps-to-bsh-bkup.bat @@ -1,7 +1,7 @@ @ECHO OFF SET REMOTE_HOST=10.10.1.29 -SET REMOTE_LOCATION=/opt/mediacube/configuration/executors +SET REMOTE_LOCATION=/opt/test-mediacube/configuration/executors SET REMOTE_SERVER_HOSTKEY=ssh-ed25519 256 ea:ab:67:70:79:63:2f:6a:34:81:48:e2:b9:dd:ca:d4 SET REMOTE_SERVER_ADDRESS=scp://root:password@%REMOTE_HOST% SET LOCAL_STEPS_LOCATION=bin/user/jobengine/server/steps diff --git a/server/user.jobengine.executors/deploy-steps-to-bsh-bkup.launch b/server/user.jobengine.executors/test-deploy-steps-to-bsh-bkup.launch similarity index 83% rename from server/user.jobengine.executors/deploy-steps-to-bsh-bkup.launch rename to server/user.jobengine.executors/test-deploy-steps-to-bsh-bkup.launch index 7e5b62eb..628a1712 100644 --- a/server/user.jobengine.executors/deploy-steps-to-bsh-bkup.launch +++ b/server/user.jobengine.executors/test-deploy-steps-to-bsh-bkup.launch @@ -3,6 +3,6 @@ - + diff --git a/server/user.jobengine.executors/test-deploy-steps-to-bsh-main.bat b/server/user.jobengine.executors/test-deploy-steps-to-bsh-main.bat new file mode 100644 index 00000000..8a83ec7d --- /dev/null +++ b/server/user.jobengine.executors/test-deploy-steps-to-bsh-main.bat @@ -0,0 +1,32 @@ +@ECHO OFF + +SET REMOTE_HOST=10.10.1.28 +SET REMOTE_LOCATION=/opt/test-mediacube/configuration/executors +SET REMOTE_SERVER_HOSTKEY=ssh-ed25519 256 ea:ab:67:70:79:63:2f:6a:34:81:48:e2:b9:dd:ca:d4 +SET REMOTE_SERVER_ADDRESS=scp://root:password@%REMOTE_HOST% +SET LOCAL_STEPS_LOCATION=bin/user/jobengine/server/steps +SET LOCAL_CONFIG_LOCATION=config + + ECHO *** Begin deploy steps to server %REMOTE_HOST% *** + ECHO --- Deploying + + WinSCP.com /command ^ + "open %REMOTE_SERVER_ADDRESS% -hostkey=""%REMOTE_SERVER_HOSTKEY%"" -timeout=60" ^ + "cd %REMOTE_LOCATION%" ^ + "lcd %LOCAL_STEPS_LOCATION%" ^ + "synchronize remote" ^ + "lcd ..\" ^ + "lcd ..\" ^ + "lcd ..\" ^ + "lcd ..\" ^ + "lcd ..\" ^ + "lcd %LOCAL_CONFIG_LOCATION%" ^ + "synchronize remote -filemask=config.xml" ^ + "cd .." ^ + "synchronize remote -filemask=scheduledjobs.json" ^ + "exit" + + ECHO *** Completed *** +@ECHO ON + + diff --git a/server/user.jobengine.executors/test-deploy-steps-to-bsh-main.launch b/server/user.jobengine.executors/test-deploy-steps-to-bsh-main.launch new file mode 100644 index 00000000..773c6382 --- /dev/null +++ b/server/user.jobengine.executors/test-deploy-steps-to-bsh-main.launch @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/server/user.jobengine.osgi.db/src/user/jobengine/db/Media.java b/server/user.jobengine.osgi.db/src/user/jobengine/db/Media.java index aa343583..3c95f49c 100644 --- a/server/user.jobengine.osgi.db/src/user/jobengine/db/Media.java +++ b/server/user.jobengine.osgi.db/src/user/jobengine/db/Media.java @@ -75,6 +75,10 @@ public class Media extends DynamicAttributes { return getMediaFiles() == null ? 0 : getMediaFiles().size(); } + public String getMediaFilesName() { + return (getMediaFiles() == null || getMediaFiles().size() == 0) ? "" : getMediaFiles().get(0).getHouseId(); + } + public byte[] getPoster() { return poster; } diff --git a/server/user.jobengine.osgi.server/pages/index.zul b/server/user.jobengine.osgi.server/pages/index.zul index c39b3fd1..8e44f53b 100644 --- a/server/user.jobengine.osgi.server/pages/index.zul +++ b/server/user.jobengine.osgi.server/pages/index.zul @@ -57,7 +57,7 @@ - +
diff --git a/server/user.jobengine.osgi.server/pages/search_items.zul b/server/user.jobengine.osgi.server/pages/search_items.zul index c94b2347..e064d247 100644 --- a/server/user.jobengine.osgi.server/pages/search_items.zul +++ b/server/user.jobengine.osgi.server/pages/search_items.zul @@ -48,12 +48,14 @@ + diff --git a/server/user.jobengine.osgi.services/src/user/jobengine/osgi/rest/octopus/OctopusRESTService.java b/server/user.jobengine.osgi.services/src/user/jobengine/osgi/rest/octopus/OctopusRESTService.java index 9bd723c9..b92266cc 100644 --- a/server/user.jobengine.osgi.services/src/user/jobengine/osgi/rest/octopus/OctopusRESTService.java +++ b/server/user.jobengine.osgi.services/src/user/jobengine/osgi/rest/octopus/OctopusRESTService.java @@ -47,7 +47,7 @@ public class OctopusRESTService { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) public Response getRundowns(@PathParam("scheduledDate") String scheduledDate) { - logger.info("Entry {}", scheduledDate); + logger.trace("Entry {}", scheduledDate); Response result = null; try { Date calendar = null; @@ -186,14 +186,14 @@ public class OctopusRESTService { } @GET - @Path("/storyFoldersByPlaceHolderID/{id}") + @Path("/storyFoldersByParentStoryID/{id}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public Response getStoryFoldersByPlaceHolderID(@PathParam(ID) String id) { + public Response getStoryFoldersByParentStoryID(@PathParam(ID) String id) { logger.trace("Entry"); Response result = null; try { - List storyFolders = octopusService.getStoryFoldersByPlaceHolderID(id); + List storyFolders = octopusService.getStoryFoldersByParentStoryID(id); result = Response.ok(storyFolders).build(); } catch (Exception e) { result = createErrorResponse(e); @@ -203,14 +203,14 @@ public class OctopusRESTService { } @GET - @Path("/storyFoldersByParentStoryID/{id}") + @Path("/storyFoldersByPlaceHolderID/{id}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public Response getStoryFoldersByParentStoryID(@PathParam(ID) String id) { + public Response getStoryFoldersByPlaceHolderID(@PathParam(ID) String id) { logger.trace("Entry"); Response result = null; try { - List storyFolders = octopusService.getStoryFoldersByParentStoryID(id); + List storyFolders = octopusService.getStoryFoldersByPlaceHolderID(id); result = Response.ok(storyFolders).build(); } catch (Exception e) { result = createErrorResponse(e); -- 2.54.0