Skip to content

Commit

Permalink
Merge pull request #173 from OmicsDI/features/OF-72
Browse files Browse the repository at this point in the history
Features/of 72
  • Loading branch information
glmanhtu committed Jul 18, 2018
2 parents ffe8400 + 9f51b56 commit d13f0cb
Show file tree
Hide file tree
Showing 335 changed files with 702 additions and 1,927 deletions.
17 changes: 0 additions & 17 deletions src/app/about/about-routing.module.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/app/about/about.module.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/app/api/api-routing.module.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/app/api/api.module.ts

This file was deleted.

87 changes: 28 additions & 59 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,45 @@ import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {Http, HttpModule, RequestOptions} from '@angular/http';
import {AppComponent} from './app.component';
import {HomeComponent} from 'pages/home/home.component';
import {AppComponent} from '@shared/components/app/app.component';
import {MatButtonModule, MatCheckboxModule, MatDialogModule, MatMenuModule} from '@angular/material';
import {AlertModule} from 'ngx-bootstrap';
import {NguiAutoCompleteModule} from '@ngui/auto-complete';
import {DisqusModule} from 'ngx-disqus';
import {SlimLoadingBarModule} from 'ng2-slim-loading-bar';
import {NgxPaginationModule} from 'ngx-pagination';
import {ClipboardModule} from 'ngx-clipboard/dist';
import {UiSwitchModule} from 'angular2-ui-switch';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {SimpleNotificationsModule} from 'angular2-notifications/dist';
import {routing} from './app.routes';
import {RouterModule} from '@angular/router';
import {ProfileService} from 'services/profile.service';
import {ProfileService} from '@shared/services/profile.service';
import {AuthConfig, AuthHttp} from 'angular2-jwt';
import {AuthService} from 'services/auth.service';
import {AuthGuardService} from 'services/auth-guard.service';
import {SearchService} from 'services/search.service';
import {DataSetService} from 'services/dataset.service';
import {EnrichmentService} from 'services/enrichment.service';
import {SimilarityService} from 'services/similarity.service';
import {OntologyService} from 'services/ontology.service';
import {PublicationService} from 'services/publication.service';
import {DatabaseListService} from 'services/database-list.service';
import {AuthService} from '@shared/services/auth.service';
import {AuthGuardService} from '@shared/services/auth-guard.service';
import {SearchService} from '@shared/services/search.service';
import {DataSetService} from '@shared/services/dataset.service';
import {EnrichmentService} from '@shared/services/enrichment.service';
import {SimilarityService} from '@shared/services/similarity.service';
import {OntologyService} from '@shared/services/ontology.service';
import {PublicationService} from '@shared/services/publication.service';
import {DatabaseListService} from '@shared/services/database-list.service';
import {AppConfig} from './app.config';
import {SimilarMoleculeService} from 'services/similar-molecule.service';
import {FeedbackService} from 'services/feedback.service';
import {StatisticsService} from 'services/statistics.service';
import {AltmetricService} from 'services/altmetric.service';
import {SelectedService} from 'services/selected.service';
import {ScoreService} from 'services/score.service';
import {DialogService} from 'services/dialog.service';
import {InviteService} from 'services/invite.service';
import {UnauthorizedComponent} from 'pages/unauthorized/unauthorized.component';
import {NotfoundComponent} from 'pages/notfound/notfound.component';
import {HotwordsComponent} from 'pages/home/charts/hotwords/hotwords.component';
import {MostAccessedComponent} from 'pages/home/charts/most-accessed/most-accessed.component';
import {ReposOmicsComponent} from 'pages/home/charts/repos-omics/repos-omics.component';
import {HomeAboutComponent} from 'pages/home/charts/home-about/home-about.component';
import {StatisticsPanelComponent} from 'pages/home/charts/statistics-panel/statistics-panel.component';
import {LatestDatasetsComponent} from 'pages/home/charts/latest-datasets/latest-datasets.component';
import {AnnualOmicstypeComponent} from 'app/pages/home/charts/annual-omicstype/annual-omicstype.component';
import {TweetsNewsComponent} from 'pages/home/charts/tweets-news/tweets-news.component';
import {TissuesOrganismsComponent} from 'pages/home/charts/tissues-organisms/tissues-organisms.component';
import {MegaNumberPipe} from './pipes/mega-number.pipe';
import {SimilarMoleculeService} from '@shared/services/similar-molecule.service';
import {FeedbackService} from '@shared/services/feedback.service';
import {StatisticsService} from '@shared/services/statistics.service';
import {AltmetricService} from '@shared/services/altmetric.service';
import {SelectedService} from '@shared/services/selected.service';
import {ScoreService} from '@shared/services/score.service';
import {DialogService} from '@shared/services/dialog.service';
import {InviteService} from '@shared/services/invite.service';
import {CommonModule, LocationStrategy, PathLocationStrategy} from '@angular/common';
import {TermsComponent} from 'pages/terms/terms.component';
import {SelectedComponent} from 'pages/selected/selected.component';
import {ThorService} from 'services/thor.service';
import {ControlsModule} from 'controls/controls.module';
import {PipesModule} from './pipes/pipes.module';
import {UtilsModule} from 'utils/utils.module';
import {PagesModule} from 'pages/pages.module';
import {ThorService} from '@shared/services/thor.service';
import {ControlsModule} from '@shared/modules/controls/controls.module';
import {PipesModule} from '@shared/pipes/pipes.module';
import {UtilsModule} from '@shared/modules/utils/utils.module';
import {HomeModule} from '@modules/home/home.module';
import {CommonplaceModule} from '@modules/commonplace/commonplace.module';


export function getParameterByName(name): string {
Expand All @@ -79,27 +64,12 @@ export function authHttpServiceFactory(http: Http, options: RequestOptions) {

@NgModule({
declarations: [
AppComponent,
HomeComponent,
UnauthorizedComponent,
NotfoundComponent,
HotwordsComponent,
TissuesOrganismsComponent,
ReposOmicsComponent,
LatestDatasetsComponent,
MostAccessedComponent,
AnnualOmicstypeComponent,
TweetsNewsComponent,
StatisticsPanelComponent,
HomeAboutComponent,
MegaNumberPipe,
TermsComponent,
NotfoundComponent,
SelectedComponent
AppComponent
],
imports: [
CommonModule,
PipesModule,
HomeModule,
BrowserModule,
FormsModule,
HttpModule,
Expand All @@ -115,13 +85,12 @@ export function authHttpServiceFactory(http: Http, options: RequestOptions) {
AlertModule.forRoot(),
UtilsModule,
SlimLoadingBarModule.forRoot(),
NgxPaginationModule,
UiSwitchModule,
BrowserAnimationsModule,
SimpleNotificationsModule.forRoot(),
ClipboardModule,
ControlsModule,
PagesModule
CommonplaceModule
],
exports: [
RouterModule
Expand Down
65 changes: 17 additions & 48 deletions src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,63 +1,32 @@
// Imports
// Deprecated import
// import { provideRouter, RouterConfig } from '@angular/router';
import {ModuleWithProviders} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
// import {ProfileComponent} from "./pages/profile/profile.component";
// import {DatabaseComponent} from "./pages/database/database.component";
import {HomeComponent} from 'pages/home/home.component';
// import {ApiComponent} from "./pages/api/api.component";
import {SearchComponent} from 'pages/search/search.component';
import {UnauthorizedComponent} from 'pages/unauthorized/unauthorized.component';
// import {DatasetComponent} from "./pages/dataset/dataset.component";
// import {TermsComponent} from "./pages/terms/terms.component";
import {NotfoundComponent} from 'pages/notfound/notfound.component';
// import {AdminComponent} from "./pages/admin/admin.component";
// import {SelectedComponent} from "./pages/selected/selected.component";
// import {DashboardComponent} from "./pages/dashboard/dashboard.component";
// import {DashboardSelectedComponent} from "./pages/dashboard/selected/selected.component";
// import {DashboardFeedbackComponent} from "./pages/dashboard/feedback/feedback.component";
// import {DashboardProfileComponent} from "./pages/dashboard/profile/profile.component";
// import {DashboardUpdateComponent} from "./pages/dashboard/update/update.component";
// import {DashboardClaimedComponent} from "./pages/dashboard/claimed/claimed.component";
// import {DashboardPictureComponent} from "./pages/dashboard/picture/picture.component";
// import {SettingsComponent} from "./pages/dashboard/settings/settings.component";
import {TermsComponent} from 'pages/terms/terms.component';
import {SelectedComponent} from 'pages/selected/selected.component';
import {AuthGuardService} from 'services/auth-guard.service';
import {AuthGuardService} from '@shared/services/auth-guard.service';
import {HomeComponent} from '@modules/home/components/home/home.component';
import {UnauthorizedComponent} from '@modules/commonplace/components/unauthorized/unauthorized.component';
import {TermsComponent} from '@modules/commonplace/components/terms/terms.component';
import {NotfoundComponent} from '@modules/commonplace/components/notfound/notfound.component';
import {SelectedComponent} from '@modules/commonplace/components/selected/selected.component';

// Route Configuration
export const routes: Routes = [
{
path: '',
redirectTo: '/home',
pathMatch: 'full'
},
{path: '', component: HomeComponent},
{path: 'home', component: HomeComponent},
// { path: 'profile', redirectTo:'dashboard/profile'},
{path: 'profile/:username', loadChildren: './profile/profile.module#ProfileModule'},
{path: 'database', loadChildren: './database/database.module#DatabaseModule'},
{path: 'about', loadChildren: './about/about.module#AboutModule'},
{path: 'api', loadChildren: './api/api.module#ApiModule'},
{ path: 'search', loadChildren: './search/search.module#SearchModule' },
{path: 'profile', redirectTo: 'dashboard/profile'},
{path: 'profile/:username', loadChildren: '@modules/profile/profile.module#ProfileModule'},
{path: 'database', loadChildren: '@modules/database/database.module#DatabaseModule'},
{path: 'help', loadChildren: '@modules/help/help.module#HelpModule'},
{path: 'search', loadChildren: '@modules/search/search.module#SearchModule' },
{path: 'unauthorized', component: UnauthorizedComponent},
{path: 'dataset/:domain/:acc', loadChildren: './dataset/dataset.module#DatasetModule'},
// { path: 'search', loadChildren: () => SearchModule },
// {path: 'search', component: SearchComponent},
{path: 'dataset/:domain/:acc', loadChildren: '@modules/dataset/dataset.module#DatasetModule'},
{path: 'terms', component: TermsComponent},
{path: 'notfound', component: NotfoundComponent},
{path: 'admin', loadChildren: './admin/admin.module#AdminModule'},
{path: 'admin', loadChildren: '@modules/admin/admin.module#AdminModule'},
{path: 'selected', component: SelectedComponent},
{path: 'merge', loadChildren: './merge/merge.module#MergeModule' , canActivate: [AuthGuardService]},
{path: 'unmerge', loadChildren: './unmerge/unmerge.module#UnmergeModule', canActivate: [AuthGuardService]},
{path: 'dashboard', loadChildren: './dashboard/dashboard.module#DashboardModule', canActivate: [AuthGuardService]}
{path: 'merge', loadChildren: '@modules/merge/merge.module#MergeModule' , canActivate: [AuthGuardService]},
{path: 'unmerge', loadChildren: '@modules/unmerge/unmerge.module#UnmergeModule', canActivate: [AuthGuardService]},
{path: 'dashboard', loadChildren: '@modules/dashboard/dashboard.module#DashboardModule', canActivate: [AuthGuardService]}
// { path: 'welcome/:inviteId', component: WelcomeComponent },

];

// Deprecated provide
// export const APP_ROUTER_PROVIDERS = [
// provideRouter(routes)
// ];
const AUTH_PROVIDERS = [AuthGuardService];
export const routing: ModuleWithProviders = RouterModule.forRoot(routes, {useHash: false});
98 changes: 0 additions & 98 deletions src/app/controls/controls.module.ts

This file was deleted.

Loading

0 comments on commit d13f0cb

Please sign in to comment.