diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index f1c6e4f..03ad874 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -2,6 +2,8 @@ import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
+import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
+
import { CommonsUIModule } from '@overflow/commons/ui/commons-ui.module';
import {
@@ -19,6 +21,7 @@ import { COMPONENTS } from './component';
import { PAGES } from './pages';
import { SERVICES } from './service';
+import { I18nService } from './service/i18n.service';
const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
suppressScrollX: true
@@ -29,7 +32,12 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
imports: [
BrowserModule,
BrowserAnimationsModule,
-
+ TranslateModule.forRoot({
+ loader: {
+ provide: TranslateLoader,
+ useExisting: I18nService,
+ }
+ }),
PerfectScrollbarModule,
CommonsUIModule,
diff --git a/src/app/component/index.ts b/src/app/component/index.ts
index 3069d82..23307af 100644
--- a/src/app/component/index.ts
+++ b/src/app/component/index.ts
@@ -7,12 +7,12 @@ import {
} from './menu';
import {
- COMPONENTS as TARGET_COMPONENTS
-} from './target';
+ COMPONENTS as INFRA_COMPONENTS
+} from './infra';
export const COMPONENTS = [
...LAYOUT_COMPONENTS,
...MENU_COMPONENTS,
- ...TARGET_COMPONENTS,
+ ...INFRA_COMPONENTS,
];
diff --git a/src/app/component/target/detail/host.component.html b/src/app/component/infra/detail/host.component.html
similarity index 100%
rename from src/app/component/target/detail/host.component.html
rename to src/app/component/infra/detail/host.component.html
diff --git a/src/app/component/target/detail/host.component.scss b/src/app/component/infra/detail/host.component.scss
similarity index 100%
rename from src/app/component/target/detail/host.component.scss
rename to src/app/component/infra/detail/host.component.scss
diff --git a/src/app/component/target/detail/host.component.ts b/src/app/component/infra/detail/host.component.ts
similarity index 98%
rename from src/app/component/target/detail/host.component.ts
rename to src/app/component/infra/detail/host.component.ts
index f334473..9e5a5d2 100644
--- a/src/app/component/target/detail/host.component.ts
+++ b/src/app/component/infra/detail/host.component.ts
@@ -11,7 +11,7 @@ import { PingService } from '../../../service/ping.service';
import { PingOption } from '@overflow/model/config/ping';
@Component({
- selector: 'app-target-detail-host',
+ selector: 'app-infra-detail-host',
templateUrl: './host.component.html',
styleUrls: ['./host.component.scss'],
})
diff --git a/src/app/component/target/detail/index.ts b/src/app/component/infra/detail/index.ts
similarity index 100%
rename from src/app/component/target/detail/index.ts
rename to src/app/component/infra/detail/index.ts
diff --git a/src/app/component/infra/detail/node.component.html b/src/app/component/infra/detail/node.component.html
new file mode 100644
index 0000000..bdf9bad
--- /dev/null
+++ b/src/app/component/infra/detail/node.component.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/component/target/detail/node.component.scss b/src/app/component/infra/detail/node.component.scss
similarity index 100%
rename from src/app/component/target/detail/node.component.scss
rename to src/app/component/infra/detail/node.component.scss
diff --git a/src/app/component/target/detail/node.component.ts b/src/app/component/infra/detail/node.component.ts
similarity index 81%
rename from src/app/component/target/detail/node.component.ts
rename to src/app/component/infra/detail/node.component.ts
index 646e5f0..460a9de 100644
--- a/src/app/component/target/detail/node.component.ts
+++ b/src/app/component/infra/detail/node.component.ts
@@ -4,13 +4,13 @@ import { Host, Port, Service } from '@overflow/model/discovery';
@Component({
- selector: 'app-target-detail-node',
+ selector: 'app-infra-detail-node',
templateUrl: './node.component.html',
styleUrls: ['./node.component.scss'],
})
export class NodeComponent {
- @Input() selectedTarget: { group: string, target: Host | Port | Service } | null;
+ @Input() selectedInfra: { group: string, infra: Host | Port | Service } | null;
@Output() otherHostSelect = new EventEmitter();
@Output() ping = new EventEmitter();
diff --git a/src/app/component/target/detail/service.component.html b/src/app/component/infra/detail/service.component.html
similarity index 100%
rename from src/app/component/target/detail/service.component.html
rename to src/app/component/infra/detail/service.component.html
diff --git a/src/app/component/target/detail/service.component.scss b/src/app/component/infra/detail/service.component.scss
similarity index 100%
rename from src/app/component/target/detail/service.component.scss
rename to src/app/component/infra/detail/service.component.scss
diff --git a/src/app/component/target/detail/service.component.ts b/src/app/component/infra/detail/service.component.ts
similarity index 98%
rename from src/app/component/target/detail/service.component.ts
rename to src/app/component/infra/detail/service.component.ts
index 540be31..a87a8c0 100644
--- a/src/app/component/target/detail/service.component.ts
+++ b/src/app/component/infra/detail/service.component.ts
@@ -11,7 +11,7 @@ import { PingService } from '../../../service/ping.service';
import { PingOption } from '@overflow/model/config/ping';
@Component({
- selector: 'app-target-detail-service',
+ selector: 'app-infra-detail-service',
templateUrl: './service.component.html',
styleUrls: ['./service.component.scss'],
})
diff --git a/src/app/component/target/detail/zone.component.html b/src/app/component/infra/detail/zone.component.html
similarity index 100%
rename from src/app/component/target/detail/zone.component.html
rename to src/app/component/infra/detail/zone.component.html
diff --git a/src/app/component/target/detail/zone.component.scss b/src/app/component/infra/detail/zone.component.scss
similarity index 100%
rename from src/app/component/target/detail/zone.component.scss
rename to src/app/component/infra/detail/zone.component.scss
diff --git a/src/app/component/target/detail/zone.component.ts b/src/app/component/infra/detail/zone.component.ts
similarity index 96%
rename from src/app/component/target/detail/zone.component.ts
rename to src/app/component/infra/detail/zone.component.ts
index bbb5db1..f75b04a 100644
--- a/src/app/component/target/detail/zone.component.ts
+++ b/src/app/component/infra/detail/zone.component.ts
@@ -5,7 +5,7 @@ import { AutoHeightDirective } from '@overflow/commons/ui/directive/auto-height.
const IPCIDR = require('ip-cidr');
@Component({
- selector: 'app-target-detail-zone',
+ selector: 'app-infra-detail-zone',
templateUrl: './zone.component.html',
styleUrls: ['./zone.component.scss'],
})
diff --git a/src/app/component/target/display/display.component.html b/src/app/component/infra/display/display.component.html
similarity index 57%
rename from src/app/component/target/display/display.component.html
rename to src/app/component/infra/display/display.component.html
index 607d225..b0d2189 100644
--- a/src/app/component/target/display/display.component.html
+++ b/src/app/component/infra/display/display.component.html
@@ -1,8 +1,8 @@
-
-
-
-
+
+
+
+
@@ -10,8 +10,8 @@
-
-
+
diff --git a/src/app/component/target/display/display.component.scss b/src/app/component/infra/display/display.component.scss
similarity index 94%
rename from src/app/component/target/display/display.component.scss
rename to src/app/component/infra/display/display.component.scss
index 2b87208..506fce7 100644
--- a/src/app/component/target/display/display.component.scss
+++ b/src/app/component/infra/display/display.component.scss
@@ -1,4 +1,4 @@
-/deep/ .target-display {
+/deep/ .infra-display {
width: 100%;
height: 100vh;
margin: -0.6em -0.9em -0.7em -0.9em; //-0.5em -0.75em;
diff --git a/src/app/component/target/display/display.component.ts b/src/app/component/infra/display/display.component.ts
similarity index 65%
rename from src/app/component/target/display/display.component.ts
rename to src/app/component/infra/display/display.component.ts
index d6fa21f..39c1f63 100644
--- a/src/app/component/target/display/display.component.ts
+++ b/src/app/component/infra/display/display.component.ts
@@ -13,22 +13,22 @@ import { map, catchError, take, tap } from 'rxjs/operators';
import { Port, Service, Host } from '@overflow/model/discovery';
-import { TargetDisplayType, DiscoveryStatusType } from '../../../core/type';
+import { InfraDisplayType, DiscoveryStatusType } from '../../../core/type';
import * as AppStore from '../../../store';
-import * as TargetStore from '../../../store/target/target';
+import * as InfraStore from '../../../store/infra/infra';
@Component({
- selector: 'app-target-display',
+ selector: 'app-infra-display',
templateUrl: './display.component.html',
styleUrls: ['./display.component.scss']
})
export class DisplayComponent implements OnInit, AfterContentInit, OnDestroy {
- private targetDisplayType$: Observable
;
+ private infraDisplayType$: Observable;
displaySidebar = false;
- selectedTargetSubscription: Subscription | null;
- selectedTarget: { group: string, target: Host | Port | Service } | null;
+ selectedInfraSubscription: Subscription | null;
+ selectedInfra: { group: string, infra: Host | Port | Service } | null;
displayDiscoveryStopping: boolean;
discoveryStatusSubscription: Subscription | null;
@@ -42,18 +42,18 @@ export class DisplayComponent implements OnInit, AfterContentInit, OnDestroy {
ngOnInit(): void {
const __this = this;
- this.targetDisplayType$ = this.store.pipe(select(AppStore.TargetSelector.TargetSelector.selectTargetDisplayType));
+ this.infraDisplayType$ = this.store.pipe(select(AppStore.InfraSelector.InfraSelector.selectInfraDisplayType));
- this.selectedTargetSubscription = this.store.pipe(
- select(AppStore.TargetSelector.TargetSelector.selectSelectedTarget)
+ this.selectedInfraSubscription = this.store.pipe(
+ select(AppStore.InfraSelector.InfraSelector.selectSelectedInfra)
).pipe(
- map((_selectedTarget) => {
- if (null === _selectedTarget) {
+ map((_selectedInfra) => {
+ if (null === _selectedInfra) {
__this.displaySidebar = false;
- __this.selectedTarget = null;
+ __this.selectedInfra = null;
} else {
__this.displaySidebar = true;
- __this.selectedTarget = _selectedTarget;
+ __this.selectedInfra = _selectedInfra;
}
__this.changeDetector.detectChanges();
}),
@@ -84,8 +84,8 @@ export class DisplayComponent implements OnInit, AfterContentInit, OnDestroy {
}
ngOnDestroy(): void {
- if (null !== this.selectedTargetSubscription) {
- this.selectedTargetSubscription.unsubscribe();
+ if (null !== this.selectedInfraSubscription) {
+ this.selectedInfraSubscription.unsubscribe();
}
if (null !== this.discoveryStatusSubscription) {
this.discoveryStatusSubscription.unsubscribe();
@@ -93,7 +93,7 @@ export class DisplayComponent implements OnInit, AfterContentInit, OnDestroy {
}
onHideDetail() {
- this.store.dispatch(new TargetStore.ChangeSelectedTarget(null));
+ this.store.dispatch(new InfraStore.ChangeSelectedInfra(null));
}
}
diff --git a/src/app/component/target/display/grid.component.html b/src/app/component/infra/display/grid.component.html
similarity index 100%
rename from src/app/component/target/display/grid.component.html
rename to src/app/component/infra/display/grid.component.html
diff --git a/src/app/component/target/display/grid.component.scss b/src/app/component/infra/display/grid.component.scss
similarity index 100%
rename from src/app/component/target/display/grid.component.scss
rename to src/app/component/infra/display/grid.component.scss
diff --git a/src/app/component/target/display/grid.component.ts b/src/app/component/infra/display/grid.component.ts
similarity index 92%
rename from src/app/component/target/display/grid.component.ts
rename to src/app/component/infra/display/grid.component.ts
index 4135610..aea1d79 100644
--- a/src/app/component/target/display/grid.component.ts
+++ b/src/app/component/infra/display/grid.component.ts
@@ -8,7 +8,7 @@ import {
import { Store } from '@ngrx/store';
@Component({
- selector: 'app-target-display-grid',
+ selector: 'app-infra-display-grid',
templateUrl: './grid.component.html',
styleUrls: ['./grid.component.scss']
})
diff --git a/src/app/component/target/display/index.ts b/src/app/component/infra/display/index.ts
similarity index 100%
rename from src/app/component/target/display/index.ts
rename to src/app/component/infra/display/index.ts
diff --git a/src/app/component/target/display/map.component.html b/src/app/component/infra/display/map.component.html
similarity index 98%
rename from src/app/component/target/display/map.component.html
rename to src/app/component/infra/display/map.component.html
index d97d8e0..d18c72f 100644
--- a/src/app/component/target/display/map.component.html
+++ b/src/app/component/infra/display/map.component.html
@@ -1,5 +1,5 @@
-
-