exported types
This commit is contained in:
@@ -18,8 +18,9 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
|
import { type Stats } from '@/types/Stats'
|
||||||
|
|
||||||
const stats = ref({
|
const stats = ref<Stats>({
|
||||||
latest: 0,
|
latest: 0,
|
||||||
queued: 0,
|
queued: 0,
|
||||||
skipped: 0,
|
skipped: 0,
|
||||||
|
|||||||
@@ -150,36 +150,8 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, UnwrapRef, watch } from 'vue'
|
import { onMounted, ref, UnwrapRef, watch } from 'vue'
|
||||||
|
import { type Package } from '@/types/Package'
|
||||||
interface Package {
|
import { type Packages } from '@/types/Packages'
|
||||||
pkgbase: string
|
|
||||||
repo: string
|
|
||||||
split_packages: Array<string>
|
|
||||||
status:
|
|
||||||
| 'latest'
|
|
||||||
| 'failed'
|
|
||||||
| 'build'
|
|
||||||
| 'skipped'
|
|
||||||
| 'delayed'
|
|
||||||
| 'building'
|
|
||||||
| 'signing'
|
|
||||||
| 'unknown'
|
|
||||||
| 'queued'
|
|
||||||
skip_reason: string
|
|
||||||
lto: 'enabled' | 'unknown' | 'disabled' | 'auto_disabled'
|
|
||||||
debug_symbols: 'available' | 'unknown' | 'not_available'
|
|
||||||
arch_version: string
|
|
||||||
repo_version: string
|
|
||||||
build_date: string
|
|
||||||
peak_mem: any
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Packages {
|
|
||||||
packages: Array<Package>
|
|
||||||
total: number
|
|
||||||
offset: number
|
|
||||||
limit: number
|
|
||||||
}
|
|
||||||
|
|
||||||
const inputPkgBase = ref('')
|
const inputPkgBase = ref('')
|
||||||
const selectRepo = ref({ title: 'Repository (any)', value: 'any' })
|
const selectRepo = ref({ title: 'Repository (any)', value: 'any' })
|
||||||
@@ -236,7 +208,7 @@ const searchPackages = (offset: number) => {
|
|||||||
throw new Error(response.statusText)
|
throw new Error(response.statusText)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then((json) => {
|
.then((json: Packages) => {
|
||||||
if (!json) return
|
if (!json) return
|
||||||
|
|
||||||
if (pagesMax.value !== json.total) {
|
if (pagesMax.value !== json.total) {
|
||||||
|
|||||||
22
frontend/src/types/Package.ts
Normal file
22
frontend/src/types/Package.ts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
export interface Package {
|
||||||
|
pkgbase: string
|
||||||
|
repo: string
|
||||||
|
split_packages: Array<string>
|
||||||
|
status:
|
||||||
|
| 'latest'
|
||||||
|
| 'failed'
|
||||||
|
| 'build'
|
||||||
|
| 'skipped'
|
||||||
|
| 'delayed'
|
||||||
|
| 'building'
|
||||||
|
| 'signing'
|
||||||
|
| 'unknown'
|
||||||
|
| 'queued'
|
||||||
|
skip_reason: string
|
||||||
|
lto: 'enabled' | 'unknown' | 'disabled' | 'auto_disabled'
|
||||||
|
debug_symbols: 'available' | 'unknown' | 'not_available'
|
||||||
|
arch_version: string
|
||||||
|
repo_version: string
|
||||||
|
build_date: string
|
||||||
|
peak_mem: any
|
||||||
|
}
|
||||||
8
frontend/src/types/Packages.ts
Normal file
8
frontend/src/types/Packages.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { type Package } from '@/types/Package'
|
||||||
|
|
||||||
|
export interface Packages {
|
||||||
|
packages: Array<Package>
|
||||||
|
total: number
|
||||||
|
offset: number
|
||||||
|
limit: number
|
||||||
|
}
|
||||||
9
frontend/src/types/Stats.ts
Normal file
9
frontend/src/types/Stats.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { type Stats_Lto } from '@/types/Stats_Lto'
|
||||||
|
|
||||||
|
export interface Stats {
|
||||||
|
latest: number
|
||||||
|
queued: number
|
||||||
|
skipped: number
|
||||||
|
failed: number
|
||||||
|
lto: Stats_Lto
|
||||||
|
}
|
||||||
5
frontend/src/types/Stats_Lto.ts
Normal file
5
frontend/src/types/Stats_Lto.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
export interface Stats_Lto {
|
||||||
|
enabled: number
|
||||||
|
disabled: number
|
||||||
|
unknown: number
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user