Skip to content

Commit 86f6b0f

Browse files
committed
feat: Private Update & Update Delivery & HTTP Download Rate Limit Online Configuration – Feature Merged into Mainline
Includes the following three features: I. Private Update The private update feature is controlled by the intranet-update configuration option under lastore-daemon. When disabled, the public network update module interface in the Control Center is displayed. When enabled, the interface switches to the private update interface. Differences between the private update interface and the public network interface: a. The update settings entry is hidden. Enterprise-level update users are not allowed to modify update-related configurations. b. The process from checking for updates to downloading in private update mode is atomic. Enterprise update users cannot refuse to download, and the download process cannot be canceled. c. After the download is complete, a re-check button is added. d. For non-mandatory update tasks, after the download is complete, users can choose the update method themselves: update immediately or update after shutdown. e. A dedicated private update tray is added to provide more detailed download/update status. The tray is loaded only when the private update switch is enabled. Story: https://pms.uniontech.com/story-view-40191.html II. Update Delivery A master switch for update delivery is added to the Advanced Settings page of the Control Center for updates. When the switch is turned on, the interface displays two sub-items: "Update Delivery – Upload Rate Limit" and "Update Delivery – Download Rate Limit". Each sub-item has its own control switch and speed limit input box, and calls the corresponding interfaces in lastore-daemon. The switches and input boxes for the upload and download rate limit sub-items control the enabling/disabling and specific values of the upload and download rate limits respectively, by calling SetDeliveryUploadSpeedLimit and SetDeliveryDownloadSpeedLimit in lastore-daemon. The rate limit configuration for update delivery supports policies issued by the update platform backend for peak/off-peak hours. When such policies are active, the Control Center grays out the upload and download rate limit sub-items accordingly, preventing users from making modifications. Each time the master switch is operated, the status values of the various sub-items are refreshed accordingly by reading the corresponding attributes from the upgrade-delivery service. Task: https://pms.uniontech.com/task-view-387713.html III. HTTP Download Rate Limit Online Configuration The HTTP download rate limit feature supports online configuration. Once the online configuration takes effect, the interface controls are grayed out and disabled for user operations. Story: https://pms.uniontech.com/story-view-40191.html feat: 私有化更新&更新传递&http下载限速在线配置 功能合入主线 包含以下三部分功能 一.私有化更新 1.通过lastore-daemon下面的intranet-update配置项决定功能私有化功能是否开启,未开启时仍为控制中心公网更新模块界面,开启后切换为私有化更新界面 2.私有化更新界面与公网界面大致相同,主要有以下区别点: a.屏蔽更新设置入口,企业级更新的用户不允许私自修改更新相关配置 b.私有化更新的检查更新到下载流程为原子化操作,企业及更新用户无拒绝下载的权利,下载过程中不允许取消 c.下载完成后添加重复检查按钮 d.若为非强制更新类型的任务,下载完成后允许用户自行决定更新方式,立即更新or关机后更新 e.添加私有化专属托盘,提供更详细的下载更新状态,仅在私有化开关开启时加载托盘 Story: https://pms.uniontech.com/story-view-40191.html 二.更新传递 1.添加更新传递总开关在控制中心更新高级设置界面。当开关打开时,界面展示更新传递-上传限速、更新传递-下载限速两个子项,每个子项有各自的控制开关和限速值输入框,同时调用lastore-daemon的SetP2pEnable相关接口,在lastore的下次检查更新时尝试拉起upgrade-delivery系统服务 2.更新传递-上传限速、更新传递-下载限速两个子项的开关和输入框各自控制上传、下载限速的开启和关闭以及具体数值,具体通过调用lastore-daemon的SetDeliveryUploadSpeedLimit和SetDeliveryDownloadSpeedLimit接口交由lastore来实际设置值。 3.更新传递的限速配置支持通过更新平台后端下发忙闲时的限速策略,此时控制中心会根据这一策略适时置灰更新传递-上传限速、更新传递-下载限速两个子项,禁止用户修改 4.每次操作总开关时会适时的刷新各种子项的状态值,具体是从upgrade-delivery服务中读取对应的属性值 Task: https://pms.uniontech.com/task-view-387713.html 三.http下载限速在线配置 http下载限速功能支持在线配置,在线配置生效后界面置灰,禁止用户操作 Story: https://pms.uniontech.com/story-view-40191.html
2 parents d848e7f + b8d050b commit 86f6b0f

49 files changed

Lines changed: 2059 additions & 1823 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.reuse/dep5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Copyright: None
3434
License: CC0-1.0
3535

3636
# configuration files for CI scripts/tools
37-
Files: .github/* .obs/* .tx/transifex.yaml .tx/deepin.conf src/dde-update/misc/deepin-update-log-copy@.service src/dde-update/misc/52-deepin-update-ui.rules
37+
Files: .github/* .obs/* .tx/transifex.yaml .tx/deepin.conf src/dde-update/misc/deepin-update-log-copy@.service src/dde-update/misc/52-deepin-update-ui.rules src/dde-update/misc/dde-update-env.service
3838
Copyright: None
3939
License: CC0-1.0
4040

debian/changelog

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
deepin-update-ui (1.0.50) unstable; urgency=medium
2+
3+
* fix(qml): fix button layout margin by adding right margin
4+
* [dde-update-ui] Updates for project Deepin Desktop Environment
5+
(#271)
6+
7+
-- zhangkun <zhangkun2@uniontech.com> Thu, 23 Apr 2026 21:46:26 +0800
8+
9+
deepin-update-ui (1.0.49) unstable; urgency=medium
10+
11+
* feat: add update detail expansion and fix version display
12+
* fix: prevent DBus signal infinite loop in QML bindings
13+
* fix: fix up key navigation in error and update complete dialogs
14+
* [dde-update-ui] Updates for project Deepin Desktop Environment
15+
(#259)
16+
* [dde-update-ui] Updates for project Deepin Desktop Environment
17+
(#231)
18+
19+
-- zhangkun <zhangkun2@uniontech.com> Thu, 09 Apr 2026 20:28:05 +0800
20+
21+
deepin-update-ui (1.0.48) unstable; urgency=medium
22+
23+
* fix: replace UpdateSelectDialog with Loader for dynamic creation
24+
* chore: refactor X11 session startup for update environment
25+
* fix(ui): adjust expand/collapse button style in UpdateSetting
26+
27+
-- zhangkun <zhangkun2@uniontech.com> Wed, 25 Mar 2026 18:13:15 +0800
28+
129
deepin-update-ui (1.0.47) unstable; urgency=medium
230

331
* fix: calculate required space for download failures

src/dcc-update-plugin/operation/updatedatastructs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ struct UpgradeSpeedLimitConfig {
184184
const QJsonDocument doc = QJsonDocument::fromJson(configStr, &jsonParseError);
185185

186186
if (jsonParseError.error != QJsonParseError::NoError || doc.isEmpty()) {
187-
// qCWarning(logDccUpdatePlugin) << "Parse upgrade speed limit config failed: " << jsonParseError.errorString();
188187
return config;
189188
}
190189

src/dcc-update-plugin/operation/updatelistmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
22
// SPDX-License-Identifier: GPL-3.0-or-later
33
#include "updatelistmodel.h"
44
#include <QLoggingCategory>

src/dcc-update-plugin/operation/updatelistmodel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
22
// SPDX-License-Identifier: GPL-3.0-or-later
33
#ifndef UPDATELISTMODEL_H
44
#define UPDATELISTMODEL_H

src/dcc-update-plugin/operation/updateloghelper.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2019-2026 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2019 - 2026 UnionTech Software Technology Co., Ltd.
22
//
33
// SPDX-License-Identifier: LGPL-3.0-or-later
44

@@ -66,7 +66,6 @@ QString UpdateLogHelper::sumCveLevelUp(const QMap<VulLevel, int>& vulCount)
6666

6767
void UpdateLogHelper::handleUpdateLog(const QString &log)
6868
{
69-
qCDebug(logDccUpdatePlugin) << "Handling update log: " << log;
7069
qCDebug(logDccUpdatePlugin) << "Handling update log, length:" << log.length();
7170
const QJsonDocument& doc = QJsonDocument::fromJson(log.toLocal8Bit());
7271
const QJsonObject& rootObj = doc.object();

src/dcc-update-plugin/qml/CheckUpdate.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
22
// SPDX-License-Identifier: GPL-3.0-or-later
33
import QtQuick 2.0
44
import QtQuick.Controls 2.0

src/dcc-update-plugin/qml/UpdateList.qml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ Rectangle {
128128
}
129129
hoveredDark: hovered
130130
}
131-
// visible: repeater.model.getDetailInfos(index).length !== 0 && !itemCtl.showDetails
132-
visible: true
131+
visible: repeater.model.getDetailInfos(index).length !== 0 && !itemCtl.showDetails
133132
bottomPadding: 0
134133
font: D.DTK.fontManager.t8
135134
text: qsTr("View More")

src/dcc-update-plugin/qml/UpdateMain.qml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
22
// SPDX-License-Identifier: GPL-3.0-or-later
33

44
import QtQuick 2.15
@@ -318,27 +318,35 @@ DccObject {
318318
if (dccData.model().isPrivateUpdate) {
319319
dccData.work().doUpgrade(updateListModels.getAllUpdateType(), true)
320320
} else {
321-
updateSelectDialog.updateType = updateType
322-
updateSelectDialog.show()
321+
updateSelectLoader.updateType = updateType
322+
updateSelectLoader.active = true
323323
}
324324
} else if (index === 1) {
325325
dccData.work().reCheckWithUi();
326326
}
327327
}
328328

329-
UpdateSelectDialog {
330-
id: updateSelectDialog
329+
Loader {
330+
id: updateSelectLoader
331+
active: false
331332
property var updateType: 0
332-
palette: parent.palette
333-
visible: false
334-
onSilentBtnClicked: {
335-
dccData.work().doUpgrade(updateType, true)
336-
}
337-
onUpgradeRebootBtnClicked: {
338-
dccData.work().modalUpgrade(true)
333+
sourceComponent: UpdateSelectDialog {
334+
palette: updateSelectLoader.parent ? updateSelectLoader.parent.palette : undefined
335+
onSilentBtnClicked: {
336+
dccData.work().doUpgrade(updateSelectLoader.updateType, true)
337+
}
338+
onUpgradeRebootBtnClicked: {
339+
dccData.work().modalUpgrade(true)
340+
}
341+
onUpgradeShutdownBtnClicked: {
342+
dccData.work().modalUpgrade(false)
343+
}
344+
onClosing: function (close) {
345+
updateSelectLoader.active = false
346+
}
339347
}
340-
onUpgradeShutdownBtnClicked: {
341-
dccData.work().modalUpgrade(false)
348+
onLoaded: function () {
349+
updateSelectLoader.item.show()
342350
}
343351
}
344352

@@ -352,7 +360,9 @@ DccObject {
352360
Connections {
353361
target: dccData.work()
354362
function onStartDoUpgrade() {
355-
updateSelectDialog.close()
363+
if (updateSelectLoader.item) {
364+
updateSelectLoader.item.close()
365+
}
356366
}
357367
}
358368
}

src/dcc-update-plugin/qml/UpdateSelectDialog.qml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd.
1+
// SPDX-FileCopyrightText: 2025 - 2026 UnionTech Software Technology Co., Ltd.
22
// SPDX-License-Identifier: GPL-3.0-or-later
33
import QtQuick 2.15
44
import QtQuick.Layouts 1.15
@@ -19,7 +19,7 @@ D.DialogWindow {
1919
signal upgradeShutdownBtnClicked()
2020

2121
ColumnLayout {
22-
width: parent.width
22+
width: root.width - root.leftPadding - root.rightPadding
2323

2424
D.Label {
2525
Layout.fillWidth: true
@@ -29,8 +29,7 @@ D.DialogWindow {
2929
}
3030

3131
Item {
32-
Layout.fillHeight: true
33-
Layout.preferredHeight: 22
32+
height: 15
3433
}
3534

3635
RowLayout {

0 commit comments

Comments
 (0)