Skip to content

Commit

Permalink
Capone not working properly.
Browse files Browse the repository at this point in the history
User reported issue with capone not finding associated images for the client. This has been marked issue #151 and has been fixed. Issue was the databaseFieldClassRelationships variable.  This was being called as databaseClassFieldRelationships so the associated elements were never pulled into the object as required. Fixed by setting the variable name properly.
  • Loading branch information
mastacontrola committed Dec 29, 2016
1 parent 8d93007 commit 9c41b9e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/web/lib/fog/fogcontroller.class.php
Expand Up @@ -1083,7 +1083,7 @@ public function setQuery(&$queryData)
(array) $this->data,
(array) $classData
);
foreach ($this->databaseFieldClassRelationships as $class => &$fields) {
foreach ((array)$this->databaseFieldClassRelationships as $class => &$fields) {
$class = self::getClass($class);
$this->set(
$fields[2],
Expand Down
2 changes: 1 addition & 1 deletion packages/web/lib/fog/system.class.php
Expand Up @@ -53,7 +53,7 @@ private static function _versionCompare()
public function __construct()
{
self::_versionCompare();
define('FOG_VERSION', '34');
define('FOG_VERSION', '13');
define('FOG_SCHEMA', 244);
define('FOG_BCACHE_VER', 110);
define('FOG_SVN_REVISION', 6052);
Expand Down
2 changes: 1 addition & 1 deletion packages/web/lib/plugins/capone/class/capone.class.php
Expand Up @@ -54,7 +54,7 @@ class Capone extends FOGController
*
* @var array
*/
protected $databaseClassFieldRelationships = array(
protected $databaseFieldClassRelationships = array(
'Image' => array(
'id',
'imageID',
Expand Down
3 changes: 0 additions & 3 deletions packages/web/lib/reg-task/caponetasking.class.php
Expand Up @@ -69,9 +69,6 @@ public function __construct()
)
);
foreach ((array)$Capones as &$Capone) {
if (!$Capone->isValid()) {
continue;
}
$Image = $Capone->getImage();
if (!$Image->isValid()) {
continue;
Expand Down
32 changes: 14 additions & 18 deletions packages/web/management/js/fog/fog.dashboard.js
Expand Up @@ -176,13 +176,7 @@ function GraphDiskUsageUpdate() {
.parents('a')
.prop('href','?node=hwinfo&id='+NodeID);
},
success: GraphDiskUsagePlots,
complete: function() {
if (diskinterval) {
clearTimeout(diskinterval);
}
diskinterval = setTimeout(GraphDiskUsageUpdate, diskusagetime - ((new Date().getTime() - startTime) % diskusagetime));
}
success: GraphDiskUsagePlots
});
$('[name="nodesel"] option').each(function(e) {
URL = $(this).attr('urlcall');
Expand Down Expand Up @@ -221,6 +215,10 @@ function GraphDiskUsagePlots(data) {
];
$.plot(GraphDiskUsage,GraphDiskUsageData,GraphDiskUsageOpts);
GraphDiskUsage.addClass('loaded');
if (diskinterval) {
clearTimeout(diskinterval);
}
diskinterval = setTimeout(GraphDiskUsageUpdate, diskusagetime - ((new Date().getTime() - startTime) % diskusagetime));
}
// Bandwidth Functions
function UpdateBandwidth() {
Expand All @@ -240,10 +238,6 @@ function UpdateBandwidth() {
},
complete: function() {
GraphBandwidth.addClass('loaded');
if (bandinterval) {
clearTimeout(bandinterval);
}
bandinterval = setTimeout(UpdateBandwidth, bandwidthtime - ((new Date().getTime() - startTime) % bandwidthtime));
}
});
}
Expand Down Expand Up @@ -282,6 +276,10 @@ function UpdateBandwidthGraph(data) {
GraphData = new Array();
for (i in GraphBandwidthData) GraphData.push({label: i+' ('+GraphBandwidthData[i].dev+')', data: (GraphBandwidthFilterTransmitActive ? GraphBandwidthData[i].tx : GraphBandwidthData[i].rx)});
$.plot(GraphBandwidth,GraphData,GraphBandwidthOpts);
if (bandinterval) {
clearTimeout(bandinterval);
}
bandinterval = setTimeout(UpdateBandwidth, bandwidthtime - ((new Date().getTime() - startTime) % bandwidthtime));
}
// Client Count Functions.
function UpdateClientCount() {
Expand All @@ -294,13 +292,7 @@ function UpdateClientCount() {
id: GroupID
},
dataType: 'json',
success: UpdateClientCountPlot,
complete: function() {
if (clientinterval) {
clearTimeout(clientinterval);
}
clientinterval = setTimeout(UpdateClientCount, clientcounttime - ((new Date().getTime() - startTime) % clientcounttime));
}
success: UpdateClientCountPlot
});
}
function UpdateClientCountPlot(data) {
Expand All @@ -313,4 +305,8 @@ function UpdateClientCountPlot(data) {
{label:'Free',data:parseInt(data.ActivitySlots)}
];
$.plot(GraphClient,UpdateClientCountData,UpdateClientCountOpts);
if (clientinterval) {
clearTimeout(clientinterval);
}
clientinterval = setTimeout(UpdateClientCount, clientcounttime - ((new Date().getTime() - startTime) % clientcounttime));
}
2 changes: 1 addition & 1 deletion packages/web/management/languages/messages.pot
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-28 07:12-0500\n"
"POT-Creation-Date: 2016-12-29 09:56-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down

0 comments on commit 9c41b9e

Please sign in to comment.