Activity Stream: fixed activity steam query build when called for specific objects. Fixed minor style issues.

This commit is contained in:
chris Houseknecht
2014-01-16 16:44:56 -05:00
parent 3a4899e04a
commit fe40f3adf5
4 changed files with 15 additions and 8 deletions

View File

@@ -249,9 +249,9 @@ function HomeHosts ($location, $routeParams, HomeHostList, GenerateList, Process
// Process search params // Process search params
if ($routeParams['name']) { if ($routeParams['name']) {
scope[HomeHostList.iterator + 'InputDisable'] = false; scope[HomeHostList.iterator + 'InputDisable'] = false;
scope[HomeHostListiterator + 'SearchValue'] = $routeParams['name']; scope[HomeHostList.iterator + 'SearchValue'] = $routeParams['name'];
scope[HomeHostList.iterator + 'SearchField'] = 'name'; scope[HomeHostList.iterator + 'SearchField'] = 'name';
scope[lHomeHostList.iterator + 'SearchFieldLabel'] = list.fields['name'].label; scope[HomeHostList.iterator + 'SearchFieldLabel'] = list.fields['name'].label;
} }
if ($routeParams['has_active_failures']) { if ($routeParams['has_active_failures']) {
@@ -267,7 +267,7 @@ function HomeHosts ($location, $routeParams, HomeHostList, GenerateList, Process
LoadBreadCrumbs(); LoadBreadCrumbs();
scope.showActivity = function() { Stream(); } scope.showActivity = function() { Stream(); }
scope.toggle_host_enabled = function(id, sources) { ToggleHostEnabled(id, sources, scope); } scope.toggle_host_enabled = function(id, sources) { ToggleHostEnabled({ host_id: id, external_source: sources, scope: scope }); }
scope.editHost = function(host_id, host_name) { scope.editHost = function(host_id, host_name) {
var host; var host;

View File

@@ -39,7 +39,7 @@ angular.module('HomeHostListDefinition', [])
awToolTip: "\{\{ host.badgeToolTip \}\}", awToolTip: "\{\{ host.badgeToolTip \}\}",
dataPlacement: 'top', dataPlacement: 'top',
badgeNgHref: '\{\{ host.activeFailuresLink \}\}', badgeNgHref: '\{\{ host.activeFailuresLink \}\}',
badgeIcon: "\{\{ 'icon-failures-' + host.has_active_failures \}\}", badgeIcon: "\{\{ 'fa icon-failures-' + host.has_active_failures \}\}",
badgePlacement: 'left', badgePlacement: 'left',
badgeToolTip: "\{\{ host.badgeToolTip \}\}", badgeToolTip: "\{\{ host.badgeToolTip \}\}",
badgeTipPlacement: 'top', badgeTipPlacement: 'top',
@@ -48,7 +48,7 @@ angular.module('HomeHostListDefinition', [])
}, },
enabled_flag: { enabled_flag: {
label: 'Enabled', label: 'Enabled',
badgeIcon: "\{\{ 'icon-enabled-' + host.enabled \}\}", badgeIcon: "\{\{ 'fa icon-enabled-' + host.enabled \}\}",
badgePlacement: 'left', badgePlacement: 'left',
badgeToolTip: "\{\{ host.enabledToolTip \}\}", badgeToolTip: "\{\{ host.enabledToolTip \}\}",
badgeTipPlacement: "top", badgeTipPlacement: "top",
@@ -89,6 +89,4 @@ angular.module('HomeHostListDefinition', [])
} }
}, },
fieldActions: {
}
}); });

View File

@@ -239,7 +239,8 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
if (paths.length > 1 && /^\d+/.test(paths[paths.length - 1])) { if (paths.length > 1 && /^\d+/.test(paths[paths.length - 1])) {
type = paths[paths.length - 2]; type = paths[paths.length - 2];
type = (type == 'inventories') ? 'inventory' : type.replace(/s$/,''); type = (type == 'inventories') ? 'inventory' : type.replace(/s$/,'');
defaultUrl += '?object1=' + type + '&object1_id=' + paths[paths.length - 1]; //defaultUrl += '?object1=' + type + '&object1__id=' +
defaultUrl += '?' + type + '__id=' + paths[paths.length - 1];
} }
else if (paths.length > 1) { else if (paths.length > 1) {
type = paths[paths.length - 1]; type = paths[paths.length - 1];

View File

@@ -712,6 +712,10 @@ input[type="checkbox"].checkbox-no-label {
} }
} }
#home-list-actions {
margin-bottom: 15px;
}
/* End Display list actions */ /* End Display list actions */
@@ -1300,6 +1304,10 @@ tr td button i {
display: none; display: none;
border-radius: 8px; border-radius: 8px;
z-index: 20; /* has to be greater than tree selector */ z-index: 20; /* has to be greater than tree selector */
.nav-path {
margin-bottom: 15px;
}
} }
#stream-content { #stream-content {