Skip to content

Commit bb7caae

Browse files
committed
Update papi converter tests and revert unecessary changes
1 parent 2a631eb commit bb7caae

13 files changed

+156
-17
lines changed

components/dashboard/src/insights/WorkspaceSession.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const WorkspaceSessionEntry = ({ session, index }: Props) => {
1717
return (
1818
<li key={index} className="text-sm text-gray-600 dark:text-gray-300">
1919
{session.creationTime ? displayTime(session.creationTime) : "n/a"} (
20-
{session.workspace?.status?.instanceId.slice(0, 7) || "No instance ID"}){isRunning ? " - running" : ""}
20+
{session.id.slice(0, 7) || "No instance ID"}){isRunning ? " - running" : ""}
2121
</li>
2222
);
2323
};

components/dashboard/src/insights/WorkspaceSessionGroup.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { Timestamp } from "@bufbuild/protobuf";
88
import { OrganizationMember } from "@gitpod/public-api/lib/gitpod/v1/organization_pb";
9-
import { WorkspaceSpec_WorkspaceType } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb";
9+
import { WorkspaceSession, WorkspaceSpec_WorkspaceType } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb";
1010
import { AccordionContent, AccordionItem, AccordionTrigger } from "../components/accordion/Accordion";
1111
import { ReactComponent as UsageIcon } from "../images/usage-default.svg";
1212
import { toRemoteURL } from "../projects/render-utils";
@@ -16,7 +16,7 @@ import { displayWorkspaceType } from "./download/download-sessions";
1616

1717
type Props = {
1818
id: string;
19-
sessions: any[];
19+
sessions: WorkspaceSession[];
2020
member?: OrganizationMember;
2121
};
2222
export const WorkspaceSessionGroup = ({ id, sessions, member }: Props) => {

components/dashboard/src/usage/download/DownloadUsage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const DownloadUsage: FC<Props> = ({ attributionId, startDate, endDate })
5050
}, [attributionId, endDate, org, setDownloadDisabled, startDate, toast]);
5151

5252
return (
53+
// TODO: Convert this to use an IconButton when we add one to podkit
5354
<Button variant="secondary" onClick={handleDownload} className="gap-1" disabled={downloadDisabled}>
5455
<DownloadIcon />
5556
<span>Export as CSV</span>

components/public-api/typescript-common/fixtures/toWorkspace2_1.golden

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,21 @@
99
"name": "gitpod-io/workspace-images - main",
1010
"pinned": false,
1111
"originalContextUrl": "https://github.com/gitpod-io/workspace-images",
12-
"warnings": []
12+
"warnings": [],
13+
"context": {
14+
"path": "",
15+
"ref": "main",
16+
"refType": "REF_TYPE_BRANCH",
17+
"revision": "fa52963fa39227bcfbf005d396eb753bf3981e40",
18+
"repository": {
19+
"cloneUrl": "https://github.com/gitpod-io/workspace-images.git",
20+
"defaultBranch": "main",
21+
"host": "github.com",
22+
"owner": "gitpod-io",
23+
"name": "workspace-images",
24+
"private": false
25+
}
26+
}
1327
},
1428
"spec": {
1529
"initializer": {

components/public-api/typescript-common/fixtures/toWorkspace2_2.golden

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,21 @@
99
"name": "gitpod-io/gitpod - main",
1010
"pinned": true,
1111
"originalContextUrl": "https://github.com/gitpod-io/gitpod",
12-
"warnings": []
12+
"warnings": [],
13+
"context": {
14+
"path": "",
15+
"ref": "main",
16+
"refType": "REF_TYPE_BRANCH",
17+
"revision": "eb6a504011d82fe87d0746012c75b4916ce54480",
18+
"repository": {
19+
"cloneUrl": "https://github.com/gitpod-io/gitpod.git",
20+
"defaultBranch": "main",
21+
"host": "github.com",
22+
"owner": "gitpod-io",
23+
"name": "gitpod",
24+
"private": false
25+
}
26+
}
1327
},
1428
"spec": {
1529
"initializer": {

components/public-api/typescript-common/fixtures/toWorkspace2_3.golden

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,21 @@
99
"name": "gitpod-io/empty ",
1010
"pinned": false,
1111
"originalContextUrl": "https://github.com/gitpod-io/empty",
12-
"warnings": []
12+
"warnings": [],
13+
"context": {
14+
"path": "",
15+
"ref": "",
16+
"refType": "REF_TYPE_UNSPECIFIED",
17+
"revision": "",
18+
"repository": {
19+
"cloneUrl": "https://github.com/gitpod-io/empty.git",
20+
"defaultBranch": "",
21+
"host": "github.com",
22+
"owner": "gitpod-io",
23+
"name": "empty",
24+
"private": false
25+
}
26+
}
1327
},
1428
"spec": {
1529
"initializer": {

components/public-api/typescript-common/fixtures/toWorkspace3_adminPage_1.golden

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,21 @@
99
"name": "description",
1010
"pinned": true,
1111
"originalContextUrl": "https://github.com/gitpod-io/contextURL",
12-
"warnings": []
12+
"warnings": [],
13+
"context": {
14+
"path": "",
15+
"ref": "master",
16+
"refType": "REF_TYPE_BRANCH",
17+
"revision": "revision",
18+
"repository": {
19+
"cloneUrl": "https://github.com/gitpod-io/contextURL.git",
20+
"defaultBranch": "",
21+
"host": "github.com",
22+
"owner": "gitpod-io",
23+
"name": "contextURL",
24+
"private": true
25+
}
26+
}
1327
},
1428
"spec": {
1529
"initializer": {

components/public-api/typescript-common/fixtures/toWorkspace3_adminPage_2.golden

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,21 @@
99
"name": "empty",
1010
"pinned": true,
1111
"originalContextUrl": "https://github.com/gitpod-io/empty",
12-
"warnings": []
12+
"warnings": [],
13+
"context": {
14+
"path": "",
15+
"ref": "master",
16+
"refType": "REF_TYPE_BRANCH",
17+
"revision": "revision",
18+
"repository": {
19+
"cloneUrl": "https://github.com/gitpod-io/empty.git",
20+
"defaultBranch": "",
21+
"host": "github.com",
22+
"owner": "gitpod.io",
23+
"name": "empty",
24+
"private": false
25+
}
26+
}
1327
},
1428
"spec": {
1529
"initializer": {

components/public-api/typescript-common/fixtures/toWorkspaceSession_1.golden

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"result": {
3-
"id": "",
3+
"id": "226695b4-f10a-471a-a219-9b657645bf78",
44
"workspace": {
55
"id": "akosyakov-parceldemo-4crqn25qlwi",
66
"metadata": {
@@ -11,7 +11,21 @@
1111
"name": "akosyakov/parcel-demo - master",
1212
"pinned": false,
1313
"originalContextUrl": "https://github.com/akosyakov/parcel-demo",
14-
"warnings": []
14+
"warnings": [],
15+
"context": {
16+
"path": "",
17+
"ref": "master",
18+
"refType": "REF_TYPE_BRANCH",
19+
"revision": "60dbf818194082ef1a368bacd49cfd25a34c9256",
20+
"repository": {
21+
"cloneUrl": "https://github.com/akosyakov/parcel-demo.git",
22+
"defaultBranch": "master",
23+
"host": "github.com",
24+
"owner": "akosyakov",
25+
"name": "parcel-demo",
26+
"private": false
27+
}
28+
}
1529
},
1630
"spec": {
1731
"initializer": {

components/public-api/typescript-common/fixtures/toWorkspaceSession_2.golden

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"result": {
3-
"id": "",
3+
"id": "8e8c7061-f312-4265-8d78-d824c0470dde",
44
"workspace": {
55
"id": "sveneffting-2048intermi-5vb9hvqev88",
66
"metadata": {
@@ -11,7 +11,21 @@
1111
"name": "svenefftinge/2048-in-terminal - master",
1212
"pinned": false,
1313
"originalContextUrl": "https://github.com/svenefftinge/2048-in-terminal",
14-
"warnings": []
14+
"warnings": [],
15+
"context": {
16+
"path": "",
17+
"ref": "master",
18+
"refType": "REF_TYPE_BRANCH",
19+
"revision": "aac9c200a79e37ebe216bb90c829d5ab2771f2ee",
20+
"repository": {
21+
"cloneUrl": "https://github.com/svenefftinge/2048-in-terminal.git",
22+
"defaultBranch": "master",
23+
"host": "github.com",
24+
"owner": "svenefftinge",
25+
"name": "2048-in-terminal",
26+
"private": false
27+
}
28+
}
1529
},
1630
"spec": {
1731
"initializer": {

0 commit comments

Comments
 (0)