Article
· Apr 10, 2021 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.

Discussion (1)1
Log in or sign up to continue