Skip to content

Commit

Permalink
feat!: Removes "Create New Dataset" Button and Add Migration Notice B…
Browse files Browse the repository at this point in the history
…anner

BREAKING CHANGE: Removes the ability to create new datasets in the UI

Closes #442
  • Loading branch information
vchendrix committed Nov 21, 2024
1 parent ec2463a commit 3bc76b1
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 36 deletions.
49 changes: 36 additions & 13 deletions archive_api/templates/archive_api/doi-base.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,28 @@

}

.bod {
width: 1100px;
background: #F8F8F8;
}

.tab {
padding-left: 5em;
}

.graybox {
background: #eeeeee;
.bod {
width: 1100px;
background:#F8F8F8;
}
.tab {
padding-left:5em;
}
.graybox {
background:#eeeeee;
}


fieldset.graybox {
display: block;
min-inline-size: min-content;
margin-inline: 2px;
border-width: 2px;
border-style: groove;
border-color: threedface;
border-image: initial;
padding-block: 0.35em 0.625em;
padding-inline: 0.75em;
}

.container {
Expand Down Expand Up @@ -92,14 +103,26 @@
{% block script %}
{% endblock %}
</script>
<link rel="stylesheet" href="/static/stylesheets/foundation.css">
<link rel="stylesheet" type="text/css" href="/static/stylesheets/style.css">
<link rel="stylesheet" type="text/css" href="/static/js/jquery-ui/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="/static/js/jquery-ui/jquery-ui.theme.css">
<link rel="stylesheet" type="text/css" href="/static/js/jquery-ui/jquery-ui.structure.css">

{% if readonly %}
<h3 class="banner" >The NGEE-Tropics Archive is undergoing maintenance and is currently in read-only mode.</h3>
<h4 class="banner" >Please contact [email protected] if you have any questions.</h4>
{% endif %}

<body data-feedly-mini="yes">

<div style="background-color: #ffcc00; padding: 10px; text-align: left; font-size: 16px;">
<b>NOTICE:</b> We’re in the process of migrating the NGEE-Tropics Data Archive to
<a href="https://ess-dive.lbl.gov/" target="_blank">ESS-DIVE</a>, the long-term data archive for
<a href="https://ess.science.energy.gov/" target="_blank">BER/ESS</a>. All public NGEE-Tropics datasets can be
accessed in the new
<a href="https://data.ess-dive.lbl.gov/portals/ngeetropics" target="_blank">NGEE-Tropics Portal in ESS-DIVE</a>,
including after the NGEE-Tropics Data Archive is retired.
</div>

<div class="container">

Expand All @@ -117,7 +140,7 @@ <h4 class="banner" >Please contact [email protected] if you have any
<a href="{% url 'login' %}?next={{ request.path }}">Login to download</a>
{% endif %}
</div>
<div class="ma">
<div class="ma" >
<h1 align="center">

{% block title %}NGEE Tropics Data Collection{% endblock %}
Expand Down
5 changes: 0 additions & 5 deletions archive_api/templates/archive_api/dois.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@

{% block title %}{{ dataset.name }}{% endblock %}
{% block content %}
<link rel="stylesheet" href="/static/stylesheets/foundation.css">
<script type="text/javascript" src="/static/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="/static/js/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="/static/stylesheets/style.css">
<link rel="stylesheet" type="text/css" href="/static/js/jquery-ui/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="/static/js/jquery-ui/jquery-ui.theme.css">
<link rel="stylesheet" type="text/css" href="/static/js/jquery-ui/jquery-ui.structure.css">
<div>
<table >
<thead>
Expand Down
42 changes: 29 additions & 13 deletions archive_api/templates/archive_api/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,41 @@
{% block title %}Login to Download Data{% endblock %}
{% block content %}
<div class="hbp"></div>
<p>Log in with your FLUXNET credentials.</p>
<ul>
<li>Click <a href="https://ameriflux-data.lbl.gov/Pages/RequestAccount.aspx">here</a>
to create a new FLUXNET account before downloading data from the NGEE Tropics Data Collection.
</li>
<li>Click <a href="https://ameriflux.lbl.gov/sign-in">here</a> to test your credentials before attempting to
login for the first time
</li>
</ul> </p>

</div>
<fieldset class="graybox">
<div class="container-fluid" style="margin-top: 30px">
<div class="row-fluid">
<div class="well" style="width: 320px; margin-left: auto; margin-right: auto">
<div class="row-fluid">
<div>

</div>
</div><!-- /row fluid -->


<div class="row-fluid">
<div>

<fieldset class="graybox" >
<p>Log in with your FLUXNET credentials.<br>Click <a href="https://ameriflux-data.lbl.gov/Pages/RequestAccount.aspx">here</a> to create a new FLUXNET account.</p>
<p>Click <a href="https://ameriflux.lbl.gov/login">here</a> to test your credentials before attempting to login for the first time.</p>

<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Download Data</button>
<div class="form-actions-no-box">
<button class="button js-view-toggle columns small-12" type="submit">Download Data</button>
</div>
</form>
</fieldset>
<p align="center">
<p align="center">
<a href="{{ request.META.HTTP_REFERER }}">Back to Previous Page</a>
</p>
</fieldset>
</div>
</div><!-- /.row-fluid -->
</div><!--/.well-->
</div><!-- /.row-fluid -->
</div><!-- /.container-fluid -->

</div>
{% endblock %}
50 changes: 47 additions & 3 deletions ui/templates/rest_framework/login.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,62 @@
{% extends "rest_framework/login.html" %}

{% block title %}{% if name %}{{ name }} – {% endif %}NGEE Tropics Archive{% endblock %}
{% block style %}
<style> .graybox {
background:#eeeeee;
}


fieldset.graybox {
display: block;
min-inline-size: min-content;
margin-inline: 2px;
border-width: 2px;
border-style: groove;
border-color: threedface;
border-image: initial;
padding-block: 0.35em 0.625em;
padding-inline: 0.75em;
}</style>
<link rel="stylesheet" href="/static/stylesheets/foundation.css">
<link rel="stylesheet" type="text/css" href="/static/stylesheets/style.css">
<link rel="stylesheet" type="text/css" href="/static/js/jquery-ui/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="/static/js/jquery-ui/jquery-ui.theme.css">
<link rel="stylesheet" type="text/css" href="/static/js/jquery-ui/jquery-ui.structure.css">

{% endblock %}
{% block body %}
<body class="container">

<div style="background-color: #ffcc00; padding: 10px; text-align: left; font-size: 16px;">
<b>NOTICE:</b> We’re in the process of migrating the NGEE-Tropics Data Archive to
<a href="https://ess-dive.lbl.gov/" target="_blank">ESS-DIVE</a>, the long-term data archive for
<a href="https://ess.science.energy.gov/" target="_blank">BER/ESS</a>. All public NGEE-Tropics datasets can be
accessed in the new
<a href="https://data.ess-dive.lbl.gov/portals/ngeetropics" target="_blank">NGEE-Tropics Portal in ESS-DIVE</a>,
including after the NGEE-Tropics Data Archive is retired.
</div>
<body data-feedly-mini="yes">

<main>
<div class="logo">
<a href="/">
<img src="/static/img/logo.png">
</a>
</div>
<article class="main-article js-main-article">
<div class="container-fluid" style="margin-top: 30px">
<div class="row-fluid">
<div class="well" style="width: 320px; margin-left: auto; margin-right: auto">
<div class="row-fluid">
<div>
{% block branding %}<h3 style="margin: 0 0 20px;">NGEE Tropics Archive</h3>{% endblock %}

</div>
</div><!-- /row fluid -->


<div class="row-fluid">
<div>
<fieldset class="graybox">
<form action="{% url 'rest_framework:login' %}" role="form" method="post">
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}" />
Expand Down Expand Up @@ -64,7 +104,7 @@
{% endif %}

<div class="form-actions-no-box">
<input type="submit" name="submit" value="Log in" class="btn btn-primary form-control" id="submit-id-submit">
<button type="submit" name="submit" value="Log in" class="button js-view-toggle columns small-12" id="submit-id-submit">Login</button>
</div>

<div>
Expand All @@ -74,10 +114,14 @@
<a href="https://ameriflux-data.lbl.gov/Pages/ResetFluxPassword.aspx">Forgot Password ?</a>
</div>
</form>
</fieldset>
</div>
</div><!-- /.row-fluid -->
</div><!--/.well-->
</div><!-- /.row-fluid -->
</div><!-- /.container-fluid -->
</article>

</main>
</body>
{% endblock %}
10 changes: 8 additions & 2 deletions ui/templates/ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@
<link rel="stylesheet" type="text/css" href="static/stylesheets/popover.css">
</head>
<body>

<div style="background-color: #ffcc00; padding: 10px; text-align: left; font-size: 16px;">
<b>NOTICE:</b> We’re in the process of migrating the NGEE-Tropics Data Archive to
<a href="https://ess-dive.lbl.gov/" target="_blank">ESS-DIVE</a>, the long-term data archive for
<a href="https://ess.science.energy.gov/" target="_blank">BER/ESS</a>. All public NGEE-Tropics datasets can be
accessed in the new
<a href="https://data.ess-dive.lbl.gov/portals/ngeetropics" target="_blank">NGEE-Tropics Portal in ESS-DIVE</a>,
including after the NGEE-Tropics Data Archive is retired.
</div>
<main>
<div class="logo">
<a href="/">
Expand Down Expand Up @@ -56,7 +63,6 @@ <h3>NGEE Tropics Archive</h3>
</p>
<br>
<div class="columns small-centered small-4">
<button class="button js-view-toggle columns small-12" data-view="create">Create New Dataset</button>
<button class="button js-view-toggle columns small-12" data-view="edit-list">Edit Datasets</button>
<button class="button js-view-toggle columns small-12" data-view="view">View Approved Datasets</button>
<a class="button columns small-12" data-view="view" href="/?view=view-sites">View Field Sites / Plots</a>
Expand Down

0 comments on commit 3bc76b1

Please sign in to comment.