-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from lsst-sqre/tickets/DM-36258
DM-36258: Deploy heartbeats to RubinTV GUI and add reload historical button
- Loading branch information
Showing
19 changed files
with
304 additions
and
160 deletions.
There are no files selected for viewing
This file contains 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 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 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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,7 @@ | ||
/* global jQuery */ | ||
import { ChannelStatus } from './modules/heartbeat.js' | ||
|
||
(function ($) { | ||
const services = Array.from(document.querySelectorAll('.service').values()).map(s => s.id) | ||
services.map(s => new ChannelStatus(s)) | ||
})(jQuery) |
This file contains 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 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,21 @@ | ||
/* global jQuery */ | ||
import { ChannelStatus } from './modules/heartbeat.js' | ||
|
||
(function ($) { | ||
const services = Array.from(document.querySelectorAll('.service') | ||
.values()) | ||
// eslint-disable-next-line no-new-object | ||
.map(s => new Object({ id: s.id, dependentOn: s.dataset.dependentOn })) | ||
const dependenciesNames = Array.from(new Set(services.map(s => s.dependentOn))) | ||
// eslint-disable-next-line eqeqeq | ||
.filter(d => !(d === '' || typeof d === 'undefined')) | ||
|
||
const dependencies = Object.fromEntries( | ||
dependenciesNames.map(d => [d, | ||
new ChannelStatus(d)]) | ||
) | ||
|
||
const stats = services | ||
.map(s => new ChannelStatus(s.id, dependencies[s.dependentOn])) | ||
console.log(stats) | ||
})(jQuery) |
This file contains 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 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,16 @@ | ||
/* global $ */ | ||
|
||
function historicalReset () { | ||
const $form = $('#historicalReset') | ||
$form.click(function (e) { | ||
e.preventDefault() | ||
$form.find('.done').addClass('hidden') | ||
$form.find('.pending').toggleClass('hidden') | ||
$.post('reload_historical', function () { | ||
$form.find('.pending').toggleClass('hidden') | ||
$form.find('.done').toggleClass('hidden') | ||
}) | ||
}) | ||
} | ||
|
||
historicalReset() |
This file contains 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.