Configuration File: chaise-config.js

Chaise uses a set of default configuration parameters. You can overwrite them through the chaise-config.js file and/or the search parameters in the URL.

A Chaise deployment includes a sample config file (chaise-config-sample.js) at the root directory that you can edit and then rename to chaise-config.js.

Each chaise config property below can be defined in each place that we allow for a chaise configuration with a few exceptions noted below. Chaise config uses a set order for determining which chaise configuration’s properties will be used. The order that the properties will be checked and then applied are as follows:

  1. Default values defined in chaise configuration document.
  2. Any properties defined at the root of the object returned from chaise-config.js.
  3. Any matching configRules in the order they appear in the configRules array. Properties in the last matching rule will take precedence
  4. Any properties defined at the root of the object returned from this annotation.
  5. Step 3 from above, but with the configRules from this annotation.

Notes: is that as the configRules are checked, properties set in step 2 will be overridden by properties defined in step 3 that have the same name. This allows the server wide configuration to be a base configuration for the chaise apps and allows for further configuration based on a combination of hostname and catalog id. This applies for step 4 and 5 as well when reading the values from the catalog annotation.

If a property appears in the same configuration twice, the property defined later will be used.

The below table explains the usage of the default parameters:

Parameter Values Default Value chaise-config.js URL Remarks
ermrestLocation The base URL for the ERMrest service window.location.protocol + // + "ermrestLocation": \<URL> N/A The location of the ERMrest service.
headTitle An application name Chaise "headTitle":\<value> N/A The application name.
customCSS A URL N/A "customCSS":\<value> N/A The URL for a style sheet file to be applied for the application header. This is typically a relative URL to a dedicated stylesheet in the CSS folder of the related static site repo (For example, in RBK, it's /assets/css/chaise.css in the rbk-www repo). More information can be found here
navbarBrand A URL N/A "navbarBrand":\<value> N/A The URL for the branding logo in the top navigation bar.
navbarBrandText A string Chaise "navbarBrandText":\<value> N/A The value to be displayed in the navigation bar.
navbarBrandImage A URL N/A "navbarBrandImage":\<value> N/A The URL for an image to be displayed in the navigation bar.
logoutURL A URL / "logoutURL":\<value> N/A The URL to the logout page, root if not defined.
maxRecordsetRowHeight A boolean/number 160 "maxRecordsetRowHeight":\<value> N/A Set this property to false if you don't want content to be clipped in tables else set it to a number which represent the maximum row height when not expanded.
dataBrowser A URL /chaise/recordset "dataBrowser":\<value> N/A The URL to continue after a logout. Also used when an error is thrown and we don't know where to redirect the user.
defaultAnnotationColor red, orange, gold, green, blue, purple red "defaultAnnotationColor":\<value> N/A In /chaise/viewer, annotations' borders and colors will default to this value.
confirmDelete A boolean true "confirmDelete":\<value> N/A If false, the user will not be prompted by a modal when deleting an item
hideSearchTextFacet A boolean false "hideSearchTextFacet":\<value> N/A Whether the search box for attributes names and values should be hidden
editRecord A boolean N/A "editRecord":\<value> N/A If not present or equal to true, the recordedit page allows for inserting records and editing records. The record page will have an edit button for both of these cases as well. If equal to false, a dialog appears on recordedit that disallows use of the app for both create and edit, and the create/edit button does not appear in the record app.
deleteRecord A boolean false "deleteRecord":\<value> N/A If present and equal to true, the recordedit page will show delete button if editRecord is also true, and record page will show delete button if this is true. Otherwise, hide delete buttons.
defaultCatalog A catalog id N/A "defaultCatalog":\<id> N/A Use this parameter to specify which catalog Chaise shows by default. When a user navigates to "/chaise/recordset" and omits the rest of the path, the defaultCatalog paired with defaultTables are used to generate a valid recordset link for the user. It is strongly recommended defining this in your chaise-config.js file. This property is used to fetch the catalog annotation information for pages that rely on chaise-config.js but don't have a catalog id in the path. For example, the navbar on static pages uses this property to try to fetch a catalog annotation for configuring the navbar.
defaultTables An object that specifies a catalog's the default schema and table N/A "defaultTables": {N: {"schema": S, "table": T}, ...} N/A Use this parameter to specify for each catalog N, which table T Chaise shows by default.
signUpURL A URL N/A "signUpURL":\<your_URL> N/A Use this parameter to specify what the "Sign Up" link in the navbar should link to. If signUpURL is unspecified, the navbar will not display a "Sign Up" link.
profileURL A URL N/A "profileURL":\<your_URL> N/A When a user is logged in, the navbar displays the user's username. Use this parameter to specify what the username in the navbar should link to (e.g. if your deployment uses Globus authentication). If profileURL is unspecified, the navbar will display the username as regular text.
navbarMenu An object N/A "navbarMenu":{...} N/A Use this parameter to customize the menu items displayed in the navbar at the top of all Chaise apps by supplying an object with your links and/or dropdown menus. Each option accepts an 'acls' object that has two attribute arrays ('show' and 'enable') used to define lists of globus groups or users that can see and click that link. The url property of each menu object allows for templating of the catalog id parameter using the pattern {{$}}. The header property of each menu object will create an unclickable bold header with class chaise-dropdown-header. Consult the chaise-config-sample.js file for more details about format.
sidebarPosition "left"
"right" "sidebarPosition": \<value> N/A Applies to the Search app only. If \<value> is "left", the sidebar will be on the left and the main content will shift left correspondingly. If \<value> is "right", the sidebar will be on the right.
attributesSidebarHeading String "Choose Attributes" "attributesSidebarHeading": \<value> N/A Applies to Search app only. Use this parameter to customize the heading displayed in at the top of the Attributes sidebar (usually the first sidebar that appears when the Search app loads).
userGroups An object N/A "userGroups" : {"curators": , "annotators": , "curators": } N/A For Viewer app only. The Viewer app assigns an authenticated user one of three permission levels depending on the user's Globus memberships. The permission levels, from highest to lowest, are curator, annotator, user. The default Globus group IDs that determine who's a curator, annotator, or user are set by RBK. To override these default group IDs for each permission level, you may specify your own via this userGroups setting.
allowErrorDismissal Boolean false "allowErrorDismissal" : \<value> N/A All terminal error message display an error message dialog that is not dismissable by default. Set this property to true if you want to allow dismissable error message dialogs.\nThis property when defined as true, will cause a degraded UX experience that will prevent future errors from being thrown and other functionality might not behave as expected. This should ONLY be used in development environments.
footerMarkdown A footer markdown string N/A "footerMarkdown" : \<value> N/A If present, it creates a footer at the bottom of the app with the markdown text.
maxRelatedTablesOpen Integer N/A "maxRelatedTablesOpen" : \<value> N/A It defines maximum number of expanded related table on a page during initial loading. If related tables exceed this value then all of them shall be collapsed.
showWriterEmptyRelatedOnLoad Boolean N/A "showWriterEmptyRelatedOnLoad" : \<value> N/A This property only applies to users with write permission to the main record being viewed. Set to false to hide all empty related tables on record page load ignoring the heuristics defined for writers. Set to true to show all empty related tables on record page load ignoring the heuristics. If not defined, the heuristics to show empty related tables based on the user being able to write to at least one of them will be used instead.
showFaceting Boolean false "showFaceting" : \<value> N/A If true, shows the faceting panel on the recordset app.
hideTableOfContents Boolean false "hideTableOfContents" : \<value> N/A If true, hides the table of contents panel on the record app. By default table of contents will be visible.
showExportButton Boolean false "showExportButton" : \<value> N/A If true, shows the experimental export button.
resolverImplicitCatalog Integer N/A "resolverImplicitCatalog" : \<value> N/A Set to a catalog number, N, if your resolver accepts /id/X instead of /id/N/X and you prefer to share records with this shorter URL. If the property is null, the resolver functionality will be turned off and the default permalink will be used. Anything else will be ignored and the default behavior will be applied which is to always use the catalog-qualified form, /id/N/X.
disableDefaultExport Boolean false "disableDefaultExport" : \<value> N/A When the export annotation is missing from table and schema, ermrestjs will use the heuristics to generate a default export template. Set this attribute to true to avoid using the heuristics.
exportServicePath String "/deriva/export/" "exportServicePath" : \<value> N/A You can use this variable to switch between different export services that might be available in the deployment.
assetDownloadPolicyURL String N/A "assetDownloadPolicyURL" : \<value> N/A Set this property to the url that points to the download policy for when an asset is fetched but the user is unauthorized to fetch that asset.
includeCanonicalTag Boolean false "includeCanonicalTag" : \<value> N/A This variable can be used to force chaise to include a tag in the tag that defines the canonical link for each of the entities and other resource pages.
systemColumnsDisplayCompact Boolean/Array false "systemColumnsDisplayCompact" : \<value> N/A If set to true, apply the system columns heuristics when no visible columns list is defined. This will put the RID system column as the first self referencing key column. 'RCB', 'RMB', 'RCT', 'RMT' will be placed at the very end of the list respectively. If set to an array, only system columns in the array will be displayed in the order mentioned earlier. This applies to compact and all subcontexts.
systemColumnsDisplayDetailed Boolean/Array false "systemColumnsDisplayDetailed" : \<value> N/A See above description for systemColumnsDisplayCompact. This property behaves the same way except only for the detailed context.
systemColumnsDisplayEntry Boolean/Array false "systemColumnsDisplayEntry" : \<value> N/A See above description for systemColumnsDisplayCompact. This property behaves the same way except only for the entry contexts.
logClientActions Boolean true "logClientActions" : \<value> N/A Set this to false to disable the logging of client side actions which occurs when users interact with the app in ways that don't generate a request to the database.
disableExternalLinkModal Boolean false "disableExternalLinkModal": \<value> N/A Set this to false to disable the external link notification.
internalHosts Array [\<current hostname>] "internalHosts": [""] N/A If external link notification is enabled, Chaise will use this array to determine whether the current host is external. List any hostnames that should be considered internal. If defined, <current hostname> will not be automatically added to the list.
hideGoToRID Boolean false "hideGoToRID": \<value> N/A Use this property to hide the RID search box in the navbar. The RID search box is present in the navbar when resolverImplicitCatalog !== null (meaning the resolver is in use) and hideGoToRID !== true
shareCiteAcls Object {show: [""], enable: [""]} "shareCiteAcls": {show: [\<value>, ...], enable: [\<value>, ...]} N/A Use this property to show/hide or enable/disable the button used to open the share and cite dialog on Record app. The accepted values for the array for both show and enable are "*" or any valid globus group key. If either key/value pair is undefined in the object, it will default to ["*"]. Consult the chaise-config-sample.js file for more details.
configRules Array N/A "configRules" : [{host: \<value> | [\<value>, ...], config: {}},...] N/A Allows for host specific configuration rules. Each object in the array contains 2 properties, host and config. Host is expected to be in the format of a single string value or an array of string values. Config mimics the chaise-config properties. All chaise config properties can be defined in this block except this property (configRules).