Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d7ffbd70
authored
Aug 03, 2018
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed all lint errors
1 parent
57efe091
Pipeline
#76
failed
in 0 seconds
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
29 additions
and
41 deletions
code/moya-angular/karma.conf.js
code/moya-angular/package.json
code/moya-angular/src/app/app.component.html
code/moya-angular/src/app/app.module.ts
code/moya-angular/src/app/menu/left-menu/left-menu.component.ts
code/moya-angular/src/app/menu/left-menu/left-menu.module.ts
code/moya-angular/src/app/menu/top-menu/top-menu.component.ts
code/moya-angular/src/app/modules/old-moya/old-moya.component.ts
code/moya-angular/src/app/modules/viplist/info/info-viplist-page.component.ts
code/moya-angular/karma.conf.js
View file @
d7ffbd7
// Karma configuration file, see link for more information
// Karma configuration file, see link for more information
// https://karma-runner.github.io/
0.13
/config/configuration-file.html
// https://karma-runner.github.io/
1.0
/config/configuration-file.html
module
.
exports
=
function
(
config
)
{
module
.
exports
=
function
(
config
)
{
config
.
set
({
config
.
set
({
basePath
:
''
,
basePath
:
''
,
frameworks
:
[
'jasmine'
,
'
angular-
cli'
],
frameworks
:
[
'jasmine'
,
'
@angular/
cli'
],
plugins
:
[
plugins
:
[
require
(
'karma-jasmine'
),
require
(
'karma-jasmine'
),
require
(
'karma-chrome-launcher'
),
require
(
'karma-chrome-launcher'
),
require
(
'karma-remap-istanbul'
),
require
(
'karma-jasmine-html-reporter'
),
require
(
'angular-cli/plugins/karma'
)
require
(
'karma-coverage-istanbul-reporter'
),
require
(
'@angular/cli/plugins/karma'
)
],
],
files
:
[
client
:{
{
pattern
:
'./src/test.ts'
,
watched
:
false
}
clearContext
:
false
// leave Jasmine Spec Runner output visible in browser
],
preprocessors
:
{
'./src/test.ts'
:
[
'angular-cli'
]
},
mime
:
{
'text/x-typescript'
:
[
'ts'
,
'tsx'
]
},
},
remapIstanbulReporter
:
{
coverageIstanbulReporter
:
{
reports
:
{
reports
:
[
'html'
,
'lcovonly'
],
html
:
'coverage'
,
fixWebpackSourcePaths
:
true
lcovonly
:
'./coverage/coverage.lcov'
}
},
},
angularCli
:
{
angularCli
:
{
config
:
'./angular-cli.json'
,
environment
:
'dev'
environment
:
'dev'
},
},
reporters
:
config
.
angularCli
&&
config
.
angularCli
.
codeCoverage
reporters
:
[
'progress'
,
'kjhtml'
],
?
[
'progress'
,
'karma-remap-istanbul'
]
:
[
'progress'
],
port
:
9876
,
port
:
9876
,
colors
:
true
,
colors
:
true
,
logLevel
:
config
.
LOG_INFO
,
logLevel
:
config
.
LOG_INFO
,
...
...
code/moya-angular/package.json
View file @
d7ffbd7
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
"aot"
:
"ng build --aot"
,
"aot"
:
"ng build --aot"
,
"test"
:
"ng test"
,
"test"
:
"ng test"
,
"lint"
:
"ng lint"
,
"lint"
:
"ng lint"
,
"test-n-build
_RESTORE_WHEN_LINT_AND_TEST_FIXED"
:
"ng lint && ng tes
t && ng build"
,
"test-n-build
"
:
"ng lin
t && ng build"
,
"test-n-build
"
:
"
ng build"
,
"test-n-build
_ENABLE_WHEN_KARMA_WORKS"
:
"ng lint && ng test &&
ng build"
,
"e2e"
:
"ng e2e"
,
"e2e"
:
"ng e2e"
,
"version"
:
"ng version"
"version"
:
"ng version"
},
},
...
...
code/moya-angular/src/app/app.component.html
View file @
d7ffbd7
<div
id=
"top-container"
>
<div
id=
"top-container"
>
<div
id=
"left-menu"
>
<div
id=
"left-menu"
>
<
left-menu></
left-menu>
<
moya-left-menu></moya-
left-menu>
</div>
</div>
<div
id=
"contentarea"
>
<div
id=
"contentarea"
>
<div
id=
"topbar"
>
<div
id=
"topbar"
>
<
top-menu></
top-menu>
<
moya-top-menu></moya-
top-menu>
<moya-locale></moya-locale>
<moya-locale></moya-locale>
</div>
</div>
<div
id=
"content"
>
<div
id=
"content"
>
...
...
code/moya-angular/src/app/app.module.ts
View file @
d7ffbd7
...
@@ -31,7 +31,7 @@ import { FrontpageComponent } from './components/frontpage/frontpage.component';
...
@@ -31,7 +31,7 @@ import { FrontpageComponent } from './components/frontpage/frontpage.component';
HttpClientModule
,
HttpClientModule
,
LoginModule
,
LoginModule
,
LeftMenuModule
,
LeftMenuModule
,
AlertModule
.
forRoot
(),
AlertModule
.
forRoot
(),
...
...
code/moya-angular/src/app/menu/left-menu/left-menu.component.ts
View file @
d7ffbd7
...
@@ -2,10 +2,10 @@ import {Component, OnInit} from '@angular/core';
...
@@ -2,10 +2,10 @@ import {Component, OnInit} from '@angular/core';
import
{
MenuGroup
}
from
'../models/menu-group.model'
;
import
{
MenuGroup
}
from
'../models/menu-group.model'
;
import
{
MENU
}
from
'../defines/menu'
;
import
{
MENU
}
from
'../defines/menu'
;
import
{
ActivatedRoute
,
Router
,
RouterEvent
,
UrlSegment
}
from
'@angular/router'
;
import
{
ActivatedRoute
,
Router
,
RouterEvent
,
UrlSegment
}
from
'@angular/router'
;
import
{
TranslatePipe
}
from
"@ngx-translate/core"
;
import
{
TranslatePipe
}
from
'@ngx-translate/core'
;
@
Component
({
@
Component
({
selector
:
'left-menu'
,
selector
:
'
moya-
left-menu'
,
templateUrl
:
'./left-menu.component.html'
,
templateUrl
:
'./left-menu.component.html'
,
styleUrls
:
[
'./left-menu.component.scss'
],
styleUrls
:
[
'./left-menu.component.scss'
],
providers
:
[
TranslatePipe
]
providers
:
[
TranslatePipe
]
...
@@ -16,23 +16,21 @@ export class LeftMenuComponent {
...
@@ -16,23 +16,21 @@ export class LeftMenuComponent {
styleClass
:
string
;
styleClass
:
string
;
searchPath
(
path
:
string
,
menu
:
MenuGroup
[]):
boolean
{
searchPath
(
path
:
string
,
groups
:
MenuGroup
[]):
boolean
{
for
(
const
i
in
menu
)
{
for
(
const
group
of
groups
)
{
for
(
const
n
in
menu
[
i
].
items
)
{
for
(
const
item
of
group
.
items
)
{
const
item
=
menu
[
i
].
items
[
n
];
if
(
path
.
startsWith
(
item
.
path
))
{
if
(
path
.
startsWith
(
item
.
path
))
{
return
true
;
return
true
;
}
}
}
}
}
}
return
false
;
return
false
;
}
}
constructor
(
private
route
:
Router
)
{
constructor
(
private
route
:
Router
)
{
route
.
events
.
filter
(
e
=>
e
instanceof
RouterEvent
).
subscribe
(
event
=>
{
route
.
events
.
filter
(
e
=>
e
instanceof
RouterEvent
).
subscribe
(
event
=>
{
...
@@ -59,18 +57,18 @@ export class LeftMenuComponent {
...
@@ -59,18 +57,18 @@ export class LeftMenuComponent {
}
}
activateInfo
()
{
activateInfo
()
{
this
.
menu
=
MENU
.
INFO
;
this
.
menu
=
MENU
.
INFO
;
this
.
styleClass
=
'infoMenu'
;
this
.
styleClass
=
'infoMenu'
;
}
}
activateUser
()
{
activateUser
()
{
this
.
menu
=
MENU
.
USER
;
this
.
menu
=
MENU
.
USER
;
this
.
styleClass
=
'userMenu'
;
this
.
styleClass
=
'userMenu'
;
}
}
activateAdmin
()
{
activateAdmin
()
{
this
.
menu
=
MENU
.
ADMIN
;
this
.
menu
=
MENU
.
ADMIN
;
this
.
styleClass
=
'adminMenu'
;
this
.
styleClass
=
'adminMenu'
;
}
}
...
...
code/moya-angular/src/app/menu/left-menu/left-menu.module.ts
View file @
d7ffbd7
...
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
...
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import
{
CommonModule
}
from
'@angular/common'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
LeftMenuComponent
}
from
'./left-menu.component'
;
import
{
LeftMenuComponent
}
from
'./left-menu.component'
;
import
{
RouterModule
}
from
'@angular/router'
;
import
{
RouterModule
}
from
'@angular/router'
;
import
{
TranslateModule
}
from
"@ngx-translate/core"
;
import
{
TranslateModule
}
from
'@ngx-translate/core'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
...
...
code/moya-angular/src/app/menu/top-menu/top-menu.component.ts
View file @
d7ffbd7
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
@
Component
({
selector
:
'top-menu'
,
selector
:
'
moya-
top-menu'
,
templateUrl
:
'./top-menu.component.html'
,
templateUrl
:
'./top-menu.component.html'
,
styleUrls
:
[
'./top-menu.component.scss'
]
styleUrls
:
[
'./top-menu.component.scss'
]
})
})
...
...
code/moya-angular/src/app/modules/old-moya/old-moya.component.ts
View file @
d7ffbd7
...
@@ -3,7 +3,7 @@ import {Location, LocationStrategy, HashLocationStrategy, PathLocationStrategy}
...
@@ -3,7 +3,7 @@ import {Location, LocationStrategy, HashLocationStrategy, PathLocationStrategy}
import
{
NavigationExtras
,
ActivatedRoute
,
Router
}
from
'@angular/router'
;
import
{
NavigationExtras
,
ActivatedRoute
,
Router
}
from
'@angular/router'
;
@
Component
({
@
Component
({
selector
:
'
old-moya
'
,
selector
:
'
moya-old
'
,
providers
:
[
Location
,
{
provide
:
LocationStrategy
,
useClass
:
PathLocationStrategy
}],
providers
:
[
Location
,
{
provide
:
LocationStrategy
,
useClass
:
PathLocationStrategy
}],
templateUrl
:
'./old-moya.component.html'
,
templateUrl
:
'./old-moya.component.html'
,
styleUrls
:
[
'./old-moya.component.scss'
]
styleUrls
:
[
'./old-moya.component.scss'
]
...
...
code/moya-angular/src/app/modules/viplist/info/info-viplist-page.component.ts
View file @
d7ffbd7
...
@@ -2,7 +2,7 @@ import {Component, NgZone, OnInit} from '@angular/core';
...
@@ -2,7 +2,7 @@ import {Component, NgZone, OnInit} from '@angular/core';
import
{
Observable
}
from
'rxjs/Observable'
;
import
{
Observable
}
from
'rxjs/Observable'
;
import
{
Vip
}
from
'../models/vip.model'
;
import
{
Vip
}
from
'../models/vip.model'
;
import
{
ViplistService
}
from
'../viplist.service'
;
import
{
ViplistService
}
from
'../viplist.service'
;
import
{
TranslatePipe
}
from
"@ngx-translate/core"
;
import
{
TranslatePipe
}
from
'@ngx-translate/core'
;
@
Component
({
@
Component
({
selector
:
'moya-viplist'
,
selector
:
'moya-viplist'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment