use configured telegraf db on kubernetes dashboard
parent
2534b6dc63
commit
7b57dcc428
|
@ -9,6 +9,7 @@ export const KubernetesPage = React.createClass({
|
||||||
links: PropTypes.shape({
|
links: PropTypes.shape({
|
||||||
proxy: PropTypes.string.isRequired,
|
proxy: PropTypes.string.isRequired,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
|
telegraf: PropTypes.string.isRequired,
|
||||||
}),
|
}),
|
||||||
layouts: PropTypes.arrayOf(PropTypes.shape().isRequired).isRequired,
|
layouts: PropTypes.arrayOf(PropTypes.shape().isRequired).isRequired,
|
||||||
},
|
},
|
||||||
|
@ -23,7 +24,7 @@ export const KubernetesPage = React.createClass({
|
||||||
renderLayouts(layouts) {
|
renderLayouts(layouts) {
|
||||||
const autoRefreshMs = 15000;
|
const autoRefreshMs = 15000;
|
||||||
const {timeRange} = this.state;
|
const {timeRange} = this.state;
|
||||||
const source = this.props.source.links.proxy;
|
const {source} = this.props;
|
||||||
|
|
||||||
let layoutCells = [];
|
let layoutCells = [];
|
||||||
layouts.forEach((layout) => {
|
layouts.forEach((layout) => {
|
||||||
|
@ -33,7 +34,7 @@ export const KubernetesPage = React.createClass({
|
||||||
layoutCells.forEach((cell, i) => {
|
layoutCells.forEach((cell, i) => {
|
||||||
cell.queries.forEach((q) => {
|
cell.queries.forEach((q) => {
|
||||||
q.text = q.query;
|
q.text = q.query;
|
||||||
q.database = q.db;
|
q.database = source.telegraf;
|
||||||
});
|
});
|
||||||
cell.x = (i * 4 % 12); // eslint-disable-line no-magic-numbers
|
cell.x = (i * 4 % 12); // eslint-disable-line no-magic-numbers
|
||||||
cell.y = 0;
|
cell.y = 0;
|
||||||
|
@ -44,7 +45,7 @@ export const KubernetesPage = React.createClass({
|
||||||
timeRange={timeRange}
|
timeRange={timeRange}
|
||||||
cells={layoutCells}
|
cells={layoutCells}
|
||||||
autoRefreshMs={autoRefreshMs}
|
autoRefreshMs={autoRefreshMs}
|
||||||
source={source}
|
source={source.links.proxy}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue