Commit 15d6acf8 authored by zheng liu's avatar zheng liu

Merged in dev (pull request #42)

Dev
parents 08170978 9efde032
......@@ -22,7 +22,6 @@
"styles": [
"../node_modules/layui-layer/dist/theme/default/layer.css",
"../node_modules/animate.css/animate.min.css",
"assets/inspinia/style.scss",
"../node_modules/xterm/dist/xterm.css",
"sass/style.scss",
"styles.css"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4,7 +4,7 @@
"license": "GPLv3",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"start": "ng serve --proxy-config proxy.conf.json --preserve-symlinks",
"build": "ng build -prod --base-href=/luna/ --deploy '/luna/'",
"test": "ng test",
"lint": "ng lint",
......@@ -12,29 +12,29 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^4.2.4",
"@angular/cdk": "^2.0.0-beta.12",
"@angular/common": "^4.2.4",
"@angular/compiler": "^4.2.4",
"@angular/core": "^4.2.4",
"@angular/forms": "^4.2.4",
"@angular/http": "^4.2.4",
"@angular/platform-browser": "^4.2.4",
"@angular/platform-browser-dynamic": "^4.2.4",
"@angular/router": "^4.2.4",
"angular2-logger": "^0.6.0",
"@angular/animations": "5.2.0",
"@angular/cdk": "^5.1.0",
"@angular/common": "5.2.0",
"@angular/compiler": "5.2.0",
"@angular/core": "5.2.0",
"@angular/forms": "5.2.0",
"@angular/http": "5.2.0",
"@angular/platform-browser": "5.2.0",
"@angular/platform-browser-dynamic": "5.2.0",
"@angular/router": "5.2.0",
"animate.css": "^3.5.2",
"body-parser": "^1.18.2",
"bootstrap": "^4.0.0-beta.3",
"clipboard": "^1.7.1",
"compass-mixins": "^0.12.10",
"core-js": "^2.4.1",
"core-js": "2.5.3",
"directory-encoder": "^0.9.2",
"filetree-css": "^1.0.0",
"font-awesome": "^4.7.0",
"font-awesome": "4.7.0",
"handlebars": "^4.0.11",
"inconsolata": "0.0.2",
"jquery": "^3.1.0",
"intl": "1.2.5",
"jquery": "3.2.1",
"jquery-slimscroll": "^1.3.8",
"jquery-sparkline": "^2.4.0",
"jvectormap": "1.2.2",
......@@ -45,14 +45,17 @@
"ng2-charts": "^1.5.0",
"ng2-cookies": "^1.0.12",
"ngx-bootstrap": "^1.6.6",
"ngx-contextmenu": "^4.1.1",
"ngx-layer": "0.0.4",
"ngx-logger": "^1.1.2",
"ngx-perfect-scrollbar": "5.2.0",
"ngx-progressbar": "^2.1.1",
"node": "^9.3.0",
"npm": "^5.6.0",
"npm-font-open-sans": "^1.1.0",
"peity": "^3.2.1",
"popper.js": "^1.12.9",
"popper.js": "1.12.9",
"roboto-fontface": "^0.8.0",
"rxjs": "^5.4.2",
"rxjs": "5.5.6",
"sass-math": "^1.0.0",
"socket.io": "^2.0.3",
"socket.io-client": "^2.0.4",
......@@ -61,28 +64,31 @@
"tether": "^1.4.0",
"uuid-js": "^0.7.5",
"xterm": "^2.9.2",
"zone.js": "^0.8.14"
"zone.js": "0.8.20"
},
"devDependencies": {
"@angular/cli": "1.5.2",
"@angular/compiler-cli": "^4.2.4",
"@angular/language-service": "^4.2.4",
"@types/jasmine": "~2.5.53",
"@angular-devkit/core": "0.0.28",
"@angular-devkit/schematics": "0.0.42",
"@angular/cli": "^1.6.5",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"node-sass": "^4.7.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.3.2",
"typescript": "~2.3.3"
"@angular/compiler-cli": "5.2.0",
"@angular/language-service": "5.2.0",
"@types/jasmine": "2.8.4",
"@types/node": "9.3.0",
"codelyzer": "4.0.2",
"jasmine-core": "2.8.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "2.0.0",
"karma-chrome-launcher": "2.2.0",
"karma-cli": "1.0.1",
"karma-coverage-istanbul-reporter": "1.3.3",
"karma-jasmine": "1.1.1",
"karma-jasmine-html-reporter": "0.2.2",
"protractor": "5.2.2",
"ts-node": "3.3.0",
"tslib": "1.8.1",
"tslint": "5.9.1",
"typescript": "2.4.2"
}
}
......@@ -6,7 +6,7 @@
* @author liuzheng <liuzheng712@gmail.com>
*/
import {Component, OnInit} from '@angular/core';
import {Logger} from 'angular2-logger/core';
import {NGXLogger} from 'ngx-logger';
import {AppService, HttpService} from '../../app.service';
import {NgForm} from '@angular/forms';
import {Router} from '@angular/router';
......@@ -18,7 +18,6 @@ import * as jQuery from 'jquery/dist/jquery.min.js';
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css'],
providers: [AppService]
})
export class LoginComponent implements OnInit {
DataStore = DataStore;
......@@ -28,7 +27,7 @@ export class LoginComponent implements OnInit {
constructor(private _appService: AppService,
private _http: HttpService,
private _router: Router,
private _logger: Logger) {
private _logger: NGXLogger) {
this._logger.log('login.ts:LoginComponent');
DataStore.NavShow = false;
}
......
......@@ -8,7 +8,7 @@
*/
import {Component, OnInit} from '@angular/core';
import {Logger} from 'angular2-logger/core';
import {NGXLogger} from 'ngx-logger';
import {AppService, HttpService} from '../../app.service';
import {SearchComponent} from '../search/search.component';
import {DataStore} from '../../globals';
......@@ -83,7 +83,7 @@ export class CleftbarComponent implements OnInit {
constructor(private _appService: AppService,
private _http: HttpService,
private _search: SearchComponent,
private _logger: Logger,
private _logger: NGXLogger,
private _menu: ElementServerMenuComponent) {
this._logger.log('nav.ts:NavComponent');
// this._appService.getnav()
......
div, app-element-term, app-element-guacamole {
div, app-element-term, app-element-iframe {
height: 100%;
padding-bottom: 30px;
}
div {
......
......@@ -11,6 +11,5 @@
[userid]="m.user.id"
[index]="i"
*ngIf="m.type=='rdp'">
</app-element-iframe>
</div>
......@@ -91,9 +91,18 @@
}
.tabs::-webkit-scrollbar {
height: 1px;
height: 2px;
}
.tabs::-webkit-scrollbar-thumb {
background-color: #19aa8d;
}
.scroll-botton {
font-size: 20px;
float: left;
height: 30px;
overflow: hidden;
background-color: #3a3333;
color: white
}
<div class="scroll-botton">
&nbsp; <a class="left" (click)="scrollleft()"><i class="fa fa-caret-left"></i></a>
&nbsp;
<a class="right" (click)="scrollright()"><i class="fa fa-caret-right"></i></a>
&nbsp;
</div>
<div class="tabs">
<ul [ngStyle]="{'width':150*NavList.List.length+'px'}">
<li *ngFor="let m of NavList.List;let i = index"
......
......@@ -11,7 +11,6 @@ import {Component, OnInit} from '@angular/core';
import {ControlComponent, NavList} from '../control.component';
import * as jQuery from 'jquery/dist/jquery.min.js';
@Component({
selector: 'app-controlnav',
templateUrl: './controlnav.component.html',
......@@ -64,5 +63,12 @@ export class ControlnavComponent implements OnInit {
ControlnavComponent.checkActive(index);
}
scrollleft() {
jQuery('.tabs').scrollLeft(jQuery('.tabs').scrollLeft() - 100);
}
scrollright() {
jQuery('.tabs').scrollLeft(jQuery('.tabs').scrollLeft() + 100);
}
}
......@@ -13,8 +13,6 @@ import {DataStore, User} from '../globals';
selector: 'app-controllpage',
templateUrl: './controlpage.component.html',
styleUrls: ['./controlpage.component.css'],
providers: [AppService]
})
export class ControlPageComponent implements OnInit {
DataStore = DataStore;
......
......@@ -7,9 +7,8 @@
*/
import {Component, OnChanges, Input, Pipe, PipeTransform} from '@angular/core';
import {Logger} from 'angular2-logger/core';
import {AppService, HttpService} from '../../app.service';
import {NGXLogger} from 'ngx-logger';
export let Q = '';
......@@ -25,7 +24,7 @@ export class SearchComponent implements OnChanges {
constructor(private _appService: AppService,
private _http: HttpService,
private _logger: Logger) {
private _logger: NGXLogger) {
this._logger.log('LeftbarComponent.ts:SearchBar');
}
......
......@@ -6,9 +6,8 @@
* @author liuzheng <liuzheng712@gmail.com>
*/
import {Component, OnInit} from '@angular/core';
import {Logger} from 'angular2-logger/core';
import {AppService} from '../../app.service';
import {NGXLogger} from 'ngx-logger';
@Component({
selector: 'app-ileftbar',
......@@ -18,7 +17,7 @@ import {AppService} from '../../app.service';
export class IleftbarComponent implements OnInit {
constructor(private _appService: AppService,
private _logger: Logger) {
private _logger:NGXLogger) {
this._logger.log('nav.ts:NavComponent');
// this._appService.getnav()
}
......
......@@ -13,7 +13,6 @@ import {User} from '../globals';
selector: 'app-index-page',
templateUrl: './index-page.component.html',
styleUrls: ['./index-page.component.css'],
providers: [AppService]
})
export class IndexPageComponent implements OnInit {
User = User;
......
......@@ -24,7 +24,7 @@ const appRoutes: Routes = [
{path: 'term/:token', component: TermPageComponent},
{path: 'replay/:token', component: ReplayPageComponent},
{path: 'monitor/:token', component: MonitorPageComponent},
{path: 'test', component: ElementServerMenuComponent},
{path: 'test', component: TermPageComponent},
{path: '', component: ControlPageComponent},
{path: '**', component: NotFoundComponent}
];
......
<ng-progress></ng-progress>
<app-element-nav *ngIf="DataStore.NavShow"></app-element-nav>
<router-outlet></router-outlet>
<!--<app-element-interactive></app-element-interactive>-->
......@@ -13,7 +13,6 @@ import {DataStore} from './globals';
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
providers: [AppService, HttpService],
// directives: [LeftbarComponent, TermComponent]
})
......
......@@ -12,23 +12,27 @@
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms'; // <-- NgModel lives here
import {Logger, Options, Level as LoggerLevel} from 'angular2-logger/core';
import {NGXLogger, LoggerConfig, NgxLoggerLevel as LoggerLevel} from 'ngx-logger';
import {HttpModule} from '@angular/http';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
// service
import {AppService, HttpService} from './app.service';
import {LayerService} from './elements/layer/layer.service';
// Elements
import {ElementFooterComponent} from './elements/footer/footer.component';
import {ElementTermComponent} from './elements/term/term.component';
import {ElementInteractiveComponent} from './elements/interactive/interactive.component';
import {ElementNavComponent} from './elements/nav/nav.component';
import {LoginComponent} from './BasicPage/login/login.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';
// 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} from './ControlPage/cleftbar/cleftbar.component';
......@@ -46,6 +50,11 @@ 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 {BrowserXhr} from '@angular/http';
import {NgProgressModule, NgProgressBrowserXhr} from 'ngx-progressbar';
import {TestPageComponent} from './test-page/test-page.component';
import {HttpClient, HttpHandler} from '@angular/common/http';
// import {NgxLayerModule} from 'ngx-layer';
@NgModule({
imports: [
......@@ -53,6 +62,8 @@ import {WindowsComponent} from './monitor-page/windows/windows.component';
FormsModule,
AppRoutingModule,
HttpModule,
NgProgressModule,
// NgxLayerModule
],
declarations: [
AppComponent,
......@@ -83,11 +94,18 @@ import {WindowsComponent} from './monitor-page/windows/windows.component';
MonitorPageComponent,
LinuxComponent,
WindowsComponent,
TestPageComponent,
],
bootstrap: [AppComponent],
providers: [
{provide: Options, useValue: {store: false, level: LoggerLevel.WARN}},
Logger
{provide: LoggerConfig, useValue: {level: LoggerLevel.WARN}},
{provide: BrowserXhr, useClass: NgProgressBrowserXhr},
AppService,
HttpService,
LayerService,
NGXLogger,
HttpClient,
HttpHandler
]
})
export class AppModule {
......
......@@ -8,8 +8,8 @@
import {Injectable, OnInit} from '@angular/core';
import {Http, RequestOptionsArgs, Headers} from '@angular/http';
import {Router} from '@angular/router';
import {Cookie} from 'ng2-cookies/ng2-cookies';
import {Logger} from 'angular2-logger/core';
// import {Cookie} from 'ng2-cookies/ng2-cookies';
import {NGXLogger} from 'ngx-logger';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import {DataStore, User, Browser} from './globals';
......@@ -94,25 +94,25 @@ export class AppService implements OnInit {
constructor(private _http: HttpService,
private _router: Router,
private _logger: Logger) {
if (Cookie.get('loglevel')) {
// 0.- Level.OFF
// 1.- Level.ERROR
// 2.- Level.WARN
// 3.- Level.INFO
// 4.- Level.DEBUG
// 5.- Level.LOG
this._logger.level = parseInt(Cookie.get('loglevel'), 10);
// this._logger.debug('Your debug stuff');
// this._logger.info('An info');
// this._logger.warn('Take care ');
// this._logger.error('Too late !');
// this._logger.log('log !');
} else {
Cookie.set('loglevel', '0', 99, '/', document.domain);
// this._logger.level = parseInt(Cookie.getCookie('loglevel'));
this._logger.level = 0;
}
private _logger: NGXLogger) {
// if (Cookie.get('loglevel')) {
// // 0.- Level.OFF
// // 1.- Level.ERROR
// // 2.- Level.WARN
// // 3.- Level.INFO
// // 4.- Level.DEBUG
// // 5.- Level.LOG
// this._logger.level = parseInt(Cookie.get('loglevel'), 10);
// // this._logger.debug('Your debug stuff');
// // this._logger.info('An info');
// // this._logger.warn('Take care ');
// // this._logger.error('Too late !');
// // this._logger.log('log !');
// } else {
// Cookie.set('loglevel', '0', 99, '/', document.domain);
// // this._logger.level = parseInt(Cookie.getCookie('loglevel'));
// this._logger.level = 0;
// }
// this.checklogin();
}
......
......@@ -7,7 +7,7 @@
*/
import {Component, OnInit} from '@angular/core';
import {AppService} from '../../app.service';
import {Logger} from 'angular2-logger/core';
import {NGXLogger} from 'ngx-logger';
import {DataStore, User} from '../../globals';
import {version} from '../../../environments/environment';
......@@ -22,7 +22,7 @@ export class ElementFooterComponent implements OnInit {
version = version;
constructor(private _appService: AppService,
private _logger: Logger) {
private _logger: NGXLogger) {
this._logger.log('nav.ts:NavComponent');
// this._appService.getnav()
}
......
......@@ -17,7 +17,7 @@ export class ElementIframeComponent implements OnInit {
}
ngOnInit() {
this.target = 'https://wx.qq.com/';
this.target = 'http://localhost:8080/#/client/MwBjAHBvc3RncmVzcWw=';
}
trust(url) {
......
import {Injectable} from '@angular/core';
@Injectable()
export class LayerService {
constructor() {
}
dialog() {
}
confirm() {
}
tip() {
}
loading() {
}
alert() {
// alert('sss');
}
}
......@@ -6,7 +6,7 @@
* @author liuzheng <liuzheng712@gmail.com>
*/
import {Component, OnInit} from '@angular/core';
import {Logger} from 'angular2-logger/core';
import {NGXLogger} from 'ngx-logger';
import {AppService, HttpService} from '../../app.service';
import {CleftbarComponent} from '../../ControlPage/cleftbar/cleftbar.component';
......@@ -30,7 +30,7 @@ export class ElementNavComponent implements OnInit {
constructor(private _appService: AppService,
private _http: HttpService,
private _logger: Logger) {
private _logger: NGXLogger) {
this._logger.log('nav.ts:NavComponent');
this.getnav();
}
......
import {Component, OnInit} from '@angular/core';
import {LayerService} from '../layer/layer.service';
export class Menu {
name: string;
......@@ -9,14 +11,14 @@ export class Menu {
@Component({
selector: 'app-element-server-menu',
templateUrl: './server-menu.component.html',
styleUrls: ['./server-menu.component.scss']
styleUrls: ['./server-menu.component.scss'],
})
export class ElementServerMenuComponent implements OnInit {
MenuList: Array<any>;
top: number;
left: number;
constructor() {
constructor(private ly: LayerService) {
}
ngOnInit() {
......@@ -27,6 +29,7 @@ export class ElementServerMenuComponent implements OnInit {
m.type = 'lll';
line.type = 'line';
this.MenuList = [m, m, line, m, m];
this.ly.alert();
}
public contextmenu(top: number, left: number) {
......
......@@ -44,7 +44,7 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
}
} else {
term.col = Math.floor(jQuery(this.el.nativeElement).width() / jQuery('#liuzheng').width() * 8) - 3;
term.row = Math.floor(jQuery(this.el.nativeElement).height() / jQuery('#liuzheng').height()) - 5;
term.row = Math.floor(jQuery(this.el.nativeElement).height() / jQuery('#liuzheng').height()) - 3;
term.term = this.term;
}
this.term.open(this.el.nativeElement, true);
......
import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Params} from '@angular/router';
import {Logger} from 'angular2-logger/core';
import {NGXLogger} from 'ngx-logger';
import {HttpService} from '../app.service';
import {Video, DataStore} from '../globals';
......@@ -14,7 +14,7 @@ export class ReplayPageComponent implements OnInit {
constructor(private activatedRoute: ActivatedRoute,
private _http: HttpService,
private _logger: Logger) {
private _logger: NGXLogger) {
// this.video = {'type': 'none'};
DataStore.NavShow = false;
......@@ -38,6 +38,7 @@ export class ReplayPageComponent implements OnInit {
Video.totalTime = Video.timelist[Video.timelist.length - 1] * 1000;
},
err => {
alert('无法下载');
this._logger.error(err);
},
);
......
<p>
test-page works!
</p>
<!--<ngx-layer></ngx-layer>-->
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TestPageComponent } from './test-page.component';
describe('TestPageComponent', () => {
let component: TestPageComponent;
let fixture: ComponentFixture<TestPageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TestPageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TestPageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-test-page',
templateUrl: './test-page.component.html',
styleUrls: ['./test-page.component.scss']
})
export class TestPageComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
......@@ -9,3 +9,60 @@ $FontPathOpenSans: "~npm-font-open-sans/fonts";
@import '~npm-font-open-sans/open-sans';
$roboto-font-path: "~roboto-fontface/fonts";
@import "~roboto-fontface/css/mixins.scss";
/*
*
* INSPINIA - Responsive Admin Theme
* version 2.7.1
*
*/
$asset-path: '../static/imgs/inspinia';
// Variables, Mixins
@import "../assets/inspinia/imports/variables";
@import "../assets/inspinia/imports/mixins";
// INSPINIA Theme Elements
@import "../assets/inspinia/imports/typography";
@import "../assets/inspinia/imports/navigation";
@import "../assets/inspinia/imports/top_navigation";
@import "../assets/inspinia/imports/buttons";
@import "../assets/inspinia/imports/badges_labels";
@import "../assets/inspinia/imports/elements";
@import "../assets/inspinia/imports/sidebar";
@import "../assets/inspinia/imports/base";
@import "../assets/inspinia/imports/pages";
@import "../assets/inspinia/imports/chat";
@import "../assets/inspinia/imports/metismenu";
@import "../assets/inspinia/imports/spinners";
// Landing page styles
//@import "../assets/inspinia/imports/landing";
// RTL Support
@import "../assets/inspinia/imports/rtl";
// For demo only - config box style
@import "../assets/inspinia/imports/theme-config";
// INSPINIA Skins
@import "../assets/inspinia/imports/skins";
@import "../assets/inspinia/imports/md-skin";
// Media query style
@import "../assets/inspinia/imports/media";
// Custom style
// Your custom style to override base style
@import "../assets/inspinia/imports/custom";
// Clear layout on print mode
@media print {
nav.navbar-static-side {
display: none;
}
body { overflow: visible !important; }
#page-wrapper {
margin: 0;
}
}
......@@ -7,12 +7,12 @@
set -ex
git checkout publish && \
git checkout github_dev && \
git pull github dev --rebase && \
git merge master -m "publish" && \
git merge dev -m "publish" && \
git reset --soft HEAD^ && \
git commit -m "publish" && \
git push github publish:dev && \
git push github github_dev:dev && \
echo "success"
git checkout master
git pull github dev --commit && git push origin master
git checkout dev
git pull github dev --commit && git push origin dev
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