Skip to content

Commit dd2e27c

Browse files
BrunoQuaresmajohnstcn
authored andcommitted
chore: rollback PR #18081 (#18104)
Rollback #18081 (cherry picked from commit d779126)
1 parent 0f380ab commit dd2e27c

File tree

8 files changed

+17
-14
lines changed

8 files changed

+17
-14
lines changed

coderd/apidoc/docs.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/audit.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ func (api *API) auditLogResourceLink(ctx context.Context, alog database.GetAudit
462462
if getWorkspaceErr != nil {
463463
return ""
464464
}
465-
return fmt.Sprintf("/@%s/%s", workspace.OwnerUsername, workspace.Name)
465+
return fmt.Sprintf("/@%s/%s", workspace.OwnerName, workspace.Name)
466466

467467
case database.ResourceTypeWorkspaceApp:
468468
if additionalFields.WorkspaceOwner != "" && additionalFields.WorkspaceName != "" {
@@ -472,7 +472,7 @@ func (api *API) auditLogResourceLink(ctx context.Context, alog database.GetAudit
472472
if getWorkspaceErr != nil {
473473
return ""
474474
}
475-
return fmt.Sprintf("/@%s/%s", workspace.OwnerUsername, workspace.Name)
475+
return fmt.Sprintf("/@%s/%s", workspace.OwnerName, workspace.Name)
476476

477477
case database.ResourceTypeOauth2ProviderApp:
478478
return fmt.Sprintf("/deployment/oauth2-provider/apps/%s", alog.AuditLog.ResourceID)

codersdk/workspaces.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ const (
2626
// Workspace is a deployment of a template. It references a specific
2727
// version and can be updated.
2828
type Workspace struct {
29-
ID uuid.UUID `json:"id" format:"uuid"`
30-
CreatedAt time.Time `json:"created_at" format:"date-time"`
31-
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
32-
OwnerID uuid.UUID `json:"owner_id" format:"uuid"`
29+
ID uuid.UUID `json:"id" format:"uuid"`
30+
CreatedAt time.Time `json:"created_at" format:"date-time"`
31+
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
32+
OwnerID uuid.UUID `json:"owner_id" format:"uuid"`
33+
// OwnerName is the username of the owner of the workspace.
3334
OwnerName string `json:"owner_name"`
3435
OwnerAvatarURL string `json:"owner_avatar_url"`
3536
OrganizationID uuid.UUID `json:"organization_id" format:"uuid"`
@@ -49,7 +50,6 @@ type Workspace struct {
4950
AutostartSchedule *string `json:"autostart_schedule,omitempty"`
5051
TTLMillis *int64 `json:"ttl_ms,omitempty"`
5152
LastUsedAt time.Time `json:"last_used_at" format:"date-time"`
52-
5353
// DeletingAt indicates the time at which the workspace will be permanently deleted.
5454
// A workspace is eligible for deletion if it is dormant (a non-nil dormant_at value)
5555
// and a value has been specified for time_til_dormant_autodelete on its template.

docs/reference/api/schemas.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/modules/resources/PortForwardButton.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -562,11 +562,11 @@ export const PortForwardPopoverView: FC<PortForwardPopoverViewProps> = ({
562562

563563
const classNames = {
564564
paper: (css, theme) => css`
565-
padding: 0;
566-
width: 404px;
567-
color: ${theme.palette.text.secondary};
568-
margin-top: 4px;
569-
`,
565+
padding: 0;
566+
width: 404px;
567+
color: ${theme.palette.text.secondary};
568+
margin-top: 4px;
569+
`,
570570
} satisfies Record<string, ClassName>;
571571

572572
const styles = {

site/src/pages/TasksPage/TasksPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import { WorkspaceAppStatus } from "modules/workspaces/WorkspaceAppStatus/Worksp
4747
import type { FC, PropsWithChildren, ReactNode } from "react";
4848
import { Helmet } from "react-helmet-async";
4949
import { useMutation, useQuery, useQueryClient } from "react-query";
50+
import { Link as RouterLink } from "react-router-dom";
5051
import { pageTitle } from "utils/page";
5152
import { relativeTime } from "utils/time";
5253

site/src/pages/WorkspacesPage/BatchUpdateConfirmation.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
type Update,
1717
} from "./BatchUpdateConfirmation";
1818

19-
const workspaces = [
19+
const workspaces: Workspace[] = [
2020
{ ...MockRunningOutdatedWorkspace, id: "1" },
2121
{ ...MockDormantOutdatedWorkspace, id: "2" },
2222
{ ...MockOutdatedWorkspace, id: "3" },

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy