summaryrefslogtreecommitdiffstats
path: root/templates/controlPanel.html
blob: 42038213df1ae056fde00c930c7df60e8da272d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
{% extends "base.html" %}
{% block content %}

{% if jobs_completed %}
    <div class="noticeBox">
            &nbsp;Just finished running:
                <ul>
                {% for job in jobs_completed %}
                    <li>{{ job }}</li>
                {% endfor %}
                </ul>
                &nbsp;See <a href="/dataissues">Data Issues</a> report
                <br>&nbsp;
    </div>
{% endif %}

{% if error %}
    <div class="noticeBox">
            {{ error }}
    </div>
{% endif %}
<h3>Administration Utilities</h3>
<ul>
<li><a href="/pathsreport">Folder paths used</a> -folders settings used by this troggle installation
<li><a href="/aliases/2022">Expoer name aliases</a> -short names recognised by troggle
<li><a href="/dataissues">Data Issues on Imports</a> - warnings and errors from the recent data import
<li><a href="/surveximport">Survex import record</a> - indented *include and begin/end tree<br /><li><a href="/survexdebug">Survex debug report</a> - warnings and  details<br />
<li><a href="/therionissues">Therion Import issues</a> - warnings from the recent data import<br /><br />
<li><a href="/admin/">Django admin</a> - Deep magic access to all models and data
</ul>
<h3>This control panel is being redeveloped</h3>

<p>Do not attempt to use any of these import functions as they are in active development. 
<ol>
<li>Importing things in the wrong order will screw-up the database links and break things.
<li>We are working on an on-line importer for new logbook entries - with syntax checking.
<li>We are working on an on-line importer for new survex files - with syntax checking
<li>Logbooks can only be <em>exported</em> in the current format.
</ol>
<p>Today (Jan. 2023) we use the <a href="/handbook/troggle/trogimport.html">databaseReset program</a> to import from the master files. This is run on the server itself only by nerds who remotely log in to the server using ssh.

<p>Before you even think about doing database imports, you should understand the implications on everyone else. See <a href="/handbook/troggle/trogindex.html">the Troggle documentation</a>. 
<p>As soon as you can cope, you should read the source code for 
<a href="http://expo.survex.com/repositories/troggle/.git/tree/databaseReset.py">databaseReset</a> to see what it does, as the details are not documented anywhere else yet. But at least the code is quite well commented.

<p>The logbook export capability wass used to convert an archaic logbook into the current logbook format. It exports the logbook entries in the database into a new file, with the entries in date order. But there is no use for this capability now (Jan. 2023).

<div style="column-count: 2; ">
<font style="color: silver">
{% comment %}
<form name="reset" method="post" action="">
{% csrf_token %}              
    <h3>Wipe:</h3>
    <table>
        <tr>
            <td>Wipe entire database and recreate tables: </td>
            <td><input type="checkbox" name="reload_db" /></td>
            <td>
                <input type="submit" id="Import" value="I really want to delete all information in troggle, and accept all responsibility.">
            </td>
        </tr>
    </table>
</form>
{% endcomment %}

<h3>Import (on top of existing data):</h3>
<p>To get a fully-functioning system, all these imports must be done and in this order. 
<form name="import" method="post" action="">
{% csrf_token %}              
    <table>
        <tr>
            <th colspan="2">Import from master files</th>
        </tr>    
        <tr>
            <td>all caves </td>
            <td><input type="checkbox" name="import_caves"/></td>
        </tr>
        <tr>
            <td>all people </td>
            <td><input type="checkbox" name="import_people"/></td>
        </tr>
        <tr>
            <td>all surveys scans </td>
            <td><input type="checkbox" name="import_surveyscans"/></td>
        </tr>
        <tr>
            <td>all logbooks</td>
            <td><input type="checkbox" name="import_logbooks"/></td>
        </tr>
        <tr>
            <td>QMs (from old csv files)</td>
            <td><input type="checkbox" name="import_QMs" /></td>
        </tr>
        <tr>
            <td>all drawings files</td>
            <td><input type="checkbox" name="import_drawingsfiles" /></td>
        </tr>
        <tr>
            <td>all survex data (10 minutes)</td>
            <td><input type="checkbox" name="import_survex" /></td>
        </tr>
    </table>
    <p>
      <input type="submit" id="Import" value="Import">
      
    </p>
</form>


<p></font>

<hr />
<h3>Export Logbook to a different format:</h3>
<p>This creates 'logbook-new-format.html' in the years/&lt;year&gt;/ folder
<table>
<tr>


    <th>Export and Download</th>

</tr>
<tr>
    <td>
        <form name="export" method="POST" action={% url "exportlogbook" %}>
{% csrf_token %}              
            <p>Download a logbook file which is dynamically generated by Troggle.</p>
            
            <p>
            Expedition year:
            <select name="year">
                        {% for expedition in expeditions %}
                            <option value="{{expedition}}"> {{expedition}} </option>
                        {% endfor %}
            </select>
            </p>
            
            <p>
            Output style: 
            <select name="extension">
              <option value="html2005">.html file - 2005 style</option>
             </select>
            </p>
            <p>
            <input name="download_logbook" type="submit" value="Download logbook" />
            </p>
        </form>
    </td>        
</tr>

</table>
</form>
<p>&nbsp;
<p>&nbsp;
<p>&nbsp;
</div>
</font>
{% endblock %}