Skip to content

Commit

Permalink
Pull request update/240830
Browse files Browse the repository at this point in the history
a229429 OS-7760. Remove focus from the leaderboard selector on select
c62f05a OS-7796. Add documentation links
  • Loading branch information
stanfra authored Aug 30, 2024
2 parents 9220b17 + a229429 commit 74bc219
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ const LeaderboardsListSection = ({
value={leaderboards.find(({ id }) => id === selectedLeaderboardId) ?? ""}
isOptionEqualToValue={(option, value) => option.id === value.id}
onChange={(event, newValue) => {
onSelectedLeaderboardIdChange(newValue.id);
if (newValue) {
onSelectedLeaderboardIdChange(newValue.id);
}
}}
blurOnSelect
sx={{
maxWidth: "450px",
flexBasis: "280px",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ import {
GITHUB_HYSTAX_EXTRACT_LINKED_REPORTS,
DOCS_HYSTAX_CONNECT_ALIBABA_CLOUD,
DOCS_HYSTAX_CONNECT_GCP_CLOUD,
DATABRICKS_CREATE_SERVICE_PRINCIPAL
DATABRICKS_CREATE_SERVICE_PRINCIPAL,
DOCS_HYSTAX_CONNECTING_A_KUBERNETES_CLUSTER_TO_OPTSCALE
} from "urls";
import { trackEvent, GA_EVENT_CATEGORIES } from "utils/analytics";
import {
Expand Down Expand Up @@ -311,7 +312,19 @@ const renderConnectionTypeInfoMessage = ({ connectionType }) =>
[KUBERNETES]: renderConnectionTypeDescription([
{
key: "createKubernetesDocumentationReference1",
messageId: "createKubernetesDocumentationReference1"
messageId: "createKubernetesDocumentationReference1",
values: {
link: (chunks) => (
<Link
data-test-id="link_guide"
href={DOCS_HYSTAX_CONNECTING_A_KUBERNETES_CLUSTER_TO_OPTSCALE}
target="_blank"
rel="noopener"
>
{chunks}
</Link>
)
}
},
{
key: "createKubernetesDocumentationReference2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import {
DOCS_HYSTAX_CONNECT_GCP_CLOUD,
DOCS_HYSTAX_DISCOVER_RESOURCES,
GITHUB_HYSTAX_K8S_COST_METRICS_COLLECTOR,
DATABRICKS_CREATE_SERVICE_PRINCIPAL
DATABRICKS_CREATE_SERVICE_PRINCIPAL,
DOCS_HYSTAX_MIGRATE_FROM_CUR_TO_DATA_EXPORTS_CUR_2_0
} from "urls";
import {
ALIBABA_CNR,
Expand Down Expand Up @@ -62,17 +63,39 @@ const Description = ({ type, config }) => {
}}
/>
) : (
<FormattedMessage
id="createAwsRootDocumentationReference"
values={{
link: (chunks) => (
<Link data-test-id="link_guide" href={DOCS_HYSTAX_AUTO_BILLING_AWS} target="_blank" rel="noopener">
{chunks}
</Link>
),
strong: (chunks) => <strong>{chunks}</strong>
}}
/>
<>
<Typography>
<FormattedMessage
id="createAwsRootDocumentationReference"
values={{
link: (chunks) => (
<Link data-test-id="link_guide" href={DOCS_HYSTAX_AUTO_BILLING_AWS} target="_blank" rel="noopener">
{chunks}
</Link>
),
strong: (chunks) => <strong>{chunks}</strong>
}}
/>
</Typography>
<Typography>
<FormattedMessage
id="migrateToCur2.0"
values={{
link: (chunks) => (
<Link
data-test-id="link_guide"
href={DOCS_HYSTAX_MIGRATE_FROM_CUR_TO_DATA_EXPORTS_CUR_2_0}
target="_blank"
rel="noopener"
>
{chunks}
</Link>
),
strong: (chunks) => <strong>{chunks}</strong>
}}
/>
</Typography>
</>
)}
</Typography>
);
Expand Down
5 changes: 3 additions & 2 deletions ngui/ui/src/translations/en-US/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,9 @@
"createDatabricksDocumentationReference": "Please provide programmatic credentials for a service principal with an account admin role. <link>Read this guide</link> for more details.",
"createEnvironmentsBackdropMessage": "Please add an Shared Environment to track its usage for testing and development purposes.",
"createGCPDocumentationReference": "Please provide a service account credentials JSON file with a ReadOnlyAccess permission attached. <link>Read this guide</link> for more details.",
"createKubernetesDocumentationReference1": "To get cost management and FinOps capabilities for your Kubernetes cluster, you need to deploy a piece of software that collects information about running pods and converts them into cost metrics.",
"createKubernetesDocumentationReference1": "To get cost management and FinOps capabilities for your Kubernetes cluster, you need to deploy a piece of software that collects information about running pods and converts them into cost metrics. Refer to <link>this guide</link> for more details.",
"createKubernetesDocumentationReference2": "The software is open-source, free of malware, and requires read-only access to Kubernetes metadata and performance metrics.",
"createKubernetesDocumentationReference3": "Please review the code and follow the instructions at {kubernetesConnectGuide}.",
"createKubernetesDocumentationReference3": "Please review the code and find a detailed description at {kubernetesConnectGuide}.",
"createMlTask.selectMetrics": "Select the metrics you want to track for this task.",
"createNebiusDescription.addPermissionsToCloud": "Please note that a newly created service account will have permissions only for its associated folder. You will need to add the required cloud permissions as well.",
"createNebiusDescription.billingReportBucket": "Please specify a bucket name and its prefix to allow OptScale to receive and process billing data.",
Expand Down Expand Up @@ -1115,6 +1115,7 @@
"metric": "Metric",
"metrics": "Metrics",
"microsoft": "Microsoft",
"migrateToCur2.0": "To migrate from CUR to Data Exports CUR 2.0, follow <link>this guide</link>.",
"migrationToNebius": "Migration to Nebius",
"migrationToNebiusDescription": "Some of your compute can cost less in the Nebius cloud. Consider their migration to reduce expenses.",
"migrationToNebiusTitle": "Migration To Nebius",
Expand Down
2 changes: 2 additions & 0 deletions ngui/ui/src/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,8 @@ export const JIRA_MARKETPLACE = "https://marketplace.atlassian.com/apps/1227110/
// Hystax documentation urls
export const DOCS_HYSTAX_OPTSCALE = "https://hystax.com/documentation/optscale/";
export const DOCS_HYSTAX_AUTO_BILLING_AWS = `${DOCS_HYSTAX_OPTSCALE}e2e_guides/e2e_aws_root_cur.html#automatic-billing-data-import-in-aws`;
export const DOCS_HYSTAX_MIGRATE_FROM_CUR_TO_DATA_EXPORTS_CUR_2_0 = `${DOCS_HYSTAX_OPTSCALE}e2e_guides/e2e_aws_migrate_cur1_cur2.html`;
export const DOCS_HYSTAX_CONNECTING_A_KUBERNETES_CLUSTER_TO_OPTSCALE = `${DOCS_HYSTAX_OPTSCALE}e2e_guides/e2e_kubernetes.html#connecting-a-kubernetes-cluster-to-optscale`;
export const DOCS_HYSTAX_DISCOVER_RESOURCES = `${DOCS_HYSTAX_OPTSCALE}e2e_guides/e2e_aws_linked.html#discover-resources`;
export const DOCS_HYSTAX_CONNECT_ALIBABA_CLOUD = `${DOCS_HYSTAX_OPTSCALE}e2e_guides/e2e_alibaba.html`;
export const DOCS_HYSTAX_CONNECT_GCP_CLOUD = `${DOCS_HYSTAX_OPTSCALE}e2e_guides/e2e_gcp.html`;
Expand Down

0 comments on commit 74bc219

Please sign in to comment.