From 080c2c43b5fab8f688038bd3f3f1f02ff7cd4be4 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Wed, 17 Jun 2015 17:39:37 -0400 Subject: [PATCH 1/3] Add soundcloud callback file for saas routing --- airtime_mvc/public/soundcloud_callback.php | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 airtime_mvc/public/soundcloud_callback.php diff --git a/airtime_mvc/public/soundcloud_callback.php b/airtime_mvc/public/soundcloud_callback.php new file mode 100644 index 000000000..e3bdb47dc --- /dev/null +++ b/airtime_mvc/public/soundcloud_callback.php @@ -0,0 +1,28 @@ +val pairs + * into an array, then redirect + */ + public function reroute() { + $params = array(); + parse_str($_SERVER['QUERY_STRING'], $params); + $this->_redirect($params); + } + + /** + * Redirect to the URL passed in the 'state' parameter + * when we're redirected here from SoundCloud + * + * @param $params array array of URL query parameters + */ + private function _redirect($params) { + $url = urldecode($params['state']); + header("Location: $url?" . $_SERVER['QUERY_STRING']); + } + +} + +(new Router())->reroute(); From 88bd3c9bc24c42cd2abfc1906f73ab0da99a7168 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Wed, 17 Jun 2015 13:44:14 -0400 Subject: [PATCH 2/3] SAAS-872 - Load disk information statically --- .../controllers/SystemstatusController.php | 5 ++-- .../views/scripts/systemstatus/index.phtml | 30 +++++++++++++++++-- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/controllers/SystemstatusController.php b/airtime_mvc/application/controllers/SystemstatusController.php index 6098f71b7..2f651db52 100644 --- a/airtime_mvc/application/controllers/SystemstatusController.php +++ b/airtime_mvc/application/controllers/SystemstatusController.php @@ -4,11 +4,12 @@ class SystemstatusController extends Zend_Controller_Action { public function init() { + /* Disable this on Airtime pro since we're not using Media Monitor/Monit + $CC_CONFIG = Config::getConfig(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'js/airtime/status/status.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + */ } public function indexAction() diff --git a/airtime_mvc/application/views/scripts/systemstatus/index.phtml b/airtime_mvc/application/views/scripts/systemstatus/index.phtml index f6e1007d5..a8687eb24 100644 --- a/airtime_mvc/application/views/scripts/systemstatus/index.phtml +++ b/airtime_mvc/application/views/scripts/systemstatus/index.phtml @@ -8,18 +8,24 @@ $externalServices = checkExternalServices(); $zend = $phpDependencies["zend"]; $postgres = $phpDependencies["postgres"]; - + $database = $externalServices["database"]; $rabbitmq = $externalServices["rabbitmq"]; - + $pypo = $externalServices["pypo"]; $liquidsoap = $externalServices["liquidsoap"]; $mediamonitor = $externalServices["media-monitor"]; - + $r1 = array_reduce($phpDependencies, "booleanReduce", true); $r2 = array_reduce($externalServices, "booleanReduce", true); $result = $r1 && $r2; */ + + // Disk information. We only use the [0]th index + // because we don't have Watched/Media Folders + $disk = $this->status->partitions[0]; + $used = $disk->totalSpace-$disk->totalFreeSpace; + $total = $disk->totalSpace; ?> @@ -178,5 +184,23 @@ + + + + +
+
    +
+
+ + +
+
;"> +
+
+
+
From 298ee30e9dbbbe5fcdd8a0e36f2f44bec95caf45 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Wed, 17 Jun 2015 14:52:04 -0400 Subject: [PATCH 3/3] Move misplaced tag --- .../views/scripts/systemstatus/index.phtml | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/airtime_mvc/application/views/scripts/systemstatus/index.phtml b/airtime_mvc/application/views/scripts/systemstatus/index.phtml index a8687eb24..d06cd4c1d 100644 --- a/airtime_mvc/application/views/scripts/systemstatus/index.phtml +++ b/airtime_mvc/application/views/scripts/systemstatus/index.phtml @@ -180,27 +180,27 @@ ?> - */?> - - - - - -
    -
- - - - - -
-
;"> -
-
-
- - + */?> + + + + + +
    +
+ + + + + +
+
;"> +
+
+
+ +