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 3b9b25d0
authored
Aug 03, 2018
by
Aino Leppänen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lint_fixes' into 'master'
fixed all lint errors See merge request
!411
2 parents
57efe091
d7ffbd70
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
37 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 @
3b9b25d
// 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
)
{
config
.
set
({
basePath
:
''
,
frameworks
:
[
'jasmine'
,
'
angular-
cli'
],
frameworks
:
[
'jasmine'
,
'
@angular/
cli'
],
plugins
:
[
require
(
'karma-jasmine'
),
require
(
'karma-chrome-launcher'
),
require
(
'karma-remap-istanbul'
),
require
(
'angular-cli/plugins/karma'
)
require
(
'karma-jasmine-html-reporter'
),
require
(
'karma-coverage-istanbul-reporter'
),
require
(
'@angular/cli/plugins/karma'
)
],
files
:
[
{
pattern
:
'./src/test.ts'
,
watched
:
false
}
],
preprocessors
:
{
'./src/test.ts'
:
[
'angular-cli'
]
},
mime
:
{
'text/x-typescript'
:
[
'ts'
,
'tsx'
]
client
:{
clearContext
:
false
// leave Jasmine Spec Runner output visible in browser
},
remapIstanbulReporter
:
{
reports
:
{
html
:
'coverage'
,
lcovonly
:
'./coverage/coverage.lcov'
}
coverageIstanbulReporter
:
{
reports
:
[
'html'
,
'lcovonly'
],
fixWebpackSourcePaths
:
true
},
angularCli
:
{
config
:
'./angular-cli.json'
,
environment
:
'dev'
},
reporters
:
config
.
angularCli
&&
config
.
angularCli
.
codeCoverage
?
[
'progress'
,
'karma-remap-istanbul'
]
:
[
'progress'
],
reporters
:
[
'progress'
,
'kjhtml'
],
port
:
9876
,
colors
:
true
,
logLevel
:
config
.
LOG_INFO
,
...
...
code/moya-angular/package.json
View file @
3b9b25d
...
...
@@ -10,8 +10,8 @@
"aot"
:
"ng build --aot"
,
"test"
:
"ng test"
,
"lint"
:
"ng lint"
,
"test-n-build
_RESTORE_WHEN_LINT_AND_TEST_FIXED"
:
"ng lint && ng tes
t && ng build"
,
"test-n-build
"
:
"
ng build"
,
"test-n-build
"
:
"ng lin
t && ng build"
,
"test-n-build
_ENABLE_WHEN_KARMA_WORKS"
:
"ng lint && ng test &&
ng build"
,
"e2e"
:
"ng e2e"
,
"version"
:
"ng version"
},
...
...
code/moya-angular/src/app/app.component.html
View file @
3b9b25d
<div
id=
"top-container"
>
<div
id=
"left-menu"
>
<
left-menu></
left-menu>
<
moya-left-menu></moya-
left-menu>
</div>
<div
id=
"contentarea"
>
<div
id=
"topbar"
>
<
top-menu></
top-menu>
<
moya-top-menu></moya-
top-menu>
<moya-locale></moya-locale>
</div>
<div
id=
"content"
>
...
...
code/moya-angular/src/app/app.module.ts
View file @
3b9b25d
code/moya-angular/src/app/menu/left-menu/left-menu.component.ts
View file @
3b9b25d
...
...
@@ -2,10 +2,10 @@ import {Component, OnInit} from '@angular/core';
import
{
MenuGroup
}
from
'../models/menu-group.model'
;
import
{
MENU
}
from
'../defines/menu'
;
import
{
ActivatedRoute
,
Router
,
RouterEvent
,
UrlSegment
}
from
'@angular/router'
;
import
{
TranslatePipe
}
from
"@ngx-translate/core"
;
import
{
TranslatePipe
}
from
'@ngx-translate/core'
;
@
Component
({
selector
:
'left-menu'
,
selector
:
'
moya-
left-menu'
,
templateUrl
:
'./left-menu.component.html'
,
styleUrls
:
[
'./left-menu.component.scss'
],
providers
:
[
TranslatePipe
]
...
...
@@ -16,23 +16,21 @@ export class LeftMenuComponent {
styleClass
:
string
;
searchPath
(
path
:
string
,
menu
:
MenuGroup
[]):
boolean
{
searchPath
(
path
:
string
,
groups
:
MenuGroup
[]):
boolean
{
for
(
const
i
in
menu
)
{
for
(
const
n
in
menu
[
i
].
items
)
{
const
item
=
menu
[
i
].
items
[
n
];
for
(
const
group
of
groups
)
{
for
(
const
item
of
group
.
items
)
{
if
(
path
.
startsWith
(
item
.
path
))
{
return
true
;
}
}
}
return
false
;
}
constructor
(
private
route
:
Router
)
{
route
.
events
.
filter
(
e
=>
e
instanceof
RouterEvent
).
subscribe
(
event
=>
{
...
...
code/moya-angular/src/app/menu/left-menu/left-menu.module.ts
View file @
3b9b25d
...
...
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import
{
CommonModule
}
from
'@angular/common'
;
import
{
LeftMenuComponent
}
from
'./left-menu.component'
;
import
{
RouterModule
}
from
'@angular/router'
;
import
{
TranslateModule
}
from
"@ngx-translate/core"
;
import
{
TranslateModule
}
from
'@ngx-translate/core'
;
@
NgModule
({
imports
:
[
...
...
code/moya-angular/src/app/menu/top-menu/top-menu.component.ts
View file @
3b9b25d
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'top-menu'
,
selector
:
'
moya-
top-menu'
,
templateUrl
:
'./top-menu.component.html'
,
styleUrls
:
[
'./top-menu.component.scss'
]
})
...
...
code/moya-angular/src/app/modules/old-moya/old-moya.component.ts
View file @
3b9b25d
...
...
@@ -3,7 +3,7 @@ import {Location, LocationStrategy, HashLocationStrategy, PathLocationStrategy}
import
{
NavigationExtras
,
ActivatedRoute
,
Router
}
from
'@angular/router'
;
@
Component
({
selector
:
'
old-moya
'
,
selector
:
'
moya-old
'
,
providers
:
[
Location
,
{
provide
:
LocationStrategy
,
useClass
:
PathLocationStrategy
}],
templateUrl
:
'./old-moya.component.html'
,
styleUrls
:
[
'./old-moya.component.scss'
]
...
...
code/moya-angular/src/app/modules/viplist/info/info-viplist-page.component.ts
View file @
3b9b25d
...
...
@@ -2,7 +2,7 @@ import {Component, NgZone, OnInit} from '@angular/core';
import
{
Observable
}
from
'rxjs/Observable'
;
import
{
Vip
}
from
'../models/vip.model'
;
import
{
ViplistService
}
from
'../viplist.service'
;
import
{
TranslatePipe
}
from
"@ngx-translate/core"
;
import
{
TranslatePipe
}
from
'@ngx-translate/core'
;
@
Component
({
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