How to implement a monitoring app using CUBA?

Hi,

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:

  1. The web app will auto login and show the the screen for monitoring
  2. The web app can auto relogin when the web server restarted.

Anybody can give some suggestion?

Thanks!

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.

1 Like

Hi,

Thanks for your reply.

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.

Hi,

your requirements should be possible to implement via the anonymous functionality. According to this GH issue: Provide an ability to work with app as anonymous · Issue #1665 · cuba-platform/cuba · GitHub the anonymous use cases will be enhanced further in 7.1.

Depending on how you want to display the monitoring data, the charts addon and or the dashboard addon will do the heavy lifting for you…

Bye
Mario

2 Likes

Hi,Mario

Thanks for your help. It is very helpful to me.

I will check the anonymous functionality.

Regards

Ray.Lv

Hi,

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";
    }
}

and add the folowing to the web-spring.xml file

<bean class="com.company.demo.web.CustomApp"
          name="cuba_App"
          scope="vaadin"/>

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.

For example, I got the following result:

skip-login-screen.zip (95.2 KB)

Regards,
Gleb

Hi,

Thanks all of you,

The answers is fit to me exactly . Now my app can auto login and show a dashboard screen in “initialLayout”.

Regards,

Ray