Article
John Murray · Apr 10 2m read

Tweaking the Web Applications page of Management Portal

Ever noticed that the Type column of the Web Applications page in the Security section of Management Portal is showing you redundant information?

It's seems strange that every row is listed as CSP type. The definition page for each app includes a radiobutton choice between REST and CSP/ZEN

Here's how I tweaked an InterSystems class to show that classification in the list.

First, clear a checkbox so your IRISLIB or CACHELIB database is no longer read-only:

Next, use Studio in the %SYS namespace to edit the %CSP.UI.Portal.Applications.WebList class.

Find this line:

<column colName="Type" header="Type" title="Type of this item."/>

and change it to:

<column colName="Type" header="Type" title="Type of this item." OnDrawCell="DrawType"/>

Add this new method:

/// OnDrawCell callback for Type column
Method DrawType(pTable As %ZEN.Component.tablePane, pName As %String, pSeed As %String) As %Status
{
  Set value=%query("Type")
  Set oApp=##class(Security.Applications).%OpenId(%query("Name"))
  If $IsObject(oApp) && (oApp.DispatchClass '= "")
  {
    If value [ "System" {
      Write "System,REST"
    }
    Else
    {
  Write "REST"
    }
  }
  Else
  {
    Write value
  }
  Quit $$$OK
}

Save and compile the class.

Here's the result:

Finally, reset the database to be read-only.

 

You'll have to redo this change after each upgrade, unless perhaps the right person at InterSystems is reading this and gets the change put into the products.

70
1 0 1 183
Log in or sign up to continue

GREAT!
>>
unless perhaps the right person at InterSystems is reading this and gets the change put into the products. <<
My hope is with you!

But even if you place a Prodlog / Change Request it might be a matter of years [plural] to see this in production. 
 Always assuming the "priests of the security grail"  don't oppose. wink