This repository has been archived by the owner on Oct 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Dynamic global dashboards of analytics
Closes gravitee-io/issues#2595
- Loading branch information
Showing
50 changed files
with
1,493 additions
and
1,152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
# Analytics | ||
|
||
You can manage analytics. | ||
## Settings | ||
|
||
You can manage analytics settings. | ||
|
||
## Dashboards | ||
|
||
Here you are able to manage the dashboards you want to display. | ||
|
||
You can manage finely the dashboards to display on APIs, applications or on the platform. | ||
|
||
You can add, delete, edit/reorder or enabled/disable dashboards and configure the widgets you want to display on each. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Dashboard | ||
|
||
Here you can organize your dashboard by moving and resizing the widgets. | ||
|
||
You can also add and delete widgets to display the metrics you want/need. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
src/components/widget/line/widget-chart-line-configuration.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright (C) 2015 The Gravitee team (http://gravitee.io) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import DashboardService from "../../../services/dashboard.service"; | ||
import * as _ from "lodash"; | ||
const WidgetChartLineConfigurationComponent: ng.IComponentOptions = { | ||
template: require('./widget-chart-line-configuration.html'), | ||
bindings: { | ||
chart: '<' | ||
}, | ||
controller: function (DashboardService: DashboardService) { | ||
'ngInject'; | ||
this.fields = DashboardService.getAggregateFields(); | ||
|
||
this.$onInit = () => { | ||
this.data = []; | ||
if (this.chart.request) { | ||
if (this.chart.request.aggs) { | ||
this.data = this.chart.request.aggs.split('%3B'); | ||
} | ||
} else { | ||
_.merge(this.chart, { | ||
request: { | ||
type: 'date_histo', | ||
aggs: '' | ||
}, | ||
labels: [] | ||
}); | ||
} | ||
}; | ||
|
||
this.onDataChanged = () => { | ||
this.chart.request.aggs = ''; | ||
this.chart.labels = []; | ||
let last = _.last(this.data); | ||
_.forEach(this.data, (data) => { | ||
this.chart.request.aggs += data + (last === data ? '' : '%3B'); | ||
this.chart.labels.push(_.find(this.fields, {aggValue: data}).label); | ||
}); | ||
}; | ||
} | ||
}; | ||
|
||
export default WidgetChartLineConfigurationComponent; |
39 changes: 39 additions & 0 deletions
39
src/components/widget/line/widget-chart-line-configuration.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!-- | ||
Copyright (C) 2015 The Gravitee team (http://gravitee.io) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<div layout="column"> | ||
|
||
<md-input-container> | ||
<label>Field</label> | ||
<md-select ng-model="$ctrl.data" ng-change="$ctrl.onDataChanged()" multiple="true"> | ||
<md-option ng-repeat="field in $ctrl.fields" ng-value="field.aggValue">{{field.aggLabel}}</md-option> | ||
</md-select> | ||
</md-input-container> | ||
|
||
<md-input-container> | ||
<md-checkbox ng-model="$ctrl.chart.stacked"> | ||
Display stacked | ||
</md-checkbox> | ||
</md-input-container> | ||
|
||
<md-input-container> | ||
<md-checkbox ng-model="$ctrl.chart.selectable"> | ||
Allows to check a field to filter | ||
</md-checkbox> | ||
</md-input-container> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.