backup-list.html 25.2 KB
Newer Older
Giorgos Korfiatis's avatar
Giorgos Korfiatis committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<!--
Copyright (C) 2015 GRNET S.A.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->
Efthymia Bika's avatar
Efthymia Bika committed
17
<script type="text/javascript">
Efthymia Bika's avatar
Efthymia Bika committed
18

Efthymia Bika's avatar
Efthymia Bika committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
    function disable_buttons(disable) {
        $("#backup_button").attr("disabled", disable);
        if(disable) {
            $("#backup_button").attr("onclick", "");
        } else {
            $("#backup_button")
                .attr("onclick", "if(check_fields()) backup(false);");
        }
        var save_button = $("#save_button");
        if(save_button) {
            $("#save_button").attr("disabled", disable);
            if(disable) {
                $("#save_button").attr("onclick", "");
            } else {
                $("#save_button")
                    .attr("onclick",
                    "if(check_fields()) save_backup_set(false);");
36
            }
Efthymia Bika's avatar
Efthymia Bika committed
37 38
        }
    }
39

Efthymia Bika's avatar
Efthymia Bika committed
40 41 42 43 44 45 46 47 48 49 50 51 52 53
    function populate_template_list(data) {
        if(typeof templates === 'undefined') {
            if(data != "") {
                templates = JSON.parse(data);
            } else {
                templates = new Object();
            }
        }
        $("#template_list").empty();
        var ul = $("<ul></ul>")
            .attr("class", "no-bullet template-list");
        var li = $("<li>Load Template:</li>")
            .attr("class", "template-list-title");
        ul.append(li);
Efthymia Bika's avatar
Efthymia Bika committed
54

Efthymia Bika's avatar
Efthymia Bika committed
55 56 57 58 59 60 61 62
        $.each(templates, function(i, template) {
            var li = $("<li></li>");
            var a = $("<a>" + template.name +
                "&nbsp;<i class='fa fa-arrow-circle-right'></a>")
                .attr("href", "#")
                .click(function() {
                    load_backup(template);
                    $("#template_list").hide();
Efthymia Bika's avatar
Efthymia Bika committed
63
                });
Efthymia Bika's avatar
Efthymia Bika committed
64 65 66 67 68
            li.append(a);
            ul.append(li);
        });
        $("#template_list").append(ul);
    }
Efthymia Bika's avatar
Efthymia Bika committed
69

Efthymia Bika's avatar
Efthymia Bika committed
70 71 72 73 74
    if(typeof templates === 'undefined') {
        load_data_from_file(TEMPLATES_FILE, populate_template_list);
    } else {
        populate_template_list("");
    }
Efthymia Bika's avatar
Efthymia Bika committed
75

Efthymia Bika's avatar
Efthymia Bika committed
76
    populate_clouds("cloud", "");
Efthymia Bika's avatar
Efthymia Bika committed
77

Efthymia Bika's avatar
Efthymia Bika committed
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
    if(typeof selected_backup != 'undefined' && selected_backup &&
        typeof backups[selected_backup] != 'undefined') {
        $("#selected-bar").html(selected_backup);
        $("#selected-bar").show();
        load_backup(backups[selected_backup]);
        if(typeof backups[selected_backup].last_status != 'undefined' &&
            backups[selected_backup].last_status == "Running") {
            disable_buttons(true);
            disable_actions(true);
            disable_form(true);
            $("#loader").show();
        }
        if(typeof backups[selected_backup].first_backup != 'undefined') {
            $("#inc").prop("checked", true);
        } else {
            $("#full").prop("checked", true);
            $("#inc").prop("disabled", true);
95

Efthymia Bika's avatar
Efthymia Bika committed
96 97 98 99 100 101
        }
    } else {
        $("#selected-bar").hide();
        $("#inc").prop("disabled", true);
        load_backup();
    }
Efthymia Bika's avatar
Efthymia Bika committed
102

Efthymia Bika's avatar
Efthymia Bika committed
103 104 105 106 107 108 109 110 111 112 113 114 115 116
    function check_backup_name() {
        var backup_name = $('#backup-name').val().replace(/^\s+|\s+$/gm,'');
        if(!backup_name) {
            $('#backup-name-error small').text(errors.backup_name_empty);
            $('#backup-name-error small').show();
            return false;
        } else {
            var pattern = /^Backup[\w.\-]+$/;
            if(!backup_name.match(pattern)) {
                $('#backup-name-error small').text(errors.backup_name_illegal);
                $('#backup-name-error small').show();
                return false;
            } else {
                $('#backup-name-error small').hide();
Efthymia Bika's avatar
Efthymia Bika committed
117
            }
Efthymia Bika's avatar
Efthymia Bika committed
118 119 120
        }
        return true;
    }
Efthymia Bika's avatar
Efthymia Bika committed
121

Efthymia Bika's avatar
Efthymia Bika committed
122 123 124 125 126 127 128 129 130 131 132
    function check_cloud() {
        var cloud = $("#cloud").val();
        if(!cloud) {
            $('#cloud-error small').text(errors.cloud_empty);
            $('#cloud-error small').show();
            return false;
        } else {
            $('#cloud-error small').hide();
        }
        return true;
    }
Efthymia Bika's avatar
Efthymia Bika committed
133

Efthymia Bika's avatar
Efthymia Bika committed
134 135 136 137 138 139 140 141 142 143 144
    function check_passphrase() {
        var passphrase = $("#passphrase").val();
        if(!passphrase) {
            $('#passphrase-error small').text(errors.passphrase_empty);
            $('#passphrase-error small').show();
            return false;
        } else {
            $('#passphrase-error small').hide();
        }
        return true;
    }
Efthymia Bika's avatar
Efthymia Bika committed
145

Efthymia Bika's avatar
Efthymia Bika committed
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
    function disable_form(disable) {
        $("#backup-name").prop("disabled", disable);
        $("#choose-dir").prop("disabled", disable);
        $("#cloud").prop("disabled", disable);
        var save_pass = $("#save_passphrase").is(":checked");
        if(save_pass) {
            $("#passphrase").prop("disabled", disable);
        }
        if(disable) {
            $("#save_button").hide();
            $("#go_to_restore_button").show();
        } else {
            $("#save_button").show();
            $("#go_to_restore_button").hide();
        }
    }
Efthymia Bika's avatar
Efthymia Bika committed
162

Efthymia Bika's avatar
Efthymia Bika committed
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
    function disable_actions(disable) {
        $("#backup_details_link").prop("disabled", disable);
        $("#status_link").prop("disabled", disable);
        $("#timeview_link").prop("disabled", disable);
        $("#cleanup_link").prop("disabled", disable);
        if(disable) {
            $("#backup_details_link").attr("click", "");
            $("#status_link").click(function(e) { e.preventDefault(); });
            $("#status_link").unbind("click");
            $("#timeview_link").click(function(e) { e.preventDefault(); });
            $("#timeview_link").unbind("click");
            $("#cleanup_link").click(function(e) { e.preventDefault(); });
            $("#cleanup_link").unbind("click");
        } else {
            $("#backup_detais_link").click(function(e) { load_backup(); });
            $("#status_link").click(function(e) { load_status(); });
            $("#timeview_link").click(function(e) { load_timeview(); });
            $("#cleanup_link").click(function(e) { load_cleanup(); });
        }
    }
Efthymia Bika's avatar
Efthymia Bika committed
183

Efthymia Bika's avatar
Efthymia Bika committed
184 185 186 187 188 189
    function check_fields() {
        return(check_directory("directory")
            && check_cloud()
            && check_backup_name()
            && check_passphrase());
    }
Efthymia Bika's avatar
Efthymia Bika committed
190

Efthymia Bika's avatar
Efthymia Bika committed
191 192 193 194 195 196 197
    function go_to_restore() {
        g_res_directory = RESTORE_DEFAULT_DIR;
        g_passphrase = $("#passphrase").val();
        g_res_file = "";
        g_timestamp = "";
        $("#restore-tab-link").trigger("click");
    }
Efthymia Bika's avatar
Efthymia Bika committed
198

Efthymia Bika's avatar
Efthymia Bika committed
199 200 201 202 203 204 205
    function load_cleanup() {
        $("#backup_details").hide();
        $("#cleanup-msg").html("");
        $("#cleanup-msg").removeClass("panel");
        $("#remove-all-button").show();
        $("#force-delete").hide();
    }
Efthymia Bika's avatar
Efthymia Bika committed
206

Efthymia Bika's avatar
Efthymia Bika committed
207 208 209 210 211 212 213 214 215 216 217 218
    function check_remove_all() {
        var remove_all_time = $("#remove-all").val();
        if(!remove_all_time) {
            $('#remove-all-error small').text(errors.remove_all_time_empty);
            $('#remove-all-error small').show();
            return false;
        } else {
            $('#remove-all-error small').hide();
        }
        return true;
    }
</script>
Efthymia Bika's avatar
Efthymia Bika committed
219

Efthymia Bika's avatar
Efthymia Bika committed
220 221
<div class="row">
    <div class="small-2 columns" id="sidebar">
Efthymia Bika's avatar
Efthymia Bika committed
222 223
        <a href="#" onclick="$('#template_list').show();load_backup();"
            class="button radius small add-button">
Efthymia Bika's avatar
Efthymia Bika committed
224 225 226
            <i class="fa fa-plus-circle">&nbsp;Add</i>
        </a>
    </div>
Efthymia Bika's avatar
Efthymia Bika committed
227 228
    <div class="small-9 columns selected-bar text-center" id="selected-bar">
    </div>
Efthymia Bika's avatar
Efthymia Bika committed
229 230 231 232 233 234 235 236 237
    <div class="small-1 columns"></div>
</div>
<div class="row">
    <div class="small-2 columns">&nbsp;
        <div class="hide" id="template_list"></div>
    </div>
    <div class="small-10 columns">
        <ul class="tabs" data-tab>
            <li class="tab-title radius" id="backup_details_tab">
Efthymia Bika's avatar
Efthymia Bika committed
238 239
                <a href="#backup_details"
                    onclick="$('#backup_details').show()"
Efthymia Bika's avatar
Efthymia Bika committed
240 241
                    id="backup_details_link">Settings</a>
            </li>
Efthymia Bika's avatar
Efthymia Bika committed
242
            <li class="tab-title">
Efthymia Bika's avatar
Efthymia Bika committed
243 244 245
                <a href="#timeview" class="radius" id="timeview_link">
                    Timeview
                </a>
Efthymia Bika's avatar
Efthymia Bika committed
246
            </li>
Efthymia Bika's avatar
Efthymia Bika committed
247 248
            <li class="tab-title">
                <a href="#status" class="radius" id="status_link">Status</a>
Efthymia Bika's avatar
Efthymia Bika committed
249
            </li>
Efthymia Bika's avatar
Efthymia Bika committed
250
            <li class="tab-title">
Efthymia Bika's avatar
Efthymia Bika committed
251 252 253
                <a href="#cleanup" class="radius" id="cleanup_link">
                    Cleanup
                </a>
Efthymia Bika's avatar
Efthymia Bika committed
254 255 256 257 258 259 260 261 262
            </li>
        </ul>
        <div class="tabs-content">
            <div class="content" id="backup_details">
                <form>
                   <fieldset>
                        <legend>From</legend>
                        <div class="clearfix">
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
263 264
                                <label id="directory_label" for="directory"
                                    class="right">
Efthymia Bika's avatar
Efthymia Bika committed
265 266
                                    Local directory
                                </label>
Efthymia Bika's avatar
Efthymia Bika committed
267
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
268 269 270 271
                            <div id="directory"
                                class="small-6 columns dir-field"></div>
                            <div id="dirdialogue_label"
                                onclick="$('#choose-dir').trigger('click');"
Efthymia Bika's avatar
Efthymia Bika committed
272
                                class="small-3 columns" id="dirpick">
Efthymia Bika's avatar
Efthymia Bika committed
273 274 275
                                <i class="fa fa-folder-o blue-folder">
                                    &nbsp;
                                </i>
276
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
277
                        </div>
Efthymia Bika's avatar
Efthymia Bika committed
278
                        <div class="clearfix">
Efthymia Bika's avatar
Efthymia Bika committed
279 280
                            <div class="small-3 columns">&nbsp;</div>
                            <div id="directory-error" class="small-6 columns">
Efthymia Bika's avatar
Efthymia Bika committed
281 282
                                <small class="error"></small>
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
283 284
                            <input type="file" id="choose-dir" nwdirectory
                                style="display:none;"
285 286
                                onchange="if($(this).val())
                                    $('#directory').html($(this).val());
Efthymia Bika's avatar
Efthymia Bika committed
287
                                    check_directory('directory');" />
Efthymia Bika's avatar
Efthymia Bika committed
288
                        </div>
Efthymia Bika's avatar
Efthymia Bika committed
289 290 291
                    </fieldset>
                    <fieldset>
                        <legend>To</legend>
292
                        <div class="clearfix">
Efthymia Bika's avatar
Efthymia Bika committed
293
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
294 295
                                 <label id="cloud_label" for="cloud"
                                    class="right inline">Cloud</label>
Efthymia Bika's avatar
Efthymia Bika committed
296
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
297 298
                            <div class="small-9 columns error"
                                id="cloud-error">
Efthymia Bika's avatar
Efthymia Bika committed
299 300 301 302
                                <select id="cloud" onchange="check_cloud();">
                                </select>
                                <small class="error"></small>
                            </div>
303
                        </div>
Efthymia Bika's avatar
Efthymia Bika committed
304
                        <div class="clearfix">
Efthymia Bika's avatar
Efthymia Bika committed
305
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
306 307 308 309 310 311
                                 <label id="backup_name_label"
                                    for="backup-name" class="right inline">
                                    Name&nbsp;
                                    <i class="fa fa-info-circle green-info"
                                        onclick="$('#name-info').slideDown();">
                                    </i>
Efthymia Bika's avatar
Efthymia Bika committed
312 313
                                 </label>
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
314 315
                            <div class="small-9 columns error"
                                id="backup-name-error">
Efthymia Bika's avatar
Efthymia Bika committed
316 317 318 319 320 321 322
                                <input type="text" id="backup-name"
                                placeholder="Backup[A-Za-z0-9-_]"
                                value="Backup"
                                onchange="check_backup_name();">
                                <small class="error"></small>
                            </div>
                            <div class="small-3 columns">&nbsp;</div>
Efthymia Bika's avatar
Efthymia Bika committed
323 324 325 326 327 328
                            <div class="small-9 columns hide info-text panel"
                                id="name-info">
                                <i class="fa fa-times right"
                                    onclick="$('#name-info').slideUp();"></i>
                                Backup name will also appear as a container
                                in your cloud
Efthymia Bika's avatar
Efthymia Bika committed
329
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
330
                        </div>
331 332
                        <div class="clearfix">
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
333 334
                                <label id="passphrase_label" for="passphrase"
                                    class="right inline">Passphrase</label>
335
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
336 337 338 339
                            <div class="small-6 columns error"
                                id="passphrase-error">
                                <input type="password" id="passphrase"
                                    placeholder="Passphrase">
340 341 342
                                <small class="error"></small>
                            </div>
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
343 344 345 346
                                <label for="save_passphrase" class="left">
                                    Save&nbsp;
                                    <input id="save_passphrase"
                                        type="checkbox" class="right">
347 348 349
                                </label>
                            </div>
                        </div>
Efthymia Bika's avatar
Efthymia Bika committed
350
                    </fieldset>
351 352
                    <div class="clearfix pad-bottom">
                        <div class="small-3 columns">
353
                            <a onclick="toggle_settings('more_settings',
354
                                'more_icon', 'More', 'Less')">
Efthymia Bika's avatar
Efthymia Bika committed
355 356
                                <i class="fa fa-plus-square-o"
                                    id="more_icon">&nbsp;More</i>
357 358 359 360
                            <a/>
                        </div>
                    </div>
                    <fieldset id="more_settings" class="hide">
Efthymia Bika's avatar
Efthymia Bika committed
361 362
                        <div class="clearfix">
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
363 364
                                 <label id="backup-type-label"
                                    for="backup-type" class="right inline">
Efthymia Bika's avatar
Efthymia Bika committed
365 366 367 368
                                    Backup Type
                                 </label>
                            </div>
                            <div class="small-9 columns">
Efthymia Bika's avatar
Efthymia Bika committed
369 370
                                <input type="radio" name="backup-type"
                                    value="full" id="full" checked="checked">
Efthymia Bika's avatar
Efthymia Bika committed
371
                                    <label for="full">Full</label>
Efthymia Bika's avatar
Efthymia Bika committed
372 373
                                <input type="radio" name="backup-type"
                                    value="incremental" id="inc">
Efthymia Bika's avatar
Efthymia Bika committed
374 375 376 377 378
                                    <label for="inc">Incremental</label>
                            </div>
                        </div>
                        <div class="clearfix">
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
379 380 381 382 383 384 385
                                <label id="exclude-label" for="exclude"
                                    class="right inline">
                                    Exclude&nbsp;
                                    <i class="fa fa-info-circle green-info"
                                    onclick="$('#include-help').slideDown();">
                                    </i>
                                </label>
Efthymia Bika's avatar
Efthymia Bika committed
386
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
387 388
                            <div class="small-9 columns error"
                                id="exclude-error">
Efthymia Bika's avatar
Efthymia Bika committed
389 390 391 392 393 394 395
                                <input type="text" id="exclude"
                                placeholder="Exclude folders or files">
                                <small class="error"></small>
                            </div>
                        </div>
                        <div class="clearfix">
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
396 397 398 399 400 401 402
                                 <label id="include-label" for="include"
                                    class="right inline">
                                    Include&nbsp;
                                    <i class="fa fa-info-circle green-info"
                                        onclick="$('#include-help')
                                            .slideDown();">
                                    </i>
Efthymia Bika's avatar
Efthymia Bika committed
403 404
                                 </label>
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
405 406
                            <div class="small-9 columns error"
                                id="include-error">
Efthymia Bika's avatar
Efthymia Bika committed
407 408 409 410 411
                                <input type="text" id="include"
                                placeholder="Include folders or files">
                                <small class="error"></small>
                            </div>
                            <div class="small-3 columns">&nbsp;</div>
Efthymia Bika's avatar
Efthymia Bika committed
412 413 414 415 416 417 418
                            <div class="small-9 columns hide info-text panel"
                                id="include-help">
                                <i class="fa fa-times right"
                                    onclick="$('#include-help').slideUp();">
                                </i>
                                Include and Exclude fields accept some
                                extended shell globbing patterns:
Efthymia Bika's avatar
Efthymia Bika committed
419 420
                                <br>* Matches any string not containing '/'
                                <br>? Matches any character except '/'
Efthymia Bika's avatar
Efthymia Bika committed
421 422 423
                                <br>[...] Expands to a single character of
                                    those characters specified (ranges are
                                    acceptable)
Efthymia Bika's avatar
Efthymia Bika committed
424 425 426 427 428 429
                                <br>** Matches any string
                            </div>
                        </div>
                    </fieldset>
                    <div class="clearfix">
                        <div class="small-6 columns">
Efthymia Bika's avatar
Efthymia Bika committed
430 431 432 433 434 435
                            <a id="backup_button"
                                class="button radius left small"
                                onclick="if(check_fields()) backup(false);">
                                <i class="fa fa-cloud-upload"></i>
                                &nbsp;Backup Now
                            </a>
Efthymia Bika's avatar
Efthymia Bika committed
436 437
                        </div>
                        <div class="small-6 columns">
Efthymia Bika's avatar
Efthymia Bika committed
438 439 440 441
                            <a id="save_button"
                                class="button radius right small success"
                                onclick=
                                    "if(check_fields()) save_backup_set(false);">
Efthymia Bika's avatar
Efthymia Bika committed
442 443 444
                            <i class="fa fa-floppy-o"></i>&nbsp;Save</a>
                        </div>
                        <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
445 446 447 448 449 450
                            <a id="go_to_restore_button"
                                class="button radius right small"
                                onclick="go_to_restore()">
                                <i class="fa fa-cloud-download"></i>
                                &nbsp;Restore
                            </a>
Efthymia Bika's avatar
Efthymia Bika committed
451 452 453 454 455 456
                        </div>
                    </div>
                    <div class="clearfix">
                        <div class="small-8 columns">
                        </div>
                        <div class="small-4 columns">
Efthymia Bika's avatar
Efthymia Bika committed
457 458 459 460 461 462 463 464
                            <a id="save_template_button"
                                class="button radius right small success"
                                onclick=
                                    "if(check_backup_name() && check_cloud())
                                        save_backup_set(true);">
                                <i class="fa fa-floppy-o"></i>
                                &nbsp;Save as Template
                            </a>
Efthymia Bika's avatar
Efthymia Bika committed
465 466 467 468
                        </div>
                    </div>
                </form>
            </div>
Efthymia Bika's avatar
Efthymia Bika committed
469 470 471
            <div class="content" id="status">
                <pre id="status_contents"></pre>
            </div>
Efthymia Bika's avatar
Efthymia Bika committed
472 473 474
            <div class="content" id="timeview">
                <div class="clearfix">
                    <div class="small-9 columns error" id="time-head-error">
Efthymia Bika's avatar
Efthymia Bika committed
475 476
                        <input type="hidden" id="time-path"
                            placeholder="Select path" value="/">
Efthymia Bika's avatar
Efthymia Bika committed
477
                        <small class="error"></small>
Efthymia Bika's avatar
Efthymia Bika committed
478 479
                    </div>
                </div>
Efthymia Bika's avatar
Efthymia Bika committed
480 481 482 483
                <div class="clearfix">
                    <ul class="breadcrumbs" id="breadcrumbs"></ul>
                </div>
                <div class="clearfix">
Efthymia Bika's avatar
Efthymia Bika committed
484 485 486 487
                    <div class="small-4 columns left scroll-list"
                        id="time-dates"></div>
                    <div class="small-8 columns scroll-list"
                        id="time-contents"></div>
Efthymia Bika's avatar
Efthymia Bika committed
488 489 490 491 492
                </div>
            </div>
            <div class="content" id="cleanup">
                <div class="clearfix">
                    <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
493 494 495 496 497 498
                         <label id="remove-all-label" for="remove-all"
                            class="right">
                            Remove backup sets<br>older than&nbsp;
                            <i class="fa fa-info-circle green-info"
                                onclick="$('#remove-all-help').slideDown();">
                            </i>
Efthymia Bika's avatar
Efthymia Bika committed
499 500 501 502 503 504 505
                         </label>
                    </div>
                    <div class="small-9 columns error" id="remove-all-error">
                        <input type="text" id="remove-all">
                        <small class="error"></small>
                    </div>
                    <div class="small-3 columns">&nbsp;</div>
Efthymia Bika's avatar
Efthymia Bika committed
506 507 508 509
                    <div class="small-9 columns hide info-text panel"
                        id="remove-all-help">
                        <i class="fa fa-times right"
                            onclick="$('#remove-all-help').slideUp();"></i>
Efthymia Bika's avatar
Efthymia Bika committed
510 511 512
                        Delete all backup sets older than the given time.
                        Accepts following formats<br>
                        1. String "now" refers to current time<br>
Efthymia Bika's avatar
Efthymia Bika committed
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528
                        2. A sequences of digits, like "123456890"
                        (indicating the time in seconds after the epoch)<br>
                        3. A string like "2002-01-25T07:00:00+02:00" in
                        datetime format<br>
                        4. A number followed by one of the characters s, m,
                        h, D, W, M, or Y (indicating seconds, minutes, hours,
                        days, weeks, months, or years respectively),
                        or a series of such pairs. In this case the string
                        refers to the time that preceded the current time by
                        the length of the interval. For instance, "1h78m"
                        indicates the time that was one hour and 78 minutes
                        ago.<br>
                        5. A date format of the form YYYY/MM/DD, YYYY-MM-DD,
                        MM/DD/YYYY, or MM-DD-YYYY, which indicates midnight
                        on the day in question, relative to the current time
                        zone settings.
Efthymia Bika's avatar
Efthymia Bika committed
529 530
                    </div>
                </div>
Efthymia Bika's avatar
Efthymia Bika committed
531 532 533 534
                <div class="row">
                    <div class="small-1 columns"></div>
                    <pre id="cleanup-msg" class="small-11 columns"></pre>
                </div>
Efthymia Bika's avatar
Efthymia Bika committed
535 536 537
                <div class="clearfix">
                    <div class="small-8 columns">&nbsp;</div>
                    <div class="small-4 columns">
Efthymia Bika's avatar
Efthymia Bika committed
538 539
                        <a id="remove-all-button"
                            class="button radius right small"
Efthymia Bika's avatar
Efthymia Bika committed
540
                            onclick="if(check_remove_all()) {
Efthymia Bika's avatar
Efthymia Bika committed
541 542 543 544
                                remove_all(false);
                                $(this).hide()}">
                            <i class="fa fa-trash-o"></i>&nbsp;Remove All
                        </a>
Efthymia Bika's avatar
Efthymia Bika committed
545 546
                    </div>
                    <div class="small-4 columns hide" id="force-delete">
Efthymia Bika's avatar
Efthymia Bika committed
547 548 549 550 551
                       <a id="remove-all-button-force"
                            class="button radius right small alert"
                            onclick="if(check_remove_all()) remove_all(true)">
                            <i class="fa fa-trash-o"></i>&nbsp;Force Delete
                        </a>
Efthymia Bika's avatar
Efthymia Bika committed
552
                    </div>
Efthymia Bika's avatar
Efthymia Bika committed
553
                </div>
Efthymia Bika's avatar
Efthymia Bika committed
554 555
            </div>
        </div>
Efthymia Bika's avatar
Efthymia Bika committed
556
    </div>
557 558 559 560 561 562 563 564 565 566 567 568 569 570 571
    <div class="clearfix">
        <div class="small-2 columns"></div>
        <div class="small-10 columns">
            <div id="success-alert" class="hide">
                <div data-alert class="alert-box success radius"
                    id="success-msg">
                </div>
            </div>
            <div id="error-alert" class="hide">
                <div data-alert class="alert-box alert radius"
                    id="error-msg">
                </div>
            </div>
        </div>
    </div>
Efthymia Bika's avatar
Efthymia Bika committed
572 573 574 575 576 577 578 579 580 581 582
    <div id="loader" class="hide text-center">
        <i class="fa fa-spinner fa-pulse fa-2x gray-spin"></i>
    </div>
</div>
<div class="row">
    <div class="small-1 columns"></div>
    <pre id="msg" class="small-11 columns"></pre>
</div>
<script type="text/javascript">
    $(document).foundation();
</script>