Skip to content

Instantly share code, notes, and snippets.

View sapiens-sapide's full-sized avatar

Stanislas SABATIER sapiens-sapide

View GitHub Profile
{
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.36"
},
"pages": [
{
"startedDateTime": "2018-05-16T14:26:31.056Z",
{
"startedDateTime": "2018-05-16T14:55:41.910Z",
"time": 53.857722962566186,
"request": {
"method": "PATCH",
"url": "https://alpha.caliopen.org/api/v1/messages/4ad121fd-9ca1-4cb7-8a42-ee318d66da76",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Cookie",
@sapiens-sapide
sapiens-sapide / payload
Created February 16, 2018 14:29
post new user
{
"username": "dave",
"password": "123456",
"recovery_email": "dave@tt.tt",
"settings": {
"default_locale": "fr",
"message_display_format": "rich_text",
"contact_display_format": "given_name, family_name",
"contact_display_order": "given_name",
"notification_enabled": true,
@sapiens-sapide
sapiens-sapide / Add a Cache to ES backend struct
Last active February 15, 2018 05:42
shard index implementation
ElasticSearchBackend struct {
ElasticSearchConfig
Client *elastic.Client
Cache APICache // put a ShardsCache struct at ElasticSearchBackend initialization
}
# -*- coding: utf-8 -*-
"""Caliopen user message qualification logic."""
from __future__ import absolute_import, print_function, unicode_literals
import logging
from caliopen_storage.config import Configuration
from caliopen_main.contact.parameters import NewPublicKey as NewKeyParam
from caliopen_main.pi.parameters import PIParameter
type DeviceLocation struct {
// PRIMARY KEYS (device_id, ip_address)
Country string `cql:"country" json:"country,omitempty"`
DeviceId UUID `cql:"device_id" json:"device_id"`
IpAddress string `cql:"ip_address" json:"ip_address,omitempty"`
PrivacyFeatures *PrivacyFeatures `cql:"privacy_features" json:"privacy_features,omitempty"`
Type string `cql:"type" json:"type,omitempty"`
}
@ ./src/hoc/user.js 12:12-46
@ ./src/scenes/UserProfile/index.js
@ ./src/routes.jsx
@ ./src/App.jsx
@ ./src/index.jsx
@ multi ./src/index.jsx
ERROR in ./src/layouts/Page/components/TakeATour/presenter.jsx
/usr/local/goland/src/github.com/CaliOpen/Caliopen/src/frontend/web_application/src/layouts/Page/components/TakeATour/presenter.jsx
[start:dev:server]
[start:dev:server] ERROR in ./server/express-react/create-engine.js
[start:dev:server] Module not found: Error: Can't resolve '../../dist/server/template.html' in '/usr/local/goland/src/github.com/CaliOpen/Caliopen/src/frontend/web_application/server/express-react'
[start:dev:server] @ ./server/express-react/create-engine.js 5:15-57
[start:dev:server] @ ./server/express-react/index.js
[start:dev:server] @ ./server/app.js
[start:dev:server] @ ./server/index.js
[start:dev:server] @ multi babel-polyfill ./server/index.js
[start:dev:server]
[start:dev:server] ERROR in ./server/ssr/ssr-middleware.js
83 et suiv. :
pi = Nested(doc_class=PIIndexModel, include_in_all=True,
properties={
"technic": Integer(),
"comportment": Integer(),
"context": Integer(),
"version": Integer(),
"date_update": Date()
})
m.field("pi", pi)
13 : from elasticsearch_dsl import InnerObjectWrapper, Integer, Date
35 : version = Integer()
36 : date_update = Date()