This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asset.configure = function(){ | |
return { | |
table:{ | |
tests:{ | |
fields:{ | |
plan:{ | |
type:'file' | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Following is to remove the edit button in the detail page since for asset types | |
// wsdl, wadl, swagger, policy, schema, the edit operations are not allowed | |
for(var index = 0; index < page.leftNav.length; index++) { | |
var button = page.leftNav[index]; | |
// if(button.iconClass === "btn-edit") { | |
// page.leftNav.splice(index, 1); | |
// index--; | |
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Following is to remove the edit button in the detail page since for asset types | |
// wsdl, wadl, swagger, policy, schema, the edit operations are not allowed | |
for(var index = 0; index < page.leftNav.length; index++) { | |
var button = page.leftNav[index]; | |
if(button.iconClass === "btn-edit") { | |
page.leftNav.splice(index, 1); | |
index--; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jsonFormatter: function (page) { | |
if (page.meta.pageName === 'details') { | |
var contacts = page.assets.attributes.contacts_entry; | |
if (contacts) { | |
var contacts_entry = []; | |
if (contacts.constructor === Array) { | |
for (var index in contacts) { | |
var contact = contacts[index].split(':'); | |
var contact_entry = {}; | |
contact_entry.name = contact[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.renderer = function(ctx) { | |
var decoratorApi = require('/modules/page-decorators.js').pageDecorators; | |
return { | |
pageDecorators: { | |
navigationBar: function(page) { | |
return require('/extensions/app/mycustom-store/modules/decorators.js').api.navigationBar(ctx, page, this); ///decoratorApi.navigationBar(ctx, page, this); | |
}, | |
searchBar: function(page) { | |
return decoratorApi.searchBar(ctx, page, this); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pageDecorators.navigationBar = function(ctx, page, utils) { | |
var app = require('rxt').app; | |
//Change the context to support cross tenant views | |
var tenantAppResources = tenantApi.createTenantAwareAppResources(ctx.session); | |
//Support for cross tenant views | |
ctx = tenantAppResources.context; | |
var rxtManager = ctx.rxtManager; | |
//Obtain all of the available rxt types | |
var availableTypes = app.getUIActivatedAssets(ctx.tenantId); | |
var types = []; |