Merge changes I1e45d3ef,I4117f5d9 am: c37be89c82 am: 48666960dd
Original change: https://android-review.googlesource.com/c/platform/development/+/1772906 Change-Id: Ib892cf002e5a290f151b481b8f438efa4f8b9052
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<h3>Basic infos</h3>
|
||||
<div v-if="zipFile">
|
||||
<div
|
||||
v-if="zipFile"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<ul class="align">
|
||||
<li><strong> File name </strong> {{ zipFile.name }}</li>
|
||||
<li><strong> File size </strong> {{ zipFile.size }} Bytes</li>
|
||||
@@ -18,26 +21,26 @@
|
||||
<span v-if="payload.manifest.partitions[0].oldPartitionInfo">
|
||||
✅
|
||||
</span>
|
||||
<span v-else> ❎ </span>
|
||||
<span v-else> ❌ </span>
|
||||
</li>
|
||||
<li>
|
||||
<strong> Partial </strong>
|
||||
<span v-if="payload.manifest.partialUpdate"> ✅ </span>
|
||||
<span v-else> ❎ </span>
|
||||
<span v-else> ❌ </span>
|
||||
</li>
|
||||
<li>
|
||||
<strong> VAB </strong>
|
||||
<span v-if="payload.manifest.dynamicPartitionMetadata.snapshotEnabled">
|
||||
✅
|
||||
</span>
|
||||
<span v-else> ❎ </span>
|
||||
<span v-else> ❌ </span>
|
||||
</li>
|
||||
<li>
|
||||
<strong> VABC </strong>
|
||||
<span v-if="payload.manifest.dynamicPartitionMetadata.vabcEnabled">
|
||||
✅
|
||||
</span>
|
||||
<span v-else> ❎ </span>
|
||||
<span v-else> ❌ </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,48 @@
|
||||
<template>
|
||||
<p
|
||||
<h4> {{ partition.partitionName }} </h4>
|
||||
<p v-if="partition.estimateCowSize">
|
||||
<strong> Estimate COW Size: </strong> {{ partition.estimateCowSize }} Bytes
|
||||
</p>
|
||||
<p v-else>
|
||||
<strong> Estimate COW Size: </strong> 0 Bytes
|
||||
</p>
|
||||
<div
|
||||
class="toggle"
|
||||
@click="toggle()"
|
||||
@click="toggle('showInfo')"
|
||||
>
|
||||
Total Operations: {{ partition.operations.length }}
|
||||
<h4> Partition Infos </h4>
|
||||
<ul v-if="showInfo">
|
||||
<li v-if="partition.oldPartitionInfo">
|
||||
<strong>
|
||||
Old Partition Size:
|
||||
</strong>
|
||||
{{ partition.oldPartitionInfo.size }} Bytes
|
||||
</li>
|
||||
<li v-if="partition.oldPartitionInfo">
|
||||
<strong>
|
||||
Old Partition Hash:
|
||||
</strong>
|
||||
{{ octToHex(partition.oldPartitionInfo.hash, false, 16) }}
|
||||
</li>
|
||||
<li>
|
||||
<strong>
|
||||
New Partition Size:
|
||||
</strong>
|
||||
{{ partition.newPartitionInfo.size }} Bytes
|
||||
</li>
|
||||
<li>
|
||||
<strong>
|
||||
New Partition Hash:
|
||||
</strong>
|
||||
{{ octToHex(partition.newPartitionInfo.hash, false, 16) }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
class="toggle"
|
||||
@click="toggle('showOPs')"
|
||||
>
|
||||
<h4> Total Operations: {{ partition.operations.length }} </h4>
|
||||
<ul
|
||||
v-if="showOPs"
|
||||
>
|
||||
@@ -17,11 +56,11 @@
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OpType } from '@/services/payload.js'
|
||||
import { OpType, octToHex } from '@/services/payload.js'
|
||||
import OperationDetail from '@/components/OperationDetail.vue'
|
||||
|
||||
export default {
|
||||
@@ -37,6 +76,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
showOPs: false,
|
||||
showInfo: false,
|
||||
opType: null,
|
||||
}
|
||||
},
|
||||
@@ -44,9 +84,10 @@ export default {
|
||||
this.opType = new OpType()
|
||||
},
|
||||
methods: {
|
||||
toggle() {
|
||||
this.showOPs = !this.showOPs
|
||||
toggle(key) {
|
||||
this[key] = !this[key]
|
||||
},
|
||||
octToHex: octToHex,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -55,7 +96,7 @@ export default {
|
||||
.toggle {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
color: #00c255;
|
||||
color: #762ace;
|
||||
}
|
||||
|
||||
li {
|
||||
|
||||
@@ -23,13 +23,6 @@
|
||||
shaped
|
||||
class="partial-info"
|
||||
>
|
||||
<h4> {{ partition.partitionName }} </h4>
|
||||
<p v-if="partition.estimateCowSize">
|
||||
<strong> Estimate COW Size: </strong> {{ partition.estimateCowSize }} Bytes
|
||||
</p>
|
||||
<p v-else>
|
||||
<strong> Estimate COW Size: </strong> 0 Bytes
|
||||
</p>
|
||||
<PartitionDetail :partition="partition" />
|
||||
</v-card>
|
||||
</v-col>
|
||||
@@ -50,7 +43,7 @@
|
||||
<script>
|
||||
import PartitionDetail from './PartitionDetail.vue'
|
||||
import BasicInfo from '@/components/BasicInfo.vue'
|
||||
import { Payload } from '@/services/payload.js'
|
||||
import { Payload, octToHex } from '@/services/payload.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -71,17 +64,6 @@ export default {
|
||||
octToHex: octToHex,
|
||||
},
|
||||
}
|
||||
|
||||
function octToHex(bufferArray) {
|
||||
let hex_table = ''
|
||||
for (let i = 0; i < bufferArray.length; i++) {
|
||||
hex_table += bufferArray[i].toString(16) + ' '
|
||||
if ((i + 1) % 16 == 0) {
|
||||
hex_table += '\n'
|
||||
}
|
||||
}
|
||||
return hex_table
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -145,3 +145,18 @@ export class MergeOpType {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function octToHex(bufferArray, space = true, maxLine = 16) {
|
||||
let hex_table = ''
|
||||
for (let i = 0; i < bufferArray.length; i++) {
|
||||
if (bufferArray[i].toString(16).length===2) {
|
||||
hex_table += bufferArray[i].toString(16) + (space ? ' ' : '')
|
||||
} else {
|
||||
hex_table += '0' + bufferArray[i].toString(16) + (space ? ' ' : '')
|
||||
}
|
||||
if ((i + 1) % maxLine == 0) {
|
||||
hex_table += '\n'
|
||||
}
|
||||
}
|
||||
return hex_table
|
||||
}
|
||||
Reference in New Issue
Block a user