From 2e12cdda73454f190dd9a532f3bb875a768135a4 Mon Sep 17 00:00:00 2001 From: Wendy V Gaultier Date: Fri, 12 Jan 2024 15:39:55 +0000 Subject: [PATCH 01/11] Test Next Button --- .../public/assets/i18n/languages.json | 2 ++ .../public/components/landing-page.js | 15 +++++++++++++++ .../public/components/landing-page.pug | 2 ++ .../public/components/main-page.js | 15 +++++++++++++++ .../public/components/main-page.pug | 3 +++ 5 files changed, 37 insertions(+) diff --git a/components/centraldashboard/public/assets/i18n/languages.json b/components/centraldashboard/public/assets/i18n/languages.json index 65d93eae115..9b7067be419 100644 --- a/components/centraldashboard/public/assets/i18n/languages.json +++ b/components/centraldashboard/public/assets/i18n/languages.json @@ -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", @@ -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 ", diff --git a/components/centraldashboard/public/components/landing-page.js b/components/centraldashboard/public/components/landing-page.js index 39a345b8875..85ce936438d 100644 --- a/components/centraldashboard/public/components/landing-page.js +++ b/components/centraldashboard/public/components/landing-page.js @@ -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; } diff --git a/components/centraldashboard/public/components/landing-page.pug b/components/centraldashboard/public/components/landing-page.pug index f15ca5da7f7..b3548b695eb 100644 --- a/components/centraldashboard/public/components/landing-page.pug +++ b/components/centraldashboard/public/components/landing-page.pug @@ -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]]/notebooks/default') paper-card#MainCard figure#Logo !{logo} neon-animatable.Main-Content diff --git a/components/centraldashboard/public/components/main-page.js b/components/centraldashboard/public/components/main-page.js index 91b3405f919..a897ca0f34e 100644 --- a/components/centraldashboard/public/components/main-page.js +++ b/components/centraldashboard/public/components/main-page.js @@ -657,6 +657,21 @@ export class MainPage extends mixinBehaviors([AppLocalizeBehavior], utilitiesMix 'lang': this.language, }; } + + async nextPage() { + 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.namespace, + }}); + } + } + } } window.customElements.define('main-page', MainPage); diff --git a/components/centraldashboard/public/components/main-page.pug b/components/centraldashboard/public/components/main-page.pug index 0eaabf464bf..d468179e7bd 100644 --- a/components/centraldashboard/public/components/main-page.pug +++ b/components/centraldashboard/public/components/main-page.pug @@ -6,6 +6,7 @@ iron-ajax#envInfo(auto='[[_shouldFetchEnv]]', url='/api/workgroup/env-info', han on-response='_onEnvInfoResponse') iron-ajax(auto, url="[[getNotebookServersUrl]]", handle-as="json", loading="{{loading}}", on-response="_onNotebookServersResponse", on-error="_onNotebookServersError") +iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespace]]/notebooks/default') aside#PageLoader(hidden='{{!pageLoading}}') app-drawer-layout.flex(narrow='{{narrowMode}}', force-narrow='[[or(thinView, hideSidebar)]]', @@ -104,6 +105,8 @@ app-drawer-layout.flex(narrow='{{narrowMode}}', dashboard-view(namespace='[[queryParams.ns]]', platform-info='[[platformInfo]]', quick-links='[[quickLinks]]', documentation-items='[[documentationItems]]', security-messages='[[securityMessages]]', language='[[language]]', resources='[[resources]]') + .actions + paper-button(on-click='nextPage') {{localize('registrationPage.btnNext')}} neon-animatable(page='activity') activity-view(namespace='[[queryParams.ns]]', language='[[language]]', resources='[[resources]]') neon-animatable(page='manage-users') From e8afda8e72c02f22db5427c68cbfbc4def517d9d Mon Sep 17 00:00:00 2001 From: Wendy V Gaultier Date: Mon, 15 Jan 2024 16:09:07 +0000 Subject: [PATCH 02/11] trigger auto deploy --- components/centraldashboard/public/components/main-page.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/centraldashboard/public/components/main-page.pug b/components/centraldashboard/public/components/main-page.pug index d468179e7bd..0d814162ed0 100644 --- a/components/centraldashboard/public/components/main-page.pug +++ b/components/centraldashboard/public/components/main-page.pug @@ -106,7 +106,7 @@ app-drawer-layout.flex(narrow='{{narrowMode}}', platform-info='[[platformInfo]]', quick-links='[[quickLinks]]', documentation-items='[[documentationItems]]', security-messages='[[securityMessages]]', language='[[language]]', resources='[[resources]]') .actions - paper-button(on-click='nextPage') {{localize('registrationPage.btnNext')}} + paper-button#me(on-click='nextPage') {{localize('registrationPage.btnNext')}} neon-animatable(page='activity') activity-view(namespace='[[queryParams.ns]]', language='[[language]]', resources='[[resources]]') neon-animatable(page='manage-users') From 0e3ccef991bb8bb15e345e58de3126811fc82d55 Mon Sep 17 00:00:00 2001 From: Wendy V Gaultier Date: Mon, 15 Jan 2024 16:29:19 +0000 Subject: [PATCH 03/11] rename api --- components/centraldashboard/public/components/main-page.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/centraldashboard/public/components/main-page.pug b/components/centraldashboard/public/components/main-page.pug index 0d814162ed0..64b4a2a6407 100644 --- a/components/centraldashboard/public/components/main-page.pug +++ b/components/centraldashboard/public/components/main-page.pug @@ -6,7 +6,7 @@ iron-ajax#envInfo(auto='[[_shouldFetchEnv]]', url='/api/workgroup/env-info', han on-response='_onEnvInfoResponse') iron-ajax(auto, url="[[getNotebookServersUrl]]", handle-as="json", loading="{{loading}}", on-response="_onNotebookServersResponse", on-error="_onNotebookServersError") -iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespace]]/notebooks/default') +iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespace]]/createdefault') aside#PageLoader(hidden='{{!pageLoading}}') app-drawer-layout.flex(narrow='{{narrowMode}}', force-narrow='[[or(thinView, hideSidebar)]]', From 9546506997975f654a9d80a4a3921f16a7977ebb Mon Sep 17 00:00:00 2001 From: Wendy V Gaultier Date: Mon, 15 Jan 2024 16:30:06 +0000 Subject: [PATCH 04/11] add json --- components/centraldashboard/public/components/main-page.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/centraldashboard/public/components/main-page.pug b/components/centraldashboard/public/components/main-page.pug index 64b4a2a6407..64d77f0dc33 100644 --- a/components/centraldashboard/public/components/main-page.pug +++ b/components/centraldashboard/public/components/main-page.pug @@ -6,7 +6,7 @@ iron-ajax#envInfo(auto='[[_shouldFetchEnv]]', url='/api/workgroup/env-info', han on-response='_onEnvInfoResponse') iron-ajax(auto, url="[[getNotebookServersUrl]]", handle-as="json", loading="{{loading}}", on-response="_onNotebookServersResponse", on-error="_onNotebookServersError") -iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespace]]/createdefault') +iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespace]]/createdefault', handle-as="json") aside#PageLoader(hidden='{{!pageLoading}}') app-drawer-layout.flex(narrow='{{narrowMode}}', force-narrow='[[or(thinView, hideSidebar)]]', From 5826b686d165281f93167bcaca36b0086ef51ffd Mon Sep 17 00:00:00 2001 From: Wendy V Gaultier Date: Mon, 15 Jan 2024 16:50:37 +0000 Subject: [PATCH 05/11] Keep handle json --- components/centraldashboard/public/components/main-page.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/centraldashboard/public/components/main-page.pug b/components/centraldashboard/public/components/main-page.pug index 64d77f0dc33..71c574c103e 100644 --- a/components/centraldashboard/public/components/main-page.pug +++ b/components/centraldashboard/public/components/main-page.pug @@ -6,7 +6,7 @@ iron-ajax#envInfo(auto='[[_shouldFetchEnv]]', url='/api/workgroup/env-info', han on-response='_onEnvInfoResponse') iron-ajax(auto, url="[[getNotebookServersUrl]]", handle-as="json", loading="{{loading}}", on-response="_onNotebookServersResponse", on-error="_onNotebookServersError") -iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespace]]/createdefault', handle-as="json") +iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespace]]/notebooks/default', handle-as='json') aside#PageLoader(hidden='{{!pageLoading}}') app-drawer-layout.flex(narrow='{{narrowMode}}', force-narrow='[[or(thinView, hideSidebar)]]', From e04e97172619f90a05a420fae4af0c60a3dc5c3f Mon Sep 17 00:00:00 2001 From: Wendy V Gaultier Date: Mon, 15 Jan 2024 17:00:07 +0000 Subject: [PATCH 06/11] try 123134234 --- .../public/components/main-page.js | 15 +++++++++++++++ .../public/components/main-page.pug | 2 ++ 2 files changed, 17 insertions(+) diff --git a/components/centraldashboard/public/components/main-page.js b/components/centraldashboard/public/components/main-page.js index a897ca0f34e..c502fee87e1 100644 --- a/components/centraldashboard/public/components/main-page.js +++ b/components/centraldashboard/public/components/main-page.js @@ -672,6 +672,21 @@ export class MainPage extends mixinBehaviors([AppLocalizeBehavior], utilitiesMix } } } + + async nextPage2() { + const APICreateDefault = this.$.CreateDefaultNotebook2; + + 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.namespace, + }}); + } + } + } } window.customElements.define('main-page', MainPage); diff --git a/components/centraldashboard/public/components/main-page.pug b/components/centraldashboard/public/components/main-page.pug index 71c574c103e..930ae56a0c6 100644 --- a/components/centraldashboard/public/components/main-page.pug +++ b/components/centraldashboard/public/components/main-page.pug @@ -7,6 +7,7 @@ iron-ajax#envInfo(auto='[[_shouldFetchEnv]]', url='/api/workgroup/env-info', han iron-ajax(auto, url="[[getNotebookServersUrl]]", handle-as="json", loading="{{loading}}", on-response="_onNotebookServersResponse", on-error="_onNotebookServersError") iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespace]]/notebooks/default', handle-as='json') +iron-ajax#CreateDefaultNotebook2(method='POST', url='/en/api/namespaces/[[namespace]]/notebooks/default', handle-as='json') aside#PageLoader(hidden='{{!pageLoading}}') app-drawer-layout.flex(narrow='{{narrowMode}}', force-narrow='[[or(thinView, hideSidebar)]]', @@ -107,6 +108,7 @@ app-drawer-layout.flex(narrow='{{narrowMode}}', security-messages='[[securityMessages]]', language='[[language]]', resources='[[resources]]') .actions paper-button#me(on-click='nextPage') {{localize('registrationPage.btnNext')}} + paper-button#me(on-click='nextPage2') {{localize('mainPage.tabActivity')}} neon-animatable(page='activity') activity-view(namespace='[[queryParams.ns]]', language='[[language]]', resources='[[resources]]') neon-animatable(page='manage-users') From a1ee1fa4f2c3316aeea41a4d7fc14aab04eb8d33 Mon Sep 17 00:00:00 2001 From: Wendy V Gaultier Date: Mon, 15 Jan 2024 17:07:36 +0000 Subject: [PATCH 07/11] rename keept 2 api --- components/centraldashboard/public/components/main-page.pug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/centraldashboard/public/components/main-page.pug b/components/centraldashboard/public/components/main-page.pug index 930ae56a0c6..5d6e6419d0f 100644 --- a/components/centraldashboard/public/components/main-page.pug +++ b/components/centraldashboard/public/components/main-page.pug @@ -6,8 +6,8 @@ iron-ajax#envInfo(auto='[[_shouldFetchEnv]]', url='/api/workgroup/env-info', han on-response='_onEnvInfoResponse') iron-ajax(auto, url="[[getNotebookServersUrl]]", handle-as="json", loading="{{loading}}", on-response="_onNotebookServersResponse", on-error="_onNotebookServersError") -iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespace]]/notebooks/default', handle-as='json') -iron-ajax#CreateDefaultNotebook2(method='POST', url='/en/api/namespaces/[[namespace]]/notebooks/default', handle-as='json') +iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespace]]/createdefault', handle-as='json') +iron-ajax#CreateDefaultNotebook2(method='POST', url='/en/api/namespaces/[[namespace]]/createdefault', handle-as='json') aside#PageLoader(hidden='{{!pageLoading}}') app-drawer-layout.flex(narrow='{{narrowMode}}', force-narrow='[[or(thinView, hideSidebar)]]', From 0789738ad89ff19c568a33ff33394f3dc9f3f622 Mon Sep 17 00:00:00 2001 From: Wendy V Gaultier Date: Mon, 15 Jan 2024 17:12:31 +0000 Subject: [PATCH 08/11] Add api body --- components/centraldashboard/public/components/main-page.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/centraldashboard/public/components/main-page.js b/components/centraldashboard/public/components/main-page.js index c502fee87e1..a2865a71b0d 100644 --- a/components/centraldashboard/public/components/main-page.js +++ b/components/centraldashboard/public/components/main-page.js @@ -660,6 +660,7 @@ export class MainPage extends mixinBehaviors([AppLocalizeBehavior], utilitiesMix async nextPage() { const APICreateDefault = this.$.CreateDefaultNotebook; + APICreateDefault.body = {test: 'bla'}; await APICreateDefault.generateRequest().completes.catch((e) => e); await this.sleep(1); // So the errors and callbacks can schedule @@ -675,7 +676,7 @@ export class MainPage extends mixinBehaviors([AppLocalizeBehavior], utilitiesMix async nextPage2() { const APICreateDefault = this.$.CreateDefaultNotebook2; - + APICreateDefault.body = {test: 'bla'}; await APICreateDefault.generateRequest().completes.catch((e) => e); await this.sleep(1); // So the errors and callbacks can schedule if (this.error && this.error.response) { From b3ab28ea79fd52a0a2545ca89f4827dc981b42fc Mon Sep 17 00:00:00 2001 From: Wendy V Gaultier Date: Wed, 24 Jan 2024 18:54:43 +0000 Subject: [PATCH 09/11] Add header content-type --- .../centraldashboard/public/components/landing-page.pug | 2 +- .../centraldashboard/public/components/main-page.pug | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/components/centraldashboard/public/components/landing-page.pug b/components/centraldashboard/public/components/landing-page.pug index b3548b695eb..91ad6954131 100644 --- a/components/centraldashboard/public/components/landing-page.pug +++ b/components/centraldashboard/public/components/landing-page.pug @@ -1,7 +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]]/notebooks/default') +iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespaceName]]/notebooks/default', handle-as='json', headers='{"Content-Type": "application/json"}') paper-card#MainCard figure#Logo !{logo} neon-animatable.Main-Content diff --git a/components/centraldashboard/public/components/main-page.pug b/components/centraldashboard/public/components/main-page.pug index 838dd6a8cda..d1384b97ee5 100644 --- a/components/centraldashboard/public/components/main-page.pug +++ b/components/centraldashboard/public/components/main-page.pug @@ -6,8 +6,6 @@ iron-ajax#envInfo(auto='[[_shouldFetchEnv]]', url='/api/workgroup/env-info', han on-response='_onEnvInfoResponse') iron-ajax(auto, url="[[getNotebookServersUrl]]", handle-as="json", loading="{{loading}}", on-response="_onNotebookServersResponse", on-error="_onNotebookServersError") -iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespace]]/createdefault', handle-as='json') -iron-ajax#CreateDefaultNotebook2(method='POST', url='/en/api/namespaces/[[namespace]]/createdefault', handle-as='json') aside#PageLoader(hidden='{{!pageLoading}}') app-drawer-layout.flex(narrow='{{narrowMode}}', force-narrow='[[or(thinView, hideSidebar)]]', @@ -105,10 +103,7 @@ app-drawer-layout.flex(narrow='{{narrowMode}}', neon-animatable(page='dashboard') dashboard-view(namespace='[[queryParams.ns]]', platform-info='[[platformInfo]]', quick-links='[[quickLinks]]', documentation-items='[[documentationItems]]', - security-messages='[[securityMessages]]', language='[[language]]', resources='[[resources]]') - .actions - paper-button#me(on-click='nextPage') {{localize('registrationPage.btnNext')}} - paper-button#me(on-click='nextPage2') {{localize('mainPage.tabActivity')}} + security-messages='[[securityMessages]]', language='[[language]]', resources='[[resources]]' neon-animatable(page='activity') activity-view(namespace='[[queryParams.ns]]', language='[[language]]', resources='[[resources]]') neon-animatable(page='manage-users') From 184b9b73b70ce0a4d643b267a29c6657c4d7b6f4 Mon Sep 17 00:00:00 2001 From: Wendy V Gaultier Date: Wed, 24 Jan 2024 19:09:13 +0000 Subject: [PATCH 10/11] Add missing parenthesis --- components/centraldashboard/public/components/landing-page.pug | 2 +- components/centraldashboard/public/components/main-page.pug | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/centraldashboard/public/components/landing-page.pug b/components/centraldashboard/public/components/landing-page.pug index 91ad6954131..c0123eabb14 100644 --- a/components/centraldashboard/public/components/landing-page.pug +++ b/components/centraldashboard/public/components/landing-page.pug @@ -1,7 +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]]/notebooks/default', handle-as='json', headers='{"Content-Type": "application/json"}') +iron-ajax#CreateDefaultNotebook(method='POST', url='/jupyter/api/namespaces/[[namespaceName]]/notebooks/default', headers='{"Content-Type": "application/json"}') paper-card#MainCard figure#Logo !{logo} neon-animatable.Main-Content diff --git a/components/centraldashboard/public/components/main-page.pug b/components/centraldashboard/public/components/main-page.pug index d1384b97ee5..5e2d4f56e76 100644 --- a/components/centraldashboard/public/components/main-page.pug +++ b/components/centraldashboard/public/components/main-page.pug @@ -103,7 +103,7 @@ app-drawer-layout.flex(narrow='{{narrowMode}}', neon-animatable(page='dashboard') dashboard-view(namespace='[[queryParams.ns]]', platform-info='[[platformInfo]]', quick-links='[[quickLinks]]', documentation-items='[[documentationItems]]', - security-messages='[[securityMessages]]', language='[[language]]', resources='[[resources]]' + security-messages='[[securityMessages]]', language='[[language]]', resources='[[resources]]') neon-animatable(page='activity') activity-view(namespace='[[queryParams.ns]]', language='[[language]]', resources='[[resources]]') neon-animatable(page='manage-users') From c21313d611d60b6bb674783f2b123a3402f6ed71 Mon Sep 17 00:00:00 2001 From: Wendy V Gaultier Date: Wed, 24 Jan 2024 19:21:22 +0000 Subject: [PATCH 11/11] Fix api --- .../public/components/landing-page.pug | 2 +- .../public/components/main-page.js | 31 ------------------- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/components/centraldashboard/public/components/landing-page.pug b/components/centraldashboard/public/components/landing-page.pug index c0123eabb14..73ae6839cb2 100644 --- a/components/centraldashboard/public/components/landing-page.pug +++ b/components/centraldashboard/public/components/landing-page.pug @@ -1,7 +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]]/notebooks/default', headers='{"Content-Type": "application/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 diff --git a/components/centraldashboard/public/components/main-page.js b/components/centraldashboard/public/components/main-page.js index a2865a71b0d..91b3405f919 100644 --- a/components/centraldashboard/public/components/main-page.js +++ b/components/centraldashboard/public/components/main-page.js @@ -657,37 +657,6 @@ export class MainPage extends mixinBehaviors([AppLocalizeBehavior], utilitiesMix 'lang': this.language, }; } - - async nextPage() { - const APICreateDefault = this.$.CreateDefaultNotebook; - APICreateDefault.body = {test: 'bla'}; - - 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.namespace, - }}); - } - } - } - - async nextPage2() { - const APICreateDefault = this.$.CreateDefaultNotebook2; - APICreateDefault.body = {test: 'bla'}; - 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.namespace, - }}); - } - } - } } window.customElements.define('main-page', MainPage);