Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ServicePulse.Host/ServicePulse.Host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
<Content Include="app\js\polyfill\array.prototype.find.js" />
<Content Include="app\modules\modules.webpackconfig.builder.js" />
<Content Include="app\modules\monitoring\js\constant.diagrams.js" />
<Content Include="app\modules\monitoring\js\directives\ui.particular.monitoringConnectivityStatus.js" />
<Content Include="app\modules\monitoring\js\directives\ui.particular.monitoringConnectivityStatus.tpl.html" />
<Content Include="app\modules\monitoring\js\directives\ui.particular.graphdecimal.js" />
<Content Include="app\modules\monitoring\js\directives\ui.particular.graphduration.js" />
<Content Include="app\modules\monitoring\js\directives\ui.particular.largeGraph.js" />
Expand Down
83 changes: 70 additions & 13 deletions src/ServicePulse.Host/app/css/particular.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,13 @@ body {
color: #181919;
overflow-y: scroll;
padding-top: 100px;
padding-bottom: 100px;
}

pre {
white-space: pre-wrap;
}

footer {
color: #bcc6c2;
font-size: 14px;
font-weight: normal;
height: 60px;
margin-top: 100px;
padding: 5px 0;
text-align: left;
text-align: center;
width: 100%;
}

footer span {
color: #777f7f;
display: inline-block !important;
Expand Down Expand Up @@ -872,6 +861,10 @@ p.endpoint-metadata {
font-size: 24px;
}

.events {
margin-top: 30px;
}

.events .box {
padding-bottom: 0;
}
Expand Down Expand Up @@ -899,6 +892,7 @@ p.endpoint-metadata {

.version-info-container {
width: 100% !important;
margin-top: -4px;
}

.version-info {
Expand Down Expand Up @@ -2155,7 +2149,7 @@ i.fa-exclamation-triangle {
background-repeat: no-repeat;
}

.pa-monitoring-lost.endpoint-details {
.pa-monitoring-lost.endpoint-details, .pa-connection-failed {
background-image: url('../../../img/monitoring-lost.svg');
background-position: center;
background-repeat: no-repeat;
Expand Down Expand Up @@ -2234,6 +2228,69 @@ i.fa.pa-endpoint-lost.endpoints-overview, i.fa.pa-monitoring-lost.endpoints-over
padding: 10px 6px;
}

footer {
color: #bcc6c2;
font-size: 14px;
font-weight: normal;
height: 35px;
margin-top: 100px;
padding: 5px 0;
text-align: left;
text-align: center;
width: 100%;
background-color: #fff;
position: fixed;
bottom: 0;
border: 1px solid #ddd;
box-shadow: 0px -10px 16px #f2f6f7;
padding-top: 7px;
}

footer .row {
display: flex;
justify-content: space-between;
}

footer span {
padding-left: 0;
padding-right: 32px;
}

footer span[ng-if="isSCConnected"], footer span[ng-if="isSCMonitoringConnected"] {
color: #000;
}

footer span[class="ng-isolate-scope"], footer span[ng-if="isSCMonitoringConnected"] {
padding-right: 0;
}

.connectivity-status div, .connectivity-status span {
display: inline-block;
color: #777f7f;
}

.connectivity-status i, .connectivity-status div.pa-connection-success {
width: 10px;
height: 10px;
}

.pa-connection-establishing {
background-image: url('../img/loader_spinner.gif');
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}


.connectivity-status .connection-failed {
color: #CE4844;
}

.connectivity-status .pa-connection-success {
border-radius: 50%;
background: #00C468;
}

@media (min-width: 0px) {
.container {
width: 92%;
Expand Down
13 changes: 10 additions & 3 deletions src/ServicePulse.Host/app/js/app.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
$scope.SCVersion = '';
$scope.is_compatible_with_sc = true;
$scope.Version = version;
$scope.isSCConnecting = true;

$scope.isActive = function(viewLocation) {
var active = $location.path().startsWith(viewLocation);
Expand Down Expand Up @@ -118,10 +119,12 @@

switch(data) {
case 'SignalR started':
toastService.showInfo('Connected to ServiceControl');
$scope.isSCConnected = true;
$scope.isSCConnecting = false;
break;
case 'Reconnected':
toastService.showInfo('Reconnected to ServiceControl');
$scope.isSCConnected = true;
$scope.isSCConnecting = false;
break;
default:
toastService.showWarning(data);
Expand All @@ -132,7 +135,11 @@

notifier.subscribe($scope, function(event, data) {
logit(event, data);
toastService.showError(data);
if ($scope.isSCConnected) {
toastService.showError(data);
}
$scope.isSCConnected = false;
$scope.isSCConnecting = false;
}, 'SignalRError');

notifier.subscribe($scope, function(event, data) {
Expand Down
1 change: 1 addition & 0 deletions src/ServicePulse.Host/app/js/directives/ui.particular.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'ui.particular.graphdecimal',
'ui.particular.multicheckboxList',
'ui.particular.reindexingstatus',
'ui.particular.monitoringConnectivityStatus'
]);

} (window, window.angular));
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@

</div>

<div class="version-info version-separator">


</div>

<div class="version-info" ng-show="scversion !== ''">


Expand Down
8 changes: 0 additions & 8 deletions src/ServicePulse.Host/app/js/views/dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ <h4>
</div>
</div>

<div class="row">
<div class="col-md-12 version-info version-info-container">
<span>
<product-version version="{{Version}}" scversion="{{SCVersion}}"></product-version>
</span>
</div>
</div>


</div>
</div>
Expand Down
42 changes: 21 additions & 21 deletions src/ServicePulse.Host/app/layout/footer.html
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

</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>
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));

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>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
require('./endpoint_details.route.js');
require('./constant.diagrams.js');

require('./directives/ui.particular.monitoringConnectivityStatus.js');
require('./directives/ui.particular.graph.js');
require('./directives/ui.particular.graphdecimal.js');
require('./directives/ui.particular.duration.js');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
require('./monitored_endpoints.route.js');
require('./constant.diagrams.js');

require('./directives/ui.particular.monitoringConnectivityStatus.js');
require('./directives/ui.particular.graph.js');
require('./directives/ui.particular.graphdecimal.js');
require('./directives/ui.particular.graphduration.js');
Expand Down
Loading