Commit fa8df131 authored by liuzheng712's avatar liuzheng712

feat: change console to control

parent 0863e0ba
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ConsolePageComponent } from './consolepage.component';
describe('ConsolePageComponent', () => {
let component: ConsolePageComponent;
let fixture: ComponentFixture<ConsolePageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ConsolePageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ConsolePageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});
......@@ -2,7 +2,7 @@ import {Component, OnInit} from '@angular/core';
import {Logger} from 'angular2-logger/core';
import {AppService, DataStore} from '../../app.service';
import {SshComponent} from '../console/ssh/ssh.component';
import {SshComponent} from '../control/ssh/ssh.component';
@Component({
selector: 'app-cleftbar',
......
<app-consolenav></app-consolenav>
<app-controlnav></app-controlnav>
<app-ssh></app-ssh>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ConsoleComponent } from './console.component';
import { ControlComponent } from './control.component';
describe('ConsoleComponent', () => {
let component: ConsoleComponent;
let fixture: ComponentFixture<ConsoleComponent>;
describe('ControlComponent', () => {
let component: ControlComponent;
let fixture: ComponentFixture<ControlComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ConsoleComponent ]
declarations: [ ControlComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ConsoleComponent);
fixture = TestBed.createComponent(ControlComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
......
......@@ -22,11 +22,11 @@ export let NavList: {
};
@Component({
selector: 'app-console',
templateUrl: './console.component.html',
styleUrls: ['./console.component.css']
selector: 'app-control',
templateUrl: './control.component.html',
styleUrls: ['./control.component.css']
})
export class ConsoleComponent implements OnInit {
export class ControlComponent implements OnInit {
constructor() {
}
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ConsolenavComponent } from './consolenav.component';
import { ControlnavComponent } from './controlnav.component';
describe('ConsolenavComponent', () => {
let component: ConsolenavComponent;
let fixture: ComponentFixture<ConsolenavComponent>;
describe('ControlnavComponent', () => {
let component: ControlnavComponent;
let fixture: ComponentFixture<ControlnavComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ConsolenavComponent ]
declarations: [ ControlnavComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ConsolenavComponent);
fixture = TestBed.createComponent(ControlnavComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
......
import {Component, OnInit} from '@angular/core';
import {NavList} from '../console.component'
import {NavList} from '../control.component'
@Component({
selector: 'app-consolenav',
templateUrl: './consolenav.component.html',
styleUrls: ['./consolenav.component.css']
selector: 'app-controlnav',
templateUrl: './controlnav.component.html',
styleUrls: ['./controlnav.component.css']
})
export class ConsolenavComponent implements OnInit {
setActive = ConsolenavComponent.setActive;
export class ControlnavComponent implements OnInit {
setActive = ControlnavComponent.setActive;
NavList = NavList;
constructor() {
......@@ -28,7 +28,7 @@ export class ConsolenavComponent implements OnInit {
} else {
NavList.termActive = index;
}
ConsolenavComponent.setActive(NavList.termActive)
ControlnavComponent.setActive(NavList.termActive)
}
static setActive(index) {
......
......@@ -6,7 +6,7 @@ import {Cookie} from 'ng2-cookies/ng2-cookies';
declare let jQuery: any;
declare let Terminal: any;
import {AppService, DataStore} from '../../../app.service';
import {NavList, Term} from '../console.component';
import {NavList, Term} from '../control.component';
@Component({
......@@ -19,7 +19,7 @@ export class SshComponent implements OnInit {
constructor(private _appService: AppService,
private _logger: Logger) {
this._logger.log('ConsoleComponent.ts:ConsoleComponent');
this._logger.log('SshComponent.ts:SshComponent');
}
ngOnInit() {
......
......@@ -15,6 +15,6 @@ app-cleftbar {
padding: 0;
}
app-console {
app-control {
padding: 0;
}
<div class="container-fluid row">
<app-cleftbar class="col-md-2" ></app-cleftbar>
<app-console class="col-md-10" ></app-console>
<app-control class="col-md-10" ></app-control>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ControlPageComponent } from './controlpage.component';
describe('ControlPageComponent', () => {
let component: ControlPageComponent;
let fixture: ComponentFixture<ControlPageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ControlPageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ControlPageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});
......@@ -2,13 +2,13 @@ import {Component, OnInit} from '@angular/core';
import {AppService, DataStore, User} from '../app.service';
@Component({
selector: 'app-consolepage',
templateUrl: './consolepage.component.html',
styleUrls: ['./consolepage.component.css'],
selector: 'app-controllpage',
templateUrl: './control.component.html',
styleUrls: ['./control.component.css'],
providers: [AppService]
})
export class ConsolePageComponent implements OnInit {
export class ControlPageComponent implements OnInit {
DataStore = DataStore;
User = User;
......
......@@ -8,13 +8,13 @@ import {environment} from '../environments/environment';
import {IndexPageComponent} from './IndexPage/index-page.component';
import {PageNotFoundComponent} from './BasicPage/not-found.component';
import {LoginComponent} from './BasicPage/login/login.component';
import {ConsolePageComponent} from './ConsolePage/consolepage.component';
import {ControlPageComponent} from './ControlPage/controlpage.component';
const appRoutes: Routes = [
// { path: 'crisis-center', component: CrisisListComponent },
{path: 'welcome', component: IndexPageComponent}, // <-- delete this line
{path: 'login', component: LoginComponent},
{path: 'term', component: ConsolePageComponent},
{path: 'term', component: ControlPageComponent},
{path: '', redirectTo: '/welcome', pathMatch: 'full'},
{path: '**', component: PageNotFoundComponent}
];
......
......@@ -17,14 +17,14 @@ import {LoginComponent} from './BasicPage/login/login.component';
import {FooterComponent} from './BasicPage/footer/footer.component';
import {PageNotFoundComponent} from './BasicPage/not-found.component';
import {SearchComponent} from './ConsolePage/search/search.component';
import {IleftbarComponent} from './IndexPage/ileftbar/ileftbar.component';
import {CleftbarComponent} from './ConsolePage/cleftbar/cleftbar.component';
import {ConsoleComponent} from './ConsolePage/console/console.component';
import {ConsolenavComponent} from './ConsolePage/console/consolenav/consolenav.component';
import {RdpComponent} from './ConsolePage/console/rdp/rdp.component';
import {SshComponent} from './ConsolePage/console/ssh/ssh.component';
import {ConsolePageComponent} from './ConsolePage/consolepage.component';
import {SearchComponent} from './ControlPage/search/search.component';
import {CleftbarComponent} from './ControlPage/cleftbar/cleftbar.component';
import {ControlComponent} from './ControlPage/control/control.component';
import {ControlnavComponent} from './ControlPage/control/controlnav/controlnav.component';
import {RdpComponent} from './ControlPage/control/rdp/rdp.component';
import {SshComponent} from './ControlPage/control/ssh/ssh.component';
import {ControlPageComponent} from './ControlPage/controlpage.component';
import {IndexPageComponent} from './IndexPage/index-page.component';
......@@ -47,9 +47,9 @@ import {IndexPageComponent} from './IndexPage/index-page.component';
SearchComponent,
IleftbarComponent,
CleftbarComponent,
ConsoleComponent,
ConsolenavComponent,
ConsolePageComponent,
ControlComponent,
ControlnavComponent,
ControlPageComponent,
IndexPageComponent
// HeroListComponent,
// CrisisListComponent,
......
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