Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    |OTTER] Status filter not working for "any error"

    Scheduled Pinned Locked Moved Support
    otter
    4 Posts 2 Posters 12 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      philippe.camelio_3885
      last edited by philippe.camelio_3885

      Hi,
      Just to report a small bug and and an observation
      The bug :
      In the server section, the status filter is not working for "any error"

      The observation:
      The filter list
      ffed0a4e-5569-4d7e-bc07-d9b848f367e7-image.png

      is not consistant with existing status
      875dbeea-7026-4283-8680-4ce4679c58c1-image.png

      65b84700-89b4-4506-b0d0-2a06dba4c883-image.png

      Otter last docker version
      Best regards
      PhilippeC.

      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @philippe.camelio_3885
        last edited by

        Thanks for the bug report @philippe-camelio_3885 !

        I logged as OT-508 , and we'll target it an upcoming maintenance release :)

        1 Reply Last reply Reply Quote 0
        • atrippA Offline
          atripp inedo-engineer
          last edited by

          Hi @philippe-camelio_3885 ,

          I looked at this one more closely, and it's behaving as expected.

          "any error" means AgentError, CollectionError, or RemediationError. There are many other statuses, and the page doesn't filter on all of them (including NoRoles or Unknown).

          The status scenario is complex 😫

          If you are curious to the logic

          string getStatus()
          {
              if (!server.Active_Indicator)
                  return Disabled;
              
              if (server.HasNullAgent())
                  return Unknown;
              if (!server.HasLocalAgent())
              {
                  if (server.AgentStatus_Code == Domains.AgentStatusCode.Error)
                      return AgentError;
                  if (server.AgentStatus_Code == Domains.AgentStatusCode.Updating)
                      return AgentUpdating;
                  if (server.AgentStatus_Code == Domains.AgentStatusCode.Unknown)
                      return Unknown;
              }
          
              if (server.RoutineConfigurationUsage_Code == Domains.ServerRoutineConfigurationUsage.None)
                  return NoCollection;
              if (!server.HasRoles_Indicator)
                  return NoRoles;
              if (server.LatestCollection_Execution_Id == null)
                  return Unknown;
              if (server.LatestCollection_ExecutionRunState_Code == Domains.ExecutionRunState.Executing)
                  return Collecting;
              if (server.LatestCollection_ExecutionStatus_Code == Domains.ExecutionStatus.Error)
                  return CollectionError;
          
              if (server.LatestRemediation_ExecutionRunState_Code == Domains.ExecutionRunState.Executing)
                  return Collecting;
              if (server.PendingRemediation_Indicator)
                  return PendingRemediation;
              if (server.LatestRemediation_ExecutionStatus_Code == Domains.ExecutionStatus.Error)
                  return RemediationError;
          
              if (server.ConfigurationState_Code == Domains.ConfigurationState.Current)
                  return Current;
          
              if (server.ConfigurationState_Code == Domains.ConfigurationState.Drifted)
                  return Drifted;
          
              return Unknown;
          }
          

          Of course it could be improved, but perhaps another day 🤷

          Best,
          Alana

          P 1 Reply Last reply Reply Quote 0
          • P Offline
            philippe.camelio_3885 @atripp
            last edited by

            @atripp 😂
            Thanks for the update

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation