Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

feat(api): add eventlog listing #8381

Merged
merged 40 commits into from
Mar 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
80add3b
Adapt font regexp path for Windows (#8375)
Thebarda Feb 28, 2020
036f6f0
enh(apiv2): add event listing for hosts and services
victorvassilev Feb 28, 2020
748d8ea
enh(apiv2): add event listing for hosts and services
victorvassilev Feb 28, 2020
e793c0e
fix(doc): regenerate html for doc
victorvassilev Feb 28, 2020
915762f
Merge branch 'MON-4866-add-eventlog-listing' of https://github.com/ce…
victorvassilev Feb 28, 2020
33c0fe1
feat(ui): Implement Resources listing (#8371)
bdauria Feb 28, 2020
9e5b802
fix(tests): update error message on unit test
victorvassilev Feb 28, 2020
85a8b6c
Fix the search parameter 'IN' (#8380)
callapa Feb 28, 2020
9972d4c
fix(doc): fix scrollbar issue in API documentation (#8378)
kduret Mar 2, 2020
4245032
feat(build): stash git sources for Sonar analysis.
Mar 2, 2020
0d3c51c
feat(ui): Implement Unified view search (#8382)
bdauria Mar 3, 2020
07c7e2f
feat(build): fail build on front-end style errors.
Mar 4, 2020
40443e8
enh(doc): update docblock in interface
victorvassilev Mar 4, 2020
a3e7713
fix: fix ESLint warnings
bdauria Mar 4, 2020
f4463cb
Merge branch 'master' into MON-4789-unified-view
kduret Mar 4, 2020
fd1f005
doc(api): document how to use search parameter with API (#8376)
kduret Mar 4, 2020
4e26b51
Merge branch 'master' into MON-4789-unified-view
kduret Mar 4, 2020
fc38f12
fix(test): improve unit test SqlRequestParametersTranslatorTest::test…
vhr Mar 5, 2020
23166d1
fix(configuration): export hosts geo_coords to remote server (#8390)
cgagnaire Mar 5, 2020
83fff4a
fix(ldap): use define user member_attribute var (#8287)
cgagnaire Mar 5, 2020
3a97ce2
feat(ui): Implement Unified view downtime and acknowledge tooltips (#…
bdauria Mar 5, 2020
75128bf
fix(code): Clean switch case service monitoring (#8285)
cgagnaire Mar 5, 2020
34c6b66
fix(remote-server): fix import with strict mode (#7944)
kduret Mar 5, 2020
b143520
doc(api): document how to generate html api documentation (#8394)
kduret Mar 5, 2020
45793fa
Merge branch 'master' into MON-4789-unified-view
kduret Mar 5, 2020
a87f83a
feat(doc): update the API documentation (#8393)
vhr Mar 5, 2020
c01eb93
fix(doc): remove again api html documentation
kduret Mar 6, 2020
50ed470
Update src/Centreon/Domain/Monitoring/Entity/DowntimeEventObject.php
victorvassilev Mar 6, 2020
99987ce
Update src/Centreon/Domain/Monitoring/Interfaces/TimelineRepositoryIn…
victorvassilev Mar 6, 2020
38983b7
Update src/Centreon/Domain/Monitoring/Interfaces/EventObjectInterface…
victorvassilev Mar 6, 2020
a06651f
Update package-lock
bdauria Mar 6, 2020
f9d30ea
enh(apiv2): add event listing for hosts and services
victorvassilev Feb 28, 2020
d4397aa
fix(doc): regenerate html for doc
victorvassilev Feb 28, 2020
64b829f
fix(tests): update error message on unit test
victorvassilev Feb 28, 2020
8e07ec2
enh(doc): update docblock in interface
victorvassilev Mar 4, 2020
28a304d
Update src/Centreon/Domain/Monitoring/Entity/DowntimeEventObject.php
victorvassilev Mar 6, 2020
d981c56
Update src/Centreon/Domain/Monitoring/Interfaces/TimelineRepositoryIn…
victorvassilev Mar 6, 2020
d6ac24e
Update src/Centreon/Domain/Monitoring/Interfaces/EventObjectInterface…
victorvassilev Mar 6, 2020
c1b4cd6
resolve conflict with html doc
victorvassilev Mar 6, 2020
60cb7cf
Merge branch 'MON-4866-add-eventlog-listing' of https://github.com/ce…
victorvassilev Mar 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#generic development files
www/index.html

#api html documentation
doc/API/centreon-api-v2.html

#backend development and project files
.idea/
vendor/
Expand Down
15 changes: 14 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ stage('Source') {
dir('centreon-web') {
checkout scm
}
// git repository is stored for the Sonar analysis below.
if ((env.BUILD == 'RELEASE') || (env.BUILD == 'REFERENCE')) {
sh 'tar czf centreon-web-git.tar.gz centreon-web'
stash name: 'git-sources', includes: 'centreon-web-git.tar.gz'
}
sh "./centreon-build/jobs/web/${serie}/mon-web-source.sh"
source = readProperties file: 'source.properties'
env.VERSION = "${source.VERSION}"
Expand Down Expand Up @@ -54,7 +59,13 @@ try {
])
recordIssues(
enabledForFailure: true,
tools: [checkStyle(pattern: 'codestyle-be.xml'), esLint(pattern: 'codestyle-fe.xml')],
tools: [checkStyle(pattern: 'codestyle-be.xml')],
referenceJobName: 'centreon-web/master'
)
recordIssues(
enabledForFailure: true,
failOnError: true,
tools: [esLint(pattern: 'codestyle-fe.xml')],
referenceJobName: 'centreon-web/master'
)

Expand All @@ -77,6 +88,8 @@ try {
}

if ((env.BUILD == 'RELEASE') || (env.BUILD == 'REFERENCE')) {
unstash 'git-sources'
sh 'rm -rf centreon-web && tar xzf centreon-web-git.tar.gz'
withSonarQubeEnv('SonarQube') {
sh "./centreon-build/jobs/web/${serie}/mon-web-analysis.sh"
}
Expand Down
7 changes: 7 additions & 0 deletions config/Modules/Centreon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,10 @@ services:
calls:
- method: setSqlRequestTranslator
arguments: ['@sqlRequestTranslator']

# Monitoring Timeline
Centreon\Domain\Monitoring\Interfaces\TimelineRepositoryInterface:
class: Centreon\Infrastructure\Monitoring\TimelineRepositoryRDB
calls:
- method: setSqlRequestTranslator
arguments: ['@sqlRequestTranslator']
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Centreon\Domain\Acknowledgement\Acknowledgement:
type: int
groups:
- 'ack_main'
- 'ack_event_list'
authorId:
type: int
groups:
Expand All @@ -12,14 +13,17 @@ Centreon\Domain\Acknowledgement\Acknowledgement:
type: string
groups:
- 'ack_main'
- 'ack_event_list'
deletionTime:
type: DateTime
groups:
- 'ack_main'
- 'ack_event_list'
entryTime:
type: DateTime
groups:
- 'ack_main'
- 'ack_event_list'
hostId:
type: int
groups:
Expand All @@ -32,19 +36,23 @@ Centreon\Domain\Acknowledgement\Acknowledgement:
type: bool
groups:
- 'ack_main'
- 'ack_event_list'
isPersistentComment:
type: bool
groups:
- 'ack_main'
- 'ack_event_list'
isSticky:
type: bool
groups:
- 'ack_main'
- 'ack_event_list'
serviceId:
type: int
groups:
- 'ack_service'
state:
type: int
groups:
- 'ack_main'
- 'ack_main'
- 'ack_event_list'
14 changes: 13 additions & 1 deletion config/packages/serializer/Centreon/Downtime.Downtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ Centreon\Domain\Downtime\Downtime:
type: int
groups:
- 'downtime_main'
- 'downtime_event_list'
entryTime:
type: DateTime
groups:
- 'downtime_main'
- 'downtime_event_list'
authorId:
type: int
groups:
Expand All @@ -24,28 +26,34 @@ Centreon\Domain\Downtime\Downtime:
type: bool
groups:
- 'downtime_main'
- 'downtime_event_list'
comment:
type: string
groups:
- 'downtime_main'
- 'downtime_event_list'
deletionTime:
type: DateTime
groups:
- 'downtime_main'
- 'downtime_event_list'
duration:
type: int
groups:
- 'downtime_main'
- 'downtime_event_list'
endTime:
type: DateTime<'Y-m-d\TH:i:sP'>
groups:
- 'downtime_main'
- 'downtime_event_list'
internalId:
type: int
isFixed:
type: bool
groups:
- 'downtime_main'
- 'downtime_event_list'
pollerId:
type: int
groups:
Expand All @@ -54,15 +62,19 @@ Centreon\Domain\Downtime\Downtime:
type: DateTime<'Y-m-d\TH:i:sP'>
groups:
- 'downtime_main'
- 'downtime_event_list'
actualStartTime:
type: DateTime
groups:
- 'downtime_main'
- 'downtime_event_list'
actualEndTime:
type: DateTime
groups:
- 'downtime_main'
- 'downtime_event_list'
isStarted:
type: bool
groups:
- 'downtime_main'
- 'downtime_main'
- 'downtime_event_list'
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Centreon\Domain\Monitoring\Entity\AckEventObject:
properties:
id:
type: int
groups:
- 'ack_event_list'
author:
type: string
groups:
- 'ack_event_list'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Centreon\Domain\Monitoring\Entity\CommentEventObject:
properties:
id:
type: int
groups:
- 'comment_event_list'
- 'comment_event_full'
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Centreon\Domain\Monitoring\Entity\DowntimeEventObject:
properties:
id:
type: int
groups:
- 'downtime_event_list'
author:
type: string
groups:
- 'downtime_event_list'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Centreon\Domain\Monitoring\Entity\LogEventObject:
properties:
id:
type: int
groups:
- 'log_event_list'
- 'log_event_full'
27 changes: 27 additions & 0 deletions config/packages/serializer/Centreon/Monitoring.Model.Comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Centreon\Domain\Monitoring\Model\Comment:
properties:
id:
type: int
groups:
- 'comment_event_list'
- 'comment_event_full'
entryTime:
type: DateTime<'Y-m-d\TH:i:sP'>
groups:
- 'comment_event_list'
- 'comment_event_full'
data:
type: string
groups:
- 'comment_event_list'
- 'comment_event_full'
author:
type: string
groups:
- 'comment_event_list'
- 'comment_event_full'
persistent:
type: int
groups:
- 'comment_event_list'
- 'comment_event_full'
46 changes: 46 additions & 0 deletions config/packages/serializer/Centreon/Monitoring.Model.Log.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Centreon\Domain\Monitoring\Model\Log:
properties:
id:
type: int
groups:
- 'log_event_list'
- 'log_event_full'
output:
type: string
groups:
- 'log_event_list'
- 'log_event_full'
createTime:
type: DateTime<'Y-m-d\TH:i:sP'>
groups:
- 'log_event_list'
- 'log_event_full'
status:
type: string
accessor:
getter: getStatusText
groups:
- 'log_event_list'
- 'log_event_full'
type:
type: string
accessor:
getter: getTypeText
groups:
- 'log_event_list'
- 'log_event_full'
retry:
type: int
groups:
- 'log_event_list'
- 'log_event_full'
contact:
type: string
groups:
- 'log_event_list'
- 'log_event_full'
command:
type: string
groups:
- 'log_event_list'
- 'log_event_full'
18 changes: 18 additions & 0 deletions config/packages/serializer/Centreon/Monitoring.TimelineEvent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Centreon\Domain\Monitoring\TimelineEvent:
virtual_properties:
getType:
serialized_name: type
groups:
- 'timeline_list'
getId:
serialized_name: id
groups:
- 'timeline_list'
getTimestamp:
serialized_name: date
groups:
- 'timeline_list'
properties:
object:
groups:
- 'timeline_list'
12 changes: 12 additions & 0 deletions config/routes/Centreon/monitoring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,16 @@ centreon_application_monitoring_gethostgroupsbyhost:
methods: GET
path: /monitoring/hosts/{hostId}/hostgroups
controller: 'Centreon\Application\Controller\MonitoringHostsController::getHostGroupsByHost'
condition: "request.attributes.get('version.is_beta') == true"

centreon_application_monitoring_gettimelinebyhostandservice:
methods: GET
path: /monitoring/hosts/{hostId}/services/{serviceId}/timeline
controller: 'Centreon\Application\Controller\MonitoringServicesController::getServiceTimeline'
condition: "request.attributes.get('version.is_beta') == true"

centreon_application_monitoring_gettimelinebyhost:
methods: GET
path: /monitoring/hosts/{hostId}/timeline
controller: 'Centreon\Application\Controller\MonitoringHostsController::getHostTimeline'
condition: "request.attributes.get('version.is_beta') == true"
8 changes: 8 additions & 0 deletions doc/API/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# API Documentation Guide

## How to build ?

```console
npm install -g redoc-cli
redoc-cli bundle --options.hideDownloadButton=true centreon-api-v2.yaml -o centreon-api-v2.html
```
142 changes: 85 additions & 57 deletions doc/API/centreon-api-v2.html

Large diffs are not rendered by default.

Loading