Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
luna
Commits
456bc3e4
Commit
456bc3e4
authored
Jan 24, 2018
by
zheng liu
Browse files
Options
Browse Files
Download
Plain Diff
Merged in dev (pull request #44)
fix: update
parents
411689e0
766228c6
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
61 additions
and
41 deletions
+61
-41
package.json
package.json
+1
-1
login.component.ts
src/app/BasicPage/login/login.component.ts
+2
-4
cleftbar.component.ts
src/app/ControlPage/cleftbar/cleftbar.component.ts
+2
-3
search.component.ts
src/app/ControlPage/search/search.component.ts
+2
-3
ileftbar.component.ts
src/app/IndexPage/ileftbar/ileftbar.component.ts
+2
-3
app.module.ts
src/app/app.module.ts
+9
-12
app.service.ts
src/app/app.service.ts
+37
-5
footer.component.ts
src/app/elements/footer/footer.component.ts
+2
-3
nav.component.ts
src/app/elements/nav/nav.component.ts
+2
-4
replay-page.component.ts
src/app/replay-page/replay-page.component.ts
+2
-3
No files found.
package.json
View file @
456bc3e4
...
...
@@ -4,7 +4,7 @@
"license"
:
"GPLv3"
,
"scripts"
:
{
"ng"
:
"ng"
,
"start"
:
"ng serve --proxy-config proxy.conf.json
--preserve-symlinks --port 4202
"
,
"start"
:
"ng serve --proxy-config proxy.conf.json"
,
"build"
:
"ng build -prod --base-href=/luna/ --deploy '/luna/'"
,
"test"
:
"ng test"
,
"lint"
:
"ng lint"
,
...
...
src/app/BasicPage/login/login.component.ts
View file @
456bc3e4
...
...
@@ -6,14 +6,12 @@
* @author liuzheng <liuzheng712@gmail.com>
*/
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
NGXLogger
}
from
'ngx-logger'
;
import
{
AppService
,
HttpService
}
from
'../../app.service'
;
import
{
AppService
,
HttpService
,
LogService
}
from
'../../app.service'
;
import
{
NgForm
}
from
'@angular/forms'
;
import
{
Router
}
from
'@angular/router'
;
import
{
DataStore
,
User
}
from
'../../globals'
;
import
*
as
jQuery
from
'jquery/dist/jquery.min.js'
;
@
Component
({
selector
:
'app-login'
,
templateUrl
:
'./login.component.html'
,
...
...
@@ -27,7 +25,7 @@ export class LoginComponent implements OnInit {
constructor
(
private
_appService
:
AppService
,
private
_http
:
HttpService
,
private
_router
:
Router
,
private
_logger
:
NGXLogger
)
{
private
_logger
:
LogService
)
{
this
.
_logger
.
log
(
'login.ts:LoginComponent'
);
DataStore
.
NavShow
=
false
;
}
...
...
src/app/ControlPage/cleftbar/cleftbar.component.ts
View file @
456bc3e4
...
...
@@ -8,8 +8,7 @@
*/
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
NGXLogger
}
from
'ngx-logger'
;
import
{
AppService
,
HttpService
}
from
'../../app.service'
;
import
{
AppService
,
HttpService
,
LogService
}
from
'../../app.service'
;
import
{
SearchComponent
}
from
'../search/search.component'
;
import
{
DataStore
}
from
'../../globals'
;
import
{
version
}
from
'../../../environments/environment'
;
...
...
@@ -83,7 +82,7 @@ export class CleftbarComponent implements OnInit {
constructor
(
private
_appService
:
AppService
,
private
_http
:
HttpService
,
private
_search
:
SearchComponent
,
private
_logger
:
NGXLogger
,
private
_logger
:
LogService
,
private
_menu
:
ElementServerMenuComponent
)
{
this
.
_logger
.
log
(
'nav.ts:NavComponent'
);
// this._appService.getnav()
...
...
src/app/ControlPage/search/search.component.ts
View file @
456bc3e4
...
...
@@ -7,8 +7,7 @@
*/
import
{
Component
,
OnChanges
,
Input
,
Pipe
,
PipeTransform
}
from
'@angular/core'
;
import
{
AppService
,
HttpService
}
from
'../../app.service'
;
import
{
NGXLogger
}
from
'ngx-logger'
;
import
{
AppService
,
HttpService
,
LogService
}
from
'../../app.service'
;
export
let
Q
=
''
;
...
...
@@ -24,7 +23,7 @@ export class SearchComponent implements OnChanges {
constructor
(
private
_appService
:
AppService
,
private
_http
:
HttpService
,
private
_logger
:
NGXLogger
)
{
private
_logger
:
LogService
)
{
this
.
_logger
.
log
(
'LeftbarComponent.ts:SearchBar'
);
}
...
...
src/app/IndexPage/ileftbar/ileftbar.component.ts
View file @
456bc3e4
...
...
@@ -6,8 +6,7 @@
* @author liuzheng <liuzheng712@gmail.com>
*/
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
AppService
}
from
'../../app.service'
;
import
{
NGXLogger
}
from
'ngx-logger'
;
import
{
AppService
,
LogService
}
from
'../../app.service'
;
@
Component
({
selector
:
'app-ileftbar'
,
...
...
@@ -17,7 +16,7 @@ import {NGXLogger} from 'ngx-logger';
export
class
IleftbarComponent
implements
OnInit
{
constructor
(
private
_appService
:
AppService
,
private
_logger
:
NGXLogger
)
{
private
_logger
:
LogService
)
{
this
.
_logger
.
log
(
'nav.ts:NavComponent'
);
// this._appService.getnav()
}
...
...
src/app/app.module.ts
View file @
456bc3e4
...
...
@@ -10,16 +10,16 @@
* @author liuzheng <liuzheng712@gmail.com>
*/
import
{
BrowserModule
}
from
'@angular/platform-browser'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
ClassProvider
,
NgModule
}
from
'@angular/core'
;
import
{
FormsModule
}
from
'@angular/forms'
;
// <-- NgModel lives here
import
{
NGXLogger
,
LoggerConfig
,
NgxLoggerLevel
as
LoggerLevel
}
from
'ngx-logger'
;
//
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
{
AppService
,
HttpService
,
LogService
}
from
'./app.service'
;
import
{
LayerService
}
from
'./elements/layer/layer.service'
;
// Elements
...
...
@@ -50,10 +50,9 @@ 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
{
NgProgressModule
}
from
'ngx-progressbar'
;
import
{
TestPageComponent
}
from
'./test-page/test-page.component'
;
import
{
HttpClient
,
HttpHandler
}
from
'@angular/common/http'
;
// import {NgxLayerModule} from 'ngx-layer';
@
NgModule
({
...
...
@@ -98,14 +97,12 @@ import {HttpClient, HttpHandler} from '@angular/common/http';
],
bootstrap
:
[
AppComponent
],
providers
:
[
{
provide
:
LoggerConfig
,
useValue
:
{
level
:
LoggerLevel
.
WARN
}},
{
provide
:
BrowserXhr
,
useClass
:
NgProgressBrowserXhr
},
//
{provide: LoggerConfig, useValue: {level: LoggerLevel.WARN}},
//
{provide: BrowserXhr, useClass: NgProgressBrowserXhr},
AppService
,
HttpService
,
LayerService
,
HttpClient
,
HttpHandler
,
NGXLogger
LogService
,
LayerService
]
})
export
class
AppModule
{
...
...
src/app/app.service.ts
View file @
456bc3e4
...
...
@@ -9,10 +9,10 @@ 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
{
NGXLogger
}
from
'ngx-logger'
;
import
'rxjs/add/operator/map'
;
import
'rxjs/add/operator/catch'
;
import
{
DataStore
,
User
,
Browser
}
from
'./globals'
;
import
{
environment
}
from
'../environments/environment'
;
declare
function
unescape
(
s
:
string
):
string
;
...
...
@@ -89,13 +89,44 @@ export class HttpService {
}
@
Injectable
()
export
class
LogService
{
constructor
()
{
}
trace
(
message
:
any
,
...
additional
:
any
[])
{
console
.
log
(
message
,
additional
.
join
(
' '
));
}
debug
(
message
:
any
,
...
additional
:
any
[])
{
console
.
log
(
message
,
additional
.
join
(
' '
));
}
info
(
message
:
any
,
...
additional
:
any
[])
{
console
.
log
(
message
,
additional
.
join
(
' '
));
}
log
(
message
:
any
,
...
additional
:
any
[])
{
console
.
log
(
message
,
additional
.
join
(
' '
));
}
warn
(
message
:
any
,
...
additional
:
any
[])
{
console
.
log
(
message
,
additional
.
join
(
' '
));
}
error
(
message
:
any
,
...
additional
:
any
[])
{
console
.
log
(
message
,
additional
.
join
(
' '
));
}
}
@
Injectable
()
export
class
AppService
implements
OnInit
{
// user:User = user ;
constructor
(
private
_http
:
HttpService
,
private
_router
:
Router
,
private
_logger
:
NGXLogger
)
{
private
_logger
:
LogService
)
{
// if (Cookie.get('loglevel')) {
// // 0.- Level.OFF
// // 1.- Level.ERROR
...
...
@@ -115,13 +146,14 @@ export class AppService implements OnInit {
// this._logger.level = 0;
// }
this
.
checklogin
();
if
(
environment
.
production
)
{
this
.
checklogin
();
}
}
ngOnInit
()
{
}
checklogin
()
{
this
.
_logger
.
log
(
'service.ts:AppService,checklogin'
);
if
(
DataStore
.
Path
)
{
...
...
@@ -182,7 +214,6 @@ export class AppService implements OnInit {
}
}
browser
()
{
this
.
_http
.
post
(
'/api/browser'
,
JSON
.
stringify
(
Browser
)).
map
(
res
=>
res
.
json
()).
subscribe
();
}
...
...
@@ -314,3 +345,4 @@ export class AppService implements OnInit {
//
// }
}
src/app/elements/footer/footer.component.ts
View file @
456bc3e4
...
...
@@ -6,8 +6,7 @@
* @author liuzheng <liuzheng712@gmail.com>
*/
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
AppService
}
from
'../../app.service'
;
import
{
NGXLogger
}
from
'ngx-logger'
;
import
{
AppService
,
LogService
}
from
'../../app.service'
;
import
{
DataStore
,
User
}
from
'../../globals'
;
import
{
version
}
from
'../../../environments/environment'
;
...
...
@@ -22,7 +21,7 @@ export class ElementFooterComponent implements OnInit {
version
=
version
;
constructor
(
private
_appService
:
AppService
,
private
_logger
:
NGXLogger
)
{
private
_logger
:
LogService
)
{
this
.
_logger
.
log
(
'nav.ts:NavComponent'
);
// this._appService.getnav()
}
...
...
src/app/elements/nav/nav.component.ts
View file @
456bc3e4
...
...
@@ -6,9 +6,7 @@
* @author liuzheng <liuzheng712@gmail.com>
*/
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
NGXLogger
}
from
'ngx-logger'
;
import
{
AppService
,
HttpService
}
from
'../../app.service'
;
import
{
AppService
,
HttpService
,
LogService
}
from
'../../app.service'
;
import
{
CleftbarComponent
}
from
'../../ControlPage/cleftbar/cleftbar.component'
;
import
{
ControlComponent
,
NavList
}
from
'../../ControlPage/control/control.component'
;
import
{
DataStore
}
from
'../../globals'
;
...
...
@@ -30,7 +28,7 @@ export class ElementNavComponent implements OnInit {
constructor
(
private
_appService
:
AppService
,
private
_http
:
HttpService
,
private
_logger
:
NGXLogger
)
{
private
_logger
:
LogService
)
{
this
.
_logger
.
log
(
'nav.ts:NavComponent'
);
this
.
getnav
();
}
...
...
src/app/replay-page/replay-page.component.ts
View file @
456bc3e4
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ActivatedRoute
,
Params
}
from
'@angular/router'
;
import
{
NGXLogger
}
from
'ngx-logger'
;
import
{
HttpService
}
from
'../app.service'
;
import
{
HttpService
,
LogService
}
from
'../app.service'
;
import
{
Video
,
DataStore
}
from
'../globals'
;
@
Component
({
...
...
@@ -14,7 +13,7 @@ export class ReplayPageComponent implements OnInit {
constructor
(
private
activatedRoute
:
ActivatedRoute
,
private
_http
:
HttpService
,
private
_logger
:
NGXLogger
)
{
private
_logger
:
LogService
)
{
// this.video = {'type': 'none'};
DataStore
.
NavShow
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment