Skip to content

Commit

Permalink
FIX: format
Browse files Browse the repository at this point in the history
  • Loading branch information
gbayasgalan committed Oct 18, 2024
1 parent c1e7181 commit b9e6b84
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 200 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<template>
<div class="theCpuParent flex w-full h-full justify-center items-center">
<div class="cpuIco w-1/3 h-full flex flex-col justify-center items-center">
<div
class="cpuIco-container flex justify-center items-center w-full h-4/5 relative p-2"
>
<div class="cpuIco-container flex justify-center items-center w-full h-4/5 relative p-2">
<img
class="w-3/4"
src="/img/icon/control-page-icons/cpuIcon.svg"
:style="{
filter:
controlStore.tempCPU === null ||
controlStore.tempCPU === undefined ||
controlStore.tempCPU === ''
controlStore.tempCPU === null || controlStore.tempCPU === undefined || controlStore.tempCPU === ''
? ''
: tempCPU === 'green'
? 'invert(40%) sepia(90%) saturate(500%) hue-rotate(90deg)'
Expand All @@ -28,21 +24,10 @@
>{{ controlStore.tempCPU }}</span
>
</div>
<span
class="w-full h-1/5 flex justify-center items-center text-gray-200 text-2xs font-semibold uppercase"
>cpu</span
>
<span class="w-full h-1/5 flex justify-center items-center text-gray-200 text-2xs font-semibold uppercase">cpu</span>
</div>
<div
v-if="chartSeries && chartOptions"
class="cpuCountPart w-2/3 h-full flex justify-start items-center pr-1"
>
<VueApexCharts
v-if="chartSeries"
:options="chartOptions"
:series="chartSeries"
class="full-size-chart"
/>
<div v-if="chartSeries && chartOptions" class="cpuCountPart w-2/3 h-full flex justify-start items-center pr-1">
<VueApexCharts v-if="chartSeries" :options="chartOptions" :series="chartSeries" class="full-size-chart" />
</div>
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
/>
</div>

<div
class="widget-name flex w-full h-1/6 justify-center items-center uppercase text-gray-200 text-[50%] font-semibold"
>
<div class="widget-name flex w-full h-1/6 justify-center items-center uppercase text-gray-200 text-[50%] font-semibold">
{{ t("controlPage.connectValWidg") }}
</div>
</template>
Expand Down Expand Up @@ -47,8 +45,7 @@ const getKeyCount = (validator) => {
if (!validator || stakingStore.keys.length === 0) {
return 0;
}
return stakingStore.keys.filter((key) => key.validatorID === validator.config.serviceID)
.length;
return stakingStore.keys.filter((key) => key.validatorID === validator.config.serviceID).length;
};
const setCursor = (info) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<template>
<div
class="pair-state-parent w-full h-full flex flex-col justify-center items-center relative"
>
<div class="pair-state-parent w-full h-full flex flex-col justify-center items-center relative">
<NoData v-if="!setupStore?.selectedSetup" />
<template v-else>
<ServiceState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
<template>
<div class="peers-over-time_parent flex w-full h-full justify-center items-center">
<div
class="peers-over-time_ico w-1/3 h-full flex flex-col justify-center items-center"
>
<div
class="peers-over-time_ico_container flex justify-center items-center w-full h-4/5"
>
<div class="peers-over-time_ico w-1/3 h-full flex flex-col justify-center items-center">
<div class="peers-over-time_ico_container flex justify-center items-center w-full h-4/5">
<img class="w-3/4" src="/img/icon/control-page-icons/PeertoPeerIcon.png" />
</div>
<span
class="w-full h-1/5 flex justify-center items-center text-center text-gray-200 text-[40%] font-semibold uppercase"
>
<span class="w-full h-1/5 flex justify-center items-center text-center text-gray-200 text-[40%] font-semibold uppercase">
{{ t("controlPage.pOverTime") }}
</span>
</div>
Expand All @@ -21,41 +15,24 @@
@mouseleave="footerStore.cursorLocation = ''"
>
<NoData v-if="setupStore.selectedServicePairs === null" />
<VueApexCharts
v-else
:options="chartOptions"
:series="chartSeries"
class="full-size-chart"
/>
<VueApexCharts v-else :options="chartOptions" :series="chartSeries" class="full-size-chart" />
</div>

<div
v-if="setupStore.selectedServicePairs !== null"
class="iconss w-1/5 h-full flex justify-center items-center flex-col gap-1"
>
<div v-if="setupStore.selectedServicePairs !== null" class="iconss w-1/5 h-full flex justify-center items-center flex-col gap-1">
<div
class="service-icon flex justify-center items-center w-8 p-1 rounded-md"
:style="{ background: selectedService === 'consensus' ? '#94DEFF' : '' }"
@click="selectService('consensus')"
>
<img
:class="isServiceLoading('consensus') ? 'animate-spin' : ''"
:src="getServiceIcon('consensus')"
alt="consensus"
/>
<img :class="isServiceLoading('consensus') ? 'animate-spin' : ''" :src="getServiceIcon('consensus')" alt="consensus" />
</div>

<div
class="service-icon flex justify-center items-center w-8 p-1 rounded-md"
:style="{ background: selectedService === 'execution' ? '#94DEFF' : '' }"
@click="selectService('execution')"
>
<img
class="w-10"
:class="isServiceLoading('execution') ? 'animate-spin' : ''"
:src="getServiceIcon('execution')"
alt="execution"
/>
<img class="w-10" :class="isServiceLoading('execution') ? 'animate-spin' : ''" :src="getServiceIcon('execution')" alt="execution" />
</div>
</div>
</div>
Expand Down Expand Up @@ -147,13 +124,9 @@ const updateChartData = () => {
if (!serviceId) return;
const p2pData = Array.isArray(controlStore.p2pstatus?.data)
? controlStore.p2pstatus.data
: [];
const p2pData = Array.isArray(controlStore.p2pstatus?.data) ? controlStore.p2pstatus.data : [];
const peerDetails = p2pData.find(
(pair) => pair.details[serviceType]?.serviceID === serviceId
)?.details[serviceType];
const peerDetails = p2pData.find((pair) => pair.details[serviceType]?.serviceID === serviceId)?.details[serviceType];
const newPeerData = peerDetails ? peerDetails.numPeer : 0;
const currentTime = new Date().getTime();
Expand All @@ -178,8 +151,7 @@ const selectService = (service) => {
chartData.value = [];
};
const isServiceLoading = (service) =>
!setupStore.selectedServicePairs?.[`${service}Service`]?.icon;
const isServiceLoading = (service) => !setupStore.selectedServicePairs?.[`${service}Service`]?.icon;
const getServiceIcon = (service) =>
isServiceLoading(service)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
<template>
<div
class="rpc-recieved-parent w-full h-full flex justify-center items-center flex-col relative"
>
<div class="rpc-recieved-parent w-full h-full flex justify-center items-center flex-col relative">
<NoData v-if="!setupStore?.selectedSetup" />
<template v-else>
<div
class="widget-name w-full h-1/5 flex justify-center items-center text-gray-200 uppercase font-semibold text-[55%]"
>
<div class="widget-name w-full h-1/5 flex justify-center items-center text-gray-200 uppercase font-semibold text-[55%]">
RPC RECEIVED OVER TIME
</div>
<div
v-if="chartOptions && chartSeries"
class="widget-box w-full h-4/5 justify-center items-center flex flex-col"
>
<VueApexCharts
:options="chartOptions"
:series="chartSeries"
class="fullSizeChart"
></VueApexCharts>
<div v-if="chartOptions && chartSeries" class="widget-box w-full h-4/5 justify-center items-center flex flex-col">
<VueApexCharts :options="chartOptions" :series="chartSeries" class="fullSizeChart"></VueApexCharts>
</div>
</template>
</div>
Expand Down Expand Up @@ -106,13 +95,9 @@ const rpcOverTimeData = async () => {
if (!rpcPort) return;
const rpcReceivedData = Array.isArray(controlStore?.rpcReceivedData)
? controlStore.rpcReceivedData
: [];
const rpcReceivedData = Array.isArray(controlStore?.rpcReceivedData) ? controlStore.rpcReceivedData : [];
const rpcDetails = rpcReceivedData.find(
(item) => Number(item.srcPort) === Number(rpcPort)
);
const rpcDetails = rpcReceivedData.find((item) => Number(item.srcPort) === Number(rpcPort));
const rpcDataCount = rpcDetails?.receivedDataLength || 0;
Expand Down
Loading

0 comments on commit b9e6b84

Please sign in to comment.