Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8553a40
feat: Workflow copy, export and import (#8)
facugon Nov 26, 2021
11a7a36
Workflow fixes (#9)
facugon Dec 16, 2021
47471ac
More documentation (#11)
EzeKoren Jan 13, 2022
6a1bdd6
File indicator (#12)
facugon Jan 13, 2022
cf1e1f0
docs
facugon Jan 14, 2022
87ea43c
bug: workflow fixes 2 (#19)
facugon Jan 21, 2022
848bf8d
Sync docs (#20)
facugon Jan 28, 2022
116fd5e
docs: monitor api with examples (#21)
EzeKoren Feb 10, 2022
9aef2cf
docs: translation (#22)
facugon Feb 10, 2022
f6572ed
Docs: (ES) Instructions on how to check version (#24)
EzeKoren Feb 25, 2022
68979ae
docs: default to spanish (#25)
EzeKoren Mar 2, 2022
571002b
Fingerprints (#34)
facugon Mar 17, 2022
1247922
Docs: Fixed an error in some JS code snippets
EzeKoren Mar 22, 2022
caa53fc
feat: Workflow copy, export and import (#8)
facugon Nov 26, 2021
7f51e70
Workflow fixes (#9)
facugon Dec 16, 2021
a256ebd
More documentation (#11)
EzeKoren Jan 13, 2022
4c62f24
File indicator (#12)
facugon Jan 13, 2022
3fd17e3
docs
facugon Jan 14, 2022
bbb3948
bug: workflow fixes 2 (#19)
facugon Jan 21, 2022
fa0cf79
Sync docs (#20)
facugon Jan 28, 2022
3afd42a
docs: monitor api with examples (#21)
EzeKoren Feb 10, 2022
088ca86
docs: translation (#22)
facugon Feb 10, 2022
bd6ca07
Docs: (ES) Instructions on how to check version (#24)
EzeKoren Feb 25, 2022
8990ef1
docs: default to spanish (#25)
EzeKoren Mar 2, 2022
9555b88
Fingerprints (#34)
facugon Mar 17, 2022
73692ea
Docs: Fixed an error in some JS code snippets
EzeKoren Mar 22, 2022
fccc41e
feat: Tasks has fingerprint and version (#35)
facugon Mar 23, 2022
a4da755
fix: changed property sent into message payload (#37)
facugon Mar 25, 2022
d3faddf
Merge branch 'development' of https://github.com/theeye-io-team/theey…
EzeKoren Mar 25, 2022
b87e386
Docs: (ES/EN) Added the runtime information (#38)
EzeKoren Apr 7, 2022
05d2bd8
Export / import / copy - Files fixes (#39)
facugon Apr 8, 2022
7991ab8
docs: README
facugon Apr 8, 2022
b67d69c
refactor: unify files serialization (#40)
facugon Apr 8, 2022
ba34897
fix: default monitor alerts severity
facugon Apr 12, 2022
756e238
fix: missing workflow migration code (#41)
facugon Apr 12, 2022
ba1b1bd
refactor: update files api endpoints (#42)
facugon Apr 12, 2022
6f4bb59
fix: save file after factory.create
facugon Apr 12, 2022
36535ac
feat: fetch user data for every workflow job (#43)
facugon Apr 18, 2022
9e6b65f
refactor: host remove service
facugon Apr 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Components Control. Can be configured to do one o more things (or nothing)
| Variable Name | Usage |
| ----- | ----- |
| COMMANDER_DISABLED | disable internal commander api |
| MONITORING_DISABLED | disable monitoring system. system monitors will not be checked anymore. will only change when bots and agents send updates |
| MONITORING_DISABLED | disable monitoring system. The core will stop checking monitors status. Events for monitor status will be triggered on API updates |
| API_DISABLED | disable rest api |
| SCHEDULER_JOBS_DISABLED | disable internal scheduler execution. scheduler-jobs will be created using the rest api but task will never be executed. theeye-jobs execution timeout will be never checked. |
| SCHEDULER_JOBS_DISABLED | disable internal scheduler execution. scheduled jobs can be created but jobs will not be created. |

### Start development sample

Expand Down
18 changes: 8 additions & 10 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ module.exports = {
port: process.env.PORT || 60080
},
system: {
logs: `${__dirname}/../logs`,
base_url: 'http://127.0.0.1:60080',
web_url: 'http://127.0.0.1:6080',
file_upload_folder: join(__dirname , '..', 'uploads'),
view_teamplates_path: __dirname + '/../core/view/template',
secret: 'b28d9f2a4d52ace6e5d3ac1dd3e5c2a0e7e66472ec7276ca501b8c4fa1f07679',
secret_uuid: 'a2a29a19-aba1-412b-a9ba-c29668e3c17b',
logs: `${__dirname}/../logs`,
view_teamplates_path: __dirname + '/../core/view/template',
user: {
username: 'theeye-automatic',
email: '[email protected]',
Expand Down Expand Up @@ -82,8 +82,8 @@ module.exports = {
*
*/
monitor: {
disabled: false,
fails_count_alert: 3,
disabled: false,
check_interval: 10000
},
/**
Expand Down Expand Up @@ -137,16 +137,13 @@ module.exports = {
*/
notifications: {
api: {
// outgoing requests secret passphrase
secret: '77E0EAF3B83DD7A7A4004602626446EADED31BF794956FC9BBAD051FA5A25038',
timeout: 5000,
url: process.env.CONFIG_NOTIFICATIONS_API_URL || 'http://127.0.0.1:6080/api/notification'
url: process.env.CONFIG_NOTIFICATIONS_API_URL || 'http://127.0.0.1:6080/api/notification',
timeout: 5000
}
},
authentication: {
// same key must be in every internal service
secret: '692fc164a0c06a9fd02575cf17688c9e',
protocol: 'http', // http or https
protocol: 'http',
api: {
timeout: 5000,
host: '127.0.0.1',
Expand All @@ -156,7 +153,8 @@ module.exports = {
profile: '/api/session/profile',
login: '/api/auth/login/local'
}
}
},
secret: '692fc164a0c06a9fd02575cf17688c9e'
},
gateway: {
secret: '77E0EAF3B83DD7A7A4004602626446EADED31BF794956FC9BBAD051FA5A25038',
Expand Down
16 changes: 8 additions & 8 deletions core/app/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ module.exports = function () {

// respond with error middleware
server.use((req, res, next) => {
res.sendError = (error, next) => {
if (error.statusCode < 500) {
res.send(error.statusCode || 400, {
statusCode: error.statusCode,
message: error.message,
errors: error.errors
res.sendError = (err, next) => {
if (err instanceof ErrorHandler.ClientError || err.statusCode < 500) {
res.send(err.statusCode || 400, {
statusCode: err.statusCode,
message: err.message,
errors: err.errors
})
} else {
logger.error(error)
logger.error(err)
const handler = new ErrorHandler()
handler.sendExceptionAlert(error, req)
handler.sendExceptionAlert(err, req)
res.send(500, 'Internal Server Error')
}
if (next) { next() }
Expand Down
4 changes: 4 additions & 0 deletions core/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ const logger = require('../lib/logger')('app')
//const User = require('../entity/user').Entity
const App = {}
const AWS = require('aws-sdk')
const { v5: uuidv5 } = require('uuid')

module.exports = App


App.boot = async (config) => {

App.namespace = uuidv5(config.system.secret, config.system.secret_uuid)

App.config = config
App.db = await MongoDB.connect(config.mongo)

Expand Down
10 changes: 6 additions & 4 deletions core/constants/indicator.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

const SHORT_TYPE_CHART = 'chart'
const SHORT_TYPE_TEXT = 'text'
const SHORT_TYPE_CHART = 'chart'
const SHORT_TYPE_TEXT = 'text'
const SHORT_TYPE_PROGRESS = 'progress'
const SHORT_TYPE_COUNTER = 'counter'
const SHORT_TYPE_COUNTER = 'counter'
const SHORT_TYPE_FILE = 'file'

exports.SHORT_TYPE_CHART = SHORT_TYPE_CHART
exports.SHORT_TYPE_CHART = SHORT_TYPE_CHART
exports.SHORT_TYPE_TEXT = SHORT_TYPE_TEXT
exports.SHORT_TYPE_PROGRESS = SHORT_TYPE_PROGRESS
exports.SHORT_TYPE_COUNTER = SHORT_TYPE_COUNTER
exports.SHORT_TYPE_FILE = SHORT_TYPE_FILE
Loading