rest-storage-editordeprecated

rest-storage-editor is the front end component for rest-storage.

Usage no npm install needed!

<script type="module">
  import restStorageEditor from 'https://cdn.skypack.dev/rest-storage-editor';
</script>

README

A swisspush project

rest-storage-editor for rest-storage

Build App

npm install

You can use the following grunt commands:

grunt               // execute clean, copy

grunt clean			// clean up the build directories
grunt copy  		// copy the files into the right folders

Settings

In the folder app/js/ you will find the rest-editor.settings.js file. In this file you can setup some parameters for the rest editor.

settings:

apiVersion: String - if you use a REST-API version
limitDefault: int - how many data-records will initially loaded
limitStretch: int - how many data-records will be loaded when you click on the "load more" button
limitParam: String - get parameter for the amout of data-records
rawEditMode: int - 1 if you want to see the code as default (0 is for render mode)
ContextDisabledDelete: Boolean - default status of the contextmenu (delete button)
ContextDisabledAdd: Boolean - default status of the contextmenu (add button)
devBaseUrl: String - overwrite localhost, if you want to connect on an other system
baseUrl: String - overwrite baseUrl, if you want to connect on an other system

security blacklist:

Set an entry for an URL you want to restrict. Every restriction is recoursive!

[
    {"route": "/path/to/my/source/1/", "add": true, "del": false},
    {"route": "/path/to/my/source/2/", "add": false, "del": false}
]

icon types by FontAwesome:

"default": {"icon": "fa fa-file-text-o"},
"folder-open": {"icon": "fa fa-folder-open"},
"folder-close": {"icon": "fa fa-folder"},
"file": {"icon": "fa fa-file-text-o"},
"loadmore": {"icon": "fa fa-refresh"},
"html": {"icon": "fa fa-html5"},
"css": {"icon": "fa fa-css3"},
"js": {"icon": "fa fa-file-code-o"},
"jpg": {"icon": "fa fa-picture-o"},
"png": {"icon": "fa fa-picture-o"},
"gif": {"icon": "fa fa-picture-o"},
"zip": {"icon": "fa fa-file-archive-o"},
"md": {"icon": "fa fa-book"}

Testing

npm run test

or

karma start test\karma.conf.js

Karma will use PhantomJS 1.9.8 for Testing.