|
21 | 21 | $t('instances.details.datasource.title', { dataSource: dataSource }) |
22 | 22 | " |
23 | 23 | > |
24 | | - <div> |
25 | | - <sba-alert v-if="error" :error="error" :title="$t('term.fetch_failed')" /> |
| 24 | + <sba-alert v-if="error" :error="error" :title="$t('term.fetch_failed')" /> |
26 | 25 |
|
27 | | - <div v-if="current" class="level datasource-current"> |
28 | | - <div class="level-item has-text-centered"> |
29 | | - <div> |
30 | | - <p |
31 | | - class="heading has-bullet has-bullet-info" |
32 | | - v-text="$t('instances.details.datasource.active_connections')" |
33 | | - /> |
34 | | - <p v-text="current.active" /> |
35 | | - </div> |
36 | | - </div> |
37 | | - <div class="level-item has-text-centered"> |
38 | | - <div> |
39 | | - <p |
40 | | - class="heading" |
41 | | - v-text="$t('instances.details.datasource.min_connections')" |
42 | | - /> |
43 | | - <p v-text="current.min" /> |
44 | | - </div> |
45 | | - </div> |
46 | | - <div class="level-item has-text-centered"> |
47 | | - <div> |
48 | | - <p |
49 | | - class="heading" |
50 | | - v-text="$t('instances.details.datasource.max_connections')" |
51 | | - /> |
52 | | - <p v-if="current.max >= 0" v-text="current.max" /> |
53 | | - <p v-else v-text="$t('instances.details.datasource.unlimited')" /> |
54 | | - </div> |
55 | | - </div> |
56 | | - </div> |
57 | | - <datasource-chart v-if="chartData.length > 0" :data="chartData" /> |
58 | | - </div> |
| 26 | + <dl |
| 27 | + v-if="current" |
| 28 | + class="px-4 py-3 sm:grid sm:grid-cols-6 sm:gap-4 sm:px-6" |
| 29 | + > |
| 30 | + <dt |
| 31 | + class="text-sm font-medium text-gray-500 sm:col-span-4" |
| 32 | + v-text="$t('instances.details.datasource.active_connections')" |
| 33 | + /> |
| 34 | + <dd |
| 35 | + class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2" |
| 36 | + v-text="current.active" |
| 37 | + /> |
| 38 | + |
| 39 | + <dt |
| 40 | + class="text-sm font-medium text-gray-500 sm:col-span-4" |
| 41 | + v-text="$t('instances.details.datasource.min_connections')" |
| 42 | + /> |
| 43 | + <dd |
| 44 | + class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2" |
| 45 | + v-text="current.min" |
| 46 | + /> |
| 47 | + |
| 48 | + <dt |
| 49 | + class="text-sm font-medium text-gray-500 sm:col-span-4" |
| 50 | + v-text="$t('instances.details.datasource.max_connections')" |
| 51 | + /> |
| 52 | + <dd |
| 53 | + class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2" |
| 54 | + v-if="current.max >= 0" |
| 55 | + v-text="current.max" |
| 56 | + /> |
| 57 | + <dd |
| 58 | + class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2" |
| 59 | + v-else |
| 60 | + v-text="$t('instances.details.datasource.unlimited')" |
| 61 | + /> |
| 62 | + </dl> |
| 63 | + <datasource-chart v-if="chartData.length > 0" :data="chartData" /> |
59 | 64 | </sba-panel> |
60 | 65 | </template> |
61 | 66 |
|
@@ -91,17 +96,15 @@ export default { |
91 | 96 | methods: { |
92 | 97 | async fetchMetrics() { |
93 | 98 | const responseActive = this.instance.fetchMetric( |
94 | | - 'data.source.active.connections', |
95 | | - { name: this.dataSource }, |
96 | | - ); |
97 | | - const responseMin = this.instance.fetchMetric( |
98 | | - 'data.source.min.connections', |
99 | | - { name: this.dataSource }, |
100 | | - ); |
101 | | - const responseMax = this.instance.fetchMetric( |
102 | | - 'data.source.max.connections', |
| 99 | + 'jdbc.connections.active', |
103 | 100 | { name: this.dataSource }, |
104 | 101 | ); |
| 102 | + const responseMin = this.instance.fetchMetric('jdbc.connections.min', { |
| 103 | + name: this.dataSource, |
| 104 | + }); |
| 105 | + const responseMax = this.instance.fetchMetric('jdbc.connections.max', { |
| 106 | + name: this.dataSource, |
| 107 | + }); |
105 | 108 |
|
106 | 109 | return { |
107 | 110 | active: (await responseActive).data.measurements[0].value, |
|
0 commit comments