Currently there isn't anyway to push content specs to Zanata from within the UI or the server and you need to do it from the csprocessor client. This used to be possible in the Old UI, however it was removed when we went to the new REST client UI. Technical Notes: This will require async rest calls as there is a high chance it will cause http timeouts otherwise.
Added in 1.5-SNAPSHOT build 201403161524 The server now has an async setup using JPPF which allows distributed computing (it's not very important for this RFE, but it's needed for book builds in the future). The new rest server endpoints are: /rest/1/contentspec/translation/push/json/{id} /rest/1/contentspec/translation/sync/json/{id} /rest/1/process/get/json/{id} /rest/1/process/stop/json/{id} /rest/1/processes/get/json/all /rest/1/processes/get/json/{query} and each will return a representation of the RESTProcessInformationV1 entity. The RESTProcessInformationV1 entity holds a uuid, a name, the status, the start and finish times and any logs. The states for the status are as follows: PENDING: The process has been submitted, but hasn't been added to the queue yet. QUEUED: The process is in a queue waiting for it's turn to be executed. EXECUTING: The process is currently in a node executing. COMPLETED: The process completed and was successful. FAILED: The task failed for either an unknown or known reason. (ie incorrect username/apikey) CANCELLED: The task was cancelled by the user/admin. The UI has been updated to include a "Processes" tab in the Content Spec UI and also a gloabl "Processes" view under the advanced menu. Additionally on the Content Spec view, there is an "Actions" menu that will you allow you to push/sync translations. Upon selecting one of the actions a Dialog box will popup and ask for any required information and then when started will show a "process status" dialog, to allow users to watch their process state. In the processes view you'll be able to see the state, start time, finish time, logs, who started the process and additional actions. The current additional actions are refresh and stop, which will only appear when the process is in a queued/executing state. Also at this stage since we don't have authentication the "Started By" field will always by "Unknown". Note: I've excluded process percentage for the initial pass, as it will require a fair overhaul of our code to accurately calculate the percentage. Note 2: This is currently live on the test/development server.
Successfully tested a push and sync of a spec.
Invalid username and passwords, invalid specs, spec with invalid topics all generate appropriate errors.
Attempting to push the same spec twice results in an appropriate error.
Pushing a spec when zanata is not running reports a successful outcome, even though there is nothing in the log files and the topics can't have been pushed.
A sync will also report success if the zanata server is not available.
Fixed in 1.5-SNAPSHOT build 201403311553 For some reason when you set the throwable on a task, only the throwable is serialized when it is returned to the client by JPPF. As such I've removed the throwable since it's information is logged anyways and also updated the logging to log more, as the error was being thrown by resteasy so it never would have been logged anyways. Note: This is currently live on the test/development server.
I forgot to mention I've also added a check at the start of each task to make sure the Zanata server is able to return a response. If it can't then it'll log the following error and fail. Unable to connect to the Zanata Server. Please make sure that the server is online and try again.
I tired this again this morning with zanata shutdown and got the same result of an empty log and a success message. Job ID is 63BDF323-04AD-86E7-3090-BDC9AAB512E9
I forgot to restart the JPPF nodes and they already had the classes cached locally, so I believe this is why it failed again. I've restarted the nodes, so moving this back to ON_QA.
Tested it again when zanata server was not running and the appropriate error message was displayed.
Started a push and shutdown the zanata server in the middle. The job failed as expected. Started Zanata back up and pushed again. The job completed successfully.