ntminer 5 年之前
父节点
当前提交
0cb294e30f

+ 8 - 9
src/AppModels/MinerStudio/Vms/MinerClientViewModel.cs

@@ -284,15 +284,14 @@ namespace NTMiner.MinerStudio.Vms {
                     var old = _selectedMineWork;
                     this.WorkId = value.Id;
                     _selectedMineWork = value;
-                    MinerStudioService.Instance.UpdateClientAsync(
-                        this.Id, nameof(WorkId), value.Id, (response, exception) => {
-                            if (!response.IsSuccess()) {
-                                _selectedMineWork = old;
-                                this.WorkId = old.Id;
-                                VirtualRoot.Out.ShowError($"{this.MinerName} {this.MinerIp} {response.ReadMessage(exception)}", toConsole: true);
-                            }
-                            OnPropertyChanged(nameof(SelectedMineWork));
-                        });
+                    MinerStudioService.Instance.UpdateClientAsync(this.Id, nameof(WorkId), value.Id, (response, exception) => {
+                        if (!response.IsSuccess()) {
+                            _selectedMineWork = old;
+                            this.WorkId = old.Id;
+                            VirtualRoot.Out.ShowError($"{this.MinerName} {this.MinerIp} {response.ReadMessage(exception)}", toConsole: true);
+                        }
+                        OnPropertyChanged(nameof(SelectedMineWork));
+                    });
                 }
             }
         }

+ 2 - 2
src/NTMinerDaemon/Ws/AbstractWsClient.cs

@@ -80,10 +80,10 @@ namespace NTMiner.Ws {
             }
             switch (_appType) {
                 case NTMinerAppType.MinerClient:
-                    _ws.SendAsync(message.ToJson(), null);
+                    _ws.SendAsync(message.ToBytes(), null);
                     break;
                 case NTMinerAppType.MinerStudio:
-                    _ws.SendAsync(message.SignToJson(RpcRoot.RpcUser.Password), null);
+                    _ws.SendAsync(message.SignToBytes(RpcRoot.RpcUser.Password), null);
                     break;
                 default:
                     break;

+ 1 - 0
src/NTMinerDataSchemas/Core/MinerServer/ClientData.cs

@@ -20,6 +20,7 @@ namespace NTMiner.Core.MinerServer {
             HashSet<string> propertyNames = new HashSet<string> {
                 nameof(WorkerName),
                 nameof(GroupId),
+                nameof(WorkId),
                 nameof(WindowsLoginName),
                 nameof(WindowsPassword)
             };