Commit be792425 authored by Robert's avatar Robert 👽
Browse files

UPD: Record loading feedback

closes #271
parent fb202ed8
Pipeline #147278 passed with stages
in 6 minutes and 51 seconds
......@@ -30,6 +30,7 @@
<font-awesome-icon v-if="collapse_states[0]" :icon="['fas','chevron-left']"/>
</transition>
Broadcastdomain
<b-spinner small v-show="loading_states[0]" variant="primary"/>
</div>
</b-list-group-item>
<b-list-group-item href="#reserved" @click="scrollIntoView($event,1, 'reserved')"
......@@ -39,6 +40,7 @@
<font-awesome-icon v-if="collapse_states[1]" :icon="['fas','chevron-left']"/>
</transition>
Reservierte Adressen
<b-spinner small v-show="loading_states[1]" variant="primary"/>
</div>
<b-badge variant="primary" pill>{{ reservedAddrCount }}</b-badge>
</b-list-group-item>
......@@ -51,6 +53,7 @@
<font-awesome-icon v-if="collapse_states[2+index]" :icon="['fas','chevron-left']"/>
</transition>
{{ record_type }} Records
<b-spinner small v-show="loading_states[2+index]" variant="primary"/>
</div>
<b-badge variant="primary" pill>{{ records[record_type].length }}</b-badge>
</b-list-group-item>
......@@ -467,6 +470,7 @@ export default {
records_by_fqdn: {},
record_types: null,
record_types_by_name: null,
loading_states: [false],
collapse_states: [true],
dhcp_ip_addrs: {},
has_v4: false,
......@@ -937,14 +941,19 @@ export default {
const offset = window.innerWidth > 1200 ? 140 : 410
window.scrollTo({left: window.scrollX, top: target.offsetTop + offset, behavior: 'smooth'})
} else {
target = document.getElementById('not-' + id)
this.$set(this.collapse_states, index, true)
const offset = window.innerWidth > 1200 ? 140 : 410
setTimeout(() => window.scrollTo({
left: window.scrollX,
top: target.offsetTop + offset,
behavior: 'smooth'
}), 350)
this.$set(this.loading_states, index, true)
setTimeout(() => {
target = document.getElementById('not-' + id)
this.$set(this.collapse_states, index, true)
const offset = window.innerWidth > 1200 ? 140 : 410
setTimeout(() => window.scrollTo({
left: window.scrollX,
top: target.offsetTop + offset,
behavior: 'smooth'
}), 350)
this.$set(this.loading_states, index, false)
}, 1)
// I know. It's disgusting.
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment