Skip to content

Commit

Permalink
fix #260
Browse files Browse the repository at this point in the history
  • Loading branch information
cars10 committed Sep 11, 2024
1 parent efe0754 commit c90b58a
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.1.0

* show node version on nodes overview, fixes [#260](https://github.com/cars10/elasticvue/issues/260)
* update to vue `3.5`

## 1.0.11

* update chinese translation, thanks @XiangtingLee, fixes [#251](https://github.com/cars10/elasticvue/pull/251)
Expand Down
1 change: 1 addition & 0 deletions src/components/nodes/ClusterNodes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
'ip',
'id',
'name',
'version',
'heap.percent',
'heap.current',
'heap.max',
Expand Down
6 changes: 4 additions & 2 deletions src/components/nodes/NodesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
data-testid="nodes-table"
:rows-per-page-options="DEFAULT_ROWS_PER_PAGE"
:pagination="{sortBy: 'name'}">
<template #body="{row}">
<template #body="{row}: {row: ElasticsearchNode}">
<tr>
<td>
<node-icons :elasticsearch-node="row" />
</td>
<td>{{ row.name }}</td>
<td>{{ row.version }}</td>
<td>{{ row.id }}</td>
<td>{{ row.ip }}</td>
<td>
Expand Down Expand Up @@ -88,13 +89,14 @@
const filter = ref('')
const items = computed(() => {
const results = filterItems<EsNode>(props.nodes, filter.value, ['name', 'ip', 'id'])
const results = filterItems<EsNode>(props.nodes, filter.value, ['name', 'ip', 'id', 'version'])
return results.map(r => new ElasticsearchNode(r))
})
const columns = genColumns([
{ label: t('cluster_nodes.node_properties.status'), field: '', align: 'left' },
{ label: t('cluster_nodes.node_properties.name'), field: 'name', align: 'left' },
{ label: t('cluster_nodes.node_properties.version'), field: 'version', align: 'left' },
{ label: t('cluster_nodes.node_properties.id'), field: 'id', align: 'left' },
{ label: t('cluster_nodes.node_properties.ip'), field: 'ip', align: 'left' },
{ label: t('cluster_nodes.node_properties.master'), field: 'master', align: 'left' },
Expand Down
3 changes: 2 additions & 1 deletion src/locales/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@
"heap": "堆内存",
"disk": "磁盘",
"name": "名称",
"status": "状态"
"status": "状态",
"version": "版本"
}
},
"query": {
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@
"heap": "heap",
"disk": "disk",
"name": "name",
"status": "status"
"status": "status",
"version": "version"
}
},
"query": {
Expand Down
3 changes: 2 additions & 1 deletion src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@
"heap": "Heap",
"disk": "Disque",
"name": "Nom",
"status": "Statut"
"status": "Statut",
"version": "Version"
}
},
"query": {
Expand Down
2 changes: 2 additions & 0 deletions src/models/ElasticsearchNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { EsNode } from '../types/types.ts'

export default class ElasticsearchNode {
name: string
version: string
id: string
ip: string
heapPercent: number
Expand All @@ -27,6 +28,7 @@ export default class ElasticsearchNode {

constructor (options: EsNode) {
this.name = options.name
this.version = options.version
this.id = options.id
this.ip = options.ip
this.heapPercent = parseFloatValue(options['heap.percent'])
Expand Down
1 change: 1 addition & 0 deletions src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export type EsNode = {
name: string,
id: string,
ip: string,
version: string,
'heap.percent': string,
'heap.current': string,
'heap.max': string,
Expand Down

0 comments on commit c90b58a

Please sign in to comment.