diff --git a/wherehows-web/app/constants/application.ts b/wherehows-web/app/constants/application.ts index 8b63628cf6..b97c6ec5bd 100644 --- a/wherehows-web/app/constants/application.ts +++ b/wherehows-web/app/constants/application.ts @@ -1,8 +1,62 @@ +/** + * Defines the props for the feedback mailto: link + * @type {object} + */ const feedback = { mail: 'wherehows-dev@linkedin.com', subject: 'WhereHows Feedback', title: 'Provide Feedback' }; +/** + * Defines the properties for the navigation bar avatar + * @type {object} + */ const avatar = { url: 'https://cinco.corp.linkedin.com/api/profile/[username]/picture/?access_token=2rzmbzEMGlHsszQktFY-B1TxUic', fallbackUrl: '/assets/assets/images/default_avatar.png' }; -export { feedback, avatar }; +/** + * Lists the application entry points for sub features + * @type {object} + */ +const featureEntryPoints: { [K: string]: object } = { + browse: { + title: 'Browse', + route: 'browse', + alt: 'Browse Icon', + icon: '/assets/assets/images/icons/browse.png', + description: "Don't know where to start? Explore by categories." + }, + + scriptFinder: { + title: 'Script Finder', + route: 'scripts', + alt: 'Script Finder Icon', + icon: '/assets/assets/images/icons/script-finder.png', + description: 'Want to search for a script, chain name or job name? Explore Script Finder.' + }, + + metadataDashboard: { + title: 'Metadata Dashboard', + route: 'metadata', + alt: 'Metadata Dashboard Icon', + icon: '/assets/assets/images/icons/metadata.png', + description: 'Explore Metadata Dashboard' + }, + + schemaHistory: { + title: 'Schema History', + route: 'schemahistory', + alt: 'Schema History Icon', + icon: '/assets/assets/images/icons/schema.png', + description: 'Explore Schema History' + }, + + idpc: { + title: 'IDPC', + route: 'idpc', + alt: 'IDPC Icon', + icon: '/assets/assets/images/icons/idpc.png', + description: 'Explore IDPC' + } +}; + +export { feedback, avatar, featureEntryPoints }; diff --git a/wherehows-web/app/routes/index.js b/wherehows-web/app/routes/index.js index 190e0122bd..407713c838 100644 --- a/wherehows-web/app/routes/index.js +++ b/wherehows-web/app/routes/index.js @@ -1,7 +1,9 @@ import Ember from 'ember'; import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; +import { featureEntryPoints } from 'wherehows-web/constants/application'; const { get, Route, inject: { service } } = Ember; +const { browse, scriptFinder, schemaHistory, idpc } = featureEntryPoints; export default Route.extend(AuthenticatedRouteMixin, { /** @@ -20,45 +22,10 @@ export default Route.extend(AuthenticatedRouteMixin, { * @type {Ember.Service} */ metrics: service(), + model() { // Static list of content for the index route featureCard links - return [ - { - title: 'Browse', - route: 'browse', - alt: 'Browse Icon', - icon: '/assets/assets/images/icons/browse.png', - description: "Don't know where to start? Explore by categories." - }, - { - title: 'Script Finder', - route: 'scripts', - alt: 'Script Finder Icon', - icon: '/assets/assets/images/icons/script-finder.png', - description: 'Want to search for a script, chain name or job name? Explore Script Finder.' - }, - { - title: 'Metadata Dashboard', - route: 'metadata', - alt: 'Metadata Dashboard Icon', - icon: '/assets/assets/images/icons/metadata.png', - description: 'Explore Metadata Dashboard' - }, - { - title: 'Schema History', - route: 'schemahistory', - alt: 'Schema History Icon', - icon: '/assets/assets/images/icons/schema.png', - description: 'Explore Schema History' - }, - { - title: 'IDPC', - route: 'idpc', - alt: 'IDPC Icon', - icon: '/assets/assets/images/icons/idpc.png', - description: 'Explore IDPC' - } - ]; + return [browse, scriptFinder, schemaHistory, idpc]; }, /** * Perform post model operations