Skip to content

vm.remotes.ts cleanup. #95

Description

@TheHeroBrine422

vms.remote.ts has some code that needs to be cleaned up for getting lists of VMs.

there are three instances of the same massive sql query. these and the surrounding code such as mapVmRow could likely be combined into one function for better code reuse.

const result = await db.execute(sql`

const result = await db.execute(sql`

const result = await db.execute(sql`

There is also likely other code in this that could simplified or documented better.

As an example, the getKnownLive, mergeKnownLive, and mapVmRow functions seem like they could be merged together, and it doesn't seem self explanatory what "known live" even means, but that could be due to me being unfamiliar with this section of the code base.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions