Skip to content

Commit

Permalink
Fix Code for Next Button (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
wg102 authored Jan 25, 2024
1 parent 102087e commit 991e38e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/centraldashboard/public/assets/i18n/languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"registrationPage.linkPrivacy": "Privacy",
"registrationPage.errValidation": "Name can only start and end with alpha-num characters, dashes are only permitted between start and end. (minlength >= 1)",
"registrationPage.errDuplicate": "Namespace \"{namespace}\" already exists",
"registrationPage.errCreateNotebook": "An error occured while creating the default notebook",
"registrationPage.errTest": "Test Error!",
"namespaceNeeded.text1": "Please select a",
"namespaceNeeded.text2": "namespace",
Expand Down Expand Up @@ -188,6 +189,7 @@
"registrationPage.linkDocumentation": "Documentation",
"registrationPage.linkPrivacy": "Confidentialité",
"registrationPage.errValidation": "Le nom doit commencer et terminer par des caractères alphanumériques, les tirets ne sont autorisés qu'à l'intérieur. (longueur minimale >= 1)",
"registrationPage.errCreateNotebook": "Erreur lors de la création du bloc-note par défaut.",
"registrationPage.errDuplicate": "L'espace de noms \"{namespace}\" existe déjà",
"registrationPage.errTest": "Test Error!",
"namespaceNeeded.text1": "Veuillez choisir un ",
Expand Down
15 changes: 15 additions & 0 deletions components/centraldashboard/public/components/landing-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,21 @@ export class LandingPage extends mixinBehaviors([AppLocalizeBehavior], utilities
*/
const success = await this.pollProfile(66, 300);
if (success) this._successSetup();

// Create the default notebook
const APICreateDefault = this.$.CreateDefaultNotebook;

await APICreateDefault.generateRequest().completes.catch((e) => e);
await this.sleep(1); // So the errors and callbacks can schedule
if (this.error && this.error.response) {
if (this.error.response.error) {
this.set('error', {response: {
error: 'registrationPage.errCreateNotebook',
namespace: this.namespaceName,
}});
}
return this.waitForRedirect = false;
}
this.waitForRedirect = false;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
iron-ajax#MakeNamespace(method='POST', url='/api/workgroup/create', handle-as='json', last-error='{{error}}', last-response='{{resp}}',
content-type='application/json', loading='{{submittingWorkgroup}}')
iron-ajax#GetMyNamespace(url='/api/workgroup/exists', handle-as='json')
iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespaceName]]/createdefault', headers='{"Content-Type": "application/json"}')
paper-card#MainCard
figure#Logo !{logo}
neon-animatable.Main-Content
Expand Down

0 comments on commit 991e38e

Please sign in to comment.