Skip to content

Commit eb5ce75

Browse files
committed
Add Free Space Table
1 parent 979f9e8 commit eb5ce75

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

src/adabas/admin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const AdminCommands = [
4040
{ command: "holdqueue", path: ["HoldQueue"] },
4141
{ command: "commandstats", path: ["CommandStats", "Commands"] },
4242
{ command: "monitor", path: ["Statistics"] },
43-
{ command: "container", path: ["Container", "ContainerList"] },
43+
{ command: "container", path: ["Container"] },
4444
{ command: "file", path: ["Files"] },
4545
{ command: "parameterinfo", path: ["ParameterInfo", "Parameter"] },
4646
{ command: "threadtable", path: ["Threads"] },
@@ -201,7 +201,7 @@ export class AdabasAdmin {
201201
}
202202
// Provide the container list with size
203203
containerList(): Promise<any> {
204-
return triggerCallCommandArray(this.status.Dbid, 8);
204+
return triggerCallCommand(this.status.Dbid, 8);
205205
}
206206
// Get the Adabas file list of the Adabas database
207207
fileList(): Promise<any> {

src/components/ContainerList.vue

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="containerlist p-2">
1818
<Sidebar :url="url" />
1919
<b-card
20-
:header="'Adabas Database containers for database ' + url"
20+
:header="'Adabas Database containers and Free Space Table data for database ' + url"
2121
border-variant="secondary"
2222
header-border-variant="secondary"
2323
>
@@ -26,15 +26,17 @@
2626
<b-row
2727
><b-col>
2828
This page provides the list of Adabas database containers to be
29-
administrate through this Adabas RESTful server.
29+
administrate through this Adabas RESTful server. The Free Space table is in an extra table.
3030
</b-col></b-row
3131
>
3232
<b-row
3333
><b-col> <Url url="/adabas/database" /> </b-col
3434
></b-row>
3535
<b-row
3636
><b-col>
37-
<b-table
37+
<b-tabs content-class="mt-3">
38+
<b-tab title="Container" active>
39+
<b-table
3840
striped
3941
bordered
4042
hover
@@ -46,6 +48,22 @@
4648
{{ calculate(row.item) }}
4749
</template>
4850
</b-table>
51+
</b-tab>
52+
<b-tab title="Free Space Table">
53+
<b-table
54+
striped
55+
bordered
56+
hover
57+
small
58+
:items="fst"
59+
:fields="fstFields"
60+
>
61+
<template v-slot:cell(BlockSize)="row">
62+
{{ row.item.BlockSize }}KB
63+
</template>
64+
</b-table>
65+
</b-tab>
66+
</b-tabs>
4967
</b-col></b-row
5068
>
5169
</b-container>
@@ -70,7 +88,7 @@ import { SearchDatabases } from '@/adabas/admin';
7088
Url,
7189
},
7290
})
73-
export default class DatabaseList extends Vue {
91+
export default class ContainerList extends Vue {
7492
@Prop(String) readonly url: string | undefined;
7593
data() {
7694
return {
@@ -85,13 +103,22 @@ export default class DatabaseList extends Vue {
85103
'FirstUnusedRabn',
86104
{ label: 'Size', key: 'calc' },
87105
],
106+
fstFields: [
107+
'Type',
108+
'FirstRABN',
109+
'LastRABN',
110+
'BlockSize'
111+
],
88112
containers: [],
113+
fst: [],
89114
};
90115
}
91116
created() {
92117
const db = SearchDatabases(this.url);
93118
db.containerList().then((response: any) => {
94-
this.$data.containers = response;
119+
console.log(JSON.stringify(response));
120+
this.$data.containers = response.Container.ContainerList;
121+
this.$data.fst = response.Container.FreeSpaceTable;
95122
});
96123
}
97124
calculate(container: any): string {

src/components/PermissionList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
</b-table></b-col></b-row
119119
></b-container>
120120
</b-tab>
121-
<b-tab title="User roles" active>
121+
<b-tab title="User roles">
122122
<b-container>
123123
<b-row
124124
><b-col sm="10">

0 commit comments

Comments
 (0)