Removed unused status page stuff for Pro and cleanup for code review
This commit is contained in:
parent
02dff34328
commit
6dc8837aff
7 changed files with 13 additions and 49 deletions
|
@ -50,12 +50,10 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
|
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||||
|
|
||||||
$foo = new ScheduleController($this->getRequest(), $this->getResponse());
|
//Embed the schedule in our page response so we don't have to make an AJAX request to get this data after the page load.
|
||||||
$foo->eventFeedPreloadAction();
|
$scheduleController = new ScheduleController($this->getRequest(), $this->getResponse());
|
||||||
//$foo->eventFeedAction();
|
$scheduleController->eventFeedPreloadAction();
|
||||||
$events = json_encode($foo->view->events);
|
$events = json_encode($scheduleController->view->events);
|
||||||
//$timescale =
|
|
||||||
//$this->getRequest()->getParam("view", "week");
|
|
||||||
|
|
||||||
$this->view->headScript()->appendScript(
|
$this->view->headScript()->appendScript(
|
||||||
"var calendarPref = {};\n".
|
"var calendarPref = {};\n".
|
||||||
|
@ -307,9 +305,9 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
public static function printCurrentPlaylistForEmbedding()
|
public static function printCurrentPlaylistForEmbedding()
|
||||||
{
|
{
|
||||||
$front = Zend_Controller_Front::getInstance();
|
$front = Zend_Controller_Front::getInstance();
|
||||||
$foo = new ScheduleController($front->getRequest(), $front->getResponse());
|
$scheduleController = new ScheduleController($front->getRequest(), $front->getResponse());
|
||||||
$foo->getCurrentPlaylistAction();
|
$scheduleController->getCurrentPlaylistAction();
|
||||||
echo(json_encode($foo->view));
|
echo(json_encode($scheduleController->view));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCurrentPlaylistAction()
|
public function getCurrentPlaylistAction()
|
||||||
|
|
|
@ -67,8 +67,8 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
if (isset($values["Privacy"])) {
|
if (isset($values["Privacy"])) {
|
||||||
Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]);
|
Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]);
|
||||||
}
|
}
|
||||||
// unset referrer
|
|
||||||
session_start(); //open session for writing again
|
session_start(); //open session for writing again
|
||||||
|
// unset referrer
|
||||||
Zend_Session::namespaceUnset('referrer');
|
Zend_Session::namespaceUnset('referrer');
|
||||||
} elseif ($values["Publicise"] == '1' && $form->isValid($values)) {
|
} elseif ($values["Publicise"] == '1' && $form->isValid($values)) {
|
||||||
Application_Model_Preference::SetHeadTitle($values["stnName"], $this->view);
|
Application_Model_Preference::SetHeadTitle($values["stnName"], $this->view);
|
||||||
|
@ -89,8 +89,8 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
if (isset($values["Privacy"])) {
|
if (isset($values["Privacy"])) {
|
||||||
Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]);
|
Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]);
|
||||||
}
|
}
|
||||||
// unset session
|
|
||||||
session_start(); //open session for writing again
|
session_start(); //open session for writing again
|
||||||
|
// unset referrer
|
||||||
Zend_Session::namespaceUnset('referrer');
|
Zend_Session::namespaceUnset('referrer');
|
||||||
} else {
|
} else {
|
||||||
$logo = Application_Model_Preference::GetStationLogo();
|
$logo = Application_Model_Preference::GetStationLogo();
|
||||||
|
|
|
@ -13,16 +13,18 @@ class SystemstatusController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
$services = array(
|
$services = array(
|
||||||
"pypo"=>Application_Model_Systemstatus::GetPypoStatus(),
|
"pypo"=>Application_Model_Systemstatus::GetPypoStatus(),
|
||||||
"liquidsoap"=>Application_Model_Systemstatus::GetLiquidsoapStatus(),
|
"liquidsoap"=>Application_Model_Systemstatus::GetLiquidsoapStatus(),
|
||||||
//"media-monitor"=>Application_Model_Systemstatus::GetMediaMonitorStatus(),
|
//"media-monitor"=>Application_Model_Systemstatus::GetMediaMonitorStatus(),
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
$partitions = Application_Model_Systemstatus::GetDiskInfo();
|
$partitions = Application_Model_Systemstatus::GetDiskInfo();
|
||||||
|
|
||||||
$this->view->status = new StdClass;
|
$this->view->status = new StdClass;
|
||||||
$this->view->status->services = $services;
|
//$this->view->status->services = $services;
|
||||||
$this->view->status->partitions = $partitions;
|
$this->view->status->partitions = $partitions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +1,6 @@
|
||||||
<table width="60%" cellpadding="0" cellspacing="0" border="0" class="statustable">
|
<table width="60%" cellpadding="0" cellspacing="0" border="0" class="statustable">
|
||||||
<thead>
|
|
||||||
<tr class="ui-state-default strong">
|
|
||||||
<td><?php echo _("Service") ?></td>
|
|
||||||
<td><?php echo _("Status") ?></td>
|
|
||||||
<td><?php echo _("Uptime") ?></td>
|
|
||||||
<td><?php echo _("CPU") ?></td>
|
|
||||||
<td><?php echo _("Memory") ?></td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<!--
|
|
||||||
<tr class="odd">
|
|
||||||
<td><?php echo sprintf(_("%s Version"), PRODUCT_NAME) ?></td>
|
|
||||||
<td>1.9.3</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
-->
|
|
||||||
<?php $i=0; ?>
|
|
||||||
<?php foreach($this->status->services as $key=>$value): ?>
|
|
||||||
<tr class="<?php echo ($i&1) == 0 ? "even":"odd"; $i++; ?>" id="<?php echo $value["name"]; ?>">
|
|
||||||
<td><?php echo $value["name"]; ?></td>
|
|
||||||
<td><span></span></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<tr id="partitions" class="even">
|
<tr id="partitions" class="even">
|
||||||
<th colspan="5"><?php echo _("Disk Space") ?></th>
|
<th colspan="5"><?php echo _("Disk Space") ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -455,7 +455,6 @@ var stream_window = null;
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
//begin producer "thread"
|
//begin producer "thread"
|
||||||
//getScheduleFromServer();
|
|
||||||
setInterval(getScheduleFromServer, serverUpdateInterval);
|
setInterval(getScheduleFromServer, serverUpdateInterval);
|
||||||
|
|
||||||
//begin consumer "thread"
|
//begin consumer "thread"
|
||||||
|
|
|
@ -892,7 +892,6 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//checkImportStatus();
|
|
||||||
checkLibrarySCUploadStatus();
|
checkLibrarySCUploadStatus();
|
||||||
|
|
||||||
addQtipToSCIcons();
|
addQtipToSCIcons();
|
||||||
|
|
|
@ -361,15 +361,6 @@ function windowResize() {
|
||||||
|
|
||||||
function preloadEventFeed () {
|
function preloadEventFeed () {
|
||||||
createFullCalendar({calendarInit: calendarPref});
|
createFullCalendar({calendarInit: calendarPref});
|
||||||
|
|
||||||
/*
|
|
||||||
var url = baseUrl+'Schedule/event-feed-preload';
|
|
||||||
var d = new Date();
|
|
||||||
$.post(url, {format: "json", cachep: d.getTime()}, function(json){
|
|
||||||
calendarEvents = json.events;
|
|
||||||
createFullCalendar({calendarInit: calendarPref});
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var initialLoad = true;
|
var initialLoad = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue