Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fiqare perseo-fe improvements #419

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
c620a0a
Fixed issue in lib/appContext.js
fiqare-emergya-dev Feb 12, 2019
b1eb8fa
Fixed issues in lib/db.js
fiqare-emergya-dev Feb 13, 2019
d38ffcc
Fixed issue in lib/models/actions.js
fiqare-emergya-dev Feb 13, 2019
f18f17b
Fixed issues in lib/models/executionsStore.js
fiqare-emergya-dev Feb 13, 2019
fb9cb75
Fixed issue in lib/models/notices.js
fiqare-emergya-dev Feb 13, 2019
d9d800d
Fixed issue in lib/models/updateAction.js
fiqare-emergya-dev Feb 13, 2019
e666027
Fixed issue in lib/models/perseo.js
fiqare-emergya-dev Feb 13, 2019
5f799c9
Fixed issue in lib/models/actionsController.js
fiqare-emergya-dev Feb 13, 2019
460c75f
Merge pull request #1 from Emergya/284633
fiqare-emergya-dev Feb 13, 2019
24bbb3f
Fixed issue #284635 in lib/models/actions.js lib/models/actionsStore.…
fiqare-emergya-dev Feb 14, 2019
c87e96f
Merge pull request #2 from Emergya/284635
fiqare-emergya-dev Feb 14, 2019
26a081e
Fixed issue #284625 in lib/routes/actionsController.js
fiqare-emergya-dev Feb 25, 2019
9fdc5b9
Merge pull request #3 from Emergya/284625
fiqare-emergya-dev Feb 25, 2019
8200b45
Merge pull request #4 from Emergya/ci
fiqare-emergya-dev Mar 6, 2019
15c1d5d
Merge branch 'telefonicaid-master'
fiqare-emergya-dev Mar 6, 2019
2e81912
Merged from telefonicaid-perseo-fe:master
fiqare-emergya-dev Mar 6, 2019
a514588
Merge pull request #6 from Emergya/master
fiqare-emergya-dev Mar 6, 2019
b8b3ce2
Merge pull request #7 from telefonicaid/master
fiqare-emergya-dev Mar 19, 2019
ca2b66c
Merge pull request #8 from Emergya/master
fiqare-emergya-dev Mar 19, 2019
ea6a05d
Merged lib/db.js and lib/routes/actionsController.js from telefonicai…
fiqare-emergya-dev Mar 19, 2019
aa23fed
Merge pull request #9 from Emergya/master
fiqare-emergya-dev Mar 19, 2019
05ac1f4
Merge pull request #10 from Emergya/ci
fiqare-emergya-dev Mar 21, 2019
88344c8
Resolver issues Db.js #292343
fiqare-emergya-dev Mar 27, 2019
2e1025f
Resolver issues actions.js #292346
fiqare-emergya-dev Mar 27, 2019
e75d07d
Resolve issues actionsStore.js #292348
fiqare-emergya-dev Mar 27, 2019
2cd53b5
Resolve issues executionsStore.js
fiqare-emergya-dev Mar 27, 2019
a3c1cc1
Resolver issues Metrics.js #292352
fiqare-emergya-dev Mar 27, 2019
c012cdc
Resolver issues Notices.js #292353
fiqare-emergya-dev Mar 27, 2019
326a6b4
Resolver issues Rules.js #292363
fiqare-emergya-dev Mar 27, 2019
9e873b8
Resolver issues RulesStore.js #292365
fiqare-emergya-dev Mar 27, 2019
9b15277
Resolver issues smppAction.js #292366
fiqare-emergya-dev Mar 27, 2019
0695fef
Resolver issus updateAction.js #292368
fiqare-emergya-dev Mar 27, 2019
c0b8505
Resolver issues visualRules.js #292387
fiqare-emergya-dev Mar 27, 2019
c11d45d
Resolver issues myutils.js #292390
fiqare-emergya-dev Mar 27, 2019
05a5208
Resolver issues visualRulesController.js #292395
fiqare-emergya-dev Mar 27, 2019
e895b69
Merge pull request #11 from Emergya/perseo-frontend-jafernandez
fiqare-emergya-dev Mar 27, 2019
590de2a
Merge branch 'master' of https://github.com/Emergya/cdti-fiqare-perse…
fiqare-emergya-dev Mar 27, 2019
53c6052
Update version of docker image
fiqare-emergya-dev Mar 27, 2019
eedd341
Merge pull request #13 from Emergya/perseo-frontend-jafernandez
fiqare-emergya-dev Mar 27, 2019
8bda3a7
Merge pull request #12 from Emergya/ci
fiqare-emergya-dev Mar 27, 2019
e4e9bca
Resolver issues db.js #292343
fiqare-emergya-dev Apr 4, 2019
01ec831
Resolver issues action.js #292346
fiqare-emergya-dev Apr 4, 2019
805219b
Resolver issues emailAction.js #293783
fiqare-emergya-dev Apr 4, 2019
32662f4
Resolver issues rules.js #292363
fiqare-emergya-dev Apr 4, 2019
4cade58
Resolver issues visualRules.js #292388
fiqare-emergya-dev Apr 4, 2019
14a0867
Merge pull request #14 from Emergya/perseo-frontend-jafernandez
fiqare-emergya-dev Apr 4, 2019
ef334a6
Resolver issues config.js
fiqare-emergya-dev Apr 4, 2019
07c164e
Fix ip for mongo in docker
fiqare-emergya-dev Apr 4, 2019
1c894b0
Merge pull request #15 from Emergya/perseo-frontend-jafernandez
fiqare-emergya-dev Apr 4, 2019
e6b731a
Added Rules Swagger
fiqare-emergya-dev Sep 24, 2019
5d3fbc4
Merge pull request #16 from Emergya/third-iteration
fiqare-emergya-dev Sep 24, 2019
862b176
Revert "Third iteration"
fiqare-emergya-dev Sep 24, 2019
c68e52d
Merge pull request #17 from Emergya/revert-16-third-iteration
fiqare-emergya-dev Sep 24, 2019
6f64b09
Merge pull request #18 from Emergya/ci
fiqare-emergya-dev Sep 24, 2019
334a59e
Added documentation for developers
fiqare-emergya-dev Sep 30, 2019
6a10db1
Merge pull request #20 from Emergya/third-iteration
fiqare-emergya-dev Sep 30, 2019
e67403a
Merge pull request #21 from Emergya/ci
fiqare-emergya-dev Sep 30, 2019
fe26c90
Added full Swagger definition
fiqare-emergya-dev Sep 30, 2019
70da2e4
Merged rulesController
fiqare-emergya-dev Sep 30, 2019
8ab124b
Merge pull request #22 from Emergya/third-iteration
fiqare-emergya-dev Sep 30, 2019
3580b61
Merge pull request #23 from Emergya/ci
fiqare-emergya-dev Sep 30, 2019
7f7ad60
Fixed Swagger
fiqare-emergya-dev Sep 30, 2019
4a5b42e
Merge pull request #24 from Emergya/master
fiqare-emergya-dev Sep 30, 2019
fd6e450
Merge pull request #25 from Emergya/ci
fiqare-emergya-dev Sep 30, 2019
b54bc43
Updated to 1.10 release from telefonicaid/perseo-fe
fiqare-emergya-dev Nov 21, 2019
c5a694f
Updated to 1.10 release from telefonicaid/perseo-fe(2)
fiqare-emergya-dev Nov 21, 2019
6f05372
Updated to 1.10 release from telefonicaid/perseo-fe(3)
fiqare-emergya-dev Nov 21, 2019
9a77dbb
Merge branch 'telefonicaid-release/1.10.0'
fiqare-emergya-dev Nov 21, 2019
5440640
Travis CI
fiqare-emergya-dev Nov 21, 2019
41f9c68
Fixed travis errors
fiqare-emergya-dev Nov 21, 2019
75aa10d
Merge pull request #1 from Emergya/fiqare-perseo-fe-improvements
fiqare-emergya-dev Nov 21, 2019
f471ce2
Fixed travis errors(2)
fiqare-emergya-dev Nov 21, 2019
14b1aa9
Fixed travis errors(3)
fiqare-emergya-dev Nov 21, 2019
e090738
Revert issue javascript:VariableShadowing
fiqare-emergya-dev Dec 16, 2019
4db0223
Revert issue javascript:VariableShadowing
fiqare-emergya-dev Dec 16, 2019
ec05fb7
Revert issue javascript:VariableShadowing
fiqare-emergya-dev Dec 16, 2019
1bfb721
Revert issue javascript:VariableShadowing
fiqare-emergya-dev Dec 16, 2019
13089b0
Revert issue javascript:VariableShadowing
fiqare-emergya-dev Dec 16, 2019
88ad953
Revert issue javascript:VariableShadowing
fiqare-emergya-dev Dec 16, 2019
dd56330
Revert issue javascript:VariableShadowing
fiqare-emergya-dev Dec 16, 2019
e71c7e6
Revert issue javascript:VariableShadowing
fiqare-emergya-dev Dec 16, 2019
97bc1f3
Revert issue javascript:S1226
fiqare-emergya-dev Dec 16, 2019
c08843e
Revert issue javascript:S1226
fiqare-emergya-dev Dec 16, 2019
94fa819
Revert issue javascript:S1226
fiqare-emergya-dev Dec 16, 2019
57334b9
Revert issue javascript:S1226
fiqare-emergya-dev Dec 16, 2019
9a0e631
Revert issue javascript:S1226
fiqare-emergya-dev Dec 16, 2019
9e975a9
Revert issue javascript:S1226
fiqare-emergya-dev Dec 16, 2019
27716c8
Revert issue javascript:S1226
fiqare-emergya-dev Dec 16, 2019
c6604b0
Revert issue javascript:S1226
fiqare-emergya-dev Dec 16, 2019
f3a905a
Revert issue javascript:S1226
fiqare-emergya-dev Dec 16, 2019
c1cddf2
Revert issue javascript:S1226
fiqare-emergya-dev Dec 16, 2019
e622aa3
Fixed rules.js
fiqare-emergya-dev Dec 16, 2019
70a972d
Fixed db IP
fiqare-emergya-dev Dec 16, 2019
bd3c7b2
Added branch to Travis build
fiqare-emergya-dev Dec 16, 2019
aa0df1d
Merge with master
fiqare-emergya-dev Dec 16, 2019
ac5620a
Merge branch 'telefonicaid-master' into fiqare-improvements-1
fiqare-emergya-dev Dec 16, 2019
4e300a4
Merge branch 'fiqare-improvements-1' into fiqare-improvements-1
vladiricoemergya Dec 16, 2019
e8d11ac
Fixed Travis
fiqare-emergya-dev Dec 16, 2019
42267ba
Fixed Travis (2)
fiqare-emergya-dev Dec 16, 2019
6e3974e
Merge pull request #2 from Emergya/fiqare-improvements-1
fiqare-emergya-dev Dec 16, 2019
08201e7
Fixed PR comments
fiqare-emergya-dev Dec 17, 2019
3020aab
Fixed TODO
fiqare-emergya-dev Dec 17, 2019
51271cd
Fixed Swagger dependencies
fiqare-emergya-dev Dec 19, 2019
ce583be
Revert ESLint docs
fiqare-emergya-dev Dec 20, 2019
d978818
Fixed indentation
fiqare-emergya-dev Jan 10, 2020
ff07d10
Fixed config.js
fiqare-emergya-dev Jan 13, 2020
0865dc8
Fixed indentation
fiqare-emergya-dev Jan 13, 2020
8371d53
Merge pull request #3 from telefonicaid/master
fiqare-emergya-dev Jan 27, 2020
9c80eb9
PR fixed
fiqare-emergya-dev Jan 28, 2020
df81a41
travis fixed
fiqare-emergya-dev Feb 3, 2020
210813b
PR fixed
fiqare-emergya-dev Feb 4, 2020
c29e89f
PR fixed
fiqare-emergya-dev Feb 6, 2020
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
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,30 @@ wish to make a clarifying public statement as follows:
> links to) an otherwise unmodified version of existing software is not considered a derivative work, and therefore it
> does not need to be released as under the same license, or even released as open source.


## User & Programmers Manual
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think README.md file is not the right place to include this. In addition, it should be simplified: you have already included the needed packages in packages.json and so on, so please focus just in the usage.

In sum, It should be included in development.md, just after the last item (Prettify Code) and be like this:

### Swagger

In order to run Swagger, you need to execute the Perseo FE (as explained [here](deployment.md) and then you
can access to:

<server_host>:9090/api-docs


The swagger documentation provided at /api-docs covers all the HTTP endpoint exposed by Perseo FE.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 210813b


### Swagger
Swagger is a framework that offers rules, tools and specifications for Apis documentation, allowing us to describe the structure of our APIs so that machines can read them.

To know more about Swagger's interface and the project's API endpoints go to http://localhost:9090/api-docs.
Swagger is a framework that offers rules, tools and specifications for Apis documentation, allowing us to describe the
structure of our APIs so that machines can read them.

To know more about Swagger's interface and the project's API endpoints go to <http://localhost:9090/api-docs>.

#### Instalation

To run Swagger in Perseo we have to install two NPM packages for NodeJs:
- Swagger-jsdoc: allows us to document our application's endpoints with notations.
- Swagger-ui-express: generates an interface with endpoints definitions.
We have to specify our swagger's version, our API's information and the route where we can find the endpoints in the project.
<pre><code>
definition: {
swagger: '2.0', // Specification (optional, defaults to swagger: '2.0')
info: {
title: 'Perseo Front-End', // Title (required)
version: '1.7.0-fiqare' // Version (required)
}
},
</code></pre>
Once the project is deployed (port 9090 by default), we can access to the interface by the following link: http://localhost:9090/api-docs.

- Swagger-jsdoc: allows us to document our application's endpoints with notations.
- Swagger-ui-express: generates an interface with endpoints definitions. We have to specify our swagger's version, our
API's information and the route where we can find the endpoints in the project.
<pre><code>
definition: {
swagger: '2.0', // Specification (optional, defaults to swagger: '2.0')
info: {
title: 'Perseo Front-End', // Title (required)
version: '1.7.0-fiqare' // Version (required)
}
},
</code></pre>
Once the project is deployed (port 9090 by default), we can access to the interface by the following link:
<http://localhost:9090/api-docs>.
14 changes: 8 additions & 6 deletions documentation/plain_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

There are two kind of rules:

* Esper-based rules, which include the final EPL statement used by the Esper engine inside perseo-core. In order to work with perseo (front-end) properly, the EPL statement must fulfill several conventions for the rule to be able to operate on the incoming events and trigger adequate actions. Example:
- Esper-based rules, which include the final EPL statement used by the Esper engine inside perseo-core. In order to
work with perseo (front-end) properly, the EPL statement must fulfill several conventions for the rule to be able to
operate on the incoming events and trigger adequate actions. Example:

```json
{
Expand All @@ -40,9 +42,8 @@ There are two kind of rules:
}
```

* No signal rules. They are triggered when a given attribute is not updated in a given interval of time. They
don't use Esper at persero-core (they are checked and triggered by perseo frontend). Example:

- No signal rules. They are triggered when a given attribute is not updated in a given interval of time. They don't
use Esper at persero-core (they are checked and triggered by perseo frontend). Example:

```json
{
Expand Down Expand Up @@ -127,15 +128,16 @@ information on how to scape characters at

## No signal conditions

The no signal condition is specified in the `nosignal` configuration element, which is an object with the following fields:
The no signal condition is specified in the `nosignal` configuration element, which is an object with the following
fields:

- **checkInterval**: _mandatory_, time in minutes for checking the attribute
- **attribute**: _mandatory_, attribute for watch
- **reportInterval**: _mandatory_, time in seconds to see an entity as silent
- **id** or **idRegexp**: _mandatory_ (but not both at the same time), id or regex of the entity to watch
- type: _optional_, type of entities to watch

Is recommended to set checkInterval at least double of reportInterval. Howeer, note that a very demanding value of
Is recommended to set checkInterval at least double of reportInterval. Howeer, note that a very demanding value of
checkInterval could impact on performance.

<a name="actions"></a>
Expand Down
2 changes: 1 addition & 1 deletion lib/perseo.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var domain = require('domain'),
d = domain.create(),
swaggerJsdoc = require('swagger-jsdoc'),
swaggerUi = require('swagger-ui-express'),
pjson = require('./package.json');
pjson = require('../package.json');

function start(callbackStart) {
var context = { op: 'start', comp: constants.COMPONENT_NAME };
Expand Down
18 changes: 9 additions & 9 deletions test/component/metrics/metrics_actions_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('Metrics', function() {
return callback();
}, 50);
});
},
}
],
done
);
Expand Down Expand Up @@ -149,7 +149,7 @@ describe('Metrics', function() {
return callback();
}, 50);
});
},
}
],
done
);
Expand Down Expand Up @@ -191,7 +191,7 @@ describe('Metrics', function() {
return callback();
}, 50);
});
},
}
],
done
);
Expand Down Expand Up @@ -226,13 +226,13 @@ describe('Metrics', function() {

should.equal(m.services.unknownt.sum.actionEntityUpdate, 1);
should.equal(m.services.unknownt.sum.okActionEntityUpdate, 0);
should.equal(m.services.unknownt.sum.failedActionEntityUpdate, 1);
should.equal(m.services.unknownt.sum.failedActionEntityUpdate, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to be handled in another PR: #425

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order not disturb @fiqare-emergya-dev (a conflict will happen when #425 gets merged), let's keep as it is now in this PR. I'll fix it in the prelanding branch (hardening/fiqare-perseo-fe-improvements-prelanding)

NTC (just informative)

should.equal(m.services.unknownt.sum.outgoingTransactions, 1);
should.equal(m.services.unknownt.sum.outgoingTransactionsErrors, 1);
should.equal(m.services.unknownt.sum.outgoingTransactionsErrors, 0);
return callback();
}, 150);
});
},
}
],
done
);
Expand Down Expand Up @@ -274,7 +274,7 @@ describe('Metrics', function() {
return callback();
}, 50);
});
},
}
],
done
);
Expand Down Expand Up @@ -316,7 +316,7 @@ describe('Metrics', function() {
return callback();
}, 50);
});
},
}
],
done
);
Expand Down Expand Up @@ -364,7 +364,7 @@ describe('Metrics', function() {
return callback();
}, 50);
});
},
}
],
done
);
Expand Down