G Web Development Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Hyperlink

Solved!
Go to solution

Hi, 

I currently have a project where consists in a main page which contains 4 hyperlinks to other 4 pages(where the data is displayed)

Im using Ni web server to save the tags(from labview), and in each page i have to use the open configuration node(systemlink data communication) to outpout the "configuration" value to open tag.vi , and then reading the tag values and displaying them. 

I sawn an example where you disable the open open configuration block(the data isn´t displayed) until the credantials(login from ni web server) are ipnut, and it worked fine , however, in every page i have to input the credentials again.

1- (prefered way)
I wan wondering if i can disable the hyperlink untill i input the credentials (login from ni web server).Therefore , i wouldnt have to put credentials in every page, only in the index(main page).

2-
Another thing i thought was to disable the open configuration node in the main page until i input the credentials (same as the example before mentioned)  , and somehow export the output("configuration") from the configuration node to the others webvis as a global variable, hence the data wont be displayed until the "configration" value is exported to the other pages.



0 Kudos
Message 1 of 5
(1,785 Views)
Solution
Accepted by topic author Labmecepel

The expected workflow would be to not have the user enter credentials on the WebVIs themselves. Instead the Open Configuration would be removed from the WebVIs, the WebVIs would be built and hosted on the Web Application Hosting service on the NI Web Server.

 

Then when a user visits the NI Web Server they have to login and when the WebVI opens the logged in credentials are used automatically for calls to the data services like Tags and Messages. The How to Build a Web UI for Your LabVIEW-Based Test System from 31m41s to 32m44s shows the following points:

 

  1. Removing explicit Open Configuration calls from the diagram.
    • The video explains earlier you may want Open Configuration calls when testing in the editor but those should be removed before deploying.
  2. Deploy the WebVI to the Web Applications hosting service
    • WebVIs are built as nipkg files and the first half of the video shows that workflow in more detail. The built nipkg is then deployed to the NI Web Server via the Web Application Hosting service.
  3. View the build WebVI from the Web Applications view
    • Note in the video how the deployed WebVI with credentials removed was able to run successfully because when hosted in the Web Application Hosting service the WebVI is able to leverage the logged in user credentials.

With the above workflow you should be able to keep the application organized with multiple top-level WebVIs and remove explicit login requirements from all of them. The user would just login to the NI Web Server and visit your application with the different URLs and select the page they need with the data displayed.

 

I'd recommend going through the content of How to Build a Web UI for Your LabVIEW-Based Test System as it gives a lot of useful context for patterns of testing and deploying WebVIs.

 


Milan
Message 2 of 5
(1,756 Views)

Thanks for the insight. I've already changed it, so you dont need to use open configuration on the web vi , only when testing it.

Furthermore , i am struggling to create a new user account(guest account where they can only see the webvi) and edit its privileges , i've come across this tutorial: Solucionado: How do I create a new user in SystemLink - NI Community

I did manage to create a new user,but the admin user disapeared and the new user didnt have any privelges.


Is it possible to have 2 users (admin and guest) using only ni web server ?
 

Labmecepel_0-1707143988889.png

 

0 Kudos
Message 3 of 5
(1,618 Views)
Solution
Accepted by topic author Labmecepel

I'm not familiar with the approach linked from that separate forum. The direction I'd probably go is in the NI Web Server Configuration > Authentication enabling:

 

  • Log in as users controlled by the web server (to create the admin account and password)
  • Log in using Windows accounts (to allow a local account I create the ability to login)

MilanR_0-1707171439300.png

 

Then I would create a local account using Windows settings for a user like "webviguest" with a password:

MilanR_1-1707171594533.png

 

I would login to the NI Web Server as "webviguest" account so that the NI Web Server is aware of it, and notice that it doesn't have access to any WebVIs or anything else yet:

MilanR_2-1707171751285.png

 

I would log back into my admin account and make sure I see the "webviguest" user show up under users:

MilanR_4-1707172068847.png

 

 

 

Continuing with the admin account I would create a new role for the user, something like "WebVI Only" that has permissions to view the WebVI but also other needed permissions for WebVIs to run like read and / or write access to certain tags or messages:

MilanR_3-1707171959050.png

 

Continuing with the admin account I would go to the workspace configuration, edit the default workspace, and under members I would add the new user and expected roles, for example "webviguest" with the "WebVI Only" role:

 

MilanR_5-1707172276595.png

 

 

I would log out of the admin account and wait several minutes for role changes to be picked up by the NII Web Server. After several minutes I would login as "webviguest" again. and notice that when I click the user menu > Account and look at workspaces that the "webviguest" user is in the default workspace with the assigned role of "WebVI Only":

 

MilanR_6-1707172717425.png

 

 

And that the "webviguest" user can now access WebVIs on the web applications page:

MilanR_7-1707172799190.png

 

MilanR_8-1707172823713.png

 


Milan
Message 4 of 5
(1,597 Views)

Thanks again , that worked fine!!

0 Kudos
Message 5 of 5
(1,548 Views)