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
28862886 }
28872887
28882888 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−
28942889 if (!hubIsConnected) {
28952890 showErrorMessage("Cannot save device connection, cannot connect to server.");
28962891 return $.Deferred().resolve().promise();
@@ -2929,7 +2924,7 @@ · 32 unmodified lines
29292924 device.ProtocolID = configFrame.ProtocolID;
29302925 device.FrameRate = configFrame.FrameRate;
29312926 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);
29332928
29342929 if (isEmpty(device.Name))
29352930 device.Name = device.Acronym;
@@ -3613,7 +3608,7 @@ · 677 unmodified lines
36133608 @if (userIsEditor)
36143609 {
36153610 <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())">
36173612 <span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;Save&nbsp;Device&nbsp;
36183613 </button>
36193614 </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