8499323ac5
WHAT: new project summary (details) section added to project dashboard page. v1 shows team size, API keys amount, buckets amount, estimated charges for selected project for current month. WHY: redesign. Better user experience? Change-Id: I31204a3e68db49486bad1e1a0eedd238eba6b84e
29 lines
826 B
TypeScript
29 lines
826 B
TypeScript
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
import { ApiKey, ApiKeyCursor, ApiKeysApi, ApiKeysPage } from '@/types/apiKeys';
|
|
|
|
/**
|
|
* Mock for ApiKeysApi
|
|
*/
|
|
export class ApiKeysMock implements ApiKeysApi {
|
|
private readonly date = new Date(0);
|
|
private mockApiKeysPage: ApiKeysPage;
|
|
|
|
public setMockApiKeysPage(mockApiKeysPage: ApiKeysPage): void {
|
|
this.mockApiKeysPage = mockApiKeysPage;
|
|
}
|
|
|
|
get(projectId: string, cursor: ApiKeyCursor): Promise<ApiKeysPage> {
|
|
return Promise.resolve(this.mockApiKeysPage);
|
|
}
|
|
|
|
create(projectId: string, name: string): Promise<ApiKey> {
|
|
return Promise.resolve(new ApiKey('testId', 'testName', this.date, 'testKey'));
|
|
}
|
|
|
|
delete(ids: string[]): Promise<void> {
|
|
return Promise.resolve();
|
|
}
|
|
}
|