Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 1 | <template> |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 2 | <overview-card |
Dixsie Wolmers | 182b3f1 | 2021-09-24 14:35:34 -0500 | [diff] [blame] | 3 | v-if="network" |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 4 | :title="$t('pageOverview.networkInformation')" |
| 5 | :to="`/settings/network`" |
| 6 | > |
| 7 | <b-row class="mt-3"> |
| 8 | <b-col sm="6"> |
| 9 | <dl> |
Dixsie Wolmers | 182b3f1 | 2021-09-24 14:35:34 -0500 | [diff] [blame] | 10 | <dt>{{ $t('pageOverview.hostName') }}</dt> |
| 11 | <dd>{{ dataFormatter(network.hostname) }}</dd> |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 12 | </dl> |
| 13 | </b-col> |
| 14 | <b-col sm="6"> |
| 15 | <dl> |
| 16 | <dt>{{ $t('pageOverview.linkStatus') }}</dt> |
| 17 | <dd> |
Dixsie Wolmers | 182b3f1 | 2021-09-24 14:35:34 -0500 | [diff] [blame] | 18 | {{ dataFormatter(network.linkStatus) }} |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 19 | </dd> |
| 20 | </dl> |
| 21 | </b-col> |
| 22 | </b-row> |
| 23 | <b-row> |
| 24 | <b-col> |
| 25 | <dl> |
| 26 | <dt>{{ $t('pageOverview.ipv4') }}</dt> |
| 27 | <dd> |
Dixsie Wolmers | 182b3f1 | 2021-09-24 14:35:34 -0500 | [diff] [blame] | 28 | {{ dataFormatter(network.staticAddress) }} |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 29 | </dd> |
| 30 | </dl> |
| 31 | </b-col> |
| 32 | <b-col> |
| 33 | <dl> |
| 34 | <dt>{{ $t('pageOverview.dhcp') }}</dt> |
| 35 | <dd> |
Dixsie Wolmers | 182b3f1 | 2021-09-24 14:35:34 -0500 | [diff] [blame] | 36 | {{ |
| 37 | dataFormatter( |
Konstantin Aladyshev | b98a133 | 2021-12-01 17:58:47 +0300 | [diff] [blame] | 38 | network.dhcpAddress.length !== 0 |
| 39 | ? network.dhcpAddress[0].Address |
| 40 | : null |
Dixsie Wolmers | 182b3f1 | 2021-09-24 14:35:34 -0500 | [diff] [blame] | 41 | ) |
| 42 | }} |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 43 | </dd> |
| 44 | </dl> |
| 45 | </b-col> |
| 46 | </b-row> |
| 47 | </overview-card> |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 48 | </template> |
| 49 | |
| 50 | <script> |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 51 | import OverviewCard from './OverviewCard'; |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 52 | import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 53 | |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 54 | export default { |
| 55 | name: 'Network', |
Dixsie Wolmers | 6a192d5 | 2021-09-02 15:26:58 -0500 | [diff] [blame] | 56 | components: { |
| 57 | OverviewCard, |
| 58 | }, |
Dixsie Wolmers | 9726f9a | 2021-09-07 15:33:16 -0500 | [diff] [blame] | 59 | mixins: [DataFormatterMixin], |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 60 | computed: { |
Dixsie Wolmers | 182b3f1 | 2021-09-24 14:35:34 -0500 | [diff] [blame] | 61 | network() { |
| 62 | return this.$store.getters['network/globalNetworkSettings'][0]; |
| 63 | }, |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 64 | }, |
| 65 | created() { |
Sandeepa Singh | f67f769 | 2021-07-19 18:04:18 +0530 | [diff] [blame] | 66 | this.$store.dispatch('network/getEthernetData').finally(() => { |
Sukanya Pandey | edb8a77 | 2020-10-29 11:33:42 +0530 | [diff] [blame] | 67 | this.$root.$emit('overview-network-complete'); |
Yoshie Muranaka | 598bf7e | 2020-05-01 12:26:00 -0700 | [diff] [blame] | 68 | }); |
Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 69 | }, |
Dixsie Wolmers | 9d40e30 | 2020-02-13 13:29:40 -0600 | [diff] [blame] | 70 | }; |
| 71 | </script> |