Ghost/core/server/views/debug.hbs
Sebastian Gierlinger c558cb7648 Add validation for importer
closes #952
- moved api.js to api/index.js
- added api/db.js for import and export functions
- moved /ghost/debug/db/export to GET /api/v0.1/db
- moved /ghost/debug/db/import to POST /api/v0.1/db
- removed /ghost/debug/db/reset
- added validation for import
- added constraints object to migration
2013-10-23 19:42:55 +01:00

41 lines
1.7 KiB
Handlebars

{{!< default}}
<div id="debug-page" class="wrapper">
<aside class="settings-sidebar" role="complementary">
<header>
<h1 class="title">Ugly Debug Tools</h1>
</header>
<nav class="settings-menu">
<ul>
<li><a class="general" href="javascript:void(0);">General</a></li>
</ul>
</nav>
</aside>
<section id="debug-general" class="settings-content" style="display: block">
<header>
<h2 class="title">General</h2>
</header>
<section class="content">
<form id="settings-export">
<input type="hidden" name="_csrf" value="{{csrfToken}}" />
<fieldset>
<div class="form-group">
<label>Export</label>
<a href="/api/v0.1/db/" class="button-save">Export</a>
<p>Export the blog settings and data.</p>
</div>
</fieldset>
</form>
<form id="settings-import" method="post" action="/api/v0.1/db/" enctype="multipart/form-data">
<input type="hidden" name="_csrf" value="{{csrfToken}}" />
<fieldset>
<div class="form-group">
<label>Import</label>
<input type="file" class="button-add" name="importfile" />
<input type="submit" class="button-save" value="Import" />
<p>Import from another Ghost installation. If you import a user, this will replace the current user & log you out.</p>
</div>
</fieldset>
</form>
</section>
</section>
</div>