
        $("#jsonInput").val(JSON.stringify(data.metadata, null, 2));
        $("#viewModal").modal('show');
      });
    }

    $(document).ready(function(){

      //If id or project variables are missing redirect to servers page
      if (!serverId || !project) {
        window.location.href = "{{ url_for('servers') }}";
      }
      else {
        loadPageContent()
      }

    });

  </script>
{% endblock script %}
