summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone <26844016+simonebortolin@users.noreply.github.com>2023-04-24 20:44:17 +0200
committerGitHub <noreply@github.com>2023-04-24 20:44:17 +0200
commit2a6de044f3684a9d0115483da895f0f7b19e1ca2 (patch)
tree832d97549cfaf206a41312365bc4f27c1c965c7c
parentUpdate zyxel.md (#155) (diff)
downloadhack-gpon.github.io-2a6de044f3684a9d0115483da895f0f7b19e1ca2.tar
hack-gpon.github.io-2a6de044f3684a9d0115483da895f0f7b19e1ca2.tar.gz
hack-gpon.github.io-2a6de044f3684a9d0115483da895f0f7b19e1ca2.tar.bz2
hack-gpon.github.io-2a6de044f3684a9d0115483da895f0f7b19e1ca2.tar.lz
hack-gpon.github.io-2a6de044f3684a9d0115483da895f0f7b19e1ca2.tar.xz
hack-gpon.github.io-2a6de044f3684a9d0115483da895f0f7b19e1ca2.tar.zst
hack-gpon.github.io-2a6de044f3684a9d0115483da895f0f7b19e1ca2.zip
Diffstat (limited to '')
-rw-r--r--_tools/ont-lantiq-print-eeprom.md4
-rw-r--r--assets/js/vue/vue-lantiq-eeprom.vue56
2 files changed, 35 insertions, 25 deletions
diff --git a/_tools/ont-lantiq-print-eeprom.md b/_tools/ont-lantiq-print-eeprom.md
index 6d95ebf..62f4314 100644
--- a/_tools/ont-lantiq-print-eeprom.md
+++ b/_tools/ont-lantiq-print-eeprom.md
@@ -12,6 +12,4 @@ layout: default
</div>
<script src="https://unpkg.com/vue@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/vue3-sfc-loader"></script>
-<script src="/assets/js/vue-eeprom.js"></script>
-
-{% include alert.html content="For more information, see the SFF-8472 Rev 10.2 specification." alert="Info" icon="svg-info" color="blue" %} \ No newline at end of file
+<script src="/assets/js/vue-eeprom.js"></script> \ No newline at end of file
diff --git a/assets/js/vue/vue-lantiq-eeprom.vue b/assets/js/vue/vue-lantiq-eeprom.vue
index 94c3db7..4bb41ed 100644
--- a/assets/js/vue/vue-lantiq-eeprom.vue
+++ b/assets/js/vue/vue-lantiq-eeprom.vue
@@ -12,26 +12,32 @@
</select>
<label for="eeprom-type">Select EEPROM A0 or A2</label>
</div>
- <table>
- <tr>
- <th>address</th>
- <th>size</th>
- <th>name</th>
- <th>hex value</th>
- <th>decoded value</th>
- <th>description</th>
- </tr>
- <tr v-for="(value, key, index) in eeprom_json" :key="index">
- <td>{{ value.address }}</td>
- <td>{{ value.size }}</td>
- <td v-if="value.name.startsWith('**')"><b>{{ value.name.replaceAll('**', '') }}</b></td>
- <td v-else>{{ value.name }}</td>
- <td><code v-if="value.value">{{ chunk(value.value)?.map(it => `0x${it}`)?.join(' ') }}</code></td>
- <td><span v-if="value.human">{{ value.human }}</span></td>
- <td v-if="value.description.startsWith('**')"><b>{{ value.description.replaceAll('**', '') }}</b></td>
- <td v-else>{{ value.description }}</td>
- </tr>
- </table>
+ <div class="table-wrapper">
+ <table>
+ <tr>
+ <th>address</th>
+ <th>size</th>
+ <th>name</th>
+ <th>hex value</th>
+ <th>decoded value</th>
+ <th>description</th>
+ </tr>
+ <tr v-for="(value, key, index) in eeprom_json" :key="index">
+ <td>{{ value.address }}</td>
+ <td>{{ value.size }}</td>
+ <td v-if="value.name.startsWith('**')"><b>{{ value.name.replaceAll('**', '') }}</b></td>
+ <td v-else>{{ value.name }}</td>
+ <td><code v-if="value.value">{{ chunk(value.value)?.map(it => `0x${it}`)?.join(' ') }}</code></td>
+ <td><span v-if="value.human">{{ value.human }}</span></td>
+ <td v-if="value.description.startsWith('**')"><b>{{ value.description.replaceAll('**', '') }}</b></td>
+ <td v-else>{{ value.description }}</td>
+ </tr>
+ </table>
+ </div>
+ <div markdown="span" class="alert alert-blue" role="alert" v-if="revision">
+ <svg viewBox="0 0 24 24" class="info-icon"><use xlink:href="#svg-info"></use></svg>
+ <span> <b>Info</b> For more information, see the {{ revision }} specification.</span>
+ </div>
</template>
<template v-if="type === 'eeprom-rooted-edit'">
<div class="form-floating mb-3">
@@ -806,6 +812,12 @@ export default {
},
props: ['type'],
computed: {
+ revision: {
+ get() {
+ if(this.eeprom_switch===0) return this.table_3_12(this.getPart(94,94));
+ return "";
+ }
+ },
eeprom: {
get() {
if(this.the_eeprom){
@@ -1093,7 +1105,7 @@ export default {
var table = {
"03":"SFP",
}
- return table[hex] ?? "See SFF-8472 Rev 10.2 Table 3.2";
+ return table[hex] ?? `See ${this.revision} Table 3.2`;
},
table_3_3: function (hex) {
var table = {
@@ -1115,7 +1127,7 @@ export default {
"07":"LC",
"22":"RJ45",
}
- return table[hex] ?? "See SFF-8472 Rev 10.2 Table 3.3";
+ return table[hex] ?? `See ${this.revision} Table 3.3`;
},
table_3_6: function (hex) {
var table = {