Skip to content

Commit

Permalink
Merge branch 'release-v1.0.5' into impl/app-image-pull
Browse files Browse the repository at this point in the history
  • Loading branch information
nxtcoder36 committed Mar 13, 2024
2 parents 04c491a + 49fb090 commit 83df995
Show file tree
Hide file tree
Showing 53 changed files with 3,052 additions and 998 deletions.
59 changes: 49 additions & 10 deletions gql-queries-generator/doc/queries.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ query consoleGetProject($name: String!) {
recordVersion
status {
checks
checkList {
description
name
title
}
isReady
lastReadyGeneration
lastReconcileTime
Expand Down Expand Up @@ -193,6 +198,11 @@ query consoleListProjects($search: SearchProjects, $pq: CursorPaginationIn) {
}
status {
checks
checkList {
description
name
title
}
isReady
lastReadyGeneration
lastReconcileTime
Expand Down Expand Up @@ -277,6 +287,11 @@ query consoleListClusters($search: SearchCluster, $pagination: CursorPaginationI
updateTime
status {
checks
checkList {
description
name
title
}
isReady
lastReadyGeneration
lastReconcileTime
Expand Down Expand Up @@ -409,6 +424,11 @@ query consoleGetCluster($name: String!) {
}
status {
checks
checkList {
description
name
title
}
isReady
lastReadyGeneration
lastReconcileTime
Expand Down Expand Up @@ -767,6 +787,11 @@ query consoleGetEnvironment($projectName: String!, $name: String!) {
}
status {
checks
checkList {
description
name
title
}
isReady
lastReadyGeneration
lastReconcileTime
Expand Down Expand Up @@ -836,6 +861,11 @@ query consoleListEnvironments($projectName: String!, $search: SearchEnvironments
}
status {
checks
checkList {
description
name
title
}
isReady
lastReadyGeneration
lastReconcileTime
Expand Down Expand Up @@ -1028,6 +1058,11 @@ query consoleGetApp($projectName: String!, $envName: String!, $name: String!) {
}
}
status {
checkList {
description
title
name
}
checks
isReady
lastReadyGeneration
Expand Down Expand Up @@ -1157,6 +1192,11 @@ query consoleListApps($projectName: String!, $envName: String!, $search: SearchA
name
namespace
}
checkList {
description
title
name
}
}
syncStatus {
action
Expand Down Expand Up @@ -1267,6 +1307,11 @@ query consoleListRouters($projectName: String!, $envName: String!, $search: Sear
}
status {
checks
checkList {
description
name
title
}
isReady
lastReadyGeneration
lastReconcileTime
Expand Down Expand Up @@ -1359,18 +1404,12 @@ query consoleGetRouter($projectName: String!, $envName: String!, $name: String!)
}
status {
checks
isReady
lastReadyGeneration
lastReconcileTime
message {
RawMessage
}
resources {
apiVersion
kind
checkList {
description
name
namespace
title
}
isReady
}
updateTime
}
Expand Down
30 changes: 30 additions & 0 deletions lib/app-setup/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ const NonIdleProgressBar = () => {

const Root = ({
Wrapper = ({ children }: { children: any }) => children,
tagId,
}: {
Wrapper: (prop: { children: ReactNode }) => JSX.Element;
tagId?: string;
}) => {
const env = useLoaderData();

Expand All @@ -172,6 +174,34 @@ const Root = ({
<meta name="viewport" content="width=device-width,initial-scale=1" />
<Links />
<Meta />
{/* <script */}
{/* async */}
{/* src="https://www.googletagmanager.com/gtag/js?id=G-9GFNBFM718" */}
{/* /> */}
{/* <script> */}
{/* window.dataLayer = window.dataLayer || []; */}
{/* function gtag(){dataLayer.push(arguments);} */}
{/* gtag('js', new Date()); */}

{/* gtag('config', 'G-9GFNBFM718'); */}
{/* </script> */}
<script
async
src={`https://www.googletagmanager.com/gtag/js?id=${tagId}`}
/>
<script
async
id="gtag-init"
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', ${tagId});
`,
}}
/>
</head>
<body className="antialiased">
<div
Expand Down
55 changes: 55 additions & 0 deletions lib/utils/tags.client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
declare global {
interface Window {
gtag: (
option: string,
gaTrackingId: string,
options: Record<string, unknown>
) => void;
}
}

/**
* @example
* https://developers.google.com/analytics/devguides/collection/gtagjs/pages
*/
export const pageview = (url: string, trackingId: string) => {
if (!window.gtag) {
console.warn(
'window.gtag is not defined. This could mean your google analytics script has not loaded on the page yet.'
);
return;
}
window.gtag('config', trackingId, {
page_path: url,
});
};

/**
* @example
* https://developers.google.com/analytics/devguides/collection/gtagjs/events
*/
export const event = ({
action,
category,
label,
value,
}: Record<string, string>) => {
if (!window.gtag) {
console.warn(
'window.gtag is not defined. This could mean your google analytics script has not loaded on the page yet.'
);
return;
}
window.gtag('event', action, {
event_category: category,
event_label: label,
value,
});
};

const tag = {
pageview,
event,
};

export default tag;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"react-viewport-list": "^7.1.2",
"remix": "^1.19.3",
"search-in-json": "^1.0.67",
"sonner": "^1.4.3",
"swr": "^2.2.4",
"use-immer": "^0.9.0",
"uuid": "^9.0.1",
Expand Down
13 changes: 13 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions src/apps/console/components/commons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,10 @@ export const CopyButton = ({
setTimeout(() => {
setCopyIcon(<CopySimple />);
}, 1000);
// toast.success('Copied to clipboard');
},
});

return (
// <Chips.Chip
// type="CLICKABLE"
// item={title}
// label={title}
// prefix={copyIcon}
// onClick={() => {
// copy(value);
// setCopyIcon(<Check />);
// }}
// />
<div
onClick={() => {
copy(value);
Expand Down
9 changes: 9 additions & 0 deletions src/apps/console/components/icons.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export {
Domain,
ArrowLeftFill as ArrowLeft,
ArrowRightFill as ArrowRight,
Plus,
Expand Down Expand Up @@ -41,4 +42,12 @@ export {
BackingServices,
VirtualMachine,
Database,
ArrowsClockwise,
Info,
Fan,
WarningCircle,
ChecksFill as Checks,
CircleNotch,
Circle,
CircleFill,
} from '@jengaicons/react';
Loading

0 comments on commit 83df995

Please sign in to comment.