The file src/main/resources/sekelton.yaml
contains the metric definitions.
The format is as follows:
TODO
In components
you find key
and value
. In yaml, key is allowed only once. Therefore, please use an array to define values of the same type.
The value can be a string, a dateperiod or a list of links. The dateperiod is a string with the format yyyy-MM-dd
.
Remark: A team YAML is not required. But if there is a team YAML, an application YAML is required. It is not allowed to have the same activity in a team YAML and an application YAML.
Create application.properties file with the following content:
#metricCA.skeleton.path=src/main/resources/skeleton.yaml
#metricCA.application.path=definitions/
metricCA.git.branch=TODO
metricCA.git.url=https://github.com/TODO/TODO.git
metricCA.api.baseurl=http://todo
metricCA.grafana.baseurl=http://todo
metricCA.grafana.apiKey=TODO
metricCA.grafana.template.path=/app/resources/templates/
metricCa.levels=Level 1, Level 2, Level 3
docker compose up
./mvnw spring-boot:run
In an other shell:
docker compose up # to startup grafana (or use your own grafana instance)
Go to grafana (e.g. localhost:3000) and setup a service account token with admin rights.
Put the token in the application.properties
for the property metricCA.grafana.apiKey
file.
Install Infinity and add it as Data Source via Connection in Grafana as admin.
Extract the Infinity datasource id from Grafana and put it in the application.properties
for the property metricCA.grafana.infinity.datasource.id
.
export spring_profiles_active=dev
mvn spring-boot:run
In case an activity with different periods for different levels is used, we couldn't find a way to display the data in a single panel. Therefore, we created multiple panels for each level. In a panel, we show the end date of a period, this is not possible in case of multiple periods. It might be possible to have different selectors to switch between Levels in a single panel.
In case an activity with same period for different levels is used, the data can be displayed in a single panel.
Assuming you are using infinity plugin:
Inspect
-> Panel JSON
src/main/resources/templates/panel-infinity-overview/<name>.ftl
and/or src/main/resources/templates/panel-infinity-team/<name>.ftl
title
and URL
in the JSON with #{title}
and #{url}
respectivelyApplicationDirector
)resources/skeleton.yaml
in the method to Java object skeletons (getDeserializedApplications()
creates sekelton/SeketlonActivity
)
deserialization/skeleton/Period
to represent the activity details (e.g. Thresholds
-> DatePeriod
)getDeserializedApplications(skeletonActivities)
, the ActivityDirector
creates the activities from the skeletons and the activity YAML files from git (or for development local file system /activities
)
ActivityFactory
is called by the ActivityDirector
to create the activitiesActivityFactory
deserializes the YAML files to Java objectsActivityFactory
uses the ActivityBuilder
to transport the data from the skeleton to the activityThresholdDatePeriodManager
calculates the DatePeriod
based on the given dates form YAMLs and threshold-Period
s