Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can change this value and restart the Operations Console for a new timeout value.

Setting a Default Search Filter in the Legacy Operations Console

There may be instances where you want to set a default search filter when initially accessing the workflow view on the Operations Console. In such instances the Javascript module that needs to be changed to support a default search filter is located in Module.js in the webapp/javascript directory. Insert the following lines 

// Initialize the search filter
if (!thisModule.gridFilter.filterApplied && document.getElementById("namespaceFilter").value == "Namespace") {
queryParams["namespaceFilter"] = "*021*";
document.getElementById("namespaceFilter").value = "*021*";
}
// End the initialize

between the lines:
    var queryParams = [];
     if (flux.lang.isValue(thisModule.gridFilter)) {
Into the code within Module.js below.

    getInitialRequestUrl: function (oState, oSelf) {
      var thisModule = flux.lang.isValue(oSelf) ? oSelf : this;

      // Get states or use defaults
      oState = oState || { pagination: null, sortedBy: null };
      var sort = (oState.sortedBy) ? oState.sortedBy.key : "timestampFormatted";
      var dir = (oState.sortedBy && oState.sortedBy.dir === YAHOO.widget.DataTable.CLASS_ASC) ? "asc" : "desc";
      var paginatorParams = thisModule.getPaginatorParams(oState);
      paginatorParams["sort"] = sort;
      paginatorParams["dir"] = dir;
      var queryParams = [];
      // Insert the code above to perform the initialize of the search filter here!

      if (flux.lang.isValue(thisModule.gridFilter)) {
        try {
          if (thisModule.gridFilter.filterApplied) {
            queryParams = thisModule.gridFilter.getFilterParams(true);
          }
        } catch (e) {
          // Do nothing
        }
      }

Changing the default per user would look as follows:

// Initialize the search by user
if (!thisModule.gridFilter.filterApplied && document.getElementById("namespaceFilter").value == "Namespace") {
if (flux.session.username.toLowerCase() == "admin" ) {
queryParams["namespaceFilter"] = "*021*";
document.getElementById("namespaceFilter").value = "*021*";
}
}
// End the initialize