Server. тображение текущей версии.

This commit is contained in:
2025-11-25 15:54:25 +03:00
parent e24c57c395
commit c627bc73d9
7 changed files with 109 additions and 59 deletions

View File

@@ -6,11 +6,14 @@ kanban-plugin: board
## backlog ## backlog
- [ ] GUI: Сделать кнопку перезапроса общих списков FIM (по аналогии с АММ)
- [ ] /RUS/Scens/tasksFIM.xml возможно изменится структура - [ ] /RUS/Scens/tasksFIM.xml возможно изменится структура
## Completed ## Completed
- [ ] Логин суперпользователя PostgreSQL предлагать по умолчанию postgres
- [ ] Сделать несколько попыток подключения к серверу
- [ ] Переобновление docs.xml в пределах версии (если инструктор изменяет процедуры) - [ ] Переобновление docs.xml в пределах версии (если инструктор изменяет процедуры)
- [ ] Реализовать механизм отображения и выбора подпроцедур для АММ. - [ ] Реализовать механизм отображения и выбора подпроцедур для АММ.
- [ ] Создание БД из кода (если нет или слетела) - [ ] Создание БД из кода (если нет или слетела)
@@ -52,12 +55,10 @@ kanban-plugin: board
## Server ## Server
- [ ] Логин суперпользователя PostgreSQL предлагать по умолчанию postgres
- [ ] Отходить от идентификации по Логину в пользу ID юзера везде, где это возможно. - [ ] Отходить от идентификации по Логину в пользу ID юзера везде, где это возможно.
(Так как сейчас может вызвать проблемы при смене логина юзера!!!) (Так как сейчас может вызвать проблемы при смене логина юзера!!!)
- [ ] Зарефакторить databaselms_PostgreSQL.cpp - [ ] Зарефакторить databaselms_PostgreSQL.cpp
(возможно, нужно использовать транзакции при восстановлении БД!) (возможно, нужно использовать транзакции при восстановлении БД!)
- [ ] При долгой работе загибается главное окно (предположительно из-за лога)
- [ ] Отображать текущую версию data в статус баре - [ ] Отображать текущую версию data в статус баре
- [ ] Сделать крутилку на начальную загрузку Сервера - [ ] Сделать крутилку на начальную загрузку Сервера
- [ ] Не блочится Сервер при смене версии - [ ] Не блочится Сервер при смене версии
@@ -74,8 +75,6 @@ kanban-plugin: board
## GUI общие ## GUI общие
- [ ] Текстовый поиск в задачах - [ ] Текстовый поиск в задачах
- [ ] Сделать кнопку перезапроса общих списков FIM (по аналогии с АММ)
- [ ] Сделать несколько попыток подключения к серверу

View File

@@ -110,6 +110,8 @@ QString AssetsManager::setVersion(QString versionName)
currentVersionData = version; currentVersionData = version;
saveVersionToFile(currentVersionData); saveVersionToFile(currentVersionData);
emit signal_setVersion(versionName);
return version->getAbsolutPath(); return version->getAbsolutPath();
} }
} }

View File

@@ -33,6 +33,7 @@ public:
signals: signals:
void sigSaveVersion(StreamingVersionData *versionData); void sigSaveVersion(StreamingVersionData *versionData);
void signal_setVersion(QString versionStr);
private: private:
UpdateController *updateController; UpdateController *updateController;

View File

@@ -166,6 +166,11 @@ void ServerLMSWidget::slot_startInitialization_step1()
waitAnimationWidget->hideWithStop(); waitAnimationWidget->hideWithStop();
} }
void ServerLMSWidget::slot_setVersion(QString versionStr)
{
ui->lblVersionText->setText(versionStr);
}
void ServerLMSWidget::start() void ServerLMSWidget::start()
{ {
startInitialization_step0(); startInitialization_step0();
@@ -372,9 +377,9 @@ void ServerLMSWidget::startInitialization_step0()
connect(updateController,&UpdateController::sigUpdateDocs,this,&ServerLMSWidget::slot_UpdateDocs,Qt::AutoConnection); connect(updateController,&UpdateController::sigUpdateDocs,this,&ServerLMSWidget::slot_UpdateDocs,Qt::AutoConnection);
connect(&Logger::instance(),&Logger::sigLogToWidget,this, &ServerLMSWidget::slot_AddMessageToLog,Qt::QueuedConnection); connect(&Logger::instance(),&Logger::sigLogToWidget,this, &ServerLMSWidget::slot_AddMessageToLog,Qt::QueuedConnection);
connect(assetsManager,&AssetsManager::signal_setVersion, this, &ServerLMSWidget::slot_setVersion);
emit sigUpdateControllerInitialize(commonClientHandler,dataParser,assetsManager); emit sigUpdateControllerInitialize(commonClientHandler,dataParser,assetsManager);
} }
void ServerLMSWidget::tryConnectionToDB() void ServerLMSWidget::tryConnectionToDB()

View File

@@ -99,6 +99,8 @@ public slots:
void slot_startInitialization_step1(); void slot_startInitialization_step1();
void slot_setVersion(QString versionStr);
public: public:
QString getLanguage() QString getLanguage()
{ {

View File

@@ -248,7 +248,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>100</width> <width>150</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@@ -298,65 +298,108 @@
</item> </item>
<item> <item>
<widget class="QLabel" name="lblDBsettings"> <widget class="QLabel" name="lblDBsettings">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text"> <property name="text">
<string>...</string> <string>...</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_Version">
<item> <item>
<spacer name="horizontalSpacer"> <widget class="QLabel" name="label_Version">
<property name="orientation"> <property name="text">
<enum>Qt::Horizontal</enum> <string>Version of materials: </string>
</property> </property>
<property name="sizeHint" stdset="0"> </widget>
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_Block"> <widget class="QLabel" name="lblVersionText">
<item> <property name="minimumSize">
<widget class="QLabel" name="label"> <size>
<property name="text"> <width>0</width>
<string>Authorization</string> <height>0</height>
</property> </size>
</widget> </property>
</item> <property name="text">
<item> <string>...</string>
<widget class="QLabel" name="lblBlockAuth"> </property>
<property name="sizePolicy"> </widget>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> </item>
<horstretch>0</horstretch> </layout>
<verstretch>0</verstretch> </item>
</sizepolicy> <item>
</property> <spacer name="horizontalSpacer_3">
<property name="minimumSize"> <property name="orientation">
<size> <enum>Qt::Horizontal</enum>
<width>32</width> </property>
<height>32</height> <property name="sizeHint" stdset="0">
</size> <size>
</property> <width>40</width>
<property name="maximumSize"> <height>20</height>
<size> </size>
<width>32</width> </property>
<height>32</height> </spacer>
</size> </item>
</property> <item>
<property name="text"> <layout class="QHBoxLayout" name="horizontalLayout_Block">
<string/> <item>
</property> <widget class="QLabel" name="label">
<property name="pixmap"> <property name="text">
<pixmap resource="ServerLMS.qrc">:/resources/icons/lock.png</pixmap> <string>Authorization</string>
</property> </property>
<property name="scaledContents"> </widget>
<bool>true</bool> </item>
</property> <item>
</widget> <widget class="QLabel" name="lblBlockAuth">
</item> <property name="sizePolicy">
</layout> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="ServerLMS.qrc">:/resources/icons/lock.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>

View File

@@ -297,10 +297,8 @@ void DialogSettingsTray::on_btnCheckDB_clicked()
dlg.setWindowTitle(tr("Superuser PostgreSQL authorization")); dlg.setWindowTitle(tr("Superuser PostgreSQL authorization"));
dlg.setWindowFlags(dlg.windowFlags() & ~Qt::WindowContextHelpButtonHint); dlg.setWindowFlags(dlg.windowFlags() & ~Qt::WindowContextHelpButtonHint);
dlg.setStyleSheet(this->styleSheet()); dlg.setStyleSheet(this->styleSheet());
#ifdef PROJECT_TYPE_DEBUG
dlg.setLogin("postgres"); dlg.setLogin("postgres");
dlg.setPassword(""); dlg.setPassword("");
#endif
switch( dlg.exec() ) switch( dlg.exec() )
{ {