ironmansoftware / universal-automation

Universal Automation is the PowerShell-first automation platform.
https://ironmansoftware.com/universal-automation/
MIT License
24 stars 4 forks source link

Job Output Not Correctly Displayed #9

Closed steviecoaster closed 4 years ago

steviecoaster commented 4 years ago

Describe the Issue

Related to #3 I believe. When viewing the Pipeline Output tab of a job, the Values are all empty, and the Type is displayed as PSCustomObject

To Reproduce

Steps to reproduce the behavior: (Example)

  1. Click History
  2. Select Job Id
  3. Click Pipeline Output tab

Expected behavior

Pipeline output should represent what the script displays when run outside of UA

Screenshots

![Uploading image.png…]()

Script Sample

  function ConvertTo-ChocoObject {
      [CmdletBinding()]
      Param (
          [Parameter(ValueFromPipeline)]
          [string]$InputObject
      )

      Process {
          # format of the 'choco list' output is:
          # <PACKAGE NAME> <VERSION> (ie. adobereader 2015.6.7)
          if (-not [string]::IsNullOrEmpty($InputObject)) {
              $props = $_.split('|')

              [pscustomobject]@{

              name = $props[0]
              version = $props[1]

              }

          }
      }
  }

  choco list -lo -r | ConvertTo-ChocoObject

This script works as expected outside of UA

Version Information

adamdriscoll commented 4 years ago

This is a dashboard issue. Try using Get-UAPipelineOutput to return the serialized object value back to the pipeline.

We need to fix the dashboard so it shows the complex objects correctly.

adamdriscoll commented 4 years ago

I'm superseding this issue with an enhancement request to improve the pipeline output tab: #14

I've fixed the issue where pipeline objects dont show up in the output page.