chore: run prettier
This commit is contained in:
parent
9cdbbc3a00
commit
155d7bb876
76 changed files with 788 additions and 550 deletions
|
@ -11,9 +11,9 @@ export interface Allocation {
|
|||
|
||||
relations: {
|
||||
server?: Server;
|
||||
}
|
||||
};
|
||||
|
||||
getDisplayText (): string;
|
||||
getDisplayText(): string;
|
||||
}
|
||||
|
||||
export const rawDataToAllocation = ({ attributes }: FractalResponseData): Allocation => ({
|
||||
|
@ -25,11 +25,14 @@ export const rawDataToAllocation = ({ attributes }: FractalResponseData): Alloca
|
|||
assigned: attributes.assigned,
|
||||
|
||||
relations: {
|
||||
server: attributes.relationships?.server?.object === 'server' ? rawDataToServer(attributes.relationships.server as FractalResponseData) : undefined,
|
||||
server:
|
||||
attributes.relationships?.server?.object === 'server'
|
||||
? rawDataToServer(attributes.relationships.server as FractalResponseData)
|
||||
: undefined,
|
||||
},
|
||||
|
||||
// TODO: If IP is an IPv6, wrap IP in [].
|
||||
getDisplayText (): string {
|
||||
getDisplayText(): string {
|
||||
if (attributes.alias !== null) {
|
||||
return `${attributes.ip}:${attributes.port} (${attributes.alias})`;
|
||||
}
|
||||
|
@ -38,7 +41,7 @@ export const rawDataToAllocation = ({ attributes }: FractalResponseData): Alloca
|
|||
});
|
||||
|
||||
export interface Filters {
|
||||
ip?: string
|
||||
ip?: string;
|
||||
/* eslint-disable camelcase */
|
||||
server_id?: string;
|
||||
/* eslint-enable camelcase */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue