History

PhasorWebUI: Added better handling to gateway connection updates and handling of empty connection strings.

J. Ritchie Carroll committed 6 years ago

Commit 446ebef1 parent 30db42c1 file · +2 −7Browse files

Unified · Split

Source/Libraries/Adapters/PhasorWebUI/Views/AddSynchrophasorDevice.cshtml+2−7
@@ -2886,11 +2886,6 @@ · 2885 unmodified lines
2886 }2886 }
2887 2887
2888 function saveDeviceConnection() {2888 function saveDeviceConnection() {
2889 if (isEmpty(viewModel.configFrame().ConnectionString)) {
2890 showErrorMessage("Cannot save device connection without a connection string");
2891 return $.Deferred().resolve().promise();
2892 }
2893
2894 if (!hubIsConnected) {2889 if (!hubIsConnected) {
2895 showErrorMessage("Cannot save device connection, cannot connect to server.");2890 showErrorMessage("Cannot save device connection, cannot connect to server.");
2896 return $.Deferred().resolve().promise();2891 return $.Deferred().resolve().promise();
@@ -2929,7 +2924,7 @@ · 32 unmodified lines
2929 device.ProtocolID = configFrame.ProtocolID;2924 device.ProtocolID = configFrame.ProtocolID;
2930 device.FrameRate = configFrame.FrameRate;2925 device.FrameRate = configFrame.FrameRate;
2931 device.AccessID = configFrame.IDCode;2926 device.AccessID = configFrame.IDCode;
2932 device.IsConcentrator = configFrame.IsConcentrator || configFrame.Cells.length > 1;2927 device.IsConcentrator = !isEmpty(viewModel.configFrame().ConnectionString) && (configFrame.IsConcentrator || configFrame.Cells.length > 1);
2933 2928
2934 if (isEmpty(device.Name))2929 if (isEmpty(device.Name))
2935 device.Name = device.Acronym;2930 device.Name = device.Acronym;
@@ -3613,7 +3608,7 @@ · 677 unmodified lines
3613 @if (userIsEditor)3608 @if (userIsEditor)
3614 {3609 {
3615 <div class="input-group save-button pull-right">3610 <div class="input-group save-button pull-right">
3616 <button type="button" class="btn btn-primary pull-right" id="saveData" data-bind="disable: !isDirty() && (working() || validationErrors() > 0 || !phasorHubIsConnected() || isEmpty(configFrame().ConnectionString))">3611 <button type="button" class="btn btn-primary pull-right" id="saveData" data-bind="disable: !isDirty() && (working() || validationErrors() > 0 || !phasorHubIsConnected())">
3617 <span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;Save&nbsp;Device&nbsp;3612 <span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;Save&nbsp;Device&nbsp;
3618 </button>3613 </button>
3619 </div>3614 </div>

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t