Closed algorys closed 7 years ago
af42a31 add first version of Threadmanager
and DataManager
.
Threadmanager:
This class manage the BackendQThread who make requests. ThreadManager will make periodic threads to get items data and feed the DataManager.
Currently, BackendQThread
makes its requests every 30 seconds.
DataManager:
This class now manage the App data. It will be the link between the queries and the GUI. So later, she will have accessor to give data to GUI and also keep other informations, like alignakdaemon
states or livesynthesis
. Currently, she only get all items
(hosts and services) with the minimum informations used by App (thanks to projection).
This class make NO requests because she is feed by BackendQThread
.
Next Steps:
If I update schema:
Threadmanager & BackendQThread ]
" Request periodically Alignak Backend " ]
" Feed DataManager " ]
---------------------------------------- ]
|
|
DataManager: " Store and give Data when needed "
(alignakdaemon - livesynthesis - items data)
|
|
Hosts / Services Views ]
Banners ] -> They only need to display what the datamanager have stored,
Menus ] by simple GET functions
So next is:
alignakdaemon
and livesynthesis
endpoints.Finally, finish by:
Missing two endpoint:
user
endpointhistory
endoint
Integrate DataManager and Threads:
accessors
on DataManager.Normally then App will execute 2 tasks: the QApplication run and the ThreadManager in parallel.
Done.
All requests are now replaced by accessors in DAtaManager
.
Application wait DataManager
is ready before start.
For the moment only some functions have been retained for the ActionManager
and therefore need to be reviewed. See #207.
App was at the base intended to display only notifications about hosts and services and to use only the system tray.
Since then it has evolved considerably and deserves to be reviewed. This issue is intended to define the global future processes. I'm not very friendly with :
To resume:
With this system, App should be much more fluid and this will really separate the interface from the data.
App will be also able to keep the old data and make some diff more easily.