cricdatabase / searchable-image-database-nodejs Goto Github PK
View Code? Open in Web Editor NEWBackend in Node.js for CRIC Searchable Image Database
License: GNU Affero General Public License v3.0
Backend in Node.js for CRIC Searchable Image Database
License: GNU Affero General Public License v3.0
/opt/cric/backend/src/executores/usuario_executor/ObterUsuarioExecutor.js:26
usuario.id = usuarioBase.dataValues.id;
^^^^^^^
SyntaxError: Unexpected identifier
From my understanding,
If 1-3 is true, ImagemModel.belongsTo(models.LesaoModel)
doesn't make any sense.
We need more examples to populate the database to use during smoke test. src/seeders
has a few examples of how to create data.
When I run
Imagem.create({
nome: php_imagem.nome,
codigo_lamina: php_imagem.lamina,
excluida: 0,
classificacao_aprovada: 1,
dt_aquisicao: date_image,
fonte_aquisicao: 1,
caminho_imagem: "imagens/base_interna/",
altura: 1040, // Requires later verification
largura: 1388, // Requires later verification
id_usuario: 1,
id_lesao: 1
});
I have
Unhandled rejection SequelizeDatabaseError: Field 'id_usuario' doesn't have a default value
at Query.formatError (/opt/cric/backend/node_modules/sequelize/lib/dialects/mysql/query.js:244:16)
at Execute.handler [as onResult] (/opt/cric/backend/node_modules/sequelize/lib/dialects/mysql/query.js:51:23)
at Execute.execute (/opt/cric/backend/node_modules/mysql2/lib/commands/command.js:30:14)
at Connection.handlePacket (/opt/cric/backend/node_modules/mysql2/lib/connection.js:408:32)
at PacketParser.onPacket (/opt/cric/backend/node_modules/mysql2/lib/connection.js:70:12)
at PacketParser.executeStart (/opt/cric/backend/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket.<anonymous> (/opt/cric/backend/node_modules/mysql2/lib/connection.js:77:25)
at Socket.emit (events.js:316:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:273:9)
at Socket.Readable.push (_stream_readable.js:214:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
What is wrong with the code?
$ cat src/seeders/20200325210000-image.js
'use strict';
const Criptografia = require('../utils/criptografia');
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.bulkInsert('imagem', [
{
id: 1,
nome: "example0001.jpg",
codigo_lamina: "0001",
excluida: 0,
classificacao_aprovada: 1,
dt_aquisicao: '2020-01-01',
fonte_aquisicao: 1,
caminho_imagem: "src/assets/imagens/base_original/example0001.jpg",
altura: 400,
largura: 600,
id_usuario: 1,
id_lesao: 1,
created_at: '2020-01-01',
updated_at: '2020-01-01'
},
{
id: 2,
nome: "example0002.jpg",
codigo_lamina: "0002",
excluida: 0,
classificacao_aprovada: 1,
dt_aquisicao: '2020-01-01',
fonte_aquisicao: 1,
caminho_imagem: "src/assets/imagens/base_original/example0002.jpg",
altura: 400,
largura: 600,
id_usuario: 1,
id_lesao: 2,
created_at: '2020-01-01',
updated_at: '2020-01-01'
},
{
id: 2,
nome: "example0003.jpg",
codigo_lamina: "0003",
excluida: 0,
classificacao_aprovada: 1,
dt_aquisicao: '2020-01-01',
fonte_aquisicao: 1,
caminho_imagem: "src/assets/imagens/base_original/example0003.jpg",
altura: 400,
largura: 600,
id_usuario: 1,
id_lesao: 3,
created_at: '2020-01-01',
updated_at: '2020-01-01'
}
], {});
},
down: (queryInterface, Sequelize) => {
return queryInterface.bulkDelete('administrador', null, {});
}
};
$ npx sequelize-cli db:seed:all
Sequelize CLI [Node: 13.10.1, CLI: 5.5.1, ORM: 5.21.5]
Loaded configuration file "src/config/database.js".
== 20200325190000-user: migrating =======
== 20200325190000-user: migrated (0.009s)
== 20200325193055-admin: migrating =======
== 20200325193055-admin: migrated (0.009s)
== 20200325200000-lesion: migrating =======
== 20200325200000-lesion: migrated (0.010s)
== 20200325210000-image: migrating =======
ERROR: Validation error
When I run
import requests
response = requests.post(
'http://localhost:3000/api/v1/imagens-lesoes/{}'.format(9),
headers=headers,
json=[
{
"nome": "LSIL",
"detalhes": "",
},
],
)
I receive
{'status_code': 404, 'mensagem': 'No one injury found'}
I suspect that the problem is in src/executores/imagem_executor/CadastrarLesaoExecutor.js
at
for (let i = 0; i < total; i++) {
await ImagemRepositorio.cadastrarLesao(req.body[i]);
}
return await ListarLesoes.Executar(req);
Some content of the website should be store as flatpages in the database instead of hard coded in the source file.
See https://unix.stackexchange.com/a/131585/217710 for the difference between path and directory.
In nodejs/src/executores/imagem_executor/CadastrarImagemExecutor.js
, we have
async function prepararCadastroNoBanco(req) {
const caminho_imagem = fonte_aquisicao == FonteAquisicao.FONTE_AQUISICAO_INTERNA ? 'imagens/base_interna/' : 'imagens/base_externa/' ;
}
The name of the variable doesn't represent what it is storing because it doesn't include the name of the file. We must use a better name for the variable, for example diretorio_imagem
.
src/models/ImagemModel.js
has
super.init({
nome: DataTypes.STRING,
codigo_lamina: DataTypes.STRING,
excluida: DataTypes.INTEGER,
classificacao_aprovada: DataTypes.INTEGER,
dt_aquisicao: DataTypes.DATE,
fonte_aquisicao: DataTypes.INTEGER,
caminho_imagem: DataTypes.STRING,
altura: DataTypes.INTEGER,
largura: DataTypes.INTEGER
},
{
sequelize: connection, //Recebe a conexao com o banco de dados
tableName: 'imagem' //Evita que o sequelize pesquise pelo nome da tabela no plural
});
Some fields are Boolean (can only be True or False), for example
excluida
classificacao_aprovada
@bernardofagner why are we using Sequelize.INTEGER?
https://cric-database.readthedocs.io/ has the begin of the HTML documentation. We are using https://readthedocs.org/ as host, https://www.sphinx-doc.org/ as HTML generator, and https://jsdoc.app/ for annotate the source code.
The root for the documentation is the directory docs
. Text is in *.rst
files. For examples of annotation in the JavaScript files, check
src/models/UsuarioBaseModel.js
src/models/CitopatologistaModel.js
src/models/ImagemModel.js
$ sudo npm install -g jsdoc
$ sudo python -m pip install -r docs/requirements.txt
$ cd docs
$ make html
Open docs/_build/html/index.html
with your web browser.
$ grep -r DataTypes.NUMBER src/models
src/models/AnalistaModel.js: total_segmentacoes: DataTypes.NUMBER,
src/models/AnalistaModel.js: total_classificacoes: DataTypes.NUMBER
We have
async function prepararCadastroNoBanco(req) {
...
const classificacao_aprovada = 1;
...
}
but we should have classificacao_aprovada = 0
. And add REST API to approve classification.
src/models/VisitanteModel.js
has
super.init({
pais: DataTypes.STRING,
estado_regiao: DataTypes.STRING,
cidade: DataTypes.STRING,
},
We want to have clean values for country (i.e. pais
) by using ISO 3166-1.
Our database has the following values for country:
Brasil
Brazil
Reino Unido
United Kingdom
UK
EUA
USA
US
United States
We will have a lot of trouble to report where are our users are based.
Our database will store the ISO 3166-1 code.
BR
BR
GB
GB
GB
US
US
US
US
Use validation provided by validator.js.
Because it is used in forms.
See https://www.loggly.com/ultimate-guide/node-logging-basics/ for example.
$ curl -v http://database.cric.com.br/api
* Trying 165.227.241.43:80...
* TCP_NODELAY set
* Connected to database.cric.com.br (165.227.241.43) port 80 (#0)
> GET /api HTTP/1.1
> Host: database.cric.com.br
> User-Agent: curl/7.65.3
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Server: nginx/1.17.8
< Date: Sat, 04 Apr 2020 21:44:55 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 142
< Connection: keep-alive
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: *
< Access-Control-Allow-Methods: *
< Content-Security-Policy: default-src 'none'
< X-Content-Type-Options: nosniff
<
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api</pre>
</body>
</html>
* Connection #0 to host database.cric.com.br left intact
nodejs/src/utils/validador_de_sessao.js
has
if(req.headers.token_autenticacao != GeradorIdUnico.obterTokenCuringa())
This need to be improved to check if any user has their unique API key instead of have all users using the same key.
I asked Claudia and Mariana about this.
fonte_aquisicao
is used to keep track of images added by staff. We should keep track of this by user.
I have the following database
$ mysql -e 'SELECT * FROM usuario_base;' -p123.456 cric
+----+---------------+-------------+-----------------------+----------------------------------+-------+---------------------+---------------------+
| id | primeiro_nome | ultimo_nome | email | senha | ativo | created_at | updated_at |
+----+---------------+-------------+-----------------------+----------------------------------+-------+---------------------+---------------------+
| 1 | P | C | [email protected] | f7f2d1a5b15ac976ab027696fe850bf7 | 1 | 2020-03-26 17:31:22 | 2020-03-26 17:31:22 |
+----+---------------+-------------+-----------------------+----------------------------------+-------+---------------------+---------------------+
$ docker-compose exec db mysql -e 'SELECT * FROM administrador;' -p123.456 cric
+----+--------------+---------------+---------------------+---------------------+
| id | nivel_acesso | api_key | created_at | updated_at |
+----+--------------+---------------+---------------------+---------------------+
| 1 | TOTAL | 123.456.789.0 | 2020-03-26 17:31:22 | 2020-03-26 17:31:22 |
+----+--------------+---------------+---------------------+---------------------+
$ db mysql -e 'SELECT * FROM citopatologista;' -p123.456 cric
$ mysql -e 'SELECT * FROM analista;' -p123.456 cric
$ mysql -e 'SELECT * FROM lesao;' -p123.456 cric
+----+------+----------+---------------------+---------------------+
| id | nome | detalhes | created_at | updated_at |
+----+------+----------+---------------------+---------------------+
| 1 | LSIL | | 2020-03-26 17:31:22 | 2020-03-26 17:31:22 |
+----+------+----------+---------------------+---------------------+
$ mysql -e 'SELECT * FROM imagem;' -p123.456 cric
+----+------------------------+---------------+----------+------------------------+---------------------+-----------------+-----------------------+--------+---------+------------+----------+---------------------+---------------------+
| id | nome | codigo_lamina | excluida | classificacao_aprovada | dt_aquisicao | fonte_aquisicao | caminho_imagem | altura | largura | id_usuario | id_lesao | created_at | updated_at |
+----+------------------------+---------------+----------+------------------------+---------------------+-----------------+-----------------------+--------+---------+------------+----------+---------------------+---------------------+
| 1 | 5d7e5937d72fe632_1.jpg | old | 0 | 1 | 2019-12-31 21:00:00 | 1 | imagens/base_interna/ | 1040 | 1392 | 1 | 1 | 2020-03-26 17:31:24 | 2020-03-26 17:31:24 |
+----+------------------------+---------------+----------+------------------------+---------------------+-----------------+-----------------------+--------+---------+------------+----------+---------------------+---------------------+
$ mysql -e 'SELECT * FROM celula;' -p123.456 cric
$ mysql -e 'SELECT * FROM classificacao_celula;' -p123.456 cric
$ mysql -e 'SELECT * FROM segmentacao_nucleo;' -p123.456 cric
$ mysql -e 'SELECT * FROM segmentacao_citoplasma;' -p123.456 cric
I call /api/v1/imagens/1/classificacao-celula/1
with
{"id_lesao": 1, "coord_centro_nucleo_x": 134, "coord_centro_nucleo_y": 0, "alturaCanvas": 1388, "larguraCanvas": 1040, "alturaOriginalImg": 1388, "larguraOriginalImg": 1040}
but the new information is not listed in the database:
$ mysql -e 'SELECT * FROM usuario_base;' -p123.456 cric
+----+---------------+-------------+-----------------------+----------------------------------+-------+---------------------+---------------------+
| id | primeiro_nome | ultimo_nome | email | senha | ativo | created_at | updated_at |
+----+---------------+-------------+-----------------------+----------------------------------+-------+---------------------+---------------------+
| 1 | P | C | [email protected] | f7f2d1a5b15ac976ab027696fe850bf7 | 1 | 2020-03-26 17:31:22 | 2020-03-26 17:31:22 |
+----+---------------+-------------+-----------------------+----------------------------------+-------+---------------------+---------------------+
$ docker-compose exec db mysql -e 'SELECT * FROM administrador;' -p123.456 cric
+----+--------------+---------------+---------------------+---------------------+
| id | nivel_acesso | api_key | created_at | updated_at |
+----+--------------+---------------+---------------------+---------------------+
| 1 | TOTAL | 123.456.789.0 | 2020-03-26 17:31:22 | 2020-03-26 17:31:22 |
+----+--------------+---------------+---------------------+---------------------+
$ db mysql -e 'SELECT * FROM citopatologista;' -p123.456 cric
$ mysql -e 'SELECT * FROM analista;' -p123.456 cric
$ mysql -e 'SELECT * FROM lesao;' -p123.456 cric
+----+------+----------+---------------------+---------------------+
| id | nome | detalhes | created_at | updated_at |
+----+------+----------+---------------------+---------------------+
| 1 | LSIL | | 2020-03-26 17:31:22 | 2020-03-26 17:31:22 |
+----+------+----------+---------------------+---------------------+
$ mysql -e 'SELECT * FROM imagem;' -p123.456 cric
+----+------------------------+---------------+----------+------------------------+---------------------+-----------------+-----------------------+--------+---------+------------+----------+---------------------+---------------------+
| id | nome | codigo_lamina | excluida | classificacao_aprovada | dt_aquisicao | fonte_aquisicao | caminho_imagem | altura | largura | id_usuario | id_lesao | created_at | updated_at |
+----+------------------------+---------------+----------+------------------------+---------------------+-----------------+-----------------------+--------+---------+------------+----------+---------------------+---------------------+
| 1 | 5d7e5937d72fe632_1.jpg | old | 0 | 1 | 2019-12-31 21:00:00 | 1 | imagens/base_interna/ | 1040 | 1392 | 1 | 1 | 2020-03-26 17:31:24 | 2020-03-26 17:31:24 |
+----+------------------------+---------------+----------+------------------------+---------------------+-----------------+-----------------------+--------+---------+------------+----------+---------------------+---------------------+
$ mysql -e 'SELECT * FROM celula;' -p123.456 cric
$ mysql -e 'SELECT * FROM classificacao_celula;' -p123.456 cric
$ mysql -e 'SELECT * FROM segmentacao_nucleo;' -p123.456 cric
$ mysql -e 'SELECT * FROM segmentacao_citoplasma;' -p123.456 cric
When running
$ docker-compose up
for https://github.com/CRICDatabase/searchable-image-database, I encounter the following error
node_1 | npm ERR! missing script: cric_api
node_1 |
node_1 | npm ERR! A complete log of this run can be found in:
node_1 | npm ERR! /root/.npm/_logs/2020-03-20T12_09_35_516Z-debug.log
@bernardofagner Can you help me? Possible places that is creating the problem
Source: https://bitbucket.org/Hakurey/cric_database_2019_backend
@bernardofagner can you git push
the source code to here?
The REST API end point is very slow, probably because of SQL join
.
In src/executores/imagem_executor/CadastrarImagemExecutor.js
, you will find
if (!req.body.id_usuario || !req.body.id_lesao || !ValidarTipo.ehNumero(req.body.id_usuario) ||
!ValidarTipo.ehNumero(req.body.id_lesao) || !req.files || !req.body.codigo_lamina ||
!req.body.codigo_lamina) {
Note that req.body.codigo_lamina
appears twice.
http://database.cric.com.br/ is making the following request when attempting user authentication
$ cat example.sh
curl --verbose \
-H "token_autenticacao: bac8db9147ac80b4ba8a05bb0de7c4fd" \
-H "Content-Type: application/json" \
--data '{email: "[email protected]", senha: "secret"}' \
-X GET "http://database.cric.com.br/api/v1/usuarios/"
[raniere@ssi] /tmp
$ bash example.sh
* Trying 165.227.241.43:80...
* TCP_NODELAY set
* Connected to database.cric.com.br (165.227.241.43) port 80 (#0)
> GET /api/v1/usuarios/ HTTP/1.1
> Host: database.cric.com.br
> User-Agent: curl/7.65.3
> Accept: */*
> token_autenticacao: bac8db9147ac80b4ba8a05bb0de7c4fd
> Content-Type: application/json
> Content-Length: 45
>
* upload completely sent off: 45 out of 45 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Server: nginx/1.17.8
< Date: Sat, 04 Apr 2020 23:05:30 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 892
< Connection: keep-alive
< X-Powered-By: Express
< Content-Security-Policy: default-src 'none'
< X-Content-Type-Options: nosniff
<
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>SyntaxError: Unexpected token e in JSON at position 1<br> at JSON.parse (<anonymous>)<br> at parse (/opt/cric/backend/node_modules/body-parser/lib/types/json.js:89:19)<br> at /opt/cric/backend/node_modules/body-parser/lib/read.js:121:18<br> at invokeCallback (/opt/cric/backend/node_modules/raw-body/index.js:224:16)<br> at done (/opt/cric/backend/node_modules/raw-body/index.js:213:7)<br> at IncomingMessage.onEnd (/opt/cric/backend/node_modules/raw-body/index.js:273:7)<br> at IncomingMessage.emit (events.js:328:22)<br> at endReadableNT (_stream_readable.js:1201:12)<br> at processTicksAndRejections (internal/process/task_queues.js:84:21)</pre>
</body>
</html>
* Connection #0 to host database.cric.com.br left intact
When including double quotes in the JSON keys, it works:
$ cat example.sh
curl --verbose \
-H "token_autenticacao: bac8db9147ac80b4ba8a05bb0de7c4fd" \
-H "Content-Type: application/json" \
--data '{"email": "[email protected]", "senha": "secret"}' \
-X GET "http://database.cric.com.br/api/v1/usuarios/"
[raniere@ssi] /tmp
$ bash example.sh
* Trying 165.227.241.43:80...
* TCP_NODELAY set
* Connected to database.cric.com.br (165.227.241.43) port 80 (#0)
> GET /api/v1/usuarios/ HTTP/1.1
> Host: database.cric.com.br
> User-Agent: curl/7.65.3
> Accept: */*
> token_autenticacao: bac8db9147ac80b4ba8a05bb0de7c4fd
> Content-Type: application/json
> Content-Length: 49
>
* upload completely sent off: 49 out of 49 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 401 Unauthorized
< Server: nginx/1.17.8
< Date: Sat, 04 Apr 2020 23:07:44 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 53
< Connection: keep-alive
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: *
< Access-Control-Allow-Methods: *
< ETag: W/"35-zBkCcivUJ7NoWc2vxazjAiWt4PA"
<
* Connection #0 to host database.cric.com.br left intact
{"status_code":401,"mensagem":"Access token invalid"}
This doesn't happen when I try locally.
It is returning true
.
When I run
sequelize.sync();
I get
Unhandled rejection SequelizeDatabaseError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NUMBER, `total_classificacoes` NUMBER, `created_at` DATETIME NOT NULL, `updated_' at line 1
at Query.formatError (/opt/cric/backend/node_modules/sequelize/lib/dialects/mysql/query.js:244:16)
at Query.handler [as onResult] (/opt/cric/backend/node_modules/sequelize/lib/dialects/mysql/query.js:51:23)
at Query.execute (/opt/cric/backend/node_modules/mysql2/lib/commands/command.js:30:14)
at Connection.handlePacket (/opt/cric/backend/node_modules/mysql2/lib/connection.js:408:32)
at PacketParser.onPacket (/opt/cric/backend/node_modules/mysql2/lib/connection.js:70:12)
at PacketParser.executeStart (/opt/cric/backend/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket.<anonymous> (/opt/cric/backend/node_modules/mysql2/lib/connection.js:77:25)
at Socket.emit (events.js:316:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:273:9)
at Socket.Readable.push (_stream_readable.js:214:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
Are we keeping the ration of the image?
If you are the administrator of the system, you must have all permissions. If you don't have all permissions, you are not the administrator.
Error reading "src/config/database.js". Error: Error: Cannot find module '/opt/cric/backend/src/config/database.js'
In src/utils/enumeracoes/mensagem_excecoes.js
, replace
LESAO_NAO_ENCONTRADA: 'No one injury found',
with
LESAO_NAO_ENCONTRADA: 'No injury found',
Related with CRICDatabase/searchable-image-database-angular#7
At the moment,
we have
$ unzip -l base.zip
Archive: base.zip
Length Date Time Name
--------- ---------- ----- ----
32781 2020-04-12 23:59 example0001.jpg
37939 2020-04-12 23:59 example0002.jpg
112560 2020-04-12 23:59 example0003.jpg
--------- -------
183280 3 files
We want to have information about the classification and segmentation.
Like name, email, password.
src/models/ImagemModel.js
has
static associacao(models) {
this.belongsTo(models.UsuarioBaseModel, {
foreignKey: 'id_usuario', as: 'fk_imagem_usuario_base'
});
this.belongsTo(models.LesaoModel, {
foreignKey: 'id_lesao', as: 'fk_imagem_lesao'
});
}
Why do we need to have foreignKey
and as
? I couldn't figure out and I also asked at https://stackoverflow.com/q/60852838/1802726.
Because it is used in forms.
Because INTERNAL_SERVER_ERROR
makes hard to debug.
$ grep -r INTERNAL_SERVER_ERROR src
src/executores/usuario_executor/#ObterUsuarioExecutor.js#: ObjetoExcecao.status_code = HttpStatus.INTERNAL_SERVER_ERROR;
src/executores/usuario_executor/ObterUsuarioExecutor.js: ObjetoExcecao.status_code = HttpStatus.INTERNAL_SERVER_ERROR;
src/executores/usuario_executor/CadastrarVisitanteExecutor.js: ObjetoExcecao.status_code = HttpStatus.INTERNAL_SERVER_ERROR;
src/executores/usuario_executor/CadastrarAdministradorExecutor.js: ObjetoExcecao.status_code = HttpStatus.INTERNAL_SERVER_ERROR;
src/executores/usuario_executor/CadastrarUsuarioBaseExcutor.js: ObjetoExcecao.status_code = HttpStatus.INTERNAL_SERVER_ERROR;
src/executores/usuario_executor/TornarCitopatologistaExecutor.js: ObjetoExcecao.status_code = HttpStatus.INTERNAL_SERVER_ERROR;
src/executores/usuario_executor/CadastrarAnalistaExecutor.js: ObjetoExcecao.status_code = HttpStatus.INTERNAL_SERVER_ERROR;
src/executores/usuario_executor/CadastrarCitopatologistaExecutor.js: ObjetoExcecao.status_code = HttpStatus.INTERNAL_SERVER_ERROR;
src/executores/imagem_executor/CadastrarSegmentacaoCelulaExecutor.js: ObjetoExcecao.status_code = HttpStatus.INTERNAL_SERVER_ERROR;
src/executores/imagem_executor/CadastrarImagemExecutor.js: ObjetoExcecao.status_code = HttpStatus.INTERNAL_SERVER_ERROR;
src/executores/imagem_executor/CadastrarClassificacaoCelulaExecutor.js: ObjetoExcecao.status_code = HttpStatus.INTERNAL_SERVER_ERROR;
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/imagem_controller/ImagemController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/sistema/SistemaController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
src/controllers/usuario_controller/UsuarioController.js: return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(erro);
When you configure a new instance of CRIC Database, you need to create the admin user.
Most of the tables have a column created_at
. It should have a default value for today. The same for updated_at
.
At the moment, only administrators have a API key to access the database. All users should be able to have a API key.
One PhD student is developing a deep learning project in R. The PhD student should not be administrator but should have one API key to access the database using R.
npm run lint
will provide you with the list of errors that need to be fixed.
At the moment, the zip file provided has
$ unzip -l ~/Downloads/base.zip
Archive: /home/raniere/Downloads/base.zip
Length Date Time Name
--------- ---------- ----- ----
0 2020-03-09 20:56 base_interna/
278454 2020-03-09 20:50 base_interna/0bfa8acda61bbc39_b90aa2a0ec.jpg
1956825 2020-03-09 20:50 base_interna/3ffefc5386e945f1_3b73689cbb3b2a04a1a713230459f7e5.png
1956825 2020-03-09 20:50 base_interna/5c4b4eefab884945_59f7e5.png
307142 2020-03-09 20:50 base_interna/7e5d60a999846f3b_75ad569640.jpg
--------- -------
4499246 5 files
when the base has
$ ls src/assets/imagens/base_interna | wc -l
436
Because JSON files can not have comments. Use JavaScript module instead.
Documentation: https://github.com/lorenwest/node-config/wiki/Special-features-for-JavaScript-configuration-files
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.