App Engine Python SDK version 1.7.7
[gae.git] / python / google / appengine / ext / datastore_admin / templates / list_actions.html
blob78e15e1050e423fb84b3cad1aefc0073ce3b41ef
1 {% extends "base.html" %}
2 {% block body %}
3 <h2>Datastore Admin of {{hosting_app_id}}</h2>
4 {% if error %}
5 <div class="ae-errorbox">
6 {{ error }}
7 </div>
8 {% endif %}
9 <div class="ae-table-caption">
10 <div class="ae-paginate">
11 <div class="g-section g-tpl-50-50 g-split">
12 <div class="g-unit g-first">
13 <strong>Entities</strong>
14 </div>
15 <div class="g-unit">
16 <span id="ae-dash-quota-refresh-info">
17 {% if last_stats_update %}
18 Entity statistics last updated
19 {{ last_stats_update|date:"M j, Y g:i a T" }}
20 {% else %}
21 Entity statistics unavailable.
22 {% endif %}
23 <a target="_blank"
24 href="http://developers.google.com/appengine/kb/adminconsole.html#datastore_stats">
25 <img class="ae-help-icon" src="{{ base_path }}/static/img/help.gif"
26 height="14" width="14" alt="help">
27 </a>
28 </span>
29 </div>
30 </div>
31 </div>
32 </div>
33 {% if kind_stats %}
34 <form action="{{ base_path }}/" method="post">
35 {% if has_namespace %}
36 <input type="hidden" name="namespace" value="{{ namespace|escape}}">
37 {% endif %}
38 <input type="hidden" name="app_id" value="{{ app_id }}">
39 <input type="hidden" name="cancel_url" value="{{ cancel_url }}">
40 <table id="kinds" class="ae-table ae-table-striped">
41 <thead>
42 <tr>
43 <th scope="col" class="cbc tct-selectall"></th>
44 <th scope="col" class="id">Entity Kind</th>
45 <th scope="col" class="id"># Entities</th>
46 <th scope="col" class="id">Avg. Size/Entity</th>
47 <th scope="col" class="id">Entities Size</th>
48 <th scope="col" class="id">Total Size</th>
49 </tr>
50 </thead>
51 <tbody>
52 {% for kind in kind_stats %}
53 <tr>
54 <td class="cbc">
55 <input type="checkbox" name="kind" value="{{ kind.kind_name }}"
56 id="{{ kind.kind_name }}">
57 </td>
58 <td class="id">
59 <label for="{{ kind.kind_name }}">{{ kind.kind_name }}</label>
60 </td>
61 {% if kind.count %}
62 <td class="id">{{ kind.count }}</td>
63 <td class="id">{{ kind.average_bytes_str }}</td>
64 <td class="id">{{ kind.entity_bytes_str }}</td>
65 <td class="id">{{ kind.total_bytes_str }}</td>
66 {% else %}
67 <td class="id" style="color: #666667;">Stats not available</td>
68 <td class="id" style="color: #666667;">Stats not available</td>
69 <td class="id" style="color: #666667;">Stats not available</td>
70 {% endif %}
71 </tr>
72 {% endfor %}
73 </tbody>
74 <tfoot>
75 <tr>
76 <td colspan="6">
77 {% for action in action_list %}
78 <input type="submit" name="action"
79 class="goog-button" value="{{ action }}">
80 {% endfor %}
81 </td>
82 </tr>
83 </tfoot>
84 </table>
85 </form>
86 {% else %}
87 <table class="ae-table">
88 <tbody>
89 <tr>
90 <td>
91 <div class="ae-disabled"
92 style="padding-top: 0.75em; padding-bottom: 0.75em;
93 text-align: center;">
94 Datastore is empty.
95 </div>
96 </td>
97 </tr>
98 </tbody>
99 </table>
100 {% endif %}
101 {% if pending_backups %}
103 <div class="ae-table-caption">
104 <div class="ae-paginate">
105 <div class="g-section g-tpl-50-50 g-split">
106 <div class="g-unit g-first">
107 <strong>Pending Backups</strong>
108 </div>
109 </div>
110 </div>
111 </div>
112 <form action="{{ base_path }}/" method="post">
113 <input type="hidden" name="app_id" value="{{ app_id }}">
114 <input type="hidden" name="cancel_url" value="{{ cancel_url }}">
115 <table id="pending_backups" class="ae-table ae-table-striped">
116 <thead>
117 <tr>
118 <th scope="col" class="cbc tct-selectall"></th>
119 <th scope="col" class="id">Name</th>
120 <th scope="col" class="id">Start-Time</th>
121 </tr>
122 </thead>
123 <tbody>
124 {% for pending_backup in pending_backups %}
125 <tr>
126 <td class="cbc">
127 <input type="checkbox" name="backup_id" value="{{ pending_backup.key }}" id="{{ pending_backup.key }}">
128 </td>
129 <td class="id">
130 <span title="Kinds: {{ pending_backup.kinds|join:', '|truncatewords:20|escape}}">{{ pending_backup.name }}{% if pending_backup.original_app %} (Imported from {{pending_backup.original_app|escape}}){% endif %}</span>
131 </td>
132 <td class="id">
133 {{ pending_backup.start_time }}
134 </td>
135 </tr>
136 {% endfor %}
137 </tbody>
138 <tfoot>
139 <tr>
140 <td colspan="4" nowrap="nowrap">
141 {% for pending_backup_action in pending_backup_action_list %}
142 <input type="submit" name="action" style="" class="goog-button" value="{{ pending_backup_action }}">
143 {% endfor %}
144 </td>
145 </tr>
146 </tfoot>
147 </table>
148 </form>
149 {% endif %}
151 <div class="ae-table-caption">
152 <div class="ae-paginate">
153 <div class="g-section g-tpl-50-50 g-split">
154 <div class="g-unit g-first">
155 <strong>Backups</strong>
156 </div>
157 </div>
158 </div>
159 </div>
160 {% if backups %}
161 <form action="{{ base_path }}/" method="post">
162 <input type="hidden" name="app_id" value="{{ app_id }}">
163 <input type="hidden" name="cancel_url" value="{{ cancel_url }}">
164 <table id="backups" class="ae-table ae-table-striped">
165 <thead>
166 <tr>
167 <th scope="col" class="cbc tct-selectall"></th>
168 <th scope="col" class="id">Name</th>
169 <th scope="col" class="id">Start-Time</th>
170 <th scope="col" class="id">End-Time</th>
171 </tr>
172 </thead>
173 <tbody>
174 {% for backup in backups %}
175 <tr>
176 <td class="cbc">
177 <input type="checkbox" name="backup_id" value="{{ backup.key }}" id="{{ backup.key }}">
178 </td>
179 <td class="id">
180 <span title="Kinds: {{ backup.kinds|join:', '|truncatewords:20|escape }}">{{ backup.name }}{% if backup.original_app %} (Imported from {{backup.original_app|escape}}){% endif %}</span>
181 </td>
182 <td class="id">
183 {{ backup.start_time }}
184 </td>
185 <td class="id">
186 {{ backup.complete_time }}
187 </td>
188 </tr>
189 {% endfor %}
190 </tbody>
191 <tfoot>
192 <tr>
193 <td colspan="4" nowrap="nowrap">
194 {% for backup_action in backup_action_list %}
195 <input type="submit" name="action" style="" class="goog-button" value="{{ backup_action }}">
196 {% endfor %}
197 </td>
198 </tr>
199 </tfoot>
200 </table>
201 </form>
202 {% endif %}
203 <div class="ae-table-caption">
204 <form action="{{ base_path }}/" method="post" >
205 <input type="hidden" name="cancel_url" value="{{ cancel_url }}">
206 <input type="submit" name="action" value="Import Backup Information" title="Import Backup Information or restore from Google Cloud Storage"/>
207 <input type="text" name="gs_handle" value="" size="50" title="Google Cloud Storage path of a backup info file or a bucket name"/>
208 </form>
209 </div>
210 {% if active_operations %}
212 <div class="ae-table-caption">
213 <div class="ae-paginate">
214 <div class="g-section g-tpl-50-50 g-split">
215 <div class="g-unit g-first">
216 <strong>Active Operations</strong>
217 </div>
218 </div>
219 </div>
220 </div>
221 <table id="operations" class="ae-table ae-table-striped">
222 <thead>
223 <tr>
224 <th scope="col" class="id">Description</th>
225 <th scope="col" class="id">Jobs</th>
226 </tr>
227 </thead>
228 <tbody>
229 {% for operation in active_operations %}
230 <tr>
231 <td class="id">
232 {{ operation.description }}
233 </td>
234 <td class="id">
235 ({{operation.completed_jobs}} steps completed,
236 {{operation.active_jobs}} active)
237 {% for job_id in operation.active_job_ids %}
238 <br/><a href="{{ map_reduce_path }}?mapreduce_id={{job_id}}">Job {{job_id}}</a>
239 {% endfor %}
240 </td>
241 </tr>
242 {% endfor %}
243 </tbody>
244 </table>
245 {% endif %}
246 {% if completed_operations %}
248 <div class="ae-table-caption">
249 <div class="ae-paginate">
250 <div class="g-section g-tpl-50-50 g-split">
251 <div class="g-unit g-first">
252 <strong>Completed Operations</strong>
253 </div>
254 </div>
255 </div>
256 </div>
257 <table id="operations" class="ae-table ae-table-striped">
258 <thead>
259 <tr>
260 <th scope="col" class="id">Description</th>
261 <th scope="col" class="id">Completed steps</th>
262 <th scope="col" class="id">Status</th>
263 <th scope="col" class="id">Status info</th>
264 </tr>
265 </thead>
266 <tbody>
267 {% for operation in completed_operations %}
268 <tr>
269 <td class="id">
270 {{ operation.description }}
271 </td>
272 <td class="id">
273 {{operation.completed_jobs}} steps
274 </td>
275 <td class="id">
276 {{operation.status}}
277 </td>
278 <td class="id">
279 {{operation.status_info}}
280 </td>
281 </tr>
282 {% endfor %}
283 </tbody>
284 </table>
285 {% endif %}
286 {% endblock %}