parent
1954e233d6
commit
2606d51e0e
@ -0,0 +1,16 @@
|
||||
{
|
||||
"/public/js/spritemap.js": "/public/js/spritemap.js?id=2dda73ecee3bb668b395026efda6524c",
|
||||
"/public/js/app.js": "/public/js/app.js?id=42bfe8fc554ce4641883c055b1d30a2c",
|
||||
"/public/css/styles.css": "/public/css/styles.css?id=d8096bd2ff84ae29cb0ecf810064b218",
|
||||
"/public/css/demo.html": "/public/css/demo.html?id=a54a5d205e3152fb64b33dda63ffa555",
|
||||
"/public/css/IBMPlexMono-Bold.eot": "/public/css/IBMPlexMono-Bold.eot?id=ef1fadf711db80a00542b202ab14f7ee",
|
||||
"/public/css/IBMPlexMono-Bold.ttf": "/public/css/IBMPlexMono-Bold.ttf?id=e46cace25a93f48a2ec32800717827cb",
|
||||
"/public/css/IBMPlexMono-Bold.woff": "/public/css/IBMPlexMono-Bold.woff?id=8864bd7cb954c4646045e3fc0bdec90c",
|
||||
"/public/css/IBMPlexMono-Bold.woff2": "/public/css/IBMPlexMono-Bold.woff2?id=c6d3f08fe7a9fecab40d748b98c87cc5",
|
||||
"/public/css/IBMPlexMono.eot": "/public/css/IBMPlexMono.eot?id=d68f064d6b86ff47b38ad486a3362d82",
|
||||
"/public/css/IBMPlexMono.ttf": "/public/css/IBMPlexMono.ttf?id=60d8ae961dba3289c1d2d54e0b85c9b7",
|
||||
"/public/css/IBMPlexMono.woff": "/public/css/IBMPlexMono.woff?id=18a7a5a76b4176759e2e1b3e674a7f82",
|
||||
"/public/css/IBMPlexMono.woff2": "/public/css/IBMPlexMono.woff2?id=428bd06c5eb0362494016994c26188b4",
|
||||
"/public/css/OFL.txt": "/public/css/OFL.txt?id=5c7bb1d9d37e52d30b53224261c955b2",
|
||||
"/public/css/stylesheet.css": "/public/css/stylesheet.css?id=a3e561da46246c3c582cddec544ad25f"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,19 @@
|
||||
require('./bootstrap.js')
|
||||
|
||||
import AppList from './components/list.riot'
|
||||
import AppSidebar from './components/sidebar.riot'
|
||||
|
||||
import AppTasks from './components/tasks.riot'
|
||||
import AppTaskNew from './components/task-new.riot'
|
||||
import AppTaskForm from './components/task-form.riot'
|
||||
|
||||
// register components
|
||||
riot.register('app-list', AppList)
|
||||
riot.register('app-sidebar', AppSidebar)
|
||||
riot.register('app-tasks', AppTasks)
|
||||
riot.register('app-task-new', AppTaskNew)
|
||||
riot.register('app-task-form', AppTaskForm)
|
||||
|
||||
// mount components
|
||||
riot.mount('app-list')
|
||||
riot.mount('app-sidebar')
|
||||
riot.mount('app-tasks')
|
||||
riot.mount('app-task-new')
|
||||
riot.mount('app-task-form')
|
@ -1,3 +0,0 @@
|
||||
<app-action>
|
||||
|
||||
</app-action>
|
@ -1,3 +0,0 @@
|
||||
<app-filter>
|
||||
|
||||
</app-filter>
|
@ -0,0 +1,89 @@
|
||||
<app-sidebar>
|
||||
<div class={ getClasses() }>
|
||||
<div class="sidebar__inner">
|
||||
|
||||
<!-- header -->
|
||||
<div class="bar">
|
||||
<div class="bar__main">
|
||||
<slot name="title" />
|
||||
</div>
|
||||
<div class="bar__end">
|
||||
<button class="button button--transparent" type="button" onclick={ (event) => { handleClose(event) } }>
|
||||
<svg class="icon fill-text-contrast" aria-hidden="true">
|
||||
<use xlink:href="/symbol-defs.svg#icon-close"></use>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- body -->
|
||||
<div class="sidebar__body">
|
||||
<slot name="form" data={ state.data } />
|
||||
</div>
|
||||
|
||||
<!-- footer -->
|
||||
<div class="sidebar__footer">
|
||||
<button class="button m-bottom-0" type="submit" form="app-users-form">
|
||||
Save
|
||||
<svg class="icon fill-success p-left-3" aria-hidden="true">
|
||||
<use xlink:href="/symbol-defs.svg#icon-check"></use>
|
||||
</svg>
|
||||
</button>
|
||||
<button class="button m-bottom-0" type="submit" form="app-users-form" close>
|
||||
Save and Close
|
||||
<svg class="icon fill-success p-left-3" aria-hidden="true">
|
||||
<use xlink:href="/symbol-defs.svg#icon-arrow-right"></use>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
import observable from '@riotjs/observable'
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
export default {
|
||||
|
||||
state: {
|
||||
isOpen: false
|
||||
},
|
||||
|
||||
onMounted()
|
||||
{
|
||||
observable(this.root)
|
||||
|
||||
this.root.on('open', () => {
|
||||
this.state.isOpen = true
|
||||
this.update()
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
getClasses()
|
||||
{
|
||||
let classes = [
|
||||
'sidebar'
|
||||
]
|
||||
|
||||
if (this.state.isOpen === true) {
|
||||
classes.push('sidebar--open')
|
||||
}
|
||||
|
||||
return classes.join(' ')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</app-sidebar>
|
@ -0,0 +1,122 @@
|
||||
<app-task-form>
|
||||
|
||||
<app-sidebar>
|
||||
|
||||
<span slot="title">
|
||||
<virtual if={ state.current.name }>
|
||||
Edit Task { state.current.name }
|
||||
</virtual>
|
||||
<virtual if={ !state.current.name }>
|
||||
New Task
|
||||
</virtual>
|
||||
</span>
|
||||
|
||||
<form class="form" slot="form" onsubmit={ (event) => { state.validator.submit(event) } }>
|
||||
<div class="field-group">
|
||||
<label class="field-label">
|
||||
name
|
||||
<input class="field-text" name="name" type="text" />
|
||||
<field-error name="name"></field-error>
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-group">
|
||||
<label class="field-label">
|
||||
url
|
||||
<input class="field-text" name="url" type="text" />
|
||||
<field-error name="url"></field-error>
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-group">
|
||||
<label class="field-label">
|
||||
requestHandler
|
||||
<select class="field-choice" name="requesthandler">
|
||||
<option></option>
|
||||
<option each={ handler in state.requestHandlers }></option>
|
||||
</select>
|
||||
<field-error name="requesthandler"></field-error>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</app-sidebar>
|
||||
|
||||
<script>
|
||||
|
||||
import FormValidator from '@tiny-components/validator/src/formValidator.js'
|
||||
import FieldError from '@tiny-components/validator/src/fieldError.riot'
|
||||
|
||||
import taskFormStore from './../stores/taskForm.js'
|
||||
|
||||
import * as riot from 'riot'
|
||||
|
||||
riot.register('field-error', FieldError)
|
||||
riot.mount('field-error')
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
export default {
|
||||
|
||||
state: {
|
||||
requestHandlers: [],
|
||||
validator: undefined,
|
||||
current: {
|
||||
|
||||
},
|
||||
isOpen: false
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
onMounted()
|
||||
{
|
||||
// creating formValidator
|
||||
this.state.validator = new FormValidator(this.$('.form'), {
|
||||
'name': {
|
||||
'presence': true
|
||||
},
|
||||
'url': {
|
||||
'presence': true
|
||||
},
|
||||
'requestHandler': {
|
||||
'presence': true
|
||||
}
|
||||
})
|
||||
|
||||
// adding on success
|
||||
this.state.validator.onSuccess((event, data) => {
|
||||
this.handleSuccess(event, data)
|
||||
})
|
||||
|
||||
taskFormStore.on('toggle-form', () => {
|
||||
if (this.state.isOpen) {
|
||||
this.state.isOpen = false
|
||||
} else {
|
||||
this.state.isOpen = true
|
||||
}
|
||||
|
||||
this.update()
|
||||
})
|
||||
|
||||
this.update()
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {object} event
|
||||
*
|
||||
*/
|
||||
handleSubmit(event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</app-task-form>
|
@ -0,0 +1,43 @@
|
||||
<app-action-new>
|
||||
<button class="button m-bottom-0 m-top-5" onclick={ (event) => { handleNew(event) } }>
|
||||
<svg class="icon fill-text-contrast" aria-hidden="true">
|
||||
<use xlink:href="/symbol-defs.svg#icon-close"></use>
|
||||
</svg>
|
||||
New
|
||||
</button>
|
||||
|
||||
<script>
|
||||
|
||||
import taskFormStore from './../stores/taskForm.js'
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
export default {
|
||||
|
||||
state: {
|
||||
form: undefined
|
||||
},
|
||||
|
||||
onMounted()
|
||||
{
|
||||
this.state.form = document.querySelector('#task-form').firstChild
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {[type]} event
|
||||
* @return {[type]}
|
||||
*/
|
||||
handleNew(event)
|
||||
{
|
||||
document.querySelector('#task-form').firstChild.trigger('open')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</app-action-new>
|
@ -0,0 +1,120 @@
|
||||
<app-tasks>
|
||||
<div class="tasks">
|
||||
<table class="table table--stripped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table__th">
|
||||
name
|
||||
</th>
|
||||
<th class="table__th">
|
||||
url
|
||||
</th>
|
||||
<th class="table__th">
|
||||
requestHandler
|
||||
</th>
|
||||
<th class="table__th">
|
||||
actions
|
||||
</th>
|
||||
<th class="table__th">
|
||||
cron
|
||||
</th>
|
||||
<th class="table__th"></th>
|
||||
<tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr if={ state.tasks.length > 0 } each={ task in state.tasks }>
|
||||
<td class="table__td">
|
||||
{ task.name }
|
||||
</td>
|
||||
<td class="table__td">
|
||||
{ task.url }
|
||||
</td>
|
||||
<td class="table__td">
|
||||
{ task.requestHandler }
|
||||
</td>
|
||||
<td class="table__td">
|
||||
<virtual each={ action in task.actions }>
|
||||
<span>
|
||||
{ action.className }
|
||||
</span>
|
||||
<span if={ actions.options }>
|
||||
{ JSON.stringify(action.options) }
|
||||
</span>
|
||||
</virtual>
|
||||
</td>
|
||||
<td class="table__td">
|
||||
{ task.cron }
|
||||
</td>
|
||||
<td class="table__td">
|
||||
<button class="button" onclick={ (event) => { handleEdit(event, task) } }>
|
||||
Edit
|
||||
</button>
|
||||
<button class="button" onclick={ (event) => { handleDelete(event, task) } }>
|
||||
Delete
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr if={ state.tasks.length === 0 }>
|
||||
<td class="table__td center" colspan="6">
|
||||
Nothing found
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
export default
|
||||
{
|
||||
state: {
|
||||
tasks: []
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
onMounted()
|
||||
{
|
||||
this.getTasks()
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
getTasks()
|
||||
{
|
||||
fetch('/api/task', (response) => {
|
||||
this.state.tasks = response.data
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
handleDelete(event, action)
|
||||
{
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
handleEdit(event, action)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</app-tasks>
|
@ -0,0 +1,34 @@
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* @author Björn Hase
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
import observable from '@riotjs/observable'
|
||||
|
||||
export default observable(
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param {object} data
|
||||
*
|
||||
*/
|
||||
toggle(data)
|
||||
{
|
||||
this.trigger('toggle-form')
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {object} data
|
||||
*
|
||||
*/
|
||||
edit(data)
|
||||
{
|
||||
this.trigger('edit-form', data)
|
||||
}
|
||||
|
||||
})
|
@ -0,0 +1,15 @@
|
||||
{% layout 'layout.liquid' %}
|
||||
|
||||
{% block app_main %}
|
||||
<div class="container">
|
||||
<div class="grid justify-center">
|
||||
<div class="col-12 col-md-8">
|
||||
<app-login></app-login>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script async src="/js/app.js"></script>
|
||||
{% endblock %}
|
@ -0,0 +1,109 @@
|
||||
import DOMPurify from 'isomorphic-dompurify'
|
||||
import ActionRepository from './../../repositories/actionRepository.js'
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Björn Hase, me@herr-hase.wtf
|
||||
* @license http://opensource.org/licenses/MIT The MIT License
|
||||
* @link https://gitea.node001.net/HerrHase/super-hog
|
||||
*
|
||||
*/
|
||||
|
||||
export default async function(fastify, opts)
|
||||
{
|
||||
const actionRepository = new ActionRepository()
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {object} request
|
||||
* @param {object} response
|
||||
*
|
||||
*/
|
||||
fastify.get('/action', async function (request, reply)
|
||||
{
|
||||
// getting actions
|
||||
const actions = await actionRepository.find({ 'selector': {
|
||||
'type': 'action'
|
||||
}})
|
||||
|
||||
// send 200 and send set-token
|
||||
reply
|
||||
.code(200)
|
||||
.send({
|
||||
'data': actions
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {object} request
|
||||
* @param {object} response
|
||||
*
|
||||
*/
|
||||
fastify.post('/action', async function (request, reply)
|
||||
{
|
||||
// getting actions
|
||||
const action = await actionRepository.create()
|
||||
|
||||
// send 200 and send set-token
|
||||
reply
|
||||
.code(200)
|
||||
.send({
|
||||
'data': action
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {object} request
|
||||
* @param {object} response
|
||||
*
|
||||
*/
|
||||
fastify.put('/action/:id', async function (request, reply)
|
||||
{
|
||||
// getting actions
|
||||
const action = await actionRepository.update({
|
||||
|
||||
})
|
||||
|
||||
// send 200 and send set-token
|
||||
reply
|
||||
.code(200)
|
||||
.send({
|
||||
'data': action
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
* delete single action
|
||||
*
|
||||
*
|
||||
* @param {object} request
|
||||
* @param {object} response
|
||||
*
|
||||
*/
|
||||
fastify.delete('/action/:id', async function (request, reply)
|
||||
{
|
||||
// getting actions
|
||||
const action = await actionRepository.findOne({
|
||||
'id': request.query.id
|
||||
})
|
||||
|
||||
if (!action) {
|
||||
return reply
|
||||
.code(404)
|
||||
.send()
|
||||
}
|
||||
|
||||
// send 200 and send set-token
|
||||
reply
|
||||
.code(200)
|
||||
.send({
|
||||
'success': true
|
||||
})
|
||||
})
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
import Repository from './repository.js'
|
||||
|
||||
/**
|
||||
* Action
|
||||
*
|
||||
* @author Björn Hase, me@herr-hase.wtf
|
||||
* @license http://opensource.org/licenses/MIT The MIT License
|
||||
* @link https://gitea.node001.net/HerrHase/super-hog
|
||||
*
|
||||
*/
|
||||
|
||||
class ActionRepository extends Repository
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
super()
|
||||
this.type = 'action'
|
||||
|
||||
this.index.push('id')
|
||||
this.index.push('name')
|
||||
}
|
||||
}
|
||||
|
||||
export default ActionRepository
|
@ -0,0 +1,166 @@
|
||||
import PouchDB from 'pouchdb'
|
||||
import PouchDBfind from 'pouchdb-find'
|
||||
|
||||
/**
|
||||
* Repository
|
||||
*
|
||||
* @author Björn Hase, me@herr-hase.wtf
|
||||
* @license http://opensource.org/licenses/MIT The MIT License
|
||||
* @link https://gitea.node001.net/HerrHase/super-hog
|
||||
*
|
||||
*/
|
||||
|
||||
class Repository
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
PouchDB.plugin(PouchDBfind)
|
||||
this.db = new PouchDB('./../../storage/database', {
|
||||
revs_limit: 0
|
||||
})
|
||||
|
||||
// adding index
|
||||
this.index = [
|
||||
'type'
|
||||
]
|
||||
|
||||
if (this.index && this.index.lenth > 0) {
|
||||
this.addIndex(this.index)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* add index
|
||||
*
|
||||
* @param {array} fields
|
||||
*
|
||||
*/
|
||||
async addIndex(fields)
|
||||
{
|
||||
try {
|
||||
await this.db.createIndex({
|
||||
index: {
|
||||
fields: fields
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {array} data
|
||||
* @param {function} success
|
||||
*
|
||||
*/
|
||||
create(data)
|
||||
{
|
||||
//data._id = uuidv4()
|
||||
data.type = this.type
|
||||
|
||||
// if beforeCreate exists
|
||||
if (typeof this['beforeCreate'] === 'function') {
|
||||
data = this.beforeCreate(data)
|
||||
}
|
||||
|
||||
return this.db.post(data)
|
||||
.then((response) => {
|
||||
|
||||
console.log(response)
|
||||
|
||||
// if afterCreate exists
|
||||
if (typeof this['afterCreate'] === 'function') {
|
||||
this.afterCreate(response)
|
||||
}
|
||||
|
||||
return response
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {array} data
|
||||
* @param {function} success
|
||||
*
|
||||
*/
|
||||
update(data)
|
||||
{
|
||||
// if beforeUpdate exists
|
||||
if (typeof this['beforeUpdate'] === 'function') {
|
||||
data = this.beforeUpdate(data)
|
||||
}
|
||||
|
||||
return this.db.put(data)
|
||||
.then((response) => {
|
||||
|
||||
// if beforeUpdate exists
|
||||
if (typeof this['afterUpdate'] === 'function') {
|
||||
this.afterUpdate(response)
|
||||
}
|
||||
|
||||
return response
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {string} id
|
||||
* @param {function} success
|
||||
*
|
||||
*/
|
||||
remove(id, success)
|
||||
{
|
||||
this.db.get(id).then((documents) => {
|
||||
|
||||
// if beforeUpdate exists
|
||||
if (typeof this['beforeRemove'] === 'function') {
|
||||
this.beforeRemove(documents)
|
||||
}
|
||||
|
||||
this.db.remove(documents, {}, success)
|
||||
|
||||
// if beforeUpdate exists
|
||||
if (typeof this['afterRemove'] === 'function') {
|
||||
this.afterRemove(documents)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* find documents
|
||||
*
|
||||
* @param {object} fields
|
||||
* @param {object} query
|
||||
* @param {function} success
|
||||
*/
|
||||
find(query)
|
||||
{
|
||||
return this.db.find(query).then((documents) => {
|
||||
return documents.docs
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* find documents
|
||||
*
|
||||
* @param {object} fields
|
||||
* @param {object} query
|
||||
* @param {function} success
|
||||
*/
|
||||
findOne(query)
|
||||
{
|
||||
return this.db.find(query).then((documents) => {
|
||||
if (documents.docs.length === 0) {
|
||||
return null
|
||||
} else {
|
||||
return documents.docs[0]
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default Repository
|
@ -0,0 +1,70 @@
|
||||
import Repository from './repository.js'
|
||||
import bcrypt from 'bcrypt'
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Björn Hase, me@herr-hase.wtf
|
||||
* @license http://opensource.org/licenses/MIT The MIT License
|
||||
* @link https://gitea.node001.net/HerrHase/super-hog
|
||||
*
|
||||
*/
|
||||
|
||||
class UserRepository extends Repository
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
super()
|
||||
this.type = 'user'
|
||||
|
||||
this.index.push('username')
|
||||
this.index.push('sessionId')
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {[type]} data
|
||||
* @return {[type]}
|
||||
*/
|
||||
beforeCreate(data)
|
||||
{
|
||||
if (data.password) {
|
||||
const salt = bcrypt.genSaltSync(15)
|
||||
data.password = bcrypt.hashSync(data.password, salt)
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* getting user by username
|
||||
*
|
||||
* @param {string} username
|
||||
* @return {promise}
|
||||
*/
|
||||
async findOneByUsername(username)
|
||||
{
|
||||
return this.findOne({
|
||||
'selector': {
|
||||
'username': username
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* getting user by sessionToken
|
||||
*
|
||||
* @param {string} sessionToken
|
||||
* @return {promise}
|
||||
*/
|
||||
findOneBySessionId(sessionId)
|
||||
{
|
||||
return this.findOne({
|
||||
'selector': {
|
||||
'sessionId': sessionId
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default UserRepository
|
@ -0,0 +1,19 @@
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
export default {
|
||||
schema: {
|
||||
body: {
|
||||
username: { type: 'string' },
|
||||
password: { type: 'string' }
|
||||
},
|
||||
response: {
|
||||
200: {
|
||||
type: 'object'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,93 @@
|
||||
Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
@ -0,0 +1,233 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex, noarchive">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<title>Transfonter demo</title>
|
||||
<link href="stylesheet.css" rel="stylesheet">
|
||||
<style>
|
||||
/*
|
||||
http://meyerweb.com/eric/tools/css/reset/
|
||||
v2.0 | 20110126
|
||||
License: none (public domain)
|
||||
*/
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
/* demo styles */
|
||||
body {
|
||||
background: #f0f0f0;
|
||||
color: #000;
|
||||
}
|
||||
.page {
|
||||
background: #fff;
|
||||
width: 920px;
|
||||
margin: 0 auto;
|
||||
padding: 20px 20px 0 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.font-container {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
margin-bottom: 40px;
|
||||
line-height: 1.3;
|
||||
white-space: nowrap;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
h1 {
|
||||
position: relative;
|
||||
background: #444;
|
||||
font-size: 32px;
|
||||
color: #fff;
|
||||
padding: 10px 20px;
|
||||
margin: 0 -20px 12px -20px;
|
||||
}
|
||||
.letters {
|
||||
font-size: 25px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.s10:before {
|
||||
content: '10px';
|
||||
}
|
||||
.s11:before {
|
||||
content: '11px';
|
||||
}
|
||||
.s12:before {
|
||||
content: '12px';
|
||||
}
|
||||
.s14:before {
|
||||
content: '14px';
|
||||
}
|
||||
.s18:before {
|
||||
content: '18px';
|
||||
}
|
||||
.s24:before {
|
||||
content: '24px';
|
||||
}
|
||||
.s30:before {
|
||||
content: '30px';
|
||||
}
|
||||
.s36:before {
|
||||
content: '36px';
|
||||
}
|
||||
.s48:before {
|
||||
content: '48px';
|
||||
}
|
||||
.s60:before {
|
||||
content: '60px';
|
||||
}
|
||||
.s72:before {
|
||||
content: '72px';
|
||||
}
|
||||
.s10:before, .s11:before, .s12:before, .s14:before,
|
||||
.s18:before, .s24:before, .s30:before, .s36:before,
|
||||
.s48:before, .s60:before, .s72:before {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
color: #999;
|
||||
padding-right: 6px;
|
||||
}
|
||||
pre {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding: 9px;
|
||||
margin: 0 0 10px;
|
||||
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
font-size: 13px;
|
||||
line-height: 1.428571429;
|
||||
color: #333;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #ccc;
|
||||
overflow-x: auto;
|
||||
border-radius: 4px;
|
||||
}
|
||||
pre:after {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
content: 'Usage';
|
||||
line-height: 1;
|
||||
padding: 5px 8px;
|
||||
font-size: 12px;
|
||||
color: #767676;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border-right: none;
|
||||
border-top: none;
|
||||
border-radius: 0 4px 0 4px;
|
||||
z-index: 10;
|
||||
}
|
||||
/* responsive */
|
||||
@media (max-width: 959px) {
|
||||
.page {
|
||||
width: auto;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<div class="demo">
|
||||
<h1 style="font-family: 'IBM Plex Mono'; font-weight: normal; font-style: normal;">IBM Plex Mono</h1>
|
||||
<pre>.your-style {
|
||||
font-family: 'IBM Plex Mono';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}</pre>
|
||||
<div class="font-container" style="font-family: 'IBM Plex Mono'; font-weight: normal; font-style: normal;">
|
||||
<p class="letters">
|
||||
abcdefghijklmnopqrstuvwxyz<br>
|
||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
|
||||
0123456789.:,;()*!?'@#<>$%&^+-=~
|
||||
</p>
|
||||
<p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="demo">
|
||||
<h1 style="font-family: 'IBM Plex Mono'; font-weight: bold; font-style: normal;">IBM Plex Mono Bold</h1>
|
||||
<pre>.your-style {
|
||||
font-family: 'IBM Plex Mono';
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}</pre>
|
||||
<div class="font-container" style="font-family: 'IBM Plex Mono'; font-weight: bold; font-style: normal;">
|
||||
<p class="letters">
|
||||
abcdefghijklmnopqrstuvwxyz<br>
|
||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
|
||||
0123456789.:,;()*!?'@#<>$%&^+-=~
|
||||
</p>
|
||||
<p class="s10" style="font-size: 10px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s11" style="font-size: 11px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s12" style="font-size: 12px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s14" style="font-size: 14px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s18" style="font-size: 18px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s24" style="font-size: 24px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s30" style="font-size: 30px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s36" style="font-size: 36px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s48" style="font-size: 48px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s60" style="font-size: 60px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
<p class="s72" style="font-size: 72px;">The quick brown fox jumps over the lazy dog.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,24 @@
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Mono';
|
||||
src: url('IBMPlexMono.eot');
|
||||
src: url('IBMPlexMono.eot?#iefix') format('embedded-opentype'),
|
||||
url('IBMPlexMono.woff2') format('woff2'),
|
||||
url('IBMPlexMono.woff') format('woff'),
|
||||
url('IBMPlexMono.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Mono';
|
||||
src: url('IBMPlexMono-Bold.eot');
|
||||
src: url('IBMPlexMono-Bold.eot?#iefix') format('embedded-opentype'),
|
||||
url('IBMPlexMono-Bold.woff2') format('woff2'),
|
||||
url('IBMPlexMono-Bold.woff') format('woff'),
|
||||
url('IBMPlexMono-Bold.ttf') format('truetype');
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,13 @@
|
||||
(self["webpackChunkfrontend"] = self["webpackChunkfrontend"] || []).push([["spritemap"],{
|
||||
|
||||
/***/ "?c20d":
|
||||
/*!******************************!*\
|
||||
!*** spritemap-dummy-module ***!
|
||||
\******************************/
|
||||
/***/ (() => {
|
||||
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
MANIFEST-000033
|
@ -0,0 +1,5 @@
|
||||
2022/03/31-00:53:26.133389 7f0745274700 Recovering log #32
|
||||
2022/03/31-00:53:26.133482 7f0745274700 Level-0 table #34: started
|
||||
2022/03/31-00:53:26.141397 7f0745274700 Level-0 table #34: 237 bytes OK
|
||||
2022/03/31-00:53:26.161662 7f0745274700 Delete type=0 #32
|
||||
2022/03/31-00:53:26.161696 7f0745274700 Delete type=3 #30
|
@ -0,0 +1,5 @@
|
||||
2022/03/29-22:43:15.594165 7f0939d36700 Recovering log #28
|
||||
2022/03/29-22:43:15.594268 7f0939d36700 Level-0 table #31: started
|
||||
2022/03/29-22:43:15.602015 7f0939d36700 Level-0 table #31: 237 bytes OK
|
||||
2022/03/29-22:43:15.622567 7f0939d36700 Delete type=0 #28
|
||||
2022/03/29-22:43:15.622595 7f0939d36700 Delete type=3 #26
|
Binary file not shown.
Loading…
Reference in new issue