Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update links and items #194

Merged
merged 4 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/centraldashboard/cypress/e2e/landing-page.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('Landing Page', () => {
it('should access the landing page', ()=>{
cy.get('main-page').shadow().find('landing-page').should('exist');
cy.get('main-page').shadow().find('landing-page').shadow().find('#MainCard > neon-animatable > h2').should('have.text', 'Welcome');
cy.get('main-page').shadow().find('landing-page').shadow().find('#MainCard > neon-animatable > aside').find('a').should('exist').and('have.prop', 'href', 'https://statcan-aaw.slack.com/');
cy.get('main-page').shadow().find('landing-page').shadow().find('#MainCard > neon-animatable > aside').find('a').should('exist').and('have.prop', 'href', 'https://business-transformation.pages.cloud.statcan.ca/aaw/aaw/en/');
cy.get('main-page').shadow().find('landing-page').shadow().find('#MainCard > neon-animatable').find('md2-input#Email').should('exist').and('have.prop', 'value', '[email protected]');
cy.get('main-page').shadow().find('landing-page').shadow().find('#MainCard > neon-animatable').find('md2-input#Namespace').should('exist').and('have.prop', 'value', 'user-name');
});
Expand Down
20 changes: 4 additions & 16 deletions components/centraldashboard/cypress/e2e/main-page.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,8 @@ describe('Main Page', () => {
cy.get('main-page').shadow().find('iframe-link[href="/en/?ns=test-namespace"]').should('exist');
cy.get('main-page').shadow().find('iframe-link[href="/en/?ns=test-namespace"]').find('paper-item').should('have.text', 'Notebooks');

cy.get('main-page').shadow().find('a[href="https://grafana.aaw-dev.cloud.statcan.ca/d/ZLp774O4z/namespace-metrics?orgId=1&var-namespace=test-namespace&kiosk=tv"]').should('exist');
cy.get('main-page').shadow().find('a[href="https://grafana.aaw-dev.cloud.statcan.ca/d/ZLp774O4z/namespace-metrics?orgId=1&var-namespace=test-namespace&kiosk=tv"]').find('paper-item').should('have.text', 'Metrics');

cy.get('main-page').shadow().find('a[href="https://github.com/StatCan/kubeflow"]').should('exist');
cy.get('main-page').shadow().find('a[href="https://github.com/StatCan/kubeflow"]').find('paper-item').should('have.text', 'GitHub');

cy.get('main-page').shadow().find('a[href="https://statcan.github.io/aaw/"]').should('exist');
cy.get('main-page').shadow().find('a[href="https://statcan.github.io/aaw/"]').find('paper-item').should('have.text', 'Documentation');
cy.get('main-page').shadow().find('a[href="https://business-transformation.pages.cloud.statcan.ca/aaw/aaw/en/"]').should('exist');
cy.get('main-page').shadow().find('a[href="https://business-transformation.pages.cloud.statcan.ca/aaw/aaw/en/"]').find('paper-item').should('have.text', 'Documentation');

//mock env info to hide manage contributors link
cy.intercept('GET', `/api/workgroup/env-info`, {
Expand Down Expand Up @@ -169,13 +163,7 @@ describe('Main Page', () => {
cy.get('main-page').shadow().find('iframe-link[href="/en/?ns=test-namespace-2"]').should('exist');
cy.get('main-page').shadow().find('iframe-link[href="/en/?ns=test-namespace-2"]').find('paper-item').should('have.text', 'Notebooks');

cy.get('main-page').shadow().find('a[href="https://grafana.aaw-dev.cloud.statcan.ca/d/ZLp774O4z/namespace-metrics?orgId=1&var-namespace=test-namespace-2&kiosk=tv"]').should('exist');
cy.get('main-page').shadow().find('a[href="https://grafana.aaw-dev.cloud.statcan.ca/d/ZLp774O4z/namespace-metrics?orgId=1&var-namespace=test-namespace-2&kiosk=tv"]').find('paper-item').should('have.text', 'Metrics');

cy.get('main-page').shadow().find('a[href="https://github.com/StatCan/kubeflow"]').should('exist');
cy.get('main-page').shadow().find('a[href="https://github.com/StatCan/kubeflow"]').find('paper-item').should('have.text', 'GitHub');

cy.get('main-page').shadow().find('a[href="https://statcan.github.io/aaw/"]').should('exist');
cy.get('main-page').shadow().find('a[href="https://statcan.github.io/aaw/"]').find('paper-item').should('have.text', 'Documentation');
cy.get('main-page').shadow().find('a[href="https://business-transformation.pages.cloud.statcan.ca/aaw/aaw/en/"]').should('exist');
cy.get('main-page').shadow().find('a[href="https://business-transformation.pages.cloud.statcan.ca/aaw/aaw/en/"]').find('paper-item').should('have.text', 'Documentation');
});
})
3 changes: 2 additions & 1 deletion components/centraldashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"test-server": "ts-node --transpile-only node_modules/jasmine/bin/jasmine --config=app/.jasmine.json --reporter=jasmine-console-reporter",
"ui-test": "cypress open . --e2e",
"ui-test-ci": "cypress run . --e2e",
"ui-test-ci-all": "cypress run . --e2e --browser=chrome && cypress run . --e2e --browser=firefox",
"//TODO": "add back firefox to cypress testing once error with v124.0 is resolved",
"ui-test-ci-all": "cypress run . --e2e --browser=chrome && cypress run . --e2e --browser=edge",
"tslint": "tslint -c tslint.json -p tsconfig.json",
"coverage": "nyc npm run test-server && karma start --single-run --reporters coverage-istanbul",
"watch-node": "nodemon dist/server.js",
Expand Down
12 changes: 6 additions & 6 deletions components/centraldashboard/public/assets/i18n/languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dashboardView.docItemVideoTutorialLink": "https://www.youtube.com/playlist?list=PL1zlA2D7AHugkDdiyeUHWOKGKUd3MB_nD",
"dashboardView.docItemCommunityChatText": "Community Chat",
"dashboardView.docItemCommunityChatDesc": "Slack workspace for discussion/support - requires sign-up for emails outside @canada.ca",
"dashboardView.docItemCommunityChatLink": "https://statcan-aaw.slack.com/",
"dashboardView.docItemCommunityChatLink": "https://business-transformation.pages.cloud.statcan.ca/aaw/aaw/en/",
"dashboardView.docItemOfficialKubeflowDocsText": "Official Kubeflow Docs",
"dashboardView.docItemOfficialKubeflowDocsDesc": "Advanced documentation for installing, running, and using Kubeflow",
"dashboardView.docItemOfficialKubeflowDocsLink": "https://www.kubeflow.org/docs/",
Expand Down Expand Up @@ -62,8 +62,8 @@
"notebookCard.txtAccessed": "Accessed ",
"registrationPage.lblWelcome": "Welcome",
"registrationPage.registrationDesc": "In order to use Kubeflow, a namespace for your account must be created. Follow the steps to get started",
"landingPage.landingDesc": "If you have questions or issues, please contact our Slack support channel at",
"landingPage.slackLink": "https://statcan-aaw.slack.com",
"landingPage.landingDesc": "If you have questions or issues, please contact our documentation",
"landingPage.slackLink": "https://business-transformation.pages.cloud.statcan.ca/aaw/aaw/en/",
"landingPage.firstTime": "This seems to be the first time you access Kubeflow, we are happy to see you!",
"landingPage.autoNamespace": "Your namespace is automatically generated.",
"landingPage.yourNamespace": "Your namespace will be",
Expand Down Expand Up @@ -155,7 +155,7 @@
"dashboardView.docItemVideoTutorialLink": "https://www.youtube.com/playlist?list=PL1zlA2D7AHugkDdiyeUHWOKGKUd3MB_nD",
"dashboardView.docItemCommunityChatText": "Clavardage de la communauté",
"dashboardView.docItemCommunityChatDesc": "Espace de travail Slack pour discussion/support - besoin de s'inscrire pour les courriels en dehors de @canada.ca",
"dashboardView.docItemCommunityChatLink": "https://statcan-aaw.slack.com/",
"dashboardView.docItemCommunityChatLink": "https://business-transformation.pages.cloud.statcan.ca/aaw/aaw/fr/",
"dashboardView.docItemOfficialKubeflowDocsText": "Documents Kubeflow Officiels",
"dashboardView.docItemOfficialKubeflowDocsDesc": "Documentation avancé pour installer, exécuter et utiliser Kubeflow",
"dashboardView.docItemOfficialKubeflowDocsLink": "https://www.kubeflow.org/docs/",
Expand Down Expand Up @@ -205,8 +205,8 @@
"notebookDefaultCard.errorDefaultNotebook": "Échec de l'opération actuelle, car:",
"registrationPage.lblWelcome": "Bienvenue",
"registrationPage.registrationDesc": "Afin d'utiliser Kubeflow, un espace de noms doit être créé pour votre compte. Suiver les étapes pour commencer",
"landingPage.landingDesc": "Si vous avez des questions ou des problèmes, joignez-nous sur notre canal d'assistance Slack à",
"landingPage.slackLink": "https://statcan-aaw.slack.com",
"landingPage.landingDesc": "Si vous avez des questions ou des problèmes, réferez-vous à notre documentation",
"landingPage.slackLink": "https://business-transformation.pages.cloud.statcan.ca/aaw/aaw/en/",
"landingPage.firstTime": "Ceci semble être la première fois que vous accédez à Kubeflow, nous sommes heureux de vous voir !",
"landingPage.autoNamespace": "Votre espace de noms est automatiquement généré.",
"landingPage.yourNamespace": "Votre espace de noms sera",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ paper-card#MainCard
md2-input#Email(label="{{localize('landingPage.email')}}", value='{{emailAddress}}', disabled="true")
md2-input#Namespace(label="{{localize('landingPage.yourNamespace')}}", value='{{namespaceName}}', disabled='true')
aside {{localize('landingPage.landingDesc')}}
a(href='https://statcan-aaw.slack.com', tabindex='-1', target="_blank") {{localize('landingPage.slackLink')}}
a(href='https://business-transformation.pages.cloud.statcan.ca/aaw/aaw/en/', tabindex='-1', target="_blank") {{localize('landingPage.slackLink')}}
.actions
paper-button(on-click='nextPage') {{localize('registrationPage.btnNext')}}

Expand Down
21 changes: 0 additions & 21 deletions components/centraldashboard/public/components/main-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,27 +406,6 @@ export class MainPage extends mixinBehaviors([AppLocalizeBehavior], utilitiesMix
queryParams);
}

/**
* Returns the URL for the grafana dashboard
* @param {string} namespace
* @return {string}
*/
_getGrafanaUrl(namespace) {
let env = 'aaw-dev';
let key = 'ZLp774O4z';
if (window.location.href.includes('.aaw.cloud.statcan.ca')) {
env='aaw';
key='Nx0z30DVk';
}

let nsParam = '';
if (namespace) {
nsParam = '&var-namespace='+namespace;
}

return `https://grafana.${env}.cloud.statcan.ca/d/${key}/namespace-metrics?orgId=1${nsParam}&kiosk=tv`;
}

/**
* Builds the new iframeSrc string based on the subroute path, current
* hash fragment, and the query string parameters other than ns.
Expand Down
15 changes: 1 addition & 14 deletions components/centraldashboard/public/components/main-page.pug
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,12 @@ app-drawer-layout.flex(narrow='{{narrowMode}}',
a(href$='[[_buildHref("/manage-filers", queryParams.*)]]', tabindex='-1')
paper-item.menu-item#filers {{localize('mainPage.menuManageFilers')}}
aside.divider
a(href$='[[_getGrafanaUrl(namespace)]]',
tabindex='-1', target="_blank")
paper-item.menu-item {{localize('mainPage.menuMetrics')}}
iron-icon.external(icon="launch")
a(href='https://github.com/StatCan/kubeflow',
tabindex='-1', target="_blank")
paper-item.menu-item {{localize('mainPage.menuGitHub')}}
iron-icon.external(icon="launch")
a(href='https://statcan.github.io/aaw/',
a(href='https://business-transformation.pages.cloud.statcan.ca/aaw/aaw/en/',
tabindex='-1', target="_blank")
paper-item.menu-item {{localize('mainPage.menuDocumentation')}}
iron-icon.external(icon="launch")
footer.footer
section.information
a.privacy(title="{{localize('mainPage.menuPrivacyTitle')}}", target='_blank', href='https://policies.google.com/privacy') {{localize('mainPage.menuPrivacy')}}
.bullet
a.usage(title="{{localize('mainPage.menuUsageReportingTitle')}}", target='_blank', href='https://www.kubeflow.org/docs/other-guides/usage-reporting/') {{localize('mainPage.menuUsageReporting')}}
// AAW commented out section: section.build build version 
// span(title="{{localize('mainPage.footerBuildVersion', 'buildVersion', buildVersion, 'dashVersion', dashVersion, 'isolationMode', isolationMode)}}") [[buildVersion]]
app-header-layout(fullbleed)
app-header(slot='header', hides, hidden$='[[notFoundInIframe]]')
app-toolbar
Expand Down
Loading