viewflow: How can I disable long embeded list of data on default frontend screens? - django-viewflow

I'm currently using viewflow frontend for the management part of our workflow and we're getting huge loading times on default views that have started to show just after we started using the system for testing purposes.
Is there a param somewhere I can set so that it doesn't fetch everything?
Here's a picture of what get's rendered in these screens:
Side cards showing all of db's data
Current process's task view

You can override viewflow/process_data.html or [app_name]/[flow_name]/process_data.html for the specific flow, ex - https://github.com/viewflow/viewflow/blob/master/demo/shipment/templates/shipment/shipment/process_data.html

Related

Electron 22.0.3 On Linux Session Cookies Dilemma

I have created my first Electron app which is a dashboard that collects a list of URLs from a mongodb and scrolls through each URL using a predefined time delay between URLs. I am using this to display information screens from different BMS systems (Building Management / Building Automation systems) which all reside on the same local network. The BMS systems require user logins in order to view the screens. I have created some code in my preload script which injects the necessary login credentials into the proper DOM elements and activates the submit method. (I know this is not 100% secure but to help that situation, I am running the dashboard in kiosk mode with DevTools disabled. Further more, the systems I am connecting to do not contain any super sensitive data only temperature readings, etc.) I create the main browser window once and call the loadURL method in a different function which loads the next URL in the list. The problem I am having is that after rotating between all of the displays in system-A, when I load the URLs from system-B, the app has to login to that system (Totally expected behavior), however, when my logic finishes displaying the URLs from system-B and loops back to system-A, my app has to login to system A again even though I had already logged into system A prior to displaying system-B screens and I never destroyed the original browser window. Is there a way to maintain persistent session info to prevent this reoccurring login process when switching from system to system? Ideally I would like to maintain the persistent session info until I quit the app.
I have read over the documentation for the session and cookies methods, but being new to JavaScript and Electron, I couldn't quite wrap my head around how to implement the classes. Any help with this would be greatly appreciated.

jmeter script for JSF with PrimeFaces

I want to stress test JSF application (using Primefaces) with Jmeter and I'm facing a strange problem.
Said application saves some textual field and one image field. The workflow of application is that, on image upload control (primefaces) image is stored in session and on save button click application saves textual data as well as image data (from session).
Now the problem is this: I made two post request - one with image data and 2nd with textual data - but the page can't simulate saving.
Is there any way to simulate the process in jmeter?
Given you send the same requests as browser does you should be able to replicate the browser behaviour, just make sure to:
Properly build HTTP Request sampler(s)
Pay attention to HTTP Headers
Correlate dynamic parameters like JSF ViewState
With regards to point 1 it should be sufficient to just record the requests using JMeter's HTTP(S) Test Script Recorder, just make sure to copy the file(s) you're uploading to the "bin" folder of your JMeter installation, this way JMeter will be able to properly capture the requests. See Recording File Uploads with JMeter article for more details.
Points 2 and 3 - cross check the requests which are being sent from browser using browser developer tools and JMeter's View Results Tree listener - the requests need to be exactly the same apart from dynamic parameters which need to be correlated
And don't forget to add HTTP Cookie Manager to your Test Plan, it should deal with JSESSIONID and other cookies

How to reload Angular app (All Pages) after every few seconds

I'm currently working on Angular,Mongodb and nodejs as backend. But problem is whenever I add something like image or any entry I have to refresh the angular page to show the changes.
So is there any way to automatically reload every page of an angular app?
Also I would like to add that it's a group project so if another partner enter any image (image path) into data from his/her side I dont get the image as image doesn't not existed in my laptop and visa versa.
Is there any other way to reflect the image both the side even if it doesn't exist in each other's memory ?
You could always add a reload function on a timer:
setTimeout(window.location.reload.bind(window.location), 250);
But I would argue that this method isn't conducive to a good user experience though - window reloads are jarring.
A better option would be to create an observable bound to changes in collections on your database, and reset the image holder HTML based on events from that observable.

Querying ArangoDB without leaving page

I'm relatively new to webdevelopment and have been using ArangoDB for most of that limited experience. I have a basic understanding of Node.js and creating express based CRUD apps with ArangoDB as the database.
I'm getting to a point though where I'd like to have the ability to query the database from inside the client. Say I would like to have a datalist-type element where the user types words into a searchbar. I'd like the ability to query the database from there rather than having to query the database for all of its files prior to creating the datalist. I have not found a single mention though of using database queries from the client side. I can't imagine that this is not possible. Surely when I search wikipedia through the search bar and it provides me with options I didn't just receive the entire wikipedia documents list upon loading the page? Please steer me in the right direction, I don't know how to tackle this problem.
Have a look at how to build dynamic forms, this will allow you to perform AJAX style calls from the browser window to a back end REST API service. This will allow your back end web service to gather the data for the response (from ArangoDB if required), and respond with that data, most likely in a JSON format.
Your UI can then take that response and dynamically update components in your DOM so that the user can see the data injected into the page without a page reload action taking place.
https://www.pluralsight.com/search?q=ajax is a great place to start.
Alternatively you can have a look at free content like https://www.youtube.com/watch?v=tNKD0kfel6o

Method(s) used to pass data to and from WebKit based browser

I'm using WebKitGTK+ ( WebKit ) application that will be a very simple web browser running in a Linux environment as a separate executable that will need to exchange data between another application. The system is described in the following image:
Example scenario:
Event such as smart card insertion detected in Backend processing Application
smart card data is read and passed to the WebKitGTK+ GUI Application
User interacts with "web page" displayed in WebKitGTK+ Application
Data is passed from WebKitGTK+ Application back to the Backend processing Application
What are the common methods of passing data between the WebKitGTK+ Application and the Backend processing Application?
Does `WebKitGTK+ provide some hooks to do this sort of thing? Any help at all would be appreciated.
I know this is a old question, but will try to answer it to best of my abilities so that it can be useful to someone else.
Webkit is basically rendering a html page. You can connect to various signals that webkit provides and act on these signals. More details at http://webkitgtk.org/reference/webkitgtk/stable/webkitgtk-webkitwebview.html
For your back end application, if something interesting happens, you can update page either by navigating to a new url, new page contents or just by setting text of desired element. Webkit provides DOM api functions and all of these are possible.
It becomes interesting when getting data from webkit and sending it to your back end system. Again, this depends upon your specific design, but generally you can hook up signals such as navigation signals when user clicks on a button and get contents. Another alternative is to use alert handler and simply use javascript alert and process the alert data on backend side.
Shameless plug for example : https://github.com/nhrdl/notesMD. It uses a simple database backend, probably can be good use case as it sends data back and forth between database and webpage. Even manipulates the links so that desired actions take place.

Resources