added get functions

This commit is contained in:
2024-02-08 13:12:01 +01:00
parent 73d0b89b4d
commit c91f9a53b6
31 changed files with 6614 additions and 2442 deletions

View File

@ -17,29 +17,51 @@
State</th>
<th :class="['User', darkMode ? 'th-darkmode' : 'th-lightmode']">User</th>
</tr>
<tr :class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
<tr v-for="item in configItemList" :key="item.primaryID"
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']">
<td
:class="['Client', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Client-darkmode' : 'Client-lightmode']">
...</td>
{{ item.customer }}
</td>
<td
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
...</td>
<router-link to="/solutions" class="button"
:class="[darkMode ? 'button-darkmode' : 'button-lightmode']"> {{
item.assetName }} </router-link>
</td>
<td
:class="['Type', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Type-darkmode' : 'Type-lightmode']">
...</td>
{{ item.type }}</td>
<td
:class="['State', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'State-darkmode' : 'State-lightmode']">
...</td>
<td :class="['User', darkMode ? 'td-darkmode' : 'td-lightmode']">...</td>
{{ item.state }}</td>
<td :class="['User', darkMode ? 'td-darkmode' : 'td-lightmode']"> {{ item.user }}</td>
</tr>
</table>
</div>
</template>
<script setup>
import { ref } from 'vue';
import { ref, onMounted } from 'vue';
import Axios from '../axios.config.js';
import serversideConfig from '../serversideConfig.js';
const darkMode = ref(true)
const configItemList = ref([]);
//get all config items
const getConfigItems = async () => {
try {
const response = await Axios.get(`https://${serversideConfig.url}:3000/api/getAllConfigItems`);
configItemList.value = response.data;
} catch (err) {
console.log(err.response.statusText);
}
}
onMounted(() => {
getConfigItems();
});
</script>
<script>
@ -197,4 +219,5 @@ th {
.label-lightmode {
color: #000;
}</style>
}
</style>