Run Linter

This commit is contained in:
Bradley Schofield
2024-07-31 15:24:45 +09:00
parent 44d716e1cc
commit d58fb6d2e0
3 changed files with 22 additions and 13 deletions
+4 -1
View File
@@ -71,7 +71,10 @@
<option value={null} disabled selected hidden>{placeholder}</option>
{/if}
{#each options as option}
<option value={option.value} selected={option.value === value} disabled={option.disabled}>
<option
value={option.value}
selected={option.value === value}
disabled={option.disabled}>
{option.label}
</option>
{/each}
+13 -8
View File
@@ -149,7 +149,7 @@ export type Sizes = {
export enum FunctionUsageRange {
TwentyFourHours = '24h',
ThirtyDays = '30d',
NinetyDays = '90d',
NinetyDays = '90d'
}
/**
@@ -164,7 +164,7 @@ export type Metric = {
* The date at which this metric was aggregated in ISO 8601 format.
*/
date: string;
}
};
/**
* Metric Breakdown
*/
@@ -181,7 +181,7 @@ export type MetricBreakdown = {
* The value of this metric at the timestamp.
*/
value: number;
}
};
/**
* UsageFunction
@@ -255,7 +255,7 @@ export type UsageFunction = {
* Aggregated number of function executions compute time per period.
*/
executionsMbSeconds: Metric[];
}
};
export class SizesFunctions {
client: Client;
@@ -412,7 +412,7 @@ export class SizesFunctions {
* @param {FunctionUsageRange} range
* @throws {AppwriteException}
* @returns {Promise}
*/
*/
async getFunctionUsage(functionId: string, range?: FunctionUsageRange): Promise<UsageFunction> {
if (typeof functionId === 'undefined') {
throw new AppwriteException('Missing required parameter: "functionId"');
@@ -426,8 +426,13 @@ export class SizesFunctions {
}
const uri = new URL(this.client.config.endpoint + apiPath);
return await this.client.call('get', uri, {
'content-type': 'application/json',
}, payload);
return await this.client.call(
'get',
uri,
{
'content-type': 'application/json'
},
payload
);
}
}
@@ -23,7 +23,7 @@
onMount(async () => {
runtime ??= $func.runtime;
size ??= $func.size
size ??= $func.size;
let runtimes = await $runtimesList;
let allowedSizes = await $sizes;
@@ -33,7 +33,9 @@
}));
sizeOptions = allowedSizes.sizes.map((size) => ({
label: `${size.cpus} CPU, ${size.memory} MB RAM` + (size.plan ? ` (${size.plan} and higher)` : ''),
label:
`${size.cpus} CPU, ${size.memory} MB RAM` +
(size.plan ? ` (${size.plan} and higher)` : ''),
value: size.slug,
disabled: !size.enabled
}));
@@ -78,8 +80,7 @@
}
}
$: isUpdateButtonEnabled =
runtime !== $func?.runtime || size !== $func?.size;
$: isUpdateButtonEnabled = runtime !== $func?.runtime || size !== $func?.size;
</script>
<Form onSubmit={updateRuntime}>