Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

Konfigurácia web aplikácie sa realizuje v sekcii application konfiguračného súboru Configuration of a web application is realized in the section application of the configuration file smartweb.json.

Tu je možné definovať dobu nečinnosti prihláseného užívateľa (s otvorenou aspoň jednou SmartWeb stránkou) v minútach, po ktorej bude automaticky odhlásený (userSessionMaxInactivePeriod), ak tento atribút nie je definovaný priamo na objekte užívateľ v systéme D2000. Atribútom httpSessionMaxInactivePeriod sa definuje doba po zatvorení všetkých tabov, po ktorej bude zrušená session prihláseného užívateľa.

Sekcia development

Here, it is possible to define an inactivity period of a logged on user (with at least one opened SmartWeb page) in minutes after which the user will be automatically logged out (userSessionMaxInactivePeriod), if this attribute is not defined directly on the object user in the D2000 system. The period after closing all tabs, after which the session of a logged on user will be closed, is defined by the attribute httpSessionMaxInactivePeriod. 

The development section

In the development section, the developing regime of the access to the page in permitted (devModeEnabled, the keyboard shortcut CTRL+ALT+D is also permitted); rebundling of an application in permitted too (rebundlingEnabled, the keyboard shortcut V sekcii development sa povoľuje vývojársky režim prístupu ku stránkam (devModeEnabled, zároveň povoľuje klávesovú skratku CTRL+ALT+D) a taktiež sa tu povoľuje rebundlovanie aplikácie (rebundlingEnabled, klávesová skratka CRTL+ALT+R).

...

The webResourceDirectories

...

section

In this section, it is necessary to define whole path to the application directory (directoryPath). Necessary JavaScript libraries (dependencies), which will be automatically downloaded, are defined here. The attribute downloadBundleEngine defines whether there should be a bundle engine downloaded before the application start - this is necessary only when first starting the application. By the attribute downloadProxyUrl, the address of the proxy server is set, if it is necessary. The attribute bundleAtServerStart defines whether the application should be rebundled when starting the web server - it is necessary only when the source files of pages have been modified and rebundling was not called manually. V tejto sekcii je potrebné zadefinovať celú cestu k adresáru aplikácie (directoryPath), definujú sa tu potrebné JavaScript knižnice (dependencies), ktoré budú automaticky stiahnuté. Atribút downloadBundleEngine určuje či má byť pred štartom aplikácie stiahnutý bundle engine - potrebné len pri prvom štarte aplikácie. Atribútom downloadProxyUrl sa nastavuje adresa proxy servera, ak je potrebný a atribút bundleAtServerStart určuje či má byť aplikácia rebundlovaná pri štarte webového servera - potrebné len ak boli zdrojové súbory stránok modifikované a nebol rebundlovanie nebolo zavolané manuálne.

Blok kódu
languagejs
titlesmartweb.json
{
    "application": {
        "httpSessionMaxInactivePeriod": "5",
        "userSessionMaxInactivePeriod": "30",


        // Development section defines if DEV mode and rebundling operation is enabled (default values are true)
        "development": {
            "devModeEnabled": "true",
            "rebundlingEnabled": "true"
        },

        // Definition of application resource directories and corresponding configuration of SmartWeb Bundle Engine
        "webResourceDirectories": [
            {
                "type": "APPLICATION",
                "downloadBundleEngine": "true",
                "downloadProxyUrl": "http://proxy:3128",
                "bundleAtServerStart": "true",
                "applicationFilesFilter": "glob:{*.js,pages/*.js}",
                "componentFilesFilter": "glob:{custom/components.js}",
                "dependencies": [
                    "npm:bootstrap@3.3.7"
                ],
                "directoryPath": "D:\\IdeaProjects\\smart-web\\cust\\cust-tutorial\\cust-tutorial-src\\src\\main\\javascript\\app"
            }
        ]
    } 
}

...