Skip to content

Instantly share code, notes, and snippets.

View nelsonsilva's full-sized avatar

Nelson Silva nelsonsilva

View GitHub Profile
@nelsonsilva
nelsonsilva / testmanagement.md
Last active July 5, 2021 09:20
QA - Test Management
@nelsonsilva
nelsonsilva / generate.sh
Created March 3, 2021 17:44
Static war
#!/bin/bash
# nuxeoctl configure is needed to process templates
docker run --rm \
-v $PWD/nuxeo.war:$NUXEO_HOME/nxserver/nuxeo.war \
docker-private.packages.nuxeo.com/nuxeo/nuxeo \
/bin/bash -c "$NUXEO_HOME/bin/nuxeoctl configure; java -cp $NUXEO_HOME/nxserver/bundles/*:$NUXEO_HOME/nxserver/lib/*:$NUXEO_HOME/lib/* -Dnuxeo.home="$NUXEO_HOME" org.nuxeo.runtime.deployment.preprocessor.DeploymentPreprocessor $NUXEO_HOME/nxserver"
@nelsonsilva
nelsonsilva / metrics.md
Last active January 19, 2021 12:23
Metrics dashboards

Analytics

Status

Simple online analytics built on top of our ES HTTP passthrough.

Nuxeo Data Visualization elements to expose a simple declarative DSL, ie:

 
@nelsonsilva
nelsonsilva / qa.md
Last active January 14, 2021 13:25
Web UI - QA

Web UI - QA

Unit tests

  • Easy, fast and cheap (mock services)
  • Cross browser

Current stack

  • Mocha + Chai
  • @nuxeo/testing-helpers
#!/bin/sh
# build kind cluster
if k3d ls | grep "k3s-nuxeo" >/dev/null; then
k3d delete -n k3s-nuxeo
fi
k3d create -n k3s-nuxeo -p 80:80 --wait 60
KUBECONFIG=$(k3d get-kubeconfig --name='k3s-nuxeo')
#!/bin/sh
# build kind cluster
if kind get clusters | grep "nuxeo" >/dev/null; then
kind delete cluster --name nuxeo
fi
# https://kind.sigs.k8s.io/docs/user/ingress/#create-cluster
cat <<EOF | kind create cluster --wait 2m --name nuxeo --config=-
kind: Cluster

Nuxeo Elements - 2014

Problem Statement

Allow building Nuxeo web applications with modern web frameworks. Frontend developers know HTML, JS and CSS we need to make it easier for them to built Nuxeo apps.

Nuxeo Approach

Provide the tools and the building blocks to do so

// Time between pages
const TIMEOUT = 5 * 1000;
// https://chromedevtools.github.io/devtools-protocol/
const BASE = 'http://localhost:9222';
const open = url => fetch(`${BASE}/json/new?${url}`).then(r => r.json());
const activate = target => fetch(`${BASE}/json/activate/${target.id}`);
const ws = target => new Promise(resolve => (new WebSocket(target.webSocketDebuggerUrl).onopen = e => resolve(e.target)));
const reload = target => ws(target).then(c => c.send(JSON.stringify({id: 0, method: 'Page.reload'})));
@nelsonsilva
nelsonsilva / import-href.js
Created December 11, 2018 09:39
import-href.js
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
<dom-module id="nuxeo-grid">
<template>
<style>
:host {
display: block;
@apply(--paper-font-common-base);
}
iron-list {