I want to build a application for monitoring using CUBA, the main screen will show some information about monitoring data.
I will create a winform application that embed a Chromium (using CefSharp) for opening the CUBA web app ,and this winform application will auto start and show as full screen when OS started.
There are some necessary feature that i am not sure how to do:
The web app will auto login and show the the screen for monitoring
The web app can auto relogin when the web server restarted.
The nature of CUBA Platform is ERP.
Basically, it means that it in most cases the best use-case to use cuba is when you have people (real persons) inserting data and viewing data. directly or via API.
Monitor app usually proactively read data from other systems and display it in dashboards and log viewers.
In my humble opinion, cuba platform is not the framework for that kind of task.
Yes,you are right about CUBA using to build data-centered application.
In fact ,i have built a CUBA application that processing data from many of terminal devices,here we named it as âData Center Applicationâ .The app runing in terminal device also is a CUBA app and based the âData Center Applicationâ, here we named this application as âTerminal Applicationâ, Most of functionality of âTerminal Applicationâ are same as âData Center Applicationâ but the data only for a Terminal ,besides, it have a screen for showing some monitoring data to users.
Before the feature above will be released, you can skip the login screen by defining the routeTopLevelWindowId. In order to do that, you need to create and register a custom App, e.g.:
package com.company.demo.web;
import com.haulmont.cuba.web.DefaultApp;
public class CustomApp extends DefaultApp {
@Override
protected String routeTopLevelWindowId() {
return "mainWindow";
}
}
Pay attention that in this case you wonât be logged in, but will work in anonymous mode, so you need either give permissions to the anonymous user to read/write required data or set another user on behalf of which the anonymous session is created by defining the cuba.anonymousLogin app property.