Title: [opsview] [9639] merge r9637-9638
Revision
9639
Author
aburzynski
Date
2012-07-27 15:17:32 +0100 (Fri, 27 Jul 2012)

Log Message

merge r9637-9638

Modified Paths


Modified: trunk/opsview-web/lib/Opsview/Web/Controller/Status/Service.pm
===================================================================
--- trunk/opsview-web/lib/Opsview/Web/Controller/Status/Service.pm	2012-07-27 14:01:23 UTC (rev 9638)
+++ trunk/opsview-web/lib/Opsview/Web/Controller/Status/Service.pm	2012-07-27 14:17:32 UTC (rev 9639)
@@ -283,10 +283,9 @@
 
         $c->forward( "/rest/status/find_objects" );
 
-        my $hosts_count = 0; #scalar @{ $c->stash->{hosts} };
         my $services_count = scalar @{ $c->stash->{services} };
 
-        if ( $hosts_count + $services_count == 0 ) {
+        if ( $services_count == 0 ) {
             $c->flash( message => $c->loc("ui.set.message.noItemsSelected") );
         }
         else {
@@ -301,9 +300,8 @@
             }
             else {
 
-                # $hosts_count    = scalar @{ $c->stash->{done_hosts} };
                 $services_count = scalar @{ $c->stash->{done_services} };
-                $c->log->info( "Set: " . ( $hosts_count + $services_count ) );
+                $c->log->info( "Set: " . $services_count );
                 my $message =
                   $c->loc( "ui.set.message.submittedForServices [_1]",
                     $services_count )
@@ -316,7 +314,12 @@
     }
 
     $c->forward( "/common/nagios_states", ["i_default"] );
-    $c->stash( status_params => { state => [ 1, 2, 3 ] } );
+
+    # filter out services in "OK" state
+    my $args = $c->req->params;
+    $args->{state} = [ 1, 2, 3 ];
+    $c->stash( status_params => $args );
+
     $c->forward( "/rest/status/status_GET" );
     $c->stash( status_data => $c->stash->{rest} );
 

_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to