feat: update the hole framework

parent ec589f57
...@@ -13566,6 +13566,11 @@ ...@@ -13566,6 +13566,11 @@
"version": "0.8.20", "version": "0.8.20",
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.20.tgz", "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.20.tgz",
"integrity": "sha512-FXlA37ErSXCMy5RNBcGFgCI/Zivqzr0D19GuvDxhcYIJc7xkFp6c29DKyODJu0Zo+EMyur/WPPgcBh1EHjB9jA==" "integrity": "sha512-FXlA37ErSXCMy5RNBcGFgCI/Zivqzr0D19GuvDxhcYIJc7xkFp6c29DKyODJu0Zo+EMyur/WPPgcBh1EHjB9jA=="
},
"ztree-v3": {
"version": "3.5.17",
"resolved": "https://registry.npmjs.org/ztree-v3/-/ztree-v3-3.5.17.tgz",
"integrity": "sha1-fO1PmNrpdFZjzL+0MXIAEKSnjKo="
} }
} }
} }
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
"@angular/router": "5.2.0", "@angular/router": "5.2.0",
"@swimlane/ngx-datatable": "^11.1.7", "@swimlane/ngx-datatable": "^11.1.7",
"ajv": "^6.2.1", "ajv": "^6.2.1",
"angular-tree-component": "^7.1.0",
"animate.css": "^3.5.2", "animate.css": "^3.5.2",
"body-parser": "^1.18.2", "body-parser": "^1.18.2",
"bootstrap": "^4.0.0-beta.3", "bootstrap": "^4.0.0-beta.3",
......
{ {
"/api": { "/api": {
"target": "http://127.0.0.1:8088", "target": "http://127.0.0.1:5000",
"secure": false "secure": false
}, },
"/luna/i18n": { "/luna/i18n": {
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ControlnavComponent } from './controlnav.component';
describe('ControlnavComponent', () => {
let component: ControlnavComponent;
let fixture: ComponentFixture<ControlnavComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ControlnavComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ControlnavComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});
<div class="container-fluid row">
<app-cleftbar class="col-md-2" *ngIf="DataStore.leftbarshow"></app-cleftbar>
<app-control [ngClass]="{'col-md-10':DataStore.leftbarshow,'col-md-12':!DataStore.leftbarshow}"></app-control>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IndexPageComponent } from './index-page.component';
describe('IndexPageComponent', () => {
let component: IndexPageComponent;
let fixture: ComponentFixture<IndexPageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ IndexPageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(IndexPageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});
/**
* app路由
*
*
* @date 2017-11-07
* @author liuzheng <liuzheng712@gmail.com>
*/
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {environment} from '../environments/environment';
import {NotFoundComponent} from './BasicPage/not-found/not-found.component';
import {LoginComponent} from './BasicPage/login/login.component';
import {ControlPageComponent} from './ControlPage/controlpage.component';
import {ReplayPageComponent} from './replay-page/replay-page.component';
import {MonitorPageComponent} from './monitor-page/monitor-page.component';
import {ElementServerMenuComponent} from './elements/server-menu/server-menu.component';
import {BlankPageComponent} from './blank-page/blank-page.component';
import {TestPageComponent} from './test-page/test-page.component';
import {SettingPageComponent} from './setting-page/setting-page.component';
import {ConnectPageComponent} from './connect-page/connect-page.component';
const appRoutes: Routes = [
// {path: 'users/login', component: LoginComponent},
{path: 'replay/:token', component: ReplayPageComponent},
{path: 'monitor/:token', component: MonitorPageComponent},
{path: 'test', component: TestPageComponent},
{path: 'connect', component: ConnectPageComponent},
// {path: 'setting', component: SettingPageComponent},
{path: 'undefined', component: BlankPageComponent},
{path: '', component: ControlPageComponent},
{path: '**', component: NotFoundComponent}
];
@NgModule({
imports: [
RouterModule.forRoot(
appRoutes,
{enableTracing: !environment.production} // <-- debugging purposes only
)
],
exports: [
RouterModule
]
})
export class AppRoutingModule {
}
app-element-nav { elements-nav {
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
font-size: 13px; font-size: 13px;
font-weight: 300; font-weight: 300;
...@@ -22,7 +22,7 @@ nav { ...@@ -22,7 +22,7 @@ nav {
width: 100%; width: 100%;
} }
app-element-interactive { elements-interactive {
position: absolute; position: absolute;
display: inline-block; display: inline-block;
bottom: 120px; bottom: 120px;
......
<ng-progress></ng-progress> <ng-progress></ng-progress>
<app-element-nav *ngIf="DataStore.NavShow"></app-element-nav> <elements-nav *ngIf="DataStore.NavShow"></elements-nav>
<router-outlet></router-outlet> <router-outlet></router-outlet>
<!--<app-element-interactive></app-element-interactive>--> <!--<elements-interactive></elements-interactive>-->
...@@ -11,123 +11,53 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms'; // <-- NgModel ...@@ -11,123 +11,53 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms'; // <-- NgModel
import {LoggerModule, NGXLogger, NgxLoggerLevel} from 'ngx-logger'; import {LoggerModule, NGXLogger, NgxLoggerLevel} from 'ngx-logger';
import {HttpClientModule} from '@angular/common/http'; import {HttpClientModule} from '@angular/common/http';
import {AppRoutingModule} from './app-routing.module'; import {AppRouterModule} from './router/router.module';
import {AppComponent} from './app.component'; import {AppComponent} from './app.component';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import { TreeModule } from 'angular-tree-component'; import {TreeModule} from 'angular-tree-component';
// service // service
import {AppService, HttpService, LocalStorageService, LogService, UUIDService} from './app.service'; import {AppService, HttpService, LocalStorageService, LogService, UUIDService} from './app.service';
import {DialogService, ElementDialogAlertComponent} from './elements/dialog/dialog.service';
// Elements
import {ElementFooterComponent} from './elements/footer/footer.component';
import {ElementTermComponent} from './elements/term/term.component';
import {ElementInteractiveComponent} from './elements/interactive/interactive.component';
import {ChangLanWarningDialogComponent, ElementNavComponent} from './elements/nav/nav.component';
import {ElementPopupComponent} from './elements/popup/popup.component';
import {ElementRdpComponent} from './elements/rdp/rdp.component';
import {ElementServerMenuComponent} from './elements/server-menu/server-menu.component';
import {ElementIframeComponent} from './elements/iframe/iframe.component';
import {ElementElfinderComponent} from './elements/elfinder/elfinder.component';
import {ElementSettingsComponent} from './elements/settings/settings.component';
// pages
import {LoginComponent} from './BasicPage/login/login.component';
import {IleftbarComponent} from './IndexPage/ileftbar/ileftbar.component';
import {SearchComponent, SearchFilter} from './ControlPage/search/search.component';
import {CleftbarComponent, CleftbarDialogComponent} from './ControlPage/cleftbar/cleftbar.component';
import {ControlComponent} from './ControlPage/control/control.component';
import {ControlnavComponent} from './ControlPage/control/controlnav/controlnav.component';
import {ControlPageComponent} from './ControlPage/controlpage.component';
import {IndexPageComponent} from './IndexPage/index-page.component';
import {NotFoundComponent} from './BasicPage/not-found/not-found.component';
import {ReplayPageComponent} from './replay-page/replay-page.component';
import {Mp4Component} from './replay-page/mp4/mp4.component';
import {JsonComponent} from './replay-page/json/json.component';
import {UtcDatePipe} from './app.pipe';
import {MonitorPageComponent} from './monitor-page/monitor-page.component';
import {LinuxComponent} from './monitor-page/linux/linux.component';
import {WindowsComponent} from './monitor-page/windows/windows.component';
import {NgProgressModule} from 'ngx-progressbar'; import {NgProgressModule} from 'ngx-progressbar';
import {TestPageComponent} from './test-page/test-page.component'; import {TestPageComponent} from './test-page/test-page.component';
import {BlankPageComponent} from './blank-page/blank-page.component'; import {MaterialModule} from './plugins/MaterialModule.component';
import {MaterialModule} from './MaterialModule.component';
import {CookieService} from 'ngx-cookie-service'; import {CookieService} from 'ngx-cookie-service';
import {NgxDatatableModule} from '@swimlane/ngx-datatable'; import {NgxDatatableModule} from '@swimlane/ngx-datatable';
import {ElementTableComponent} from './elements/table/table.component';
import {SettingPageComponent} from './setting-page/setting-page.component';
import {ElementLeftbarComponent} from './elements/leftbar/leftbar.component';
import {ElementOfooterComponent} from './elements/ofooter/ofooter.component';
import {SettingPageBasicComponent} from './setting-page/basic/basic.component';
import {SettingPageEmailComponent} from './setting-page/email/email.component';
import {SettingPageLdapComponent} from './setting-page/ldap/ldap.component';
import {SettingPageTerminalComponent} from './setting-page/terminal/terminal.component';
import {SettingPageS3Component} from './setting-page/s3/s3.component';
import {TransPipe} from './trans.pipe';
import {MAT_LABEL_GLOBAL_OPTIONS} from '@angular/material'; import {MAT_LABEL_GLOBAL_OPTIONS} from '@angular/material';
import {ElementGuacamoleComponent} from './elements/guacamole/guacamole.component';
import {ConnectPageComponent} from './connect-page/connect-page.component';
import {Pipes} from './pipes/pipes';
import {PagesComponents} from './pages/pages.component';
import {ElementComponents} from './elements/elements.component';
import {ChangLanWarningDialogComponent} from './elements/nav/nav.component';
import {CleftbarDialogComponent} from './pages/control/cleftbar/cleftbar.component';
import {DialogService, ElementDialogAlertComponent} from './elements/dialog/dialog.service';
import {pluginModules} from './plugins/plugins';
@NgModule({ @NgModule({
imports: [ imports: [
BrowserModule, BrowserModule,
BrowserAnimationsModule, BrowserAnimationsModule,
FormsModule, FormsModule,
AppRoutingModule,
NgProgressModule, NgProgressModule,
HttpClientModule, HttpClientModule,
ReactiveFormsModule, ReactiveFormsModule,
MaterialModule,
LoggerModule.forRoot({serverLoggingUrl: '/api/logs', level: NgxLoggerLevel.DEBUG, serverLogLevel: NgxLoggerLevel.ERROR}), LoggerModule.forRoot({serverLoggingUrl: '/api/logs', level: NgxLoggerLevel.DEBUG, serverLogLevel: NgxLoggerLevel.ERROR}),
NgxDatatableModule, NgxDatatableModule,
TreeModule TreeModule,
AppRouterModule,
...pluginModules
], ],
declarations: [ declarations: [
AppComponent, AppComponent,
ElementNavComponent, ChangLanWarningDialogComponent,
ElementFooterComponent,
ElementPopupComponent,
ElementTermComponent,
ElementInteractiveComponent,
ElementRdpComponent,
ElementServerMenuComponent,
ElementIframeComponent,
ElementDialogAlertComponent,
ElementTableComponent,
ElementLeftbarComponent,
ElementOfooterComponent,
ElementGuacamoleComponent,
ElementElfinderComponent,
ElementSettingsComponent,
LoginComponent,
SearchComponent,
SearchFilter,
IleftbarComponent,
CleftbarComponent, CleftbarDialogComponent,
ControlComponent,
ControlnavComponent,
ControlPageComponent,
IndexPageComponent,
NotFoundComponent,
ReplayPageComponent,
Mp4Component,
JsonComponent,
UtcDatePipe,
MonitorPageComponent,
LinuxComponent,
WindowsComponent,
TestPageComponent, TestPageComponent,
BlankPageComponent, ...Pipes,
SettingPageComponent, ...ElementComponents,
SettingPageBasicComponent, ...PagesComponents
SettingPageEmailComponent,
SettingPageLdapComponent,
SettingPageTerminalComponent,
SettingPageS3Component,
TransPipe,
ConnectPageComponent,
], ],
entryComponents: [ entryComponents: [
CleftbarDialogComponent, CleftbarDialogComponent,
......
...@@ -14,7 +14,7 @@ import {DataStore, User, Browser, i18n} from './globals'; ...@@ -14,7 +14,7 @@ import {DataStore, User, Browser, i18n} from './globals';
import {environment} from '../environments/environment'; import {environment} from '../environments/environment';
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http'; import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
import {NGXLogger} from 'ngx-logger'; import {NGXLogger} from 'ngx-logger';
import {HostGroup} from './ControlPage/cleftbar/cleftbar.component'; import {HostGroup} from './pages/control/cleftbar/cleftbar.component';
import * as UUID from 'uuid-js/lib/uuid.js'; import * as UUID from 'uuid-js/lib/uuid.js';
declare function unescape(s: string): string; declare function unescape(s: string): string;
...@@ -139,7 +139,6 @@ export class HttpService { ...@@ -139,7 +139,6 @@ export class HttpService {
.set('user-only', '1') .set('user-only', '1')
.set('token', token); .set('token', token);
return this.http.get('/api/users/v1/connection-token/', {params: params}); return this.http.get('/api/users/v1/connection-token/', {params: params});
} }
} }
......
<div class="overflow">
<ul class="filetree">
<li *ngFor="let hostGroup of HostGroups ; let i = index ">
<input type="checkbox" id="hostgroup-{{i}}">
<label for="hostgroup-{{i}}" matTooltip="{{hostGroup.name}}" [matTooltipPosition]="TooltipPosition">{{hostGroup.name}}</label>
<ul [ngClass]="{'insearch': q }">
<li *ngFor="let host of hostGroup.assets_granted " (click)="Connect(host)"
(contextmenu)="onRightClick($event)" matTooltip="{{host.hostname}}"
[matTooltipPosition]="TooltipPosition">
<i class="fa" [ngClass]="'fa-'+(host.platform||'undefined').toLowerCase()" id="fa-{{i}}"></i>
{{host.hostname}}
</li>
</ul>
</li>
</ul>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MonitorPageComponent } from './monitor-page.component'; import { ElementAssetTreeComponent } from './asset-tree.component';
describe('MonitorPageComponent', () => { describe('R ', () => {
let component: MonitorPageComponent; let component: ElementAssetTreeComponent;
let fixture: ComponentFixture<MonitorPageComponent>; let fixture: ComponentFixture<ElementAssetTreeComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ MonitorPageComponent ] declarations: [ ElementAssetTreeComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(MonitorPageComponent); fixture = TestBed.createComponent(ElementAssetTreeComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import {Component, OnInit} from '@angular/core';
import {HttpService} from '../../app.service';
import * as jQuery from 'jquery/dist/jquery.min.js';
@Component({
selector: 'elements-asset-tree',
templateUrl: './asset-tree.component.html',
styleUrls: ['./asset-tree.component.scss']
})
export class ElementAssetTreeComponent implements OnInit {
constructor(private _http: HttpService) {
}
ngOnInit() {
}
}
...@@ -43,7 +43,7 @@ export class DialogService { ...@@ -43,7 +43,7 @@ export class DialogService {
@Component({ @Component({
selector: 'app-alert', selector: 'elements-alert',
templateUrl: 'alert.html', templateUrl: 'alert.html',
styleUrls: ['./alert.scss'] styleUrls: ['./alert.scss']
}) })
......
// Elements
import {ElementTableComponent} from './table/table.component';
import {ElementLeftbarComponent} from './leftbar/leftbar.component';
import {ElementOfooterComponent} from './ofooter/ofooter.component';
import {ElementFooterComponent} from './footer/footer.component';
import {ElementTermComponent} from './term/term.component';
import {ElementInteractiveComponent} from './interactive/interactive.component';
import {ChangLanWarningDialogComponent, ElementNavComponent} from './nav/nav.component';
import {ElementPopupComponent} from './popup/popup.component';
import {ElementRdpComponent} from './rdp/rdp.component';
import {ElementServerMenuComponent} from './server-menu/server-menu.component';
import {ElementIframeComponent} from './iframe/iframe.component';
import {ElementElfinderComponent} from './elfinder/elfinder.component';
import {ElementSettingsComponent} from './settings/settings.component';
import {ElementDialogAlertComponent} from './dialog/dialog.service';
import {ElementGuacamoleComponent} from './guacamole/guacamole.component';
export const ElementComponents = [
ElementLeftbarComponent,
ElementOfooterComponent,
ElementTableComponent,
ElementFooterComponent,
ElementTermComponent,
ElementInteractiveComponent,
ElementNavComponent, ChangLanWarningDialogComponent,
ElementPopupComponent,
ElementRdpComponent,
ElementServerMenuComponent,
ElementIframeComponent,
ElementElfinderComponent,
ElementSettingsComponent,
ElementDialogAlertComponent,
ElementGuacamoleComponent
];
...@@ -2,7 +2,7 @@ import {Component, OnInit} from '@angular/core'; ...@@ -2,7 +2,7 @@ import {Component, OnInit} from '@angular/core';
// import * as elfinder from 'elfinder/js/elfinder.min.js'; // import * as elfinder from 'elfinder/js/elfinder.min.js';
@Component({ @Component({
selector: 'app-element-elfinder', selector: 'elements-elfinder',
templateUrl: './elfinder.component.html', templateUrl: './elfinder.component.html',
styleUrls: ['./elfinder.component.scss'] styleUrls: ['./elfinder.component.scss']
}) })
......
...@@ -10,7 +10,7 @@ import {DataStore, User} from '../../globals'; ...@@ -10,7 +10,7 @@ import {DataStore, User} from '../../globals';
import {version} from '../../../environments/environment'; import {version} from '../../../environments/environment';
@Component({ @Component({
selector: 'app-element-footer', selector: 'elements-footer',
templateUrl: './footer.component.html', templateUrl: './footer.component.html',
styleUrls: ['./footer.component.css'] styleUrls: ['./footer.component.css']
}) })
......
...@@ -4,10 +4,10 @@ import {HttpService, LogService} from '../../app.service'; ...@@ -4,10 +4,10 @@ import {HttpService, LogService} from '../../app.service';
import {DataStore, User} from '../../globals'; import {DataStore, User} from '../../globals';
import {DomSanitizer} from '@angular/platform-browser'; import {DomSanitizer} from '@angular/platform-browser';
import {environment} from '../../../environments/environment'; import {environment} from '../../../environments/environment';
import {NavList} from '../../ControlPage/control/control.component'; import {NavList} from '../../pages/control/control/control.component';
@Component({ @Component({
selector: 'app-element-guacamole', selector: 'elements-guacamole',
templateUrl: './guacamole.component.html', templateUrl: './guacamole.component.html',
styleUrls: ['./guacamole.component.scss'] styleUrls: ['./guacamole.component.scss']
}) })
......
import {Component, Input, OnInit} from '@angular/core'; import {Component, Input, OnInit} from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser'; import {DomSanitizer} from '@angular/platform-browser';
import {NavList} from '../../ControlPage/control/control.component'; import {NavList} from '../../pages/control/control/control.component';
import {User, DataStore} from '../../globals'; import {User, DataStore} from '../../globals';
import {HttpService, LogService} from '../../app.service'; import {HttpService, LogService} from '../../app.service';
...@@ -8,7 +8,7 @@ import {environment} from '../../../environments/environment'; ...@@ -8,7 +8,7 @@ import {environment} from '../../../environments/environment';
import {CookieService} from 'ngx-cookie-service'; import {CookieService} from 'ngx-cookie-service';
@Component({ @Component({
selector: 'app-element-iframe', selector: 'elements-iframe',
templateUrl: './iframe.component.html', templateUrl: './iframe.component.html',
styleUrls: ['./iframe.component.scss'] styleUrls: ['./iframe.component.scss']
}) })
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'app-element-interactive', selector: 'elements-interactive',
templateUrl: './interactive.component.html', templateUrl: './interactive.component.html',
styleUrls: ['./interactive.component.scss'] styleUrls: ['./interactive.component.scss']
}) })
......
...@@ -3,7 +3,7 @@ import {FormBuilder, FormGroup} from '@angular/forms'; ...@@ -3,7 +3,7 @@ import {FormBuilder, FormGroup} from '@angular/forms';
import {Router} from '@angular/router'; import {Router} from '@angular/router';
@Component({ @Component({
selector: 'app-element-leftbar', selector: 'elements-leftbar',
templateUrl: './leftbar.component.html', templateUrl: './leftbar.component.html',
styleUrls: ['./leftbar.component.scss'] styleUrls: ['./leftbar.component.scss']
}) })
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
*/ */
import {Component, Inject, OnInit} from '@angular/core'; import {Component, Inject, OnInit} from '@angular/core';
import {AppService, HttpService, LocalStorageService, LogService} from '../../app.service'; import {AppService, HttpService, LocalStorageService, LogService} from '../../app.service';
import {CleftbarComponent} from '../../ControlPage/cleftbar/cleftbar.component'; import {CleftbarComponent} from '../../pages/control/cleftbar/cleftbar.component';
import {ControlComponent, NavList, View} from '../../ControlPage/control/control.component'; import {ControlComponent, NavList, View} from '../../pages/control/control/control.component';
import {DataStore, i18n} from '../../globals'; import {DataStore, i18n} from '../../globals';
import * as jQuery from 'jquery/dist/jquery.min.js'; import * as jQuery from 'jquery/dist/jquery.min.js';
import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material'; import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material';
...@@ -17,7 +17,7 @@ import {FormControl, Validators} from '@angular/forms'; ...@@ -17,7 +17,7 @@ import {FormControl, Validators} from '@angular/forms';
declare let layer: any; declare let layer: any;
@Component({ @Component({
selector: 'app-element-nav', selector: 'elements-nav',
templateUrl: './nav.component.html', templateUrl: './nav.component.html',
styleUrls: ['./nav.component.css'], styleUrls: ['./nav.component.css'],
}) })
...@@ -26,7 +26,7 @@ export class ElementNavComponent implements OnInit { ...@@ -26,7 +26,7 @@ export class ElementNavComponent implements OnInit {
ChangeLanWarningDialog: any; ChangeLanWarningDialog: any;
static Hide() { static Hide() {
jQuery('app-element-nav').hide(); jQuery('elements-nav').hide();
} }
constructor(private _appService: AppService, constructor(private _appService: AppService,
...@@ -357,7 +357,7 @@ export class ElementNavComponent implements OnInit { ...@@ -357,7 +357,7 @@ export class ElementNavComponent implements OnInit {
@Component({ @Component({
selector: 'app-element-nav-dialog', selector: 'elements-nav-dialog',
templateUrl: 'changeLanWarning.html', templateUrl: 'changeLanWarning.html',
}) })
export class ChangLanWarningDialogComponent implements OnInit { export class ChangLanWarningDialogComponent implements OnInit {
......
...@@ -3,7 +3,7 @@ import {version} from '../../../environments/environment'; ...@@ -3,7 +3,7 @@ import {version} from '../../../environments/environment';
import {DataStore} from '../../globals'; import {DataStore} from '../../globals';
@Component({ @Component({
selector: 'app-element-ofooter', selector: 'elements-ofooter',
templateUrl: './ofooter.component.html', templateUrl: './ofooter.component.html',
styleUrls: ['./ofooter.component.scss'] styleUrls: ['./ofooter.component.scss']
}) })
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'app-element-popup', selector: 'elements-popup',
templateUrl: './popup.component.html', templateUrl: './popup.component.html',
styleUrls: ['./popup.component.css'] styleUrls: ['./popup.component.css']
}) })
......
...@@ -11,7 +11,7 @@ import {DataStore} from '../../globals'; ...@@ -11,7 +11,7 @@ import {DataStore} from '../../globals';
declare let Mstsc: any; declare let Mstsc: any;
@Component({ @Component({
selector: 'app-element-rdp', selector: 'elements-rdp',
templateUrl: './rdp.component.html', templateUrl: './rdp.component.html',
styleUrls: ['./rdp.component.scss'] styleUrls: ['./rdp.component.scss']
}) })
......
...@@ -9,7 +9,7 @@ export class Menu { ...@@ -9,7 +9,7 @@ export class Menu {
} }
@Component({ @Component({
selector: 'app-element-server-menu', selector: 'elements-server-menu',
templateUrl: './server-menu.component.html', templateUrl: './server-menu.component.html',
styleUrls: ['./server-menu.component.scss'], styleUrls: ['./server-menu.component.scss'],
}) })
......
import {Component, Input, OnInit} from '@angular/core'; import {Component, Input, OnInit} from '@angular/core';
@Component({ @Component({
selector: 'app-element-settings', selector: 'elements-settings',
templateUrl: './settings.component.html', templateUrl: './settings.component.html',
styleUrls: ['./settings.component.scss'] styleUrls: ['./settings.component.scss']
}) })
......
...@@ -28,7 +28,7 @@ export let Config: { ...@@ -28,7 +28,7 @@ export let Config: {
}; };
@Component({ @Component({
selector: 'app-element-table', selector: 'elements-table',
templateUrl: './table.component.html', templateUrl: './table.component.html',
styleUrls: ['./table.component.scss'] styleUrls: ['./table.component.scss']
}) })
......
import {AfterViewInit, Component, Input, OnInit, ViewChild} from '@angular/core'; import {AfterViewInit, Component, Input, OnInit, ViewChild} from '@angular/core';
import {ElementRef} from '@angular/core'; import {ElementRef} from '@angular/core';
import {term, Terminal, TermWS} from '../../globals'; import {term, Terminal, TermWS} from '../../globals';
import {NavList} from '../../ControlPage/control/control.component'; import {NavList} from '../../pages/control/control/control.component';
import * as jQuery from 'jquery/dist/jquery.min.js'; import * as jQuery from 'jquery/dist/jquery.min.js';
import {UUIDService} from '../../app.service'; import {UUIDService} from '../../app.service';
import {CookieService} from 'ngx-cookie-service'; import {CookieService} from 'ngx-cookie-service';
@Component({ @Component({
selector: 'app-element-term', selector: 'elements-term',
templateUrl: './term.component.html', templateUrl: './term.component.html',
styleUrls: ['./term.component.css'] styleUrls: ['./term.component.css']
}) })
......
<app-monitor-linux></app-monitor-linux>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BlankPageComponent } from './blank-page.component'; import { PagesBlankComponent } from './blank.component';
describe('BlankPageComponent', () => { describe('PagesBlankComponent', () => {
let component: BlankPageComponent; let component: PagesBlankComponent;
let fixture: ComponentFixture<BlankPageComponent>; let fixture: ComponentFixture<PagesBlankComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ BlankPageComponent ] declarations: [ PagesBlankComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(BlankPageComponent); fixture = TestBed.createComponent(PagesBlankComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {DataStore} from '../globals'; import {DataStore} from '../../globals';
@Component({ @Component({
selector: 'app-blank-page', selector: 'pages-blank',
templateUrl: './blank-page.component.html', templateUrl: './blank.component.html',
styleUrls: ['./blank-page.component.scss'] styleUrls: ['./blank.component.scss']
}) })
export class BlankPageComponent implements OnInit { export class PagesBlankComponent implements OnInit {
constructor() { constructor() {
DataStore.NavShow = false; DataStore.NavShow = false;
......
<app-element-term <elements-term
[token]="token" [token]="token"
[index]="0" [index]="0"
*ngIf="system =='linux'"> *ngIf="system =='linux'">
</app-element-term> </elements-term>
<app-element-guacamole <elements-guacamole
[target]="target" [target]="target"
[index]="0" [index]="0"
*ngIf="system=='windows' && target"> *ngIf="system=='windows' && target">
</app-element-guacamole> </elements-guacamole>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ConnectPageComponent } from './connect-page.component'; import { PagesConnectComponent } from './connect.component';
describe('ConnectPageComponent', () => { describe('ConnectPageComponent', () => {
let component: ConnectPageComponent; let component: PagesConnectComponent;
let fixture: ComponentFixture<ConnectPageComponent>; let fixture: ComponentFixture<PagesConnectComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ ConnectPageComponent ] declarations: [ PagesConnectComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(ConnectPageComponent); fixture = TestBed.createComponent(PagesConnectComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {AppService, HttpService, LocalStorageService} from '../app.service'; import {AppService, HttpService, LocalStorageService} from '../../app.service';
import {DataStore} from '../globals'; import {DataStore} from '../../globals';
import * as jQuery from 'jquery/dist/jquery.min.js'; import * as jQuery from 'jquery/dist/jquery.min.js';
@Component({ @Component({
selector: 'app-connect-page', selector: 'pages-connect',
templateUrl: './connect-page.component.html', templateUrl: './connect.component.html',
styleUrls: ['./connect-page.component.scss'] styleUrls: ['./connect.component.scss']
}) })
export class ConnectPageComponent implements OnInit { export class PagesConnectComponent implements OnInit {
token: string; token: string;
system: string; system: string;
authToken: string; authToken: string;
......
...@@ -25,4 +25,4 @@ ...@@ -25,4 +25,4 @@
<div class="footer"> <div class="footer">
Version <strong>{{version}}</strong> Version <strong>{{version}}</strong>
</div> </div>
<!--<app-element-server-menu></app-element-server-menu>--> <!--<elements-server-menu></elements-server-menu>-->
...@@ -8,15 +8,15 @@ ...@@ -8,15 +8,15 @@
*/ */
import {Component, Inject, OnInit} from '@angular/core'; import {Component, Inject, OnInit} from '@angular/core';
import {AppService, HttpService, LogService} from '../../app.service'; import {AppService, HttpService, LogService} from '../../../app.service';
import {SearchComponent} from '../search/search.component'; import {SearchComponent} from '../search/search.component';
import {DataStore} from '../../globals'; import {DataStore} from '../../../globals';
import {version} from '../../../environments/environment'; import {version} from '../../../../environments/environment';
import {ElementServerMenuComponent} from '../../elements/server-menu/server-menu.component';
import {NavList, View} from '../control/control.component'; import {NavList, View} from '../control/control.component';
import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material'; import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material';
import {FormControl, Validators} from '@angular/forms'; import {FormControl, Validators} from '@angular/forms';
import {DialogService} from '../../elements/dialog/dialog.service'; import {ElementServerMenuComponent} from '../../../elements/server-menu/server-menu.component';
import {DialogService} from '../../../elements/dialog/dialog.service';
export interface HostGroup { export interface HostGroup {
...@@ -32,7 +32,7 @@ export class Host { ...@@ -32,7 +32,7 @@ export class Host {
} }
@Component({ @Component({
selector: 'app-cleftbar', selector: 'pages-control-cleftbar',
templateUrl: './cleftbar.component.html', templateUrl: './cleftbar.component.html',
styleUrls: ['./cleftbar.component.css'], styleUrls: ['./cleftbar.component.css'],
providers: [SearchComponent, ElementServerMenuComponent] providers: [SearchComponent, ElementServerMenuComponent]
......
...@@ -11,12 +11,12 @@ div { ...@@ -11,12 +11,12 @@ div {
position: initial; position: initial;
} }
app-cleftbar { pages-control-cleftbar {
padding: 0; padding: 0;
background: #2f2a2a; background: #2f2a2a;
color: #d6cbcb; color: #d6cbcb;
} }
app-control { pages-control-control {
padding: 0; padding: 0;
} }
<div class="container-fluid row">
<pages-control-cleftbar class="col-md-2" *ngIf="DataStore.leftbarshow"></pages-control-cleftbar>
<pages-control-control [ngClass]="{'col-md-10':DataStore.leftbarshow,'col-md-12':!DataStore.leftbarshow}"></pages-control-control>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ControlPageComponent } from './controlpage.component'; import { PagesControlComponent } from './control.component';
describe('ControlPageComponent', () => { describe('ControlPageComponent', () => {
let component: ControlPageComponent; let component: PagesControlComponent;
let fixture: ComponentFixture<ControlPageComponent>; let fixture: ComponentFixture<PagesControlComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ ControlPageComponent ] declarations: [ PagesControlComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(ControlPageComponent); fixture = TestBed.createComponent(PagesControlComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
...@@ -6,15 +6,15 @@ ...@@ -6,15 +6,15 @@
* @author liuzheng <liuzheng712@gmail.com> * @author liuzheng <liuzheng712@gmail.com>
*/ */
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {AppService} from '../app.service'; import {AppService} from '../../app.service';
import {DataStore, User} from '../globals'; import {DataStore, User} from '../../globals';
@Component({ @Component({
selector: 'app-controllpage', selector: 'pages-control',
templateUrl: './controlpage.component.html', templateUrl: './control.component.html',
styleUrls: ['./controlpage.component.css'], styleUrls: ['./control.component.css'],
}) })
export class ControlPageComponent implements OnInit { export class PagesControlComponent implements OnInit {
DataStore = DataStore; DataStore = DataStore;
User = User; User = User;
......
div, app-element-term, app-element-iframe { div, elements-term, elements-iframe {
height: 100%; height: 100%;
padding-bottom: 30px; padding-bottom: 30px;
} }
......
<app-controlnav></app-controlnav> <pages-control-nav></pages-control-nav>
<div *ngFor="let m of NavList.List;let i=index" <div *ngFor="let m of NavList.List;let i=index"
[ngClass]="{'active':i==NavList.Active}" [ngClass]="{'active':i==NavList.Active}"
> >
<app-element-term [index]="i" <elements-term [index]="i"
[host]="m.host" [host]="m.host"
[userid]="m.user.id" [userid]="m.user.id"
*ngIf="m.type=='ssh'"> *ngIf="m.type=='ssh'">
</app-element-term> </elements-term>
<app-element-guacamole [index]="i" <elements-guacamole [index]="i"
[host]="m.host" [host]="m.host"
[userid]="m.user.id" [userid]="m.user.id"
*ngIf="m.type=='rdp'"> *ngIf="m.type=='rdp'">
</app-element-guacamole> </elements-guacamole>
<app-element-settings [index]="i" <elements-settings [index]="i"
*ngIf="m.type=='settings'"> *ngIf="m.type=='settings'">
</app-element-settings> </elements-settings>
</div> </div>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {TermWS} from '../../globals'; import {TermWS} from '../../../globals';
// export class Term { // export class Term {
// machine: string; // machine: string;
...@@ -41,7 +41,7 @@ export let NavList: { ...@@ -41,7 +41,7 @@ export let NavList: {
}; };
@Component({ @Component({
selector: 'app-control', selector: 'pages-control-control',
templateUrl: './control.component.html', templateUrl: './control.component.html',
styleUrls: ['./control.component.css'] styleUrls: ['./control.component.css']
}) })
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PagesControlNavComponent } from './nav.component';
describe('ControlPagesControlNavComponent', () => {
let component: PagesControlNavComponent;
let fixture: ComponentFixture<PagesControlNavComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PagesControlNavComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PagesControlNavComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});
...@@ -12,12 +12,12 @@ import {ControlComponent, NavList} from '../control.component'; ...@@ -12,12 +12,12 @@ import {ControlComponent, NavList} from '../control.component';
import * as jQuery from 'jquery/dist/jquery.min.js'; import * as jQuery from 'jquery/dist/jquery.min.js';
@Component({ @Component({
selector: 'app-controlnav', selector: 'pages-control-nav',
templateUrl: './controlnav.component.html', templateUrl: './nav.component.html',
styleUrls: ['./controlnav.component.css'], styleUrls: ['./nav.component.css'],
}) })
export class ControlnavComponent implements OnInit { export class PagesControlNavComponent implements OnInit {
setActive = ControlnavComponent.setActive; setActive = PagesControlNavComponent.setActive;
NavList = NavList; NavList = NavList;
static checkActive(index) { static checkActive(index) {
...@@ -31,7 +31,7 @@ export class ControlnavComponent implements OnInit { ...@@ -31,7 +31,7 @@ export class ControlnavComponent implements OnInit {
} else { } else {
NavList.Active = index; NavList.Active = index;
} }
ControlnavComponent.setActive(NavList.Active); PagesControlNavComponent.setActive(NavList.Active);
} }
static setActive(index) { static setActive(index) {
...@@ -65,7 +65,7 @@ export class ControlnavComponent implements OnInit { ...@@ -65,7 +65,7 @@ export class ControlnavComponent implements OnInit {
ControlComponent.TerminalDisconnect(index); ControlComponent.TerminalDisconnect(index);
} }
NavList.List.splice(index, 1); NavList.List.splice(index, 1);
ControlnavComponent.checkActive(index); PagesControlNavComponent.checkActive(index);
} }
scrollleft() { scrollleft() {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
import {Component, OnChanges, Input, Pipe, PipeTransform} from '@angular/core'; import {Component, OnChanges, Input, Pipe, PipeTransform} from '@angular/core';
import {AppService, HttpService, LogService} from '../../app.service'; import {AppService, HttpService, LogService} from '../../../app.service';
export let Q = ''; export let Q = '';
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
* @author liuzheng <liuzheng712@gmail.com> * @author liuzheng <liuzheng712@gmail.com>
*/ */
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {AppService, LogService} from '../../app.service'; import {AppService, LogService} from '../../../app.service';
@Component({ @Component({
selector: 'app-ileftbar', selector: 'pages-ileftbar',
templateUrl: './ileftbar.component.html', templateUrl: './ileftbar.component.html',
styleUrls: ['./ileftbar.component.css'] styleUrls: ['./ileftbar.component.css']
}) })
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LoginComponent } from './login.component'; import { PagesIndexComponent } from './index.component';
describe('LoginComponent', () => { describe('PagesIndexComponent', () => {
let component: LoginComponent; let component: PagesIndexComponent;
let fixture: ComponentFixture<LoginComponent>; let fixture: ComponentFixture<PagesIndexComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ LoginComponent ] declarations: [ PagesIndexComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(LoginComponent); fixture = TestBed.createComponent(PagesIndexComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
...@@ -6,15 +6,15 @@ ...@@ -6,15 +6,15 @@
* @author liuzheng <liuzheng712@gmail.com> * @author liuzheng <liuzheng712@gmail.com>
*/ */
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {AppService} from '../app.service'; import {AppService} from '../../app.service';
import {User} from '../globals'; import {User} from '../../globals';
@Component({ @Component({
selector: 'app-index-page', selector: 'pages-index',
templateUrl: './index-page.component.html', templateUrl: './index.component.html',
styleUrls: ['./index-page.component.css'], styleUrls: ['./index.component.css'],
}) })
export class IndexPageComponent implements OnInit { export class PagesIndexComponent implements OnInit {
User = User; User = User;
constructor() { constructor() {
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NotFoundComponent } from './not-found.component'; import { PagesLoginComponent } from './login.component';
describe('NotFoundComponent', () => { describe('PagesLoginComponent', () => {
let component: NotFoundComponent; let component: PagesLoginComponent;
let fixture: ComponentFixture<NotFoundComponent>; let fixture: ComponentFixture<PagesLoginComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ NotFoundComponent ] declarations: [ PagesLoginComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(NotFoundComponent); fixture = TestBed.createComponent(PagesLoginComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
...@@ -13,11 +13,11 @@ import {DataStore, User} from '../../globals'; ...@@ -13,11 +13,11 @@ import {DataStore, User} from '../../globals';
import * as jQuery from 'jquery/dist/jquery.min.js'; import * as jQuery from 'jquery/dist/jquery.min.js';
@Component({ @Component({
selector: 'app-login', selector: 'pages-login',
templateUrl: './login.component.html', templateUrl: './login.component.html',
styleUrls: ['./login.component.css'], styleUrls: ['./login.component.css'],
}) })
export class LoginComponent implements OnInit { export class PagesLoginComponent implements OnInit {
DataStore = DataStore; DataStore = DataStore;
User = User; User = User;
loginBotton = 'login to your account'; loginBotton = 'login to your account';
......
<app-element-term <elements-term
[index]="0" [index]="0"
[monitor]="token" [monitor]="token"
></app-element-term> ></elements-term>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PagesMonitorLinuxComponent } from './linux.component';
describe('PagesMonitorLinuxComponent', () => {
let component: PagesMonitorLinuxComponent;
let fixture: ComponentFixture<PagesMonitorLinuxComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PagesMonitorLinuxComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PagesMonitorLinuxComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {Monitor} from '../../globals'; import {Monitor} from '../../../globals';
@Component({ @Component({
selector: 'app-monitor-linux', selector: 'pages-monitor-linux',
templateUrl: './linux.component.html', templateUrl: './linux.component.html',
styleUrls: ['./linux.component.css'] styleUrls: ['./linux.component.css']
}) })
export class LinuxComponent implements OnInit { export class PagesMonitorLinuxComponent implements OnInit {
token: string; token: string;
constructor() { constructor() {
......
<pages-monitor-linux></pages-monitor-linux>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LinuxComponent } from './linux.component'; import { PagesMonitorComponent } from './monitor.component';
describe('LinuxComponent', () => { describe('PagesMonitorComponent', () => {
let component: LinuxComponent; let component: PagesMonitorComponent;
let fixture: ComponentFixture<LinuxComponent>; let fixture: ComponentFixture<PagesMonitorComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ LinuxComponent ] declarations: [ PagesMonitorComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(LinuxComponent); fixture = TestBed.createComponent(PagesMonitorComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Params} from '@angular/router'; import {ActivatedRoute, Params} from '@angular/router';
import {DataStore, Monitor} from '../globals'; import {DataStore, Monitor} from '../../globals';
@Component({ @Component({
selector: 'app-monitor-page', selector: 'pages-monitor',
templateUrl: './monitor-page.component.html', templateUrl: './monitor.component.html',
styleUrls: ['./monitor-page.component.css'] styleUrls: ['./monitor.component.css']
}) })
export class MonitorPageComponent implements OnInit { export class PagesMonitorComponent implements OnInit {
constructor(private activatedRoute: ActivatedRoute) { constructor(private activatedRoute: ActivatedRoute) {
DataStore.NavShow = false; DataStore.NavShow = false;
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { WindowsComponent } from './windows.component'; import { PagesMonitorWindowsComponent } from './windows.component';
describe('WindowsComponent', () => { describe('PagesMonitorWindowsComponent', () => {
let component: WindowsComponent; let component: PagesMonitorWindowsComponent;
let fixture: ComponentFixture<WindowsComponent>; let fixture: ComponentFixture<PagesMonitorWindowsComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ WindowsComponent ] declarations: [ PagesMonitorWindowsComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(WindowsComponent); fixture = TestBed.createComponent(PagesMonitorWindowsComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'app-windows', selector: 'pages-monitor-windows',
templateUrl: './windows.component.html', templateUrl: './windows.component.html',
styleUrls: ['./windows.component.css'] styleUrls: ['./windows.component.css']
}) })
export class WindowsComponent implements OnInit { export class PagesMonitorWindowsComponent implements OnInit {
constructor() { } constructor() { }
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PagesNotFoundComponent } from './not-found.component';
describe('PagesNotFoundComponent', () => {
let component: PagesNotFoundComponent;
let fixture: ComponentFixture<PagesNotFoundComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PagesNotFoundComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PagesNotFoundComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});
...@@ -2,11 +2,11 @@ import {Component, OnInit} from '@angular/core'; ...@@ -2,11 +2,11 @@ import {Component, OnInit} from '@angular/core';
import {DataStore} from '../../globals'; import {DataStore} from '../../globals';
@Component({ @Component({
selector: 'app-not-found', selector: 'pages-not-found',
templateUrl: './not-found.component.html', templateUrl: './not-found.component.html',
styleUrls: ['./not-found.component.css'] styleUrls: ['./not-found.component.css']
}) })
export class NotFoundComponent implements OnInit { export class PagesNotFoundComponent implements OnInit {
constructor() { constructor() {
......
import {PagesBlankComponent} from './blank/blank.component';
import {PagesConnectComponent} from './connect/connect.component';
import {PagesControlComponent} from './control/control.component';
import {PagesIndexComponent} from './index/index.component';
import {PagesMonitorComponent} from './monitor/monitor.component';
import {PagesReplayComponent} from './replay/replay.component';
// import {PagesSettingComponent} from './setting/setting.component';
import {PagesNotFoundComponent} from './not-found/not-found.component';
import {PagesLoginComponent} from './login/login.component';
import {CleftbarComponent, CleftbarDialogComponent} from './control/cleftbar/cleftbar.component';
import {Mp4Component} from './replay/mp4/mp4.component';
import {JsonComponent} from './replay/json/json.component';
import {ControlComponent} from './control/control/control.component';
import {PagesControlNavComponent} from './control/control/controlnav/nav.component';
import {SearchComponent, SearchFilter} from './control/search/search.component';
import {PagesMonitorLinuxComponent} from './monitor/linux/linux.component';
import {PagesMonitorWindowsComponent} from './monitor/windows/windows.component';
export const PagesComponents = [
PagesBlankComponent,
PagesConnectComponent,
PagesControlComponent, ControlComponent, PagesControlNavComponent,
CleftbarComponent, CleftbarDialogComponent,
PagesIndexComponent,
PagesMonitorComponent,
PagesReplayComponent, Mp4Component, JsonComponent,
// PagesSettingComponent,
PagesNotFoundComponent,
PagesLoginComponent,
SearchComponent,
SearchFilter,
PagesMonitorLinuxComponent,
PagesMonitorWindowsComponent
];
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
min-width: 12px; min-width: 12px;
} }
app-element-term { elements-term {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -33,5 +33,5 @@ ...@@ -33,5 +33,5 @@
{{time | utcDate | date:"HH:mm:ss"}} {{time | utcDate | date:"HH:mm:ss"}}
</div> </div>
<app-element-term></app-element-term> <elements-term></elements-term>
<!--<asciinema-player></asciinema-player>--> <!--<asciinema-player></asciinema-player>-->
import {Component, Input, OnInit} from '@angular/core'; import {Component, Input, OnInit} from '@angular/core';
import {Video, term} from '../../globals'; import {Video, term} from '../../../globals';
import {HttpService, LogService} from '../../app.service'; import {HttpService, LogService} from '../../../app.service';
@Component({ @Component({
selector: 'app-replay-json', selector: 'app-replay-json',
......
import {Component, Input, OnInit} from '@angular/core'; import {Component, Input, OnInit} from '@angular/core';
import {Video} from '../../globals'; import {Video} from '../../../globals';
@Component({ @Component({
selector: 'app-replay-mp4', selector: 'app-replay-mp4',
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ReplayPageComponent } from './replay-page.component'; import { PagesReplayComponent } from './replay-page.component';
describe('ReplayPageComponent', () => { describe('ReplayPageComponent', () => {
let component: ReplayPageComponent; let component: PagesReplayComponent;
let fixture: ComponentFixture<ReplayPageComponent>; let fixture: ComponentFixture<PagesReplayComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ ReplayPageComponent ] declarations: [ PagesReplayComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(ReplayPageComponent); fixture = TestBed.createComponent(PagesReplayComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Params} from '@angular/router'; import {ActivatedRoute, Params} from '@angular/router';
import {HttpService, LogService} from '../app.service'; import {HttpService, LogService} from '../../app.service';
import {Video, DataStore} from '../globals'; import {Video, DataStore} from '../../globals';
@Component({ @Component({
selector: 'app-replay-page', selector: 'pages-replay',
templateUrl: './replay-page.component.html', templateUrl: './replay.component.html',
styleUrls: ['./replay-page.component.css'] styleUrls: ['./replay.component.css']
}) })
export class ReplayPageComponent implements OnInit { export class PagesReplayComponent implements OnInit {
constructor(private activatedRoute: ActivatedRoute, constructor(private activatedRoute: ActivatedRoute,
private _http: HttpService, private _http: HttpService,
......
<div class="pace-done"> <div class="pace-done">
<app-element-leftbar></app-element-leftbar> <elements-leftbar></elements-leftbar>
<mat-card class="content"> <mat-card class="content">
<mat-tab-group> <mat-tab-group>
<mat-tab label="{{'Basic setting'|trans}}"> <mat-tab label="{{'Basic setting'|trans}}">
...@@ -16,5 +16,5 @@ ...@@ -16,5 +16,5 @@
</mat-tab> </mat-tab>
</mat-tab-group> </mat-tab-group>
</mat-card> </mat-card>
<app-element-ofooter></app-element-ofooter> <elements-ofooter></elements-ofooter>
</div> </div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SettingPageComponent } from './setting-page.component'; import { PagesSettingComponent } from './setting.component';
describe('SettingPageComponent', () => { describe('SettingPageComponent', () => {
let component: SettingPageComponent; let component: PagesSettingComponent;
let fixture: ComponentFixture<SettingPageComponent>; let fixture: ComponentFixture<PagesSettingComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ SettingPageComponent ] declarations: [ PagesSettingComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(SettingPageComponent); fixture = TestBed.createComponent(PagesSettingComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'pages-setting',
templateUrl: './setting.component.html',
styleUrls: ['./setting.component.scss']
})
export class PagesSettingComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
import {Pipe, PipeTransform} from '@angular/core'; import {Pipe, PipeTransform} from '@angular/core';
@Pipe({ @Pipe({
name: 'utcDate' name: 'utcDate'
}) })
......
import {TransPipe} from './trans.pipe';
import {UtcDatePipe} from './date.pipe';
export const Pipes = [
UtcDatePipe,
TransPipe
];
import {Pipe, PipeTransform} from '@angular/core'; import {Pipe, PipeTransform} from '@angular/core';
import {i18n} from './globals'; import {i18n} from '../globals';
@Pipe({ @Pipe({
name: 'trans' name: 'trans'
......
import {MaterialModule} from './MaterialModule.component';
export const pluginModules = [
MaterialModule
];
/**
* app路由
*
*
* @date 2017-11-07
* @author liuzheng <liuzheng712@gmail.com>
*/
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {environment} from '../../environments/environment';
import {PagesBlankComponent} from '../pages/blank/blank.component';
import {TestPageComponent} from '../test-page/test-page.component';
// import {PagesSettingComponent} from '../pages/setting/setting.component';
import {PagesConnectComponent} from '../pages/connect/connect.component';
import {PagesReplayComponent} from '../pages/replay/replay.component';
import {PagesControlComponent} from '../pages/control/control.component';
import {PagesNotFoundComponent} from '../pages/not-found/not-found.component';
import {PagesMonitorComponent} from '../pages/monitor/monitor.component';
const appRoutes: Routes = [
// {path: 'users/login', component: LoginComponent},
{path: 'replay/:token', component: PagesReplayComponent},
{path: 'monitor/:token', component: PagesMonitorComponent},
{path: 'test', component: TestPageComponent},
{path: 'connect', component: PagesConnectComponent},
// {path: 'setting', component: PagesSettingComponent},
{path: 'undefined', component: PagesBlankComponent},
{path: '', component: PagesControlComponent},
{path: '**', component: PagesNotFoundComponent}
];
@NgModule({
imports: [
RouterModule.forRoot(
appRoutes,
{enableTracing: false} // <-- debugging purposes only
// {enableTracing: !environment.production} // <-- debugging purposes only
)
],
exports: [
RouterModule
]
})
export class AppRouterModule {
}
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-setting-page',
templateUrl: './setting-page.component.html',
styleUrls: ['./setting-page.component.scss']
})
export class SettingPageComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
import { enableProdMode } from '@angular/core'; import {enableProdMode} from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module'; import {AppModule} from './app/app.module';
import { environment } from './environments/environment'; import {environment} from './environments/environment';
if (environment.production) { if (environment.production) {
enableProdMode(); enableProdMode();
......
...@@ -117,13 +117,23 @@ ...@@ -117,13 +117,23 @@
"directive-selector": [ "directive-selector": [
true, true,
"attribute", "attribute",
"app", [
"camelCase" "elements",
"pages",
"app"
],
"camelCase",
"elements",
"pages"
], ],
"component-selector": [ "component-selector": [
true, true,
"element", "element",
"app", [
"elements",
"pages",
"app"
],
"kebab-case" "kebab-case"
], ],
"use-input-property-decorator": true, "use-input-property-decorator": true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment