mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 18:07:57 +00:00
OS build improvements (1minute)
{COMMIT-SYNC:01040678c188091b7f5ccea77e1ec8282d4be142}
This commit is contained in:
parent
96af9c7ed6
commit
5fc77f2e61
3
datahub-web/packages/data-portal/app/more-routes.ts
Normal file
3
datahub-web/packages/data-portal/app/more-routes.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import RouterDSL from '@ember/routing/-private/router-dsl';
|
||||
|
||||
export function moreRoutes(_router: RouterDSL) {}
|
||||
@ -2,6 +2,7 @@ import EmberRouter from '@ember/routing/router';
|
||||
import config from 'datahub-web/config/environment';
|
||||
import { sharedRoutes } from '@datahub/shared/shared-routes';
|
||||
import { entitiesRoutes } from '@datahub/entities/entities-routes';
|
||||
import { moreRoutes } from 'datahub-web/more-routes';
|
||||
|
||||
/**
|
||||
* Extends the EmberRouter object to define application routes and track events cross application
|
||||
@ -28,17 +29,12 @@ export default class ApplicationRouter extends EmberRouter {
|
||||
ApplicationRouter.map(function(): void {
|
||||
sharedRoutes(this);
|
||||
entitiesRoutes(this);
|
||||
moreRoutes(this);
|
||||
|
||||
this.route('page-not-found', {
|
||||
path: '/*wildcard'
|
||||
});
|
||||
|
||||
this.route('lists', function(): void {
|
||||
this.route('entity', {
|
||||
path: '/:entity_name'
|
||||
});
|
||||
});
|
||||
|
||||
this.route('search');
|
||||
|
||||
this.route('logout');
|
||||
@ -57,8 +53,6 @@ ApplicationRouter.map(function(): void {
|
||||
});
|
||||
});
|
||||
|
||||
this.route('app-catalogue', { path: '/apps' });
|
||||
|
||||
this.route('lineage', function() {
|
||||
this.route('urn', { path: '/:urn' });
|
||||
});
|
||||
|
||||
@ -1,9 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
/**
|
||||
* Index route for a specific feature should transition to a default tab for Features
|
||||
* @export
|
||||
* @class FeaturesFeatureIndex
|
||||
* @extends {Route}
|
||||
*/
|
||||
export default class FeaturesFeatureIndex extends Route { }
|
||||
export default class FeaturesFeatureIndex extends Route {}
|
||||
|
||||
@ -1,57 +1,3 @@
|
||||
import Route from '@ember/routing/route';
|
||||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||
import { DataModelName } from '@datahub/data-models/constants/entity';
|
||||
import Transition from '@ember/routing/-private/transition';
|
||||
import { inject as service } from '@ember/service';
|
||||
import DataModelsService from '@datahub/data-models/services/data-models';
|
||||
|
||||
/**
|
||||
* Describes the ListEntity route transition object parameters
|
||||
*/
|
||||
interface IListEntityTransitionParams {
|
||||
entity_name?: DataModelName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the route for Entity Lists, enabling navigation to a Lists page for a known / supported entities
|
||||
* @export
|
||||
* @class ListsEntity
|
||||
* @extends {Route.extend(AuthenticatedRouteMixin)}
|
||||
*/
|
||||
export default class ListsEntity extends Route.extend(AuthenticatedRouteMixin) {
|
||||
/**
|
||||
* ListsEntity will use Data Models service to check if the entity is guarded or not
|
||||
*/
|
||||
@service('data-models')
|
||||
dataModels: DataModelsService;
|
||||
|
||||
/**
|
||||
* Before loading the model we will check if list supports this entity type
|
||||
* @param transition
|
||||
*/
|
||||
beforeModel(transition: Transition): void {
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
const { entity_name: entity }: IListEntityTransitionParams =
|
||||
(transition.to && (transition.to.params as IListEntityTransitionParams)) || {};
|
||||
this.checkEntitySupport(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the entity_name parameter as a entityType
|
||||
*/
|
||||
model({ entity_name: entityType }: IListEntityTransitionParams): { entityType?: string } {
|
||||
return { entityType };
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the entity supplied in the route paramter is an entity that has support for Entity Lists
|
||||
* @memberof ListsEntity
|
||||
*/
|
||||
checkEntitySupport(entity?: DataModelName): void {
|
||||
if (entity && !this.dataModels.guards.isGuardedEntity(entity)) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new Error(`Entity ${entity} is not supported`);
|
||||
}
|
||||
}
|
||||
export default class ListsEntity extends Route {}
|
||||
|
||||
@ -1,2 +1 @@
|
||||
@import 'open-source-main';
|
||||
@import 'internal-main';
|
||||
|
||||
@ -31,6 +31,8 @@
|
||||
{{/if}}
|
||||
</ul>
|
||||
|
||||
<NavbarRightColumn />
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a
|
||||
@ -40,8 +42,9 @@
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
href="#"
|
||||
onclick="return false"
|
||||
>
|
||||
<i class="caret"></i>
|
||||
<FaIcon @icon="chevron-down" />
|
||||
<Avatars::AvatarImage @avatar={{this.avatar}} @class="navbar-avatar-image" />
|
||||
</a>
|
||||
|
||||
@ -79,11 +82,7 @@
|
||||
|
||||
<li class="dropdown-header">
|
||||
Help
|
||||
<span
|
||||
class="glyphicon glyphicon-question-sign"
|
||||
aria-hidden="true"
|
||||
>
|
||||
</span>
|
||||
<FaIcon @icon="question-circle" aria-hidden="true"/>
|
||||
</li>
|
||||
{{#each @applicationHelpResources as |applicationHelpResource|}}
|
||||
<li>
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
</div>
|
||||
|
||||
<section class="container">
|
||||
<Search::Containers::MultiEntityTaskContainerTopComponents @keyword={{@keyword}} />
|
||||
</section>
|
||||
|
||||
{{yield
|
||||
|
||||
@ -1,4 +1 @@
|
||||
<section class="row">
|
||||
</section>
|
||||
|
||||
{{outlet}}
|
||||
Loading…
x
Reference in New Issue
Block a user