mirror of https://github.com/lissy93/dashy
🐛 Fixes CVE description not showing (#609)
This commit is contained in:
parent
8acb8cd6b2
commit
45fa35a384
|
@ -12,7 +12,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<p class="description">
|
<p class="cve-description">
|
||||||
{{ cve.description | formatDescription }}
|
{{ cve.description | formatDescription }}
|
||||||
<a v-if="cve.description.length > 350" class="read-more" :href="cve.url" target="_blank">
|
<a v-if="cve.description.length > 350" class="read-more" :href="cve.url" target="_blank">
|
||||||
{{ $t('widgets.general.open-link') }}
|
{{ $t('widgets.general.open-link') }}
|
||||||
|
@ -23,7 +23,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from 'axios';
|
|
||||||
import WidgetMixin from '@/mixins/WidgetMixin';
|
import WidgetMixin from '@/mixins/WidgetMixin';
|
||||||
import { timestampToDate, truncateStr } from '@/utils/MiscHelpers';
|
import { timestampToDate, truncateStr } from '@/utils/MiscHelpers';
|
||||||
import { widgetApiEndpoints, serviceEndpoints } from '@/utils/defaults';
|
import { widgetApiEndpoints, serviceEndpoints } from '@/utils/defaults';
|
||||||
|
@ -103,18 +102,8 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
/* Make GET request to CoinGecko API endpoint */
|
/* Make GET request to CoinGecko API endpoint */
|
||||||
fetchData() {
|
fetchData() {
|
||||||
axios.request({
|
this.defaultTimeout = 12000;
|
||||||
method: 'GET',
|
this.makeRequest(this.endpoint).then(this.processData);
|
||||||
url: this.proxyReqEndpoint,
|
|
||||||
headers: { 'Target-URL': this.endpoint },
|
|
||||||
})
|
|
||||||
.then((response) => {
|
|
||||||
this.processData(response.data);
|
|
||||||
}).catch((error) => {
|
|
||||||
this.error('Unable to fetch CVE data', error);
|
|
||||||
}).finally(() => {
|
|
||||||
this.finishLoading();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/* Assign data variables to the returned data */
|
/* Assign data variables to the returned data */
|
||||||
processData(data) {
|
processData(data) {
|
||||||
|
@ -214,7 +203,8 @@ export default {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
opacity: var(--dimming-factor);
|
opacity: var(--dimming-factor);
|
||||||
}
|
}
|
||||||
.description {
|
.cve-description {
|
||||||
|
font-size: 0.9rem;
|
||||||
margin: 0 0.25rem 0.5rem 0.25rem;
|
margin: 0 0.25rem 0.5rem 0.25rem;
|
||||||
}
|
}
|
||||||
a.read-more {
|
a.read-more {
|
||||||
|
|
Loading…
Reference in New Issue