Skip to content
Snippets Groups Projects
Select Git revision
  • 6073280f9a47552d7cc474de439e78644d021b33
  • main default protected
  • Kelvinrr-patch-5
  • Kelvinrr-patch-4
  • Kelvinrr-patch-3
  • update_release_doc
  • Kelvinrr-patch-2
  • Kelvinrr-patch-1
  • spice_docs
  • ale_testing
  • changelog_docs
  • 1.0.1
  • 1.0.0
13 results

sensor-model-software.md

Blame
    • Austin Sanders's avatar
      6073280f
      Sensor model and reference system documentation (#36) · 6073280f
      Austin Sanders authored
      * Unfinished draft of sensor-models.md
      
      * Addressed PR feedback and added text
      
      * Removed incorrect DN description
      
      * codespell and gramma
      
      * Mermaid sequence diagram and requiremens setup
      
      * Added figures and citations
      
      * Updated glossary to include ISD
      
      * Moved all quick definitions to top of sections, reworded some sections
      
      * Address doc PR feedback
      
      * Split ecosystem docs into separate file
      
      * gramma and codespell
      
      * Updated software link description
      
      * Replaced todo with 'further docs' message
      
      * Checkout glossary.md
      Sensor model and reference system documentation (#36)
      Austin Sanders authored
      * Unfinished draft of sensor-models.md
      
      * Addressed PR feedback and added text
      
      * Removed incorrect DN description
      
      * codespell and gramma
      
      * Mermaid sequence diagram and requiremens setup
      
      * Added figures and citations
      
      * Updated glossary to include ISD
      
      * Moved all quick definitions to top of sections, reworded some sections
      
      * Address doc PR feedback
      
      * Split ecosystem docs into separate file
      
      * gramma and codespell
      
      * Updated software link description
      
      * Replaced todo with 'further docs' message
      
      * Checkout glossary.md
    nodesReloader.js 1.48 KiB
    /*
     * This file is part of vospace-ui
     * Copyright (C) 2021 Istituto Nazionale di Astrofisica
     * SPDX-License-Identifier: GPL-3.0-or-later
     */
    import store from './store.js'
    import client from 'api-client'
    
    let lastResultTime = null;
    let times = 0;
    
    function checkNodes() {
      let busyNodes = document.getElementsByClassName('node-busy').length > 0;
      let jobsInProgress = store.state.jobs.filter(j => j.phase === 'EXECUTING').length > 0;
      if (!busyNodes && !jobsInProgress) {
        // reset state
        lastResultTime = null;
        times = 0;
        return;
      }
      if (lastResultTime !== null) {
        // first 10 times check every second, then check every ten seconds
        let offset = times < 10 ? 1000 : 10000;
        let now = new Date().getTime();
        if (now - lastResultTime < offset) {
          return;
        }
      }
    
      if (!store.state.nodesLoading) {
        let path = store.state.path;
        store.commit('setNodesLoading', true);
        client.getNode(path, false)
          .then(res => {
            // check that path didn't change in meantime by user action
            if (path === store.state.path) {
              let resHasBusyNodes = res.html.includes('node-busy');
              if ((!busyNodes && resHasBusyNodes) || (busyNodes && !resHasBusyNodes)) {
                store.dispatch('setNodes', res);
              } else {
                times++;
                lastResultTime = new Date().getTime();
              }
            }
          })
          .finally(() => {
            store.commit('setNodesLoading', false);
          });
      }
    }
    
    export default {
      checkNodes
    }