Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Commit 6a6e660

Browse files
committed
formatted environment variable list as table
1 parent 1a8a0fd commit 6a6e660

File tree

2 files changed

+38
-6
lines changed

2 files changed

+38
-6
lines changed

quasar/quasar.conf.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ module.exports = function(ctx) {
5757
"QSelect",
5858
"QForm",
5959
"QSpinnerGears",
60-
"QInnerLoading"
60+
"QInnerLoading",
61+
"QTable",
62+
"QTh",
63+
"QTr",
64+
"QTd"
6165
],
6266

6367
directives: ["Ripple", "ClosePopup"],

quasar/src/pages/Environment.vue

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,46 @@
11
<template>
22
<base-page>
33
<page-header>Environment Variables</page-header>
4-
<div v-for="(value, key) in env" :key="key">
5-
<q-chip>{{ key }}</q-chip
6-
><q-chip text-color="white" color="teal">{{ value }}</q-chip>
7-
</div>
4+
<q-table
5+
compact
6+
:hide-bottom="true"
7+
:dark="$store.getters.isDark"
8+
dense
9+
row-key="name"
10+
:data="env"
11+
:pagination.sync="pagination"
12+
:columns="columns"
13+
/>
814
</base-page>
915
</template>
1016

1117
<script>
1218
export default {
1319
data() {
1420
return {
15-
env: process.env
21+
pagination: {
22+
rowsPerPage: 0
23+
},
24+
columns: [
25+
{
26+
name: "key",
27+
align: "left",
28+
label: "Environment Variable",
29+
field: "key"
30+
},
31+
{
32+
name: "value",
33+
align: "left",
34+
label: "Value",
35+
field: "value"
36+
}
37+
],
38+
env: Object.keys(process.env).map(x => {
39+
return {
40+
key: x,
41+
value: process.env[x]
42+
};
43+
})
1644
};
1745
}
1846
};

0 commit comments

Comments
 (0)