- * Fires off an AJAX request to retrieve the current status of a Sone.
- *
- * @param soneId
- * The ID of the Sone
- * @param local
- * <code>true</code> if the Sone is local, <code>false</code>
- * otherwise
- */
-function getSoneStatus(soneId, local) {
- $.getJSON("ajax/getSoneStatus.ajax", {"sone": soneId}, function(data, textStatus) {
- if ((data != null) && data.success) {
- updateSoneStatus(soneId, data.name, data.status, data.modified, data.locked, data.lastUpdated);
- }
- /* seconds! */
- updateInterval = 60;
- if (local || (data!= null) && (data.modified || (data.status == "downloading") || (data.status == "inserting"))) {
- updateInterval = 5;
- }
- setTimeout(function() {
- getSoneStatus(soneId, local);
- }, updateInterval * 1000);
- }, function(xmlHttpRequest, textStatus, error) {
- /* ignore error. */
- });
-}
-
-/**