-
Notifications
You must be signed in to change notification settings - Fork 26
Adding a toolbar that contains SC connectivity status #677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9d1dac0
Adding a toolbar that contains information about connectivity to SC a…
WojcikMike 9445818
footer stick to bottom and layout tweaking
sergioc 086b6df
further footer tweaks
sergioc 39c8b19
remove version indicator from dashboard
sergioc 7c1c41b
Improve footer contrast
sergioc bcddca3
reverting changes to constant
WojcikMike 2b2e531
Adding the connecting state to the toolbar
WojcikMike 2fa1bd3
Changing to show toast errors once for connection error
WojcikMike b26cf87
Adding a code to check connectivity to SC Monitoring
WojcikMike 03d7248
Update src/ServicePulse.Host/app/modules/monitoring/js/directives/ui.…
WilliamBZA 6b5aa0f
Update src/ServicePulse.Host/app/modules/monitoring/js/services/servi…
WilliamBZA 7b03bf4
Change the method name, remove iterating through array
WojcikMike c9f04f5
Rename vars
WilliamBZA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,29 @@ | ||
| <footer class="footer"> | ||
| <div class="container"> | ||
| <div class="row"> | ||
| <div class="col-sm-12"> | ||
| <div class="row"> | ||
| <div> | ||
| <span> | ||
| <script>document.write(new Date().getFullYear())</script> © Particular Software | ||
| </span> | ||
|
|
||
| • | ||
|
|
||
| <span> | ||
| <i class="fa fa-external-link fake-link"></i> <a href="http://docs.particular.net/servicepulse" target="_blank">ServicePulse documentation</a> | ||
| </span> | ||
|
|
||
| • | ||
|
|
||
| <span> | ||
| <i class="fa fa-envelope fake-link"></i> <a href="mailto:support@particular.net" target="_blank">support@particular.net</a> | ||
| </span> | ||
|
|
||
| <span> | ||
| <product-version version="{{Version}}" scversion="{{SCVersion}}"></product-version> | ||
| </span><span> | ||
| <i class="fa fa-envelope fake-link"></i> <a href="mailto:support@particular.net" target="_blank">support@particular.net</a> | ||
| </span> | ||
| <span> | ||
| <i class="fa fa-external-link fake-link"></i> <a href="http://docs.particular.net/servicepulse" target="_blank">Documentation</a> | ||
| </span> | ||
| <div class="connectivity-status"> | ||
| <div> | ||
| Service Control: | ||
| <span ng-if="isSCConnected && !isSCConnecting"> | ||
| <div class="fa pa-connection-success"></div> Connected | ||
| </span> | ||
| <span ng-if="!isSCConnected && !isSCConnecting" class="connection-failed"> | ||
| <i class="fa pa-connection-failed"></i> Not connected | ||
| </span> | ||
| <span ng-if="isSCConnecting" class="connection-establishing"> | ||
| <i class="fa pa-connection-establishing"></i> Connecting | ||
| </span> | ||
| </div> | ||
| <monitoring-connectivity-status></monitoring-connectivity-status> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </footer> | ||
56 changes: 56 additions & 0 deletions
56
...e.Host/app/modules/monitoring/js/directives/ui.particular.monitoringConnectivityStatus.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| | ||
| ; (function (window, angular, $, undefined) { | ||
| 'use strict'; | ||
|
|
||
|
|
||
| function controller($scope, connectivityNotifier, monitoringService, $interval) { | ||
| $scope.isSCMonitoringConnecting = true; | ||
| connectivityNotifier.getConnectionStatusSource().subscribe(value => { | ||
| $scope.isSCMonitoringConnected = value; | ||
| $scope.isSCMonitoringConnecting = false; | ||
| }); | ||
|
|
||
| var scMonitoringConnectionPing = $interval(function () { | ||
| var promises = monitoringService.getMonitoredEndpoints().map((request, index) => { | ||
| request.then(r => { | ||
| connectivityNotifier.reportSuccessfulConnection(index); | ||
| }, e => { | ||
| connectivityNotifier.reportFailedConnection(index); | ||
| }); | ||
| }); | ||
| }, 10000); | ||
|
|
||
| // Cancel interval on page changes | ||
| $scope.$on('$destroy', function () { | ||
| if (angular.isDefined(scMonitoringConnectionPing)) { | ||
| $interval.cancel(scMonitoringConnectionPing); | ||
| scMonitoringConnectionPing = undefined; | ||
| } | ||
| }); | ||
| } | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| controller.$inject = ['$scope', 'connectivityNotifier', 'monitoringService', '$interval']; | ||
|
|
||
| function directive() { | ||
| return { | ||
| scope: {}, | ||
| restrict: 'E', | ||
| replace: true, | ||
| templateUrl: 'modules/monitoring/js/directives/ui.particular.monitoringConnectivityStatus.tpl.html', | ||
| controller: controller, | ||
| link: function (scope, element) { } | ||
| }; | ||
| } | ||
|
|
||
| directive.$inject = []; | ||
|
|
||
| angular | ||
| .module('ui.particular.monitoringConnectivityStatus', []) | ||
| .directive('monitoringConnectivityStatus', directive); | ||
|
|
||
| }(window, window.angular, window.jQuery)); | ||
|
|
12 changes: 12 additions & 0 deletions
12
.../app/modules/monitoring/js/directives/ui.particular.monitoringConnectivityStatus.tpl.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <span> | ||
| SC Monitoring: | ||
| <span ng-if="isSCMonitoringConnected && !isSCMonitoringConnecting"> | ||
| <div class="fa pa-connection-success"></div> Connected | ||
| </span> | ||
| <span ng-if="!isSCMonitoringConnected && !isSCMonitoringConnecting" class="connection-failed"> | ||
| <i class="fa pa-connection-failed"></i> Not connected | ||
| </span> | ||
| <span ng-if="isSCMonitoringConnecting" class="connection-establishing"> | ||
| <i class="fa pa-connection-establishing"></i> Connecting | ||
| </span> | ||
| </span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉