backup-list.html 25.8 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
    function load_cleanup() {
        $("#backup_details").hide();
        $("#cleanup-msg").html("");
        $("#cleanup-msg").removeClass("panel");
203 204
        $("#msg").html("");
        $("#msg").removeClass("panel");
Efthymia Bika's avatar
Efthymia Bika committed
205 206 207
        $("#remove-all-button").show();
        $("#force-delete").hide();
    }
Efthymia Bika's avatar
Efthymia Bika committed
208

Efthymia Bika's avatar
Efthymia Bika committed
209 210 211 212 213 214 215 216 217 218 219 220
    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
221

Efthymia Bika's avatar
Efthymia Bika committed
222 223
<div class="row">
    <div class="small-2 columns" id="sidebar">
Efthymia Bika's avatar
Efthymia Bika committed
224 225
        <a href="#" onclick="$('#template_list').show();load_backup();"
            class="button radius small add-button">
Efthymia Bika's avatar
Efthymia Bika committed
226 227 228
            <i class="fa fa-plus-circle">&nbsp;Add</i>
        </a>
    </div>
Efthymia Bika's avatar
Efthymia Bika committed
229 230
    <div class="small-9 columns selected-bar text-center" id="selected-bar">
    </div>
Efthymia Bika's avatar
Efthymia Bika committed
231 232 233 234 235 236 237 238 239
    <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
240
                <a href="#backup_details"
241 242
                    onclick="$('#backup_details').show();
                    toggle_msgs(false, 'msg', false)"
Efthymia Bika's avatar
Efthymia Bika committed
243 244
                    id="backup_details_link">Settings</a>
            </li>
Efthymia Bika's avatar
Efthymia Bika committed
245
            <li class="tab-title">
Efthymia Bika's avatar
Efthymia Bika committed
246 247 248
                <a href="#timeview" class="radius" id="timeview_link">
                    Timeview
                </a>
Efthymia Bika's avatar
Efthymia Bika committed
249
            </li>
Efthymia Bika's avatar
Efthymia Bika committed
250 251
            <li class="tab-title">
                <a href="#status" class="radius" id="status_link">Status</a>
Efthymia Bika's avatar
Efthymia Bika committed
252
            </li>
Efthymia Bika's avatar
Efthymia Bika committed
253
            <li class="tab-title">
Efthymia Bika's avatar
Efthymia Bika committed
254 255 256
                <a href="#cleanup" class="radius" id="cleanup_link">
                    Cleanup
                </a>
Efthymia Bika's avatar
Efthymia Bika committed
257 258 259 260 261 262 263 264 265
            </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
266 267
                                <label id="directory_label" for="directory"
                                    class="right">
Efthymia Bika's avatar
Efthymia Bika committed
268 269
                                    Local directory
                                </label>
Efthymia Bika's avatar
Efthymia Bika committed
270
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
271 272 273 274
                            <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
275
                                class="small-3 columns" id="dirpick">
Efthymia Bika's avatar
Efthymia Bika committed
276 277 278
                                <i class="fa fa-folder-o blue-folder">
                                    &nbsp;
                                </i>
279
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
280
                        </div>
Efthymia Bika's avatar
Efthymia Bika committed
281
                        <div class="clearfix">
Efthymia Bika's avatar
Efthymia Bika committed
282 283
                            <div class="small-3 columns">&nbsp;</div>
                            <div id="directory-error" class="small-6 columns">
Efthymia Bika's avatar
Efthymia Bika committed
284 285
                                <small class="error"></small>
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
286 287
                            <input type="file" id="choose-dir" nwdirectory
                                style="display:none;"
288 289
                                onchange="if($(this).val())
                                    $('#directory').html($(this).val());
Efthymia Bika's avatar
Efthymia Bika committed
290
                                    check_directory('directory');" />
Efthymia Bika's avatar
Efthymia Bika committed
291
                        </div>
Efthymia Bika's avatar
Efthymia Bika committed
292 293 294
                    </fieldset>
                    <fieldset>
                        <legend>To</legend>
295
                        <div class="clearfix">
Efthymia Bika's avatar
Efthymia Bika committed
296
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
297 298
                                 <label id="cloud_label" for="cloud"
                                    class="right inline">Cloud</label>
Efthymia Bika's avatar
Efthymia Bika committed
299
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
300 301
                            <div class="small-9 columns error"
                                id="cloud-error">
Efthymia Bika's avatar
Efthymia Bika committed
302 303 304 305
                                <select id="cloud" onchange="check_cloud();">
                                </select>
                                <small class="error"></small>
                            </div>
306
                        </div>
Efthymia Bika's avatar
Efthymia Bika committed
307
                        <div class="clearfix">
Efthymia Bika's avatar
Efthymia Bika committed
308
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
309 310 311 312 313 314
                                 <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
315 316
                                 </label>
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
317 318
                            <div class="small-9 columns error"
                                id="backup-name-error">
Efthymia Bika's avatar
Efthymia Bika committed
319 320 321 322 323 324 325
                                <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
326 327 328 329 330 331
                            <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
332
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
333
                        </div>
334 335
                        <div class="clearfix">
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
336 337
                                <label id="passphrase_label" for="passphrase"
                                    class="right inline">Passphrase</label>
338
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
339 340 341 342
                            <div class="small-6 columns error"
                                id="passphrase-error">
                                <input type="password" id="passphrase"
                                    placeholder="Passphrase">
343 344 345
                                <small class="error"></small>
                            </div>
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
346 347 348 349
                                <label for="save_passphrase" class="left">
                                    Save&nbsp;
                                    <input id="save_passphrase"
                                        type="checkbox" class="right">
350 351 352
                                </label>
                            </div>
                        </div>
Efthymia Bika's avatar
Efthymia Bika committed
353
                    </fieldset>
354 355
                    <div class="clearfix pad-bottom">
                        <div class="small-3 columns">
356
                            <a onclick="toggle_settings('more_settings',
357
                                'more_icon', 'More', 'Less')">
Efthymia Bika's avatar
Efthymia Bika committed
358 359
                                <i class="fa fa-plus-square-o"
                                    id="more_icon">&nbsp;More</i>
360 361 362 363
                            <a/>
                        </div>
                    </div>
                    <fieldset id="more_settings" class="hide">
Efthymia Bika's avatar
Efthymia Bika committed
364 365
                        <div class="clearfix">
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
366 367
                                 <label id="backup-type-label"
                                    for="backup-type" class="right inline">
Efthymia Bika's avatar
Efthymia Bika committed
368 369 370 371
                                    Backup Type
                                 </label>
                            </div>
                            <div class="small-9 columns">
Efthymia Bika's avatar
Efthymia Bika committed
372 373
                                <input type="radio" name="backup-type"
                                    value="full" id="full" checked="checked">
Efthymia Bika's avatar
Efthymia Bika committed
374
                                    <label for="full">Full</label>
Efthymia Bika's avatar
Efthymia Bika committed
375 376
                                <input type="radio" name="backup-type"
                                    value="incremental" id="inc">
Efthymia Bika's avatar
Efthymia Bika committed
377 378 379 380 381
                                    <label for="inc">Incremental</label>
                            </div>
                        </div>
                        <div class="clearfix">
                            <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
382 383 384 385 386 387 388
                                <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
389
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
390 391
                            <div class="small-9 columns error"
                                id="exclude-error">
Efthymia Bika's avatar
Efthymia Bika committed
392 393 394 395 396 397 398
                                <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
399 400 401 402 403 404 405
                                 <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
406 407
                                 </label>
                            </div>
Efthymia Bika's avatar
Efthymia Bika committed
408 409
                            <div class="small-9 columns error"
                                id="include-error">
Efthymia Bika's avatar
Efthymia Bika committed
410 411 412 413 414
                                <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
415 416 417 418 419 420 421
                            <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
422 423
                                <br>* Matches any string not containing '/'
                                <br>? Matches any character except '/'
Efthymia Bika's avatar
Efthymia Bika committed
424 425 426
                                <br>[...] Expands to a single character of
                                    those characters specified (ranges are
                                    acceptable)
Efthymia Bika's avatar
Efthymia Bika committed
427 428 429 430 431 432
                                <br>** Matches any string
                            </div>
                        </div>
                    </fieldset>
                    <div class="clearfix">
                        <div class="small-6 columns">
Efthymia Bika's avatar
Efthymia Bika committed
433 434 435 436 437 438
                            <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
439 440
                        </div>
                        <div class="small-6 columns">
Efthymia Bika's avatar
Efthymia Bika committed
441 442 443 444
                            <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
445 446 447
                            <i class="fa fa-floppy-o"></i>&nbsp;Save</a>
                        </div>
                        <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
448 449 450 451 452 453
                            <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
454 455 456 457 458 459
                        </div>
                    </div>
                    <div class="clearfix">
                        <div class="small-8 columns">
                        </div>
                        <div class="small-4 columns">
Efthymia Bika's avatar
Efthymia Bika committed
460 461 462 463 464 465 466 467
                            <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
468 469 470 471
                        </div>
                    </div>
                </form>
            </div>
Efthymia Bika's avatar
Efthymia Bika committed
472 473 474
            <div class="content" id="status">
                <pre id="status_contents"></pre>
            </div>
Efthymia Bika's avatar
Efthymia Bika committed
475 476 477
            <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
478 479
                        <input type="hidden" id="time-path"
                            placeholder="Select path" value="/">
Efthymia Bika's avatar
Efthymia Bika committed
480
                        <small class="error"></small>
Efthymia Bika's avatar
Efthymia Bika committed
481 482
                    </div>
                </div>
Efthymia Bika's avatar
Efthymia Bika committed
483 484 485 486
                <div class="clearfix">
                    <ul class="breadcrumbs" id="breadcrumbs"></ul>
                </div>
                <div class="clearfix">
Efthymia Bika's avatar
Efthymia Bika committed
487 488 489 490
                    <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
491 492 493 494 495
                </div>
            </div>
            <div class="content" id="cleanup">
                <div class="clearfix">
                    <div class="small-3 columns">
Efthymia Bika's avatar
Efthymia Bika committed
496 497 498 499 500 501
                         <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
502 503 504 505 506 507 508
                         </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
509 510 511 512
                    <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
513 514 515
                        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
516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531
                        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
532 533
                    </div>
                </div>
Efthymia Bika's avatar
Efthymia Bika committed
534 535 536 537
                <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
538 539 540
                <div class="clearfix">
                    <div class="small-8 columns">&nbsp;</div>
                    <div class="small-4 columns">
Efthymia Bika's avatar
Efthymia Bika committed
541 542
                        <a id="remove-all-button"
                            class="button radius right small"
Efthymia Bika's avatar
Efthymia Bika committed
543
                            onclick="if(check_remove_all()) {
Efthymia Bika's avatar
Efthymia Bika committed
544 545 546 547
                                remove_all(false);
                                $(this).hide()}">
                            <i class="fa fa-trash-o"></i>&nbsp;Remove All
                        </a>
Efthymia Bika's avatar
Efthymia Bika committed
548 549
                    </div>
                    <div class="small-4 columns hide" id="force-delete">
Efthymia Bika's avatar
Efthymia Bika committed
550 551 552 553 554
                       <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
555
                    </div>
Efthymia Bika's avatar
Efthymia Bika committed
556
                </div>
Efthymia Bika's avatar
Efthymia Bika committed
557 558
            </div>
        </div>
Efthymia Bika's avatar
Efthymia Bika committed
559
    </div>
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574
    <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
575 576 577 578
    <div id="loader" class="hide text-center">
        <i class="fa fa-spinner fa-pulse fa-2x gray-spin"></i>
    </div>
</div>
Efthymia Bika's avatar
Efthymia Bika committed
579 580 581 582 583 584
<div class="row">
    <div class="small-1 columns">&nbsp;</div>
    <div id="show_log" class="clearfix pad-bottom hide">
        <div class="small-3 columns">
            <a onclick="toggle_settings('msg', 'more_log_icon',
                'Show activity log', 'Hide activity log');
Efthymia Bika's avatar
Efthymia Bika committed
585 586
                $('html,body').animate({scrollTop:
                    $('#msg_div').offset().top}, 1000);">
Efthymia Bika's avatar
Efthymia Bika committed
587 588 589 590 591 592
                <i class="fa fa-plus-square-o"
                    id="more_log_icon">&nbsp;Show activity log</i>
            <a/>
        </div>
    </div>
</div>
Efthymia Bika's avatar
Efthymia Bika committed
593
<div class="row" id="msg_div">
Efthymia Bika's avatar
Efthymia Bika committed
594
    <div class="small-1 columns"></div>
Efthymia Bika's avatar
Efthymia Bika committed
595
    <pre id="msg" class="small-11 columns hide"></pre>
Efthymia Bika's avatar
Efthymia Bika committed
596 597 598 599
</div>
<script type="text/javascript">
    $(document).foundation();
</script>