commit
423d2655b6
1546 changed files with 248297 additions and 0 deletions
@ -0,0 +1,47 @@ |
|||
# Título del Proyecto |
|||
|
|||
_Acá va un párrafo que describa lo que es el proyecto_ |
|||
|
|||
## Comenzando 🚀 |
|||
|
|||
_Estas instrucciones te permitirán obtener una copia del proyecto en funcionamiento en tu máquina local para propósitos de desarrollo y pruebas._ |
|||
|
|||
Mira **Deployment** para conocer como desplegar el proyecto. |
|||
|
|||
|
|||
### Pre-requisitos 📋 |
|||
|
|||
_Que cosas necesitas para instalar el software y como instalarlas_ |
|||
|
|||
``` |
|||
Da un ejemplo |
|||
``` |
|||
|
|||
### Instalación 🔧 |
|||
|
|||
_Una serie de ejemplos paso a paso que te dice lo que debes ejecutar para tener un entorno de desarrollo ejecutandose_ |
|||
|
|||
_Dí cómo será ese paso_ |
|||
|
|||
``` |
|||
Da un ejemplo |
|||
``` |
|||
|
|||
_Y repite_ |
|||
|
|||
``` |
|||
hasta finalizar |
|||
``` |
|||
|
|||
_Finaliza con un ejemplo de cómo obtener datos del sistema o como usarlos para una pequeña demo_ |
|||
|
|||
|
|||
## Autores ✒️ |
|||
|
|||
|
|||
* **Matias Gonzalez** - desarrollo de script y documentación - [matias.gonzalez](http://fabrica.faniot.ar:90/matias.gonzalez) |
|||
|
|||
|
|||
|
|||
|
|||
--- |
|||
@ -0,0 +1,5 @@ |
|||
//DB_CREDENTIALS |
|||
DB_HOST = '192.168.1.2' |
|||
DB_USER = 'aplication' |
|||
DB_PASS = 'passApp' |
|||
|
|||
@ -0,0 +1,5 @@ |
|||
FROM node:latest |
|||
WORKDIR /app |
|||
COPY . . |
|||
RUN npm install |
|||
CMD ["node","server.js"] |
|||
@ -0,0 +1,34 @@ |
|||
//Mock de base de datos
|
|||
const store = require("./store"); |
|||
|
|||
function addDevice(chip_id, product_id) { |
|||
return new Promise((resolve, reject) => { |
|||
if (!chip_id || !product_id) { |
|||
console.error( |
|||
"[deviceController]: No se cargaron todos los datos del disposivo!" |
|||
); |
|||
reject("No se cargaron todos los datos del dispositivo!"); |
|||
} |
|||
|
|||
const device = { |
|||
chip_id: chip_id, |
|||
product_id: product_id |
|||
}; |
|||
|
|||
//store.add(device);
|
|||
resolve(store.add(device)); |
|||
}); |
|||
} |
|||
|
|||
function getDevices(filterDevices) { |
|||
return new Promise((resolve, reject) => { |
|||
resolve(store.list(filterDevices)); |
|||
}); |
|||
} |
|||
|
|||
|
|||
module.exports = { |
|||
addDevice, |
|||
getDevices, |
|||
|
|||
}; |
|||
@ -0,0 +1,50 @@ |
|||
//Se declara express
|
|||
const express = require("express"); |
|||
|
|||
//Se inicializa express
|
|||
var app = express(); |
|||
|
|||
//Response
|
|||
const response = require("../../network/response"); |
|||
|
|||
//Agrega controlador
|
|||
const controller = require("./controller"); |
|||
|
|||
|
|||
app.get("/", async function (req, res) { |
|||
try { |
|||
const filterDevices = req.query.id || null; |
|||
const devicesList = await controller.getDevices(filterDevices); |
|||
response.success(req, res, devicesList, 201); |
|||
} catch (error) { |
|||
response.error(req, res, error, 401); |
|||
} |
|||
}); |
|||
|
|||
|
|||
//redirecciona a metodo POST
|
|||
app.post("/", async (req, res) => { |
|||
try { |
|||
console.log(req.body.chip_id) |
|||
console.log(req.body.product_id) |
|||
|
|||
const newDevice = await controller.addDevice(req.body.chip_id, req.body.product_id); |
|||
console.log(newDevice) |
|||
if(newDevice == 'ER_DUP_ENTRY'){ |
|||
response.error(req, res, 'Ya existe un dispositivo con el mismo CHIP ID!', 400); |
|||
console.log('Ya existe en la BD') |
|||
}else if(newDevice == 'nohayfirmware'){ |
|||
response.error(req, res, 'No existe un firmware asociado al producto!', 400); |
|||
console.log('No hay firmware') |
|||
}else{ |
|||
response.success(req, res, 'Dispositivo agregado!', 201); |
|||
} |
|||
} catch (error) { |
|||
response.error(req, res, error, 401); |
|||
console.log('Salió del try') |
|||
} |
|||
}); |
|||
|
|||
|
|||
|
|||
module.exports = app; |
|||
@ -0,0 +1,58 @@ |
|||
//Se declara express
|
|||
const express = require("express"); |
|||
const res = require("express/lib/response"); |
|||
|
|||
//Se inicializa express
|
|||
var app = express(); |
|||
|
|||
//Conexión MariaDB
|
|||
const pool = require('../../db') |
|||
|
|||
//Agrega el mensaje a la BD
|
|||
async function addDevice(device) { |
|||
try{ |
|||
//Se utiliza solo pool.query porque se necesita solo realizar una consulta y cerrar la conexión a la BD
|
|||
//pool.getConnection() deja abierta la conexión y luego de unos segundos crashea por no utilizarla
|
|||
//const conn = await pool.getConnection();
|
|||
|
|||
|
|||
//Se listan todos los firmwares de ese producto
|
|||
const listFirmwares = await pool.query(`SELECT firmware_id FROM main_database.firmwares WHERE product_id = ${device.product_id} ORDER BY date DESC`); |
|||
|
|||
//Se filtra el último firmware subido a ese dispositivo
|
|||
const lastFirmware = listFirmwares[0].firmware_id; |
|||
const rows = await pool.query(`INSERT INTO main_database.devices (chip_id, product_id, firmware_id_act, firmware_id_update) VALUES ('${device.chip_id}', ${device.product_id}, ${lastFirmware}, ${lastFirmware})`); |
|||
console.log(lastFirmware) |
|||
return rows; |
|||
}catch(err){ |
|||
if(err.code == 'ER_DUP_ENTRY'){ |
|||
return err.code |
|||
}else{ |
|||
return 'nohayfirmware'; |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
async function getDevices(filterDevices) { |
|||
console.log(filterDevices); |
|||
var myQuery = 'SELECT * FROM main_database.devices'; |
|||
if(filterDevices != null){ |
|||
myQuery += ` WHERE product_id = ${filterDevices} ORDER BY device_id DESC`; |
|||
}else{ |
|||
myQuery += ' ORDER BY device_id DESC'; |
|||
} |
|||
return new Promise(async (resolve, reject) => { |
|||
//const conn = await pool.getConnection();
|
|||
const rows = await pool.query(myQuery); |
|||
resolve(rows); |
|||
}); |
|||
} |
|||
|
|||
|
|||
module.exports = { |
|||
add: addDevice, |
|||
list: getDevices, |
|||
|
|||
}; |
|||
@ -0,0 +1,38 @@ |
|||
//Mock de base de datos
|
|||
const store = require("./store"); |
|||
|
|||
function addFirmware(productID, label, version, filepath) { |
|||
return new Promise((resolve, reject) => { |
|||
if (!productID || !label || !version || !filepath) { |
|||
console.error( |
|||
"[firmwareController]: No se cargaron todos los datos del firmware!" |
|||
); |
|||
reject("No se cargaron todos los datos del firmware!"); |
|||
} |
|||
const path = '/data/binarios/' + filepath; |
|||
const firmware = { |
|||
productID: productID, |
|||
label: label, |
|||
version: version, |
|||
filepath: path |
|||
} |
|||
|
|||
resolve(store.add(firmware)); |
|||
}); |
|||
} |
|||
|
|||
function getFirmwares() { |
|||
return new Promise((resolve, reject) => { |
|||
resolve(store.list()); |
|||
}); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
module.exports = { |
|||
addFirmware, |
|||
getFirmwares, |
|||
|
|||
}; |
|||
@ -0,0 +1,67 @@ |
|||
//Se declara express
|
|||
const express = require("express"); |
|||
|
|||
//Se inicializa express
|
|||
var app = express(); |
|||
|
|||
//Response
|
|||
const response = require("../../network/response"); |
|||
|
|||
//Agrega controlador
|
|||
const controller = require("./controller"); |
|||
|
|||
//subir archivos
|
|||
const multer = require("multer"); |
|||
|
|||
const storage = multer.diskStorage({ |
|||
destination: function (req, file, cb) { |
|||
cb(null, '/app/public/binaries') |
|||
}, |
|||
filename: function (req, file, cb) { |
|||
cb(null, file.originalname) |
|||
} |
|||
}) |
|||
|
|||
const upload = multer({storage: storage}); |
|||
|
|||
|
|||
|
|||
app.get("/", async function (req, res) { |
|||
try { |
|||
|
|||
const firmwaresList = await controller.getFirmwares(); |
|||
response.success(req, res, firmwaresList, 201); |
|||
} catch (error) { |
|||
response.error(req, res, error, 401); |
|||
} |
|||
}); |
|||
|
|||
|
|||
//redirecciona a metodo POST
|
|||
app.post("/", upload.single("bin"), async (req, res) => { |
|||
try { |
|||
console.log("Este es el bin: " + req.file); |
|||
console.log("Este es el ID: " + req.body.productID) |
|||
const newFirmware = await controller.addFirmware( |
|||
req.body.productID, |
|||
req.body.label, |
|||
req.body.version, |
|||
req.file.originalname |
|||
); |
|||
console.log('network: ' + newFirmware) |
|||
|
|||
if(newFirmware == 'ER_DUP_ENTRY'){ |
|||
response.error(req, res, 'Ya existe un binario con el mismo nombre en la BD', 400); |
|||
}else{ |
|||
response.success(req, res, 'Binario subido exitosamente!', 201); |
|||
} |
|||
|
|||
} catch (error) { |
|||
response.error(req, res, error, 401); |
|||
} |
|||
}); |
|||
|
|||
|
|||
|
|||
|
|||
module.exports = app; |
|||
@ -0,0 +1,42 @@ |
|||
//Se declara express
|
|||
const express = require("express"); |
|||
|
|||
//Se inicializa express
|
|||
var app = express(); |
|||
|
|||
//Conexión MariaDB
|
|||
const pool = require('../../db') |
|||
|
|||
const response = require("../../network/response"); |
|||
|
|||
|
|||
async function addFirmware(firmware) { |
|||
//const conn = await pool.getConnection();
|
|||
try{ |
|||
const rows = await pool.query(`INSERT INTO main_database.firmwares (product_id, firmware_version, etiqueta, filepath) VALUES ('${firmware.productID}', '${firmware.version}', '${firmware.label}', '${firmware.filepath}') RETURNING firmware_id`); |
|||
const newFirmware = rows[0].firmware_id; |
|||
console.log(newFirmware) |
|||
const updateDevices = await pool.query(`UPDATE main_database.devices SET firmware_id_update = ${newFirmware} WHERE product_id = ${firmware.productID}`); |
|||
console.log(updateDevices) |
|||
return rows; |
|||
}catch(err){ |
|||
return err.code; |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
async function getFirmwares() { |
|||
return new Promise(async (resolve, reject) => { |
|||
//const conn = await pool.getConnection();
|
|||
const rows = await pool.query(`SELECT * FROM main_database.firmwares`); |
|||
resolve(rows); |
|||
}); |
|||
} |
|||
|
|||
|
|||
module.exports = { |
|||
add: addFirmware, |
|||
list: getFirmwares, |
|||
|
|||
}; |
|||
@ -0,0 +1,28 @@ |
|||
//Mock de base de datos
|
|||
const store = require("./store"); |
|||
|
|||
function addProduct(name) { |
|||
return new Promise((resolve, reject) => { |
|||
if (!name) { |
|||
console.error( |
|||
"[productController]: No se cargó el nombre del producto!" |
|||
); |
|||
reject("Los datos son incorrectos!"); |
|||
} |
|||
const product = name; |
|||
resolve(store.add(product)); |
|||
}); |
|||
} |
|||
|
|||
function getProducts() { |
|||
return new Promise((resolve, reject) => { |
|||
resolve(store.list()); |
|||
}); |
|||
} |
|||
|
|||
|
|||
module.exports = { |
|||
addProduct, |
|||
getProducts, |
|||
|
|||
}; |
|||
@ -0,0 +1,37 @@ |
|||
//Se declara express
|
|||
const express = require("express"); |
|||
|
|||
//Se inicializa express
|
|||
var app = express(); |
|||
|
|||
//Response
|
|||
const response = require("../../network/response"); |
|||
|
|||
//Agrega controlador
|
|||
const controller = require("./controller"); |
|||
|
|||
|
|||
app.get("/", async function (req, res) { |
|||
try { |
|||
const productsList = await controller.getProducts(); |
|||
response.success(req, res, productsList, 201); |
|||
} catch (error) { |
|||
response.error(req, res, error, 401); |
|||
} |
|||
}); |
|||
|
|||
|
|||
//redirecciona a metodo POST
|
|||
app.post("/", async (req, res) => { |
|||
try { |
|||
console.log(req.body.name) |
|||
const newProduct = await controller.addProduct(req.body.name); |
|||
response.success(req, res, newProduct, 201); |
|||
} catch (error) { |
|||
response.error(req, res, error, 401); |
|||
} |
|||
}); |
|||
|
|||
|
|||
|
|||
module.exports = app; |
|||
@ -0,0 +1,42 @@ |
|||
//Se declara express
|
|||
const express = require("express"); |
|||
|
|||
//Se inicializa express
|
|||
var app = express(); |
|||
|
|||
//Conexión MariaDB
|
|||
const pool = require('../../db') |
|||
|
|||
const response = require("../../network/response"); |
|||
|
|||
//Agrega el mensaje a la BD
|
|||
async function addProduct(product) { |
|||
|
|||
//Se utiliza solo pool.query porque se necesita solo realizar una consulta y cerrar la conexión a la BD
|
|||
//pool.getConnection() deja abierta la conexión y luego de unos segundos crashea por no utilizarla
|
|||
|
|||
//const conn = await pool.getConnection();
|
|||
try{ |
|||
await pool.query(`INSERT INTO main_database.products (product) VALUES ('${product}')`); |
|||
return product; |
|||
}catch(err){ |
|||
console.log(err.text) |
|||
response.error(err.code, 401); |
|||
} |
|||
|
|||
} |
|||
|
|||
async function getProducts() { |
|||
return new Promise(async (resolve, reject) => { |
|||
//const conn = await pool.getConnection();
|
|||
const rows = await pool.query(`SELECT * FROM main_database.products ORDER BY product_id DESC`); |
|||
resolve(rows); |
|||
}); |
|||
} |
|||
|
|||
|
|||
module.exports = { |
|||
add: addProduct, |
|||
list: getProducts, |
|||
|
|||
}; |
|||
@ -0,0 +1,16 @@ |
|||
const mariadb = require('mariadb'); |
|||
require('dotenv').config(); |
|||
|
|||
const dbHost = process.env.DB_HOST; |
|||
const dbUser = process.env.DB_USER; |
|||
const dbPass = process.env.DB_PASS; |
|||
|
|||
const pool = mariadb.createPool( { |
|||
host: dbHost, |
|||
user:dbUser, |
|||
password: dbPass, |
|||
connectionLimit: 5 |
|||
}); |
|||
|
|||
|
|||
module.exports = pool; |
|||
@ -0,0 +1,17 @@ |
|||
exports.success = function (req, res, message, status){ |
|||
//Recibe parametro message y lo imprime
|
|||
res.status(status || 200).send({ |
|||
error: '', |
|||
body: message |
|||
}); |
|||
} |
|||
|
|||
exports.error = function (req, res, message, status, details){ |
|||
//Muestra los errores internos a través de un log para no darle tanta informacion al cliente
|
|||
//console.error(message);
|
|||
|
|||
res.status(status || 500).send({ |
|||
error: message, |
|||
body: '' |
|||
}); |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
const express = require('express'); |
|||
const product = require('../components/products/network'); |
|||
const firmware = require('../components/firmwares/network'); |
|||
const device = require('../components/devices/network') |
|||
|
|||
|
|||
const routes = function(server) { |
|||
server.use('/faniota/api/products', product) |
|||
server.use('/faniota/api/firmwares', firmware) |
|||
server.use('/faniota/api/devices', device) |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
module.exports = routes; |
|||
File diff suppressed because it is too large
@ -0,0 +1,27 @@ |
|||
{ |
|||
"name": "backend-node", |
|||
"version": "0.1.0", |
|||
"description": "Es un backend hecho con node y websockets", |
|||
"main": "server.js", |
|||
"scripts": { |
|||
"test": "echo \"Error: no test specified\" && exit 1" |
|||
}, |
|||
"keywords": [ |
|||
"chat", |
|||
"telegram", |
|||
"backend", |
|||
"node" |
|||
], |
|||
"author": "matijego", |
|||
"license": "MIT", |
|||
"dependencies": { |
|||
"body-parser": "^1.19.1", |
|||
"cors": "^2.8.5", |
|||
"dotenv": "^16.0.1", |
|||
"express": "^4.17.2", |
|||
"mariadb": "^3.0.0", |
|||
"mongoose": "^6.1.10", |
|||
"multer": "^1.4.4", |
|||
"socket.io": "^4.4.1" |
|||
} |
|||
} |
|||
Binary file not shown.
@ -0,0 +1,12 @@ |
|||
<!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.0"> |
|||
<title>Document</title> |
|||
</head> |
|||
<body> |
|||
<h1>Es un archivo estático!</h1> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,13 @@ |
|||
<!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.0"> |
|||
<title>Document</title> |
|||
</head> |
|||
<body> |
|||
<h1>una imagen</h1> |
|||
<img src="http://localhost:1997/app/images/supplies/7c993759144468fbff710bad57e8e931" alt="gg"> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,35 @@ |
|||
//Se declara express
|
|||
const express = require('express'); |
|||
const cors = require('cors'); |
|||
|
|||
//Se inicializa express
|
|||
const app = express(); |
|||
app.use(express.json()); |
|||
app.use(express.urlencoded({extended : false})); |
|||
|
|||
//WebSockets
|
|||
/* const server = require('http').Server(app); |
|||
const socket = require('./socket') |
|||
socket.connect(server); */ |
|||
app.use(cors()) |
|||
|
|||
/* //Declara la base de datos |
|||
const db = require('./db') |
|||
db('mongodb://localhost:27017/fanstock') */ |
|||
|
|||
|
|||
//Inicializa componentes
|
|||
//const router = require('./components/messages/network');
|
|||
const router = require('./network/routes'); |
|||
|
|||
|
|||
//Archivos estáticos
|
|||
app.use('/app', express.static('public')); |
|||
|
|||
//Inicializa las rutas
|
|||
router(app); |
|||
|
|||
//Configura el puerto
|
|||
app.listen(1997, function (){ |
|||
console.log('El back está corriendo en el puerto 1997'); |
|||
}); |
|||
@ -0,0 +1,140 @@ |
|||
## custom configuration file, please be aware that changing options here may break things |
|||
|
|||
[mysqld_safe] |
|||
nice = 0 |
|||
|
|||
[mysqld] |
|||
character-set-server = utf8 |
|||
max_connections = 100 |
|||
connect_timeout = 5 |
|||
wait_timeout = 600 |
|||
max_allowed_packet = 16M |
|||
thread_cache_size = 128 |
|||
sort_buffer_size = 4M |
|||
bulk_insert_buffer_size = 16M |
|||
tmp_table_size = 32M |
|||
max_heap_table_size = 32M |
|||
binlog_format=mixed |
|||
# |
|||
# * MyISAM |
|||
# |
|||
# This replaces the startup script and checks MyISAM tables if needed |
|||
# the first time they are touched. On error, make copy and try a repair. |
|||
myisam_recover_options = BACKUP |
|||
key_buffer_size = 128M |
|||
#open-files-limit = 2000 |
|||
table_open_cache = 400 |
|||
myisam_sort_buffer_size = 512M |
|||
concurrent_insert = 2 |
|||
read_buffer_size = 2M |
|||
read_rnd_buffer_size = 1M |
|||
# |
|||
# * Query Cache Configuration |
|||
# |
|||
# Cache only tiny result sets, so we can fit more in the query cache. |
|||
query_cache_limit = 128K |
|||
query_cache_size = 64M |
|||
# for more write intensive setups, set to DEMAND or OFF |
|||
#query_cache_type = DEMAND |
|||
# |
|||
# * Logging and Replication |
|||
# |
|||
# Both location gets rotated by the cronjob. |
|||
# Be aware that this log type is a performance killer. |
|||
# As of 5.1 you can enable the log at runtime! |
|||
#general_log_file = /config/log/mysql/mysql.log |
|||
#general_log = 1 |
|||
# |
|||
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf. |
|||
# |
|||
# we do want to know about network errors and such |
|||
log_warnings = 2 |
|||
# |
|||
# Enable the slow query log to see queries with especially long duration |
|||
#slow_query_log[={0|1}] |
|||
slow_query_log_file = /config/log/mysql/mariadb-slow.log |
|||
long_query_time = 10 |
|||
#log_slow_rate_limit = 1000 |
|||
log_slow_verbosity = query_plan |
|||
|
|||
#log-queries-not-using-indexes |
|||
#log_slow_admin_statements |
|||
# |
|||
# The following can be used as easy to replay backup logs or for replication. |
|||
# note: if you are setting up a replication slave, see README.Debian about |
|||
# other settings you may need to change. |
|||
#server-id = 1 |
|||
#report_host = master1 |
|||
#auto_increment_increment = 2 |
|||
#auto_increment_offset = 1 |
|||
log_bin = /config/log/mysql/mariadb-bin |
|||
log_bin_index = /config/log/mysql/mariadb-bin.index |
|||
# not fab for performance, but safer |
|||
#sync_binlog = 1 |
|||
expire_logs_days = 10 |
|||
max_binlog_size = 100M |
|||
# slaves |
|||
#relay_log = /config/log/mysql/relay-bin |
|||
#relay_log_index = /config/log/mysql/relay-bin.index |
|||
#relay_log_info_file = /config/log/mysql/relay-bin.info |
|||
#log_slave_updates |
|||
#read_only |
|||
# |
|||
# If applications support it, this stricter sql_mode prevents some |
|||
# mistakes like inserting invalid dates etc. |
|||
#sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL |
|||
# |
|||
# * InnoDB |
|||
# |
|||
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. |
|||
# Read the manual for more InnoDB related options. There are many! |
|||
default_storage_engine = InnoDB |
|||
# you can't just change log file size, requires special procedure |
|||
#innodb_log_file_size = 50M |
|||
innodb_buffer_pool_size = 256M |
|||
innodb_log_buffer_size = 8M |
|||
innodb_file_per_table = 1 |
|||
innodb_open_files = 400 |
|||
innodb_io_capacity = 400 |
|||
innodb_flush_method = O_DIRECT |
|||
# |
|||
# * Security Features |
|||
# |
|||
# Read the manual, too, if you want chroot! |
|||
# chroot = /var/lib/mysql/ |
|||
# |
|||
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". |
|||
# |
|||
# ssl-ca=/etc/mysql/cacert.pem |
|||
# ssl-cert=/etc/mysql/server-cert.pem |
|||
# ssl-key=/etc/mysql/server-key.pem |
|||
|
|||
# |
|||
# * Galera-related settings |
|||
# |
|||
[galera] |
|||
# Mandatory settings |
|||
#wsrep_on=ON |
|||
#wsrep_provider= |
|||
#wsrep_cluster_address= |
|||
#default_storage_engine=InnoDB |
|||
#innodb_autoinc_lock_mode=2 |
|||
# |
|||
# Allow server to accept connections on all interfaces. |
|||
# |
|||
#bind-address=0.0.0.0 |
|||
# |
|||
# Optional setting |
|||
#wsrep_slave_threads=1 |
|||
#innodb_flush_log_at_trx_commit=0 |
|||
|
|||
[mysqldump] |
|||
quick |
|||
quote-names |
|||
max_allowed_packet = 16M |
|||
|
|||
[mysql] |
|||
#no-auto-rehash # faster start of mysql but no tab completion |
|||
|
|||
[isamchk] |
|||
key_buffer_size = 16M |
|||
File diff suppressed because it is too large
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,2 @@ |
|||
default-character-set=utf8mb4 |
|||
default-collation=utf8mb4_general_ci |
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,16 @@ |
|||
TYPE=VIEW |
|||
query=select `main_database`.`firmwares`.`firmware_id` AS `firmware_id`,`main_database`.`firmwares`.`filepath` AS `filepath`,`main_database`.`firmwares`.`etiqueta` AS `etiqueta`,`main_database`.`products`.`product` AS `product`,`main_database`.`devices`.`product_id` AS `product_id`,`main_database`.`devices`.`chip_id` AS `chip_id` from ((`main_database`.`devices` join `main_database`.`firmwares` on(`main_database`.`devices`.`firmware_id_update` = `main_database`.`firmwares`.`firmware_id`)) join `main_database`.`products` on(`main_database`.`devices`.`product_id` = `main_database`.`products`.`product_id`)) |
|||
md5=2924f0f66852d1cee702f8a855488c29 |
|||
updatable=1 |
|||
algorithm=0 |
|||
definer_user=aplication |
|||
definer_host=% |
|||
suid=1 |
|||
with_check_option=0 |
|||
timestamp=2022-02-18 11:22:55 |
|||
create-version=2 |
|||
source=select `firmwares`.`firmware_id` AS `firmware_id`,`firmwares`.`filepath` AS `filepath`,`firmwares`.`etiqueta` AS `etiqueta`,`products`.`product` AS `product`,`devices`.`product_id` AS `product_id`,`devices`.`chip_id` AS `chip_id` from ((`devices` join `firmwares` on((`devices`.`firmware_id_update` = `firmwares`.`firmware_id`))) join `products` on((`devices`.`product_id` = `products`.`product_id`))) |
|||
client_cs_name=utf8mb4 |
|||
connection_cl_name=utf8mb4_general_ci |
|||
view_body_utf8=select `main_database`.`firmwares`.`firmware_id` AS `firmware_id`,`main_database`.`firmwares`.`filepath` AS `filepath`,`main_database`.`firmwares`.`etiqueta` AS `etiqueta`,`main_database`.`products`.`product` AS `product`,`main_database`.`devices`.`product_id` AS `product_id`,`main_database`.`devices`.`chip_id` AS `chip_id` from ((`main_database`.`devices` join `main_database`.`firmwares` on(`main_database`.`devices`.`firmware_id_update` = `main_database`.`firmwares`.`firmware_id`)) join `main_database`.`products` on(`main_database`.`devices`.`product_id` = `main_database`.`products`.`product_id`)) |
|||
mariadb-version=100513 |
|||
@ -0,0 +1,16 @@ |
|||
TYPE=VIEW |
|||
query=select `main_database`.`firmwares`.`filepath` AS `filepath`,`main_database`.`products`.`product` AS `product`,`main_database`.`firmwares`.`firmware_id` AS `firmware_id`,`main_database`.`products`.`product_id` AS `product_id` from (`main_database`.`firmwares` join `main_database`.`products` on(`main_database`.`products`.`product_id` = `main_database`.`firmwares`.`product_id`)) order by `main_database`.`firmwares`.`firmware_id` desc |
|||
md5=978a1ebe2892e80f4998591925ea81db |
|||
updatable=1 |
|||
algorithm=0 |
|||
definer_user=aplication |
|||
definer_host=% |
|||
suid=1 |
|||
with_check_option=0 |
|||
timestamp=2022-02-18 11:22:55 |
|||
create-version=2 |
|||
source=select `firmwares`.`filepath` AS `filepath`,`products`.`product` AS `product`,`firmwares`.`firmware_id` AS `firmware_id`,`products`.`product_id` AS `product_id` from (`firmwares` join `products` on((`products`.`product_id` = `firmwares`.`product_id`))) order by `firmwares`.`firmware_id` desc |
|||
client_cs_name=utf8mb4 |
|||
connection_cl_name=utf8mb4_general_ci |
|||
view_body_utf8=select `main_database`.`firmwares`.`filepath` AS `filepath`,`main_database`.`products`.`product` AS `product`,`main_database`.`firmwares`.`firmware_id` AS `firmware_id`,`main_database`.`products`.`product_id` AS `product_id` from (`main_database`.`firmwares` join `main_database`.`products` on(`main_database`.`products`.`product_id` = `main_database`.`firmwares`.`product_id`)) order by `main_database`.`firmwares`.`firmware_id` desc |
|||
mariadb-version=100513 |
|||
@ -0,0 +1,16 @@ |
|||
TYPE=VIEW |
|||
query=select `main_database`.`firmwares`.`firmware_id` AS `firmware_id`,`main_database`.`products`.`product` AS `product`,`main_database`.`products`.`product_id` AS `product_id` from (`main_database`.`firmwares` join `main_database`.`products` on(`main_database`.`products`.`product_id` = `main_database`.`firmwares`.`product_id`)) order by `main_database`.`firmwares`.`firmware_id` desc |
|||
md5=186200faacfe434d4e6222b404ae7dfd |
|||
updatable=1 |
|||
algorithm=0 |
|||
definer_user=aplication |
|||
definer_host=% |
|||
suid=1 |
|||
with_check_option=0 |
|||
timestamp=2022-02-18 11:22:55 |
|||
create-version=2 |
|||
source=select `firmwares`.`firmware_id` AS `firmware_id`,`products`.`product` AS `product`,`products`.`product_id` AS `product_id` from (`firmwares` join `products` on((`products`.`product_id` = `firmwares`.`product_id`))) order by `firmwares`.`firmware_id` desc |
|||
client_cs_name=utf8mb4 |
|||
connection_cl_name=utf8mb4_general_ci |
|||
view_body_utf8=select `main_database`.`firmwares`.`firmware_id` AS `firmware_id`,`main_database`.`products`.`product` AS `product`,`main_database`.`products`.`product_id` AS `product_id` from (`main_database`.`firmwares` join `main_database`.`products` on(`main_database`.`products`.`product_id` = `main_database`.`firmwares`.`product_id`)) order by `main_database`.`firmwares`.`firmware_id` desc |
|||
mariadb-version=100513 |
|||
@ -0,0 +1,16 @@ |
|||
TYPE=VIEW |
|||
query=select `main_database`.`devices`.`chip_id` AS `chip_id`,`main_database`.`firmwares`.`firmware_version` AS `firmware_version` from (`main_database`.`devices` join `main_database`.`firmwares` on(`main_database`.`devices`.`firmware_id_update` = `main_database`.`firmwares`.`firmware_id`)) |
|||
md5=1810b2feb0ec9d693ba9a4d44f4393f1 |
|||
updatable=1 |
|||
algorithm=0 |
|||
definer_user=aplication |
|||
definer_host=% |
|||
suid=1 |
|||
with_check_option=0 |
|||
timestamp=2022-02-18 11:22:55 |
|||
create-version=2 |
|||
source=select `devices`.`chip_id` AS `chip_id`,`firmwares`.`firmware_version` AS `firmware_version` from (`devices` join `firmwares` on((`devices`.`firmware_id_update` = `firmwares`.`firmware_id`))) |
|||
client_cs_name=utf8mb4 |
|||
connection_cl_name=utf8mb4_general_ci |
|||
view_body_utf8=select `main_database`.`devices`.`chip_id` AS `chip_id`,`main_database`.`firmwares`.`firmware_version` AS `firmware_version` from (`main_database`.`devices` join `main_database`.`firmwares` on(`main_database`.`devices`.`firmware_id_update` = `main_database`.`firmwares`.`firmware_id`)) |
|||
mariadb-version=100513 |
|||
@ -0,0 +1,16 @@ |
|||
TYPE=VIEW |
|||
query=select `main_database`.`products`.`product` AS `product`,`main_database`.`devices`.`chip_id` AS `chip_id` from (`main_database`.`devices` join `main_database`.`products` on(`main_database`.`devices`.`product_id` = `main_database`.`products`.`product_id`)) |
|||
md5=d8b81498fe3f62a4011a2fb0cc23b288 |
|||
updatable=1 |
|||
algorithm=0 |
|||
definer_user=aplication |
|||
definer_host=% |
|||
suid=1 |
|||
with_check_option=0 |
|||
timestamp=2022-02-18 11:22:55 |
|||
create-version=2 |
|||
source=select `products`.`product` AS `product`,`devices`.`chip_id` AS `chip_id` from (`devices` join `products` on((`devices`.`product_id` = `products`.`product_id`))) |
|||
client_cs_name=utf8mb4 |
|||
connection_cl_name=utf8mb4_general_ci |
|||
view_body_utf8=select `main_database`.`products`.`product` AS `product`,`main_database`.`devices`.`chip_id` AS `chip_id` from (`main_database`.`devices` join `main_database`.`products` on(`main_database`.`devices`.`product_id` = `main_database`.`products`.`product_id`)) |
|||
mariadb-version=100513 |
|||
@ -0,0 +1,16 @@ |
|||
TYPE=VIEW |
|||
query=select `main_database`.`products`.`product` AS `product`,`main_database`.`firmwares`.`firmware_id` AS `firmware_id`,`main_database`.`firmwares`.`product_id` AS `product_id`,`main_database`.`firmwares`.`firmware_version` AS `firmware_version` from (`main_database`.`firmwares` join `main_database`.`products` on(`main_database`.`firmwares`.`product_id` = `main_database`.`products`.`product_id`)) |
|||
md5=75b755f10b00d2f75d526587ddad8849 |
|||
updatable=1 |
|||
algorithm=0 |
|||
definer_user=aplication |
|||
definer_host=% |
|||
suid=1 |
|||
with_check_option=0 |
|||
timestamp=2022-02-18 11:22:55 |
|||
create-version=2 |
|||
source=select `products`.`product` AS `product`,`firmwares`.`firmware_id` AS `firmware_id`,`firmwares`.`product_id` AS `product_id`,`firmwares`.`firmware_version` AS `firmware_version` from (`firmwares` join `products` on((`firmwares`.`product_id` = `products`.`product_id`))) |
|||
client_cs_name=utf8mb4 |
|||
connection_cl_name=utf8mb4_general_ci |
|||
view_body_utf8=select `main_database`.`products`.`product` AS `product`,`main_database`.`firmwares`.`firmware_id` AS `firmware_id`,`main_database`.`firmwares`.`product_id` AS `product_id`,`main_database`.`firmwares`.`firmware_version` AS `firmware_version` from (`main_database`.`firmwares` join `main_database`.`products` on(`main_database`.`firmwares`.`product_id` = `main_database`.`products`.`product_id`)) |
|||
mariadb-version=100513 |
|||
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 @@ |
|||
ÿ% main_database aplication |
|||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@ |
|||
default-character-set=utf8mb4 |
|||
default-collation=utf8mb4_general_ci |
|||
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.
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.
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.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@ |
|||
˙localhost root `ČĽě˙3a9cede433bd root `ČĽě |
|||
Binary file not shown.
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue