Skip to content

Commit

Permalink
Update the context dialog of the command bar so that it can be shared…
Browse files Browse the repository at this point in the history
… betwen the laucher and myServices
  • Loading branch information
garronej committed Oct 8, 2023
1 parent 397038b commit 54c347e
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 89 deletions.
3 changes: 1 addition & 2 deletions web/src/ui/i18n/resources/de.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,7 @@ Fühlen Sie sich frei, Ihre Kubernetes-Bereitstellungen zu erkunden und die Kont
"confirm delete body shared services":
"Achtung, einige Ihrer Dienste sind für andere Projektmitglieder freigegeben.",
"cancel": "Abbrechen",
"confirm": "Ja, löschen",
"api logs help body": undefined
"confirm": "Ja, löschen"
},
"MyServicesButtonBar": {
"refresh": "Aktualisieren",
Expand Down
73 changes: 8 additions & 65 deletions web/src/ui/i18n/resources/en.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -394,27 +394,25 @@ export const translations: Translations<"en"> = {
return false;
}
}}
>{`Welcome to our Helm Command Explanation Dialog!
We've designed this interface to empower you to take control over your Kubernetes deployments.
>{`We've designed the command bar to empower you to take control over your Kubernetes deployments.
Here's what you need to know:
#### What is this Helm Command?
#### What are those Helm Commands?
The command displayed on the screen is the exact Helm command that our application will execute on your behalf in your Kubernetes namespace.
This enables you to know what's happening behind the scenes when you click the 'launch' button.
Theses commands are the exact Helm command that Onyxia API will execute on your behalf in your Kubernetes namespace.
This enables you to know what's happening behind the scenes when you interact with the UI.
#### Real-time Updates
As you modify options in the UI, the Helm command will automatically update to reflect those changes.
This way, you can see how your choices impact the underlying system.
As you interact with the UI, the Helm commands will automatically update to reflect what you are doing.
#### Why Should I Care?
- **Transparency:** We believe you have the right to know what actions are being performed in your environment.
- **Learning:** Understanding these commands can provide insight into Kubernetes and Helm, deepening your knowledge.
- **Manual Execution:** You can copy and paste this command into a terminal with write-access to Kubernetes, allowing you to launch the service manually.
- **Manual Execution:** You can copy and paste those commands into a terminal with write-access to Kubernetes, allowing you to launch the service manually.
#### How Can I Run this Command Manually?
#### How Can I Run Those Commands Manually?
There are two ways to run theses commands:
Expand Down Expand Up @@ -472,62 +470,7 @@ Feel free to explore and take charge of your Kubernetes deployments!
"confirm delete body":
"Don't forget to push your code on GitHub or GitLab before terminating your services",
"cancel": "cancel",
"confirm": "Yes, delete",
"api logs help body": ({
k8CredentialsHref,
myServicesHref,
interfacePreferenceHref
}) => (
<Markdown
getDoesLinkShouldOpenNewTab={href => {
switch (href) {
case k8CredentialsHref:
return true;
case myServicesHref:
return true;
case interfacePreferenceHref:
return false;
default:
return false;
}
}}
>{`Welcome to our Helm Command Explanation Dialog!
We've designed this interface to empower you to take control over your Kubernetes deployments.
Here's what you need to know:
#### What is this Helm Command?
The command displayed on the screen is the exact Helm command that our application will execute on your behalf in your Kubernetes namespace.
This enables you to know what's happening behind the scenes when you click the 'launch' button.
#### Real-time Updates
As you modify options in the UI, the Helm command will automatically update to reflect those changes.
This way, you can see how your choices impact the underlying system.
#### Why Should I Care?
- **Transparency:** We believe you have the right to know what actions are being performed in your environment.
- **Learning:** Understanding these commands can provide insight into Kubernetes and Helm, deepening your knowledge.
- **Manual Execution:** You can copy and paste this command into a terminal with write-access to Kubernetes, allowing you to launch the service manually.
#### How Can I Run this Command Manually?
There are two ways to run theses commands:
- **Local Terminal:** Go to [\`My Account -> Kubernetes tab\`](${k8CredentialsHref}).
Here, you will find the credentials that allow you to run commands in your Kubernetes namespace from your local terminal.
- **VSCode-Python Terminal:** You can also launch a VSCode-Python instance with the Kubernetes role set to \`write\`.
Open a terminal within VSCode, and you'll be able to execute the command.
By executing the command manually, you will still be able to see the service in the [\`MyServices\`](${myServicesHref}) page as if it was launched via the UI.
You can disable the command bar in the [\`My Account -> Interface preference tab\`](${interfacePreferenceHref}).
Feel free to explore and take charge of your Kubernetes deployments!
`}</Markdown>
)
"confirm": "Yes, delete"
},
"MyServicesButtonBar": {
"refresh": "Refresh",
Expand Down
3 changes: 1 addition & 2 deletions web/src/ui/i18n/resources/fi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,7 @@ Tutustu vapaasti ja ota hallintaan Kubernetes-julkaisusi!
"confirm delete body":
"Muista tallentaa koodisi GitHubiin tai GitLabiin ennen palveluiden lopettamista",
"cancel": "Peruuta",
"confirm": "Kyllä, poista",
"api logs help body": undefined
"confirm": "Kyllä, poista"
},
"MyServicesButtonBar": {
"refresh": "Päivitä",
Expand Down
3 changes: 1 addition & 2 deletions web/src/ui/i18n/resources/fr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,7 @@ N'hésitez pas à explorer et à prendre en main vos déploiements Kubernetes !
"confirm delete body shared services":
"Attention, certains de vos services sont partagés aux autres membres du projet.",
"cancel": "Annuler",
"confirm": "Oui, supprimer",
"api logs help body": undefined
"confirm": "Oui, supprimer"
},
"MyServicesButtonBar": {
"refresh": "Rafraîchir",
Expand Down
3 changes: 1 addition & 2 deletions web/src/ui/i18n/resources/it.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,7 @@ Sentiti libero di esplorare e prendere il controllo dei tuoi deployment Kubernet
"confirm delete body shared services":
"Attenzione, alcuni dei tuoi servizi sono condivisi con gli altri membri del progetto.",
"cancel": "Annullare",
"confirm": "Sì, eliminare",
"api logs help body": undefined
"confirm": "Sì, eliminare"
},
"MyServicesButtonBar": {
"refresh": "Aggiornare",
Expand Down
3 changes: 1 addition & 2 deletions web/src/ui/i18n/resources/nl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,7 @@ Voel je vrij om te verkennen en controle te nemen over je Kubernetes-implementat
"confirm delete body shared services":
"Opgelet, sommige van uw diensten worden gedeeld met andere projectleden.",
"cancel": "Annuleren",
"confirm": "Ja, verwijderen",
"api logs help body": undefined
"confirm": "Ja, verwijderen"
},
"MyServicesButtonBar": {
"refresh": "Vernieuwen",
Expand Down
3 changes: 1 addition & 2 deletions web/src/ui/i18n/resources/no.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,7 @@ Føl deg fri til å utforske og ta kontroll over dine Kubernetes-implementeringe
"confirm delete body":
"Ikke glem å laste opp koden din på GitHub eller GitLab før du avslutter tjenestene dine",
"cancel": "Avbryt",
"confirm": "Ja, slett",
"api logs help body": undefined
"confirm": "Ja, slett"
},
"MyServicesButtonBar": {
"refresh": "Oppdater",
Expand Down
3 changes: 1 addition & 2 deletions web/src/ui/i18n/resources/zh-CN.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,7 @@ export const translations: Translations<"zh-CN"> = {
"confirm delete body shared services":
"请注意,您的某些服务正在与项目的其他成员共享.",
"cancel": "取消",
"confirm": "是的, 删除",
"api logs help body": undefined
"confirm": "是的, 删除"
},
"MyServicesButtonBar": {
"refresh": "刷新",
Expand Down
12 changes: 2 additions & 10 deletions web/src/ui/pages/myServices/MyServices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default function MyServices(props: Props) {
const { className, route } = props;

const { t } = useTranslation({ MyServices });
const { t: tCatalogLauncher } = useTranslation("CatalogLauncher");

/* prettier-ignore */
const { serviceManager, restorablePackageConfig, projectConfigs } = useCoreFunctions();
Expand Down Expand Up @@ -308,7 +309,7 @@ export default function MyServices(props: Props) {
helpDialog={{
"body": (
<div className={classes.helpDialogBody}>
{t("api logs help body", {
{tCatalogLauncher("api logs help body", {
"k8CredentialsHref": routes.account({
"tabId": "k8sCredentials"
}).href,
Expand Down Expand Up @@ -418,15 +419,6 @@ export const { i18n } = declareComponentKeys<
| "confirm delete body shared services"
| "cancel"
| "confirm"
| {
K: "api logs help body";
P: {
k8CredentialsHref: string;
myServicesHref: string;
interfacePreferenceHref: string;
};
R: JSX.Element;
}
>()({ MyServices });

const useStyles = tss
Expand Down

0 comments on commit 54c347e

Please sign in to comment.