[Bps-public-commit] Path-Dispatcher-Debugger branch, master, updated. a7c22a0207c43acdd15f554777800ef383bcf5e0

sartak at bestpractical.com sartak at bestpractical.com
Wed Dec 23 16:00:36 EST 2009


The branch, master has been updated
       via  a7c22a0207c43acdd15f554777800ef383bcf5e0 (commit)
      from  f0c48673224b29f087bd0364096bd37445bf7bb8 (commit)

Summary of changes:
 lib/Path/Dispatcher/Debugger/View.pm |   20 ++++++++++++++++----
 share/path-dispatcher-debugger.css   |    5 +++++
 2 files changed, 21 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit a7c22a0207c43acdd15f554777800ef383bcf5e0
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Dec 23 16:00:12 2009 -0500

    Grey out unmatched rules

diff --git a/lib/Path/Dispatcher/Debugger/View.pm b/lib/Path/Dispatcher/Debugger/View.pm
index 06d9adc..f1e6ca6 100644
--- a/lib/Path/Dispatcher/Debugger/View.pm
+++ b/lib/Path/Dispatcher/Debugger/View.pm
@@ -117,18 +117,30 @@ template matching_rules => sub {
             }
 
             h5 { "Matched Rules" };
-            display_rules(@matches);
+            div {
+                class is 'matched_rules';
+                display_rules(@matches);
+            }
             h5 { "Unmatched Rules" };
-            display_rules(@not_matches);
+            div {
+                class is 'unmatched_rules';
+                display_rules(@not_matches);
+            }
         }
         else {
             my $dispatch = $debugger->dispatcher->dispatch($path);
             my %seen = map { $_ => 1 } map { $_->rule } $dispatch->matches;
 
             h5 { "Matched Rules" };
-            display_rules(grep {  $seen{$_} } $debugger->dispatcher->rules);
+            div {
+                class is 'matched_rules';
+                display_rules(grep {  $seen{$_} } $debugger->dispatcher->rules);
+            }
             h5 { "Unmatched Rules" };
-            display_rules(grep { !$seen{$_} } $debugger->dispatcher->rules);
+            div {
+                class is 'unmatched_rules';
+                display_rules(grep { !$seen{$_} } $debugger->dispatcher->rules);
+            }
         }
     };
 };
diff --git a/share/path-dispatcher-debugger.css b/share/path-dispatcher-debugger.css
index 9200f87..1cb66b8 100644
--- a/share/path-dispatcher-debugger.css
+++ b/share/path-dispatcher-debugger.css
@@ -2,3 +2,8 @@
     color: #009900;
     font-weight: bold;
 }
+
+.unmatched_rules {
+    color: #777777;
+}
+

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list