ChemoLIMS NX Frontend & Backend Setup Should Know

ChemoLIMS NX Frontend & Backend Setup Should Know

  1. Database Setup:

    To assign database, for shortcut quick click “Shift” twice, and look for webappcore\src\main\resources\application.properties


    Look from line 1x, you will found the line of code “spring.datasource.url”, simply change to the database you want:

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen1.jpg’ title=” title_color=” title_tag=”]- localhost:5434 can change to your desire port using
    temp_dwnp_live can change to your desire database name

    [/image_with_text]

  2. CALL FUNCTIONS: GET, UPDATE, DELETE:

    Each module contains one of FomService.js file under sections folder. FormService will contain all the method to be call from backend to frontend. Refer below image for the page view.


    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen2.jpg’ title=” title_color=” title_tag=”]

    – You may direct use the white label as the function to call
    – To create new call function, simply duplicate one and change the label, method & url

    [/image_with_text]
  3. Setup HTML & Controller:

    Each module contains one of module.js file under module root folder. Module JS use to identify which HTML is belong to which controller.


    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen3.jpg’ title=” title_color=” title_tag=”]

    – Controller name has to be unique
    – File path cannot be same or duplicate

    [/image_with_text]
  4. Create & Setup New Module:


    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen4.jpg’ title=” title_color=” title_tag=”]

    Step 1: Frontend, navigate to this path and duplicate one of existing, and rename to the new module name.
    (For example, module-newmoudlename.json)

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen5.jpg’ title=” title_color=” title_tag=”]

    Step 2: Fronend, open the new created json file, change:
    href to the module url path
    title to module full name
    package to module short name / call name

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen6.jpg’ title=” title_color=” title_tag=”]

    Step 3: Backend, open file from or shortcut click “shift” twice, and search for apps\common\config\WebappProperties.java


    – Insert module short name / call name into last value of MODS_ALL
    – MODS_yourmodulename
    can be added, but remember to change the value from String modules

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen7.jpg’ title=” title_color=” title_tag=”]

    Step 4: Backend, open file from or shortcut click “shift” twice, and search for apps \core\WebappProperties.java


    – Insert module short name / call name into last value of “all” under packmodules

    [/image_with_text]
  5. Setup Permission:

    Module of page would have a section to tell which permission applicable on the page.


    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen8.jpg’ title=” title_color=” title_tag=”]

    Step 1: Frontend, open page would like to apply permission, and use above image code or duplicate from another existing permission page and change:


    $scope.pageid change to a unique id for your page
    $scope.permissions can set permission you want in the page

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen9.jpg’ title=” title_color=” title_tag=”]

    Step 2: Backend, create or open your backend module folder from apps\webappcore\[YOUR_MODULE] and create a folder path \assets\config if don’t have.

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen10.jpg’ title=” title_color=” title_tag=”]

    Step 3: Create or duplicate an existing permissions.yml file, and change the content to your module permission style:


    modulecode change to your module short name / call name
    modulename change to your module full name
    id is the page of id ($scope.pageid)
    actions is the permission you set for the page ($scope.permissions)
    access is the level of person can be access below of the page(s)

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen11.jpg’ title=” title_color=” title_tag=”]

    Step 4: Open Chemolims NX application and navigate to Settings > Manage Role page. Click “Permission Install” button and a pop up should display.

    [/image_with_text]

    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen12.jpg’ title=” title_color=” title_tag=”]

    Step 5: Copy & paste the complete version of code from permission.yml into the textfield of the popup and click “Install” button. Now permission should install according the format you set.

    [/image_with_text]
  6. API Connection:

    For certain client such as Elken DNAecomLab, our Chemolims NX application has to communicate with their third party system to retrieve data into our application.


    [image_with_text image=’https://docs.chemoinformatics.com/wp-content/uploads/2020/10/chemolimsnx-frontend-backend-setup-screen13.jpg’ title=” title_color=” title_tag=”]

    Navigate webappcore\src\main\resources\application.properties and scroll to line 5x, you should have this few line of code to setup Elken TruYou API.


    webapp.dnaecomlab.truyouapi.url for API url, have to concern about the certificate of expiration
    webapp.dnaecomlab.truyouapi.enabled for enable/disabled API function in the application

    [/image_with_text]

Total 0 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Admin

Website: