Menu

Display unused ports in a different color

Help
breisinger
2005-06-06
2012-09-14
  • breisinger

    breisinger - 2005-06-06

    The first version of Switchmap that I used was 6.0. In that version, any ports that were unused for longer than the $UnusedAfter were colored in light red. I would like to have that functionality in 10.x. Is that an easy fix, or should I request this to be an enhancement for the next version.

     
    • breisinger

      breisinger - 2005-06-10

      Is there any way to differentiate between the ports that are disabled, and those that are inactive for more than the $UnusedAfter variable? I seem to remember in the version 6.0 the disabled ports were white, and the ports that were inactive were colored light red. I do think that is a good color scheme.

       
    • Pete Siemsen

      Pete Siemsen - 2005-06-09

      It's an easy fix, in SwitchUtils.pm, in the
      WriteHtmlRow function, replace

      my $RowColor = ($State eq 'Active') ? $Constants::ActiveColor : $Constants::BackgroundColor;

      with

      my $RowColor;
      if ($State eq 'Active') {
      $RowColor = $Constants::ActiveColor;
      } else {
      if (($DaysInactive ne '') and ($DaysInactive > $ThisSite::UnusedAfter)) {
      $RowColor = $Constants::WarningColor; # mark it "unused"
      } else {
      $RowColor = $Constants::BackgroundColor;
      }
      }

      If you do this, please let me know how you like the
      results - should I use light red for those rows? I'd
      like to settle on something that looks good for the
      next version.

       
    • Pete Siemsen

      Pete Siemsen - 2005-06-13

      I released switchmap 10.7 to Sourceforge on 6/10/2005.
      In it. I made ports that are older than $UnusedAfter be
      light grey. Ports that have been inactive less than
      $UnusedAfter days are white. I like this - it suggests
      that "dead" ports are grey and less-dead ports are white.
      Maybe someday I'll add levels of grey to suggest how
      dead a port is.

      To answer your question, how about some other way to
      represent disabled ports? I just added code to make
      the "information about what the port is connected to"
      cells dark red on disabled ports. I'll release that as
      version 10.8 soon, after I get some feedback about
      version 10.7.

       
    • breisinger

      breisinger - 2005-06-13

      For my purposes, I like to see they disabled ports be one color, and the ones that exceed the $UnusedAfter days a different color because I try not to leave unused ports active. It is easier for me if they are in a different color, that way I know which ones I need to disable with just a glance.

       

Log in to post a comment.

MongoDB Logo MongoDB