Skip to content
Maksim Rakitin edited this page Nov 23, 2018 · 8 revisions

You can configure Olog by modifying configuration.js file. What follows are descriptions of variables and their values that can be changed by the user.

  • serviceurl Variable holds URL of the running olog-service. URL must include resources folder like in the example. Beware of the port number because service can be ran on http and https addresses at the same time.

  • dateFormat Date format Log's creation and changed date and time are displayed in. These dates are managed by moment.js plugin so format rules are documented at http://momentjs.com/docs/#/displaying/format/.

  • datePickerDateFormat When user selects a date with a datepicker (from - to time filter) date is displayed in a format defined by this variable. Format rules can be found at http://api.jqueryui.com/datepicker/.

  • datePickerTimeFormat In jQuery datepicker user cannot set time, so datetimepicker plugin must be added and configured. Time format rules can be found at http://trentrichardson.com/examples/timepicker/.

  • datePickerDateFormatMometParseString After date and time are set by datetimepicker, they have to be parsed by Javascript. For parsing date and time we again user moment.js and so we must define another variable that holds the format for parsing value. Rules for parsing can be again found at http://momentjs.com/docs/#/parsing/

  • datePickerFirstName Define day that start a week in datetimepicker. Available values are

  • 0 - Sunday,

  • 1 - Monday,

  • 2 - Tuesday,

  • 3 - Wednesday,

  • 4 - Thursday,

  • 5 - Friday,

  • 6 - Saturday.

  • numberOfLogsPerLoad The number of Log entries loaded per request. Logs will be displayed in the middle pane. When user scrolls to the end of the list, next numberOfLogsPerLoad Log entries will be appended. Recommended values are between 20 and 500.

  • filtersCookieName When user selects filters from the left pane those filters are saved into a cookie so data can be moved from one page to another. Name of the cookie can be changed to the user likings so it can be more easily found and deleted if necessary.

  • sessionCookieName User credentials are saved so user doesn't have to sign in every time he makes an authenticated REST request. Name of the cookie can be changed to the user likings so it can be more easily found and deleted if necessary.

  • writeLogs Some developers console output statements may still be present in the code. In production environment we can disable al of them by setting writeLogs to false.

  • firstPageName Some servers can have default page name set to something different than index.html. We can set firstPageName and repair the file name so we do not have to change server settings.

  • keyMap Object holds key, value pairs and represents the map between user search input and olog-service search query. If some other keys are more intuitive than proposed ones, they can be added to the object. For example if user enters tag: tag1,tag2,tag3 this will be converted to ...&tag=tag1,tag2,tag3...

  • timeFilter When using time based search, reserved words are defined to make search more intuitive. User can enter a number and then a reserved word e.g. from: last 9 mins. Everything before the number is ignored and everything after the number is checked against time filter map. If map exists for specific input, input is converted to seconds and multiplied by a number. Product is then passed to the search query. More maps can be added to support other inputs.

  • createdFromFilterDefinition Array of created from filters that are displayed in the left pane. Filter object must have name and value defined and value must be recognized by timeFilter object.

  • imageSizes List of image attachments sizes, default selected size and current selected size.

  • backwardImageSizesMap When a size is selected we want to have a reference back to an object.

  • updateInterval Update interval in seconds. After this time has elapsed system will check if new Log entries were created. If updateInterval is set to -1, checking will be disabled.

  • settingsCookieName Olog settings e.g. pane widths are saved in the cookie with this name.

  • smallScreenResolutionWidth Maximum width of small resolution. If Olog will be displayed in smaller width, panes will be stacked one upon each other and filters will be closed. If this constant is changes, constant should also be changed in style.css file.

  • levels Available Log entry levels. If levels change on the server side, this array should be changed to support new levels.

After those properties another group of properties follows. Those properties will be listed and their usage explained but should not be changed by the user.

  • searchURL Current search URL.

  • selectedLog Id of the Log entry currently displayed

  • modalWindows Path to the html that contains modal windows. Modal windows can be displayed on top of more than one html so their code is separated from the file they are ran from.

  • templates Path to the html that contains templates. Modal windows can be used in more than one html so their code is separated from the file they are used in.

Clone this wiki locally