Commit 859a904 1 parent 2b5d6ea commit 859a904 Copy full SHA for 859a904
File tree 3 files changed +56
-45
lines changed
organization-[organization]/usage/[[invoice]]
project-[project]/settings/usage/[[invoice]]
3 files changed +56
-45
lines changed Original file line number Diff line number Diff line change @@ -323,8 +323,13 @@ export type UsageProject = {
323
323
*/
324
324
authPhoneCountriesBreakdown : Models . MetricBreakdown [ ] ;
325
325
326
+ /**
327
+ * Array of image transformations per period.
328
+ */
329
+ imageTransformations : Metric [ ] ;
330
+
326
331
/**
327
332
* Aggregated statistics of total number of image transformations.
328
333
*/
329
- imageTransformations : number ;
334
+ imageTransformationsTotal : number ;
330
335
} ;
Original file line number Diff line number Diff line change 272
272
{#if data .organizationUsage .imageTransformationsTotal }
273
273
{@const current = data .organizationUsage .imageTransformationsTotal }
274
274
{@const max = getServiceLimit (' imageTransformations' , tier , plan )}
275
- <div style:margin-top =" -1.5em" style:margin-bottom =" -1em" >
276
- <ProgressBarBig
277
- currentUnit =" Transformations"
278
- currentValue ={formatNum (current )}
279
- maxUnit =" transformations"
280
- maxValue ={` out of ${formatNum (max )} ` }
281
- progressValue ={current }
282
- progressMax ={max }
283
- showBar ={false } />
284
- <BarChart
285
- options ={{
286
- yAxis : {
287
- axisLabel : {
288
- formatter : formatNum
289
- }
290
- }
291
- }}
292
- series ={[
293
- {
294
- name: ' Image Transformations' ,
295
- data: [
296
- ... (data .organizationUsage .imageTransformations ?? []).map (
297
- (e ) => [e .date , e .value ]
298
- )
299
- ]
275
+ <ProgressBarBig
276
+ currentUnit =" Transformations"
277
+ currentValue ={formatNum (current )}
278
+ maxUnit =" transformations"
279
+ maxValue ={` out of ${formatNum (max )} ` }
280
+ progressValue ={current }
281
+ progressMax ={max }
282
+ showBar ={false } />
283
+ <BarChart
284
+ options ={{
285
+ yAxis : {
286
+ axisLabel : {
287
+ formatter : formatNum
300
288
}
301
- ]} />
302
- </div >
289
+ }
290
+ }}
291
+ series ={[
292
+ {
293
+ name: ' Image Transformations' ,
294
+ data: [
295
+ ... (data .organizationUsage .imageTransformations ?? []).map ((e ) => [
296
+ e .date ,
297
+ e .value
298
+ ])
299
+ ]
300
+ }
301
+ ]} />
303
302
{#if projects ?.length > 0 }
304
303
<ProjectBreakdown {projects } metric ="imageTransformations" {data } />
305
304
{/if }
Original file line number Diff line number Diff line change 36
36
data .usage .filesStorageTotal +
37
37
data .usage .deploymentsStorageTotal +
38
38
data .usage .buildsStorageTotal ;
39
-
39
+ $ : imageTransformations = data .usage .imageTransformations ;
40
+ $ : imageTransformationsTotal = data .usage .imageTransformationsTotal ;
40
41
$ : dbReads = data .usage .databasesReads ;
41
42
$ : dbWrites = data .usage .databasesWrites ;
42
- $ : imageTransformations = data .usage .imageTransformations ;
43
43
44
44
$ : legendData = [
45
45
{ name: ' Reads' , value: data .usage .databasesReadsTotal },
254
254
255
255
<svelte:fragment slot =" aside" >
256
256
{#if imageTransformations }
257
- <div style:margin-top =" -1.5em" style:margin-bottom =" -1em" >
258
- <BarChart
259
- options ={{
260
- yAxis : {
261
- axisLabel : {
262
- formatter : formatNum
263
- }
264
- }
265
- }}
266
- series ={[
267
- {
268
- name: ' Image transformations' ,
269
- data: [... imageTransformations .map ((e ) => [e .date , e .value ])]
270
- }
271
- ]} />
257
+ {@const current = formatNum (imageTransformationsTotal )}
258
+ <div class =" u-flex u-flex-vertical" >
259
+ <div class =" u-flex u-main-space-between" >
260
+ <p >
261
+ <span class ="heading-level-4" >{current }</span >
262
+ <span class =" body-text-1 u-bold" >Transformations</span >
263
+ </p >
264
+ </div >
272
265
</div >
266
+ <BarChart
267
+ options ={{
268
+ yAxis : {
269
+ axisLabel : {
270
+ formatter : formatNum
271
+ }
272
+ }
273
+ }}
274
+ series ={[
275
+ {
276
+ name: ' Image transformations' ,
277
+ data: [... imageTransformations .map ((e ) => [e .date , e .value ])]
278
+ }
279
+ ]} />
273
280
{:else }
274
281
<Card isDashed >
275
282
<div class =" u-flex u-cross-center u-flex-vertical u-main-center u-flex" >
You can’t perform that action at this time.
0 commit comments