Skip to content

Commit

Permalink
History tab with routing
Browse files Browse the repository at this point in the history
  • Loading branch information
zaychenko-sergei committed Dec 12, 2024
1 parent 681d5d9 commit 5046899
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { RouterModule, Routes } from "@angular/router";
import { OverviewComponent } from "./overview-component/overview.component";
import { DatasetViewTypeEnum } from "../dataset-view.interface";
import { MetadataComponent } from "./metadata-component/metadata.component";
import { HistoryComponent } from "./history-component/history.component";
import { FlowsComponent } from "./flows-component/flows.component";

const routes: Routes = [
Expand All @@ -24,7 +23,7 @@ const routes: Routes = [
},
{
path: "history",
component: HistoryComponent,
loadChildren: () => import("./history-tab/history-tab.module").then((m) => m.HistoryTabModule),
data: { tab: DatasetViewTypeEnum.History },
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { first } from "rxjs/operators";
import { DatasetSubscriptionsService } from "../../dataset.subscriptions.service";
import { mockHistoryUpdate } from "../data-tabs.mock";
import { HistoryComponent } from "./history.component";
import { SharedTestModule } from "src/app/common/shared-test.module";
import { PaginationComponent } from "src/app/components/pagination-component/pagination.component";
Expand All @@ -14,6 +12,8 @@ import { HttpClientTestingModule } from "@angular/common/http/testing";
import { ToastrModule } from "ngx-toastr";
import { MatIconModule } from "@angular/material/icon";
import { RouterTestingModule } from "@angular/router/testing";
import { DatasetSubscriptionsService } from "src/app/dataset-view/dataset.subscriptions.service";
import { mockHistoryUpdate } from "../../data-tabs.mock";

describe("HistoryComponent", () => {
let component: HistoryComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Observable } from "rxjs";
import { ChangeDetectionStrategy, Component, EventEmitter, inject, Output } from "@angular/core";
import { BaseComponent } from "src/app/common/base.component";
import { DatasetHistoryUpdate } from "../../dataset.subscriptions.interface";
import { DatasetSubscriptionsService } from "../../dataset.subscriptions.service";
import { MaybeNull } from "src/app/common/app.types";
import { NavigationService } from "src/app/services/navigation.service";
import { DatasetViewTypeEnum } from "../../dataset-view.interface";
import { DatasetInfo } from "src/app/interface/navigation.interface";
import { DatasetSubscriptionsService } from "src/app/dataset-view/dataset.subscriptions.service";
import { DatasetViewTypeEnum } from "src/app/dataset-view/dataset-view.interface";
import { DatasetHistoryUpdate } from "src/app/dataset-view/dataset.subscriptions.interface";

@Component({
selector: "app-history",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'

import { HistoryComponent } from './history-component/history.component'

const routes: Routes = [{ path: '', component: HistoryComponent }]

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class HistoryTabRoutingModule {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";

import { HistoryComponent } from "./history-component/history.component";
import { HistoryTabRoutingModule } from "./history-tab-routing.module";
import { TimelineModule } from "src/app/components/timeline-component/timeline.module";
import { PaginationModule } from "src/app/components/pagination-component/pagination.module";

@NgModule({
declarations: [HistoryComponent],
imports: [CommonModule, PaginationModule, TimelineModule, HistoryTabRoutingModule],
})
export class HistoryTabModule {}
2 changes: 1 addition & 1 deletion src/app/dataset-view/dataset.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { DatasetSettingsComponent } from "./additional-components/dataset-settin
import { MatDividerModule } from "@angular/material/divider";
import { DataComponent } from "./additional-components/data-tab/data-component/data.component";
import { MetadataComponent } from "./additional-components/metadata-component/metadata.component";
import { HistoryComponent } from "./additional-components/history-component/history.component";
import { HistoryComponent } from "./additional-components/history-tab/history-component/history.component";
import { LineageComponent } from "./additional-components/lineage-tab/lineage-component/lineage.component";
import { DatasetSettingsGeneralTabComponent } from "./additional-components/dataset-settings-component/tabs/general/dataset-settings-general-tab.component";
import { DatasetSettingsSchedulingTabComponent } from "./additional-components/dataset-settings-component/tabs/scheduling/dataset-settings-scheduling-tab.component";
Expand Down
5 changes: 0 additions & 5 deletions src/app/dataset-view/dataset.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import { MetadataComponent } from "./additional-components/metadata-component/me
import { ClipboardModule } from "@angular/cdk/clipboard";
import { OverviewComponent } from "./additional-components/overview-component/overview.component";
import { CdkAccordionModule } from "@angular/cdk/accordion";
import { HistoryComponent } from "./additional-components/history-component/history.component";
import { TimelineModule } from "../components/timeline-component/timeline.module";
import { CustomPaginationModule } from "../components/custom-pagination-component/custom-pagination.module";
import { SideNavModule } from "../sidenav/side-nav.module";
import { RouterModule } from "@angular/router";
Expand Down Expand Up @@ -93,7 +91,6 @@ import { DatasetTabsRoutingModule } from "./additional-components/dataset-tabs-r
MatButtonToggleModule,
DynamicTableModule,
SearchSidenavModule,
TimelineModule,
NgxGraphModule,
PaginationModule,
MatMenuModule,
Expand Down Expand Up @@ -149,7 +146,6 @@ import { DatasetTabsRoutingModule } from "./additional-components/dataset-tabs-r
PreprocessStepComponent,
StepperNavigationComponent,
OverviewComponent,
HistoryComponent,
DisplayHashModule,
MatTreeModule,
MatTooltipModule,
Expand All @@ -163,7 +159,6 @@ import { DatasetTabsRoutingModule } from "./additional-components/dataset-tabs-r
DatasetComponent,
MetadataComponent,
OverviewComponent,
HistoryComponent,
EditDetailsModalComponent,
EditLicenseModalComponent,
FinalYamlModalComponent,
Expand Down

0 comments on commit 5046899

Please sign in to comment.