Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalWebpage
Commits
889f3187
Commit
889f3187
authored
Jun 15, 2018
by
Lukas Burgey
Browse files
Restructure the dialogues
parent
eb7e9d3a
Changes
30
Hide whitespace changes
Inline
Side-by-side
src/app/app.module.ts
View file @
889f3187
...
...
@@ -6,59 +6,29 @@ import {JsonPipe} from '@angular/common';
import
{
HttpModule
}
from
'
@angular/http
'
;
import
{
HttpClientModule
,
HttpClientXsrfModule
}
from
'
@angular/common/http
'
;
import
{
MatButtonModule
}
from
'
@angular/material
'
;
import
{
MatToolbarModule
}
from
'
@angular/material
'
;
import
{
MatTableModule
}
from
'
@angular/material/table
'
;
import
{
MatSnackBarModule
}
from
'
@angular/material/snack-bar
'
;
import
{
MatExpansionModule
}
from
'
@angular/material/expansion
'
;
import
{
MatIconModule
}
from
'
@angular/material/icon
'
;
import
{
MatDialogModule
}
from
'
@angular/material/dialog
'
;
import
{
MatFormFieldModule
}
from
'
@angular/material/form-field
'
;
import
{
MatSelectModule
}
from
'
@angular/material/select
'
;
import
{
MatInputModule
}
from
'
@angular/material/input
'
;
import
{
MatCheckboxModule
}
from
'
@angular/material/checkbox
'
;
import
{
MatTooltipModule
}
from
'
@angular/material/tooltip
'
;
import
{
MatProgressBarModule
}
from
'
@angular/material/progress-bar
'
;
import
{
MatProgressSpinnerModule
}
from
'
@angular/material/progress-spinner
'
;
// Other libs
import
{
StompRService
}
from
'
@stomp/ng2-stompjs
'
;
import
{
CookieService
}
from
'
ngx-cookie-service
'
;
// Our stuff
//
// services
import
{
UserService
}
from
'
./user.service
'
;
import
{
SnackBarService
}
from
'
./snackbar.service
'
;
import
{
DialogService
}
from
'
./dialog.service
'
;
// imports
import
{
DialoguesModule
}
from
'
./dialogues/dialogues.module
'
;
import
{
MaterialModule
}
from
'
./material/material.module
'
;
import
{
SharedModule
}
from
'
./shared/shared.module
'
;
// declarations
import
{
AppComponent
}
from
'
./app.component
'
;
import
{
MgmtComponent
}
from
'
./mgmt/mgmt.component
'
;
import
{
LoginComponent
}
from
'
./login/login.component
'
;
import
{
ProfileComponent
}
from
'
./profile/profile.component
'
;
import
{
QuestionnaireComponent
}
from
'
./questionnaire/questionnaire.component
'
;
import
{
ServiceComponent
}
from
'
./service/service.component
'
;
import
{
SshKeysComponent
}
from
'
./ssh-keys/ssh-keys.component
'
;
import
{
AccountComponent
}
from
'
./account/account.component
'
;
@
Pipe
({
name
:
'
ObjNgFor
'
,
pure
:
false
})
export
class
ObjNgFor
implements
PipeTransform
{
transform
(
value
:
any
,
args
:
any
[]
=
null
):
any
{
return
Object
.
keys
(
value
);
//.map(key => value[key]);
}
}
@
NgModule
({
declarations
:
[
AppComponent
,
MgmtComponent
,
LoginComponent
,
ProfileComponent
,
QuestionnaireComponent
,
ServiceComponent
,
SshKeysComponent
,
AccountComponent
,
ObjNgFor
,
],
imports
:
[
BrowserModule
,
BrowserAnimationsModule
,
...
...
@@ -69,37 +39,24 @@ export class ObjNgFor implements PipeTransform {
cookieName
:
'
csrftoken
'
,
headerName
:
'
HTTP_X_CSRFTOKEN
'
,
}),
MatButtonModule
,
MatToolbarModule
,
MatTableModule
,
MatSnackBarModule
,
MatExpansionModule
,
MatIconModule
,
MatDialogModule
,
MatFormFieldModule
,
MatSelectModule
,
MatInputModule
,
MatCheckboxModule
,
MatTooltipModule
,
MatProgressBarModule
,
MatProgressSpinnerModule
,
DialoguesModule
,
MaterialModule
,
SharedModule
,
],
declarations
:
[
AppComponent
,
MgmtComponent
,
LoginComponent
,
ServiceComponent
,
],
providers
:
[
CookieService
,
UserService
,
SnackBarService
,
DialogService
,
StompRService
,
JsonPipe
,
ObjNgFor
,
],
bootstrap
:
[
AppComponent
],
entryComponents
:
[
ProfileComponent
,
SshKeysComponent
,
AccountComponent
,
QuestionnaireComponent
,
],
})
export
class
AppModule
{
constructor
()
{
...
...
src/app/dialog.service.spec.ts
deleted
100644 → 0
View file @
eb7e9d3a
import
{
TestBed
,
inject
}
from
'
@angular/core/testing
'
;
import
{
DialogService
}
from
'
./dialog.service
'
;
describe
(
'
DialogService
'
,
()
=>
{
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({
providers
:
[
DialogService
]
});
});
it
(
'
should be created
'
,
inject
([
DialogService
],
(
service
:
DialogService
)
=>
{
expect
(
service
).
toBeTruthy
();
}));
});
src/app/account/account.component.css
→
src/app/
dialogues/
account/account.component.css
View file @
889f3187
File moved
src/app/account/account.component.html
→
src/app/
dialogues/
account/account.component.html
View file @
889f3187
File moved
src/app/account/account.component.spec.ts
→
src/app/
dialogues/
account/account.component.spec.ts
View file @
889f3187
File moved
src/app/account/account.component.ts
→
src/app/
dialogues/
account/account.component.ts
View file @
889f3187
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
UserService
}
from
'
../user.service
'
;
import
{
UserService
}
from
'
../
../
user.service
'
;
@
Component
({
selector
:
'
app-account
'
,
...
...
src/app/dialog.service.ts
→
src/app/
dialogues/
dialog.service.ts
View file @
889f3187
File moved
src/app/dialogues/dialogues.module.spec.ts
0 → 100644
View file @
889f3187
import
{
DialoguesModule
}
from
'
./dialogues.module
'
;
describe
(
'
DialoguesModule
'
,
()
=>
{
let
dialoguesModule
:
DialoguesModule
;
beforeEach
(()
=>
{
dialoguesModule
=
new
DialoguesModule
();
});
it
(
'
should create an instance
'
,
()
=>
{
expect
(
dialoguesModule
).
toBeTruthy
();
});
});
src/app/dialogues/dialogues.module.ts
0 → 100644
View file @
889f3187
import
{
NgModule
}
from
'
@angular/core
'
;
import
{
CommonModule
}
from
'
@angular/common
'
;
import
{
FormsModule
}
from
'
@angular/forms
'
;
// imports
import
{
MaterialModule
}
from
'
../material/material.module
'
;
import
{
SharedModule
}
from
'
../shared/shared.module
'
;
// declarations
import
{
QuestionnaireComponent
}
from
'
./questionnaire/questionnaire.component
'
;
import
{
ProfileComponent
}
from
'
./profile/profile.component
'
;
import
{
SshKeysComponent
}
from
'
./ssh-keys/ssh-keys.component
'
;
import
{
AccountComponent
}
from
'
./account/account.component
'
;
//providers
import
{
DialogService
}
from
'
./dialog.service
'
;
@
NgModule
({
imports
:
[
CommonModule
,
FormsModule
,
MaterialModule
,
SharedModule
,
],
declarations
:
[
QuestionnaireComponent
,
ProfileComponent
,
SshKeysComponent
,
AccountComponent
,
],
entryComponents
:
[
QuestionnaireComponent
,
ProfileComponent
,
SshKeysComponent
,
AccountComponent
,
],
providers
:
[
DialogService
,
],
})
export
class
DialoguesModule
{
}
src/app/profile/profile.component.css
→
src/app/
dialogues/
profile/profile.component.css
View file @
889f3187
File moved
src/app/profile/profile.component.html
→
src/app/
dialogues/
profile/profile.component.html
View file @
889f3187
File moved
src/app/profile/profile.component.spec.ts
→
src/app/
dialogues/
profile/profile.component.spec.ts
View file @
889f3187
File moved
src/app/profile/profile.component.ts
→
src/app/
dialogues/
profile/profile.component.ts
View file @
889f3187
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
MatTableDataSource
}
from
'
@angular/material
'
;
import
{
UserService
}
from
'
../user.service
'
;
import
{
UserService
}
from
'
../
../
user.service
'
;
@
Component
({
selector
:
'
app-profile
'
,
...
...
src/app/questionnaire/questionnaire.component.css
→
src/app/
dialogues/
questionnaire/questionnaire.component.css
View file @
889f3187
File moved
src/app/questionnaire/questionnaire.component.html
→
src/app/
dialogues/
questionnaire/questionnaire.component.html
View file @
889f3187
<div
class=
"mat-typography"
>
<h2>
Parameter
questionnaire
</h2>
<h2>
Data
questionnaire
</h2>
<p>
The following data is requirred to access the service.
The site {{taskItem.site.name}} needs the following data to give you access to the service {{
taskItem.service.name}}.
</p>
<form
class=
"form-vertical"
(ngSubmit)=
"sendAnswers()"
#questionnaireForm
="
ngForm
"
>
<mat-form-field
*ngFor=
"let key of taskItem.questionnaire | Obj
NgFor
"
>
<mat-form-field
*ngFor=
"let key of taskItem.questionnaire | Obj
Keys
"
>
<input
matInput
required
placeholder=
"{{taskItem.questionnaire[key]}}"
[(ngModel)]=
"answers[key]"
name=
"key"
>
</mat-form-field>
...
...
src/app/questionnaire/questionnaire.component.ts
→
src/app/
dialogues/
questionnaire/questionnaire.component.ts
View file @
889f3187
import
{
Component
,
OnInit
,
Inject
}
from
'
@angular/core
'
;
import
{
MAT_DIALOG_DATA
}
from
'
@angular/material
'
;
import
{
UserService
}
from
'
../user.service
'
;
import
{
UserService
}
from
'
../
../
user.service
'
;
@
Component
({
selector
:
'
app-questionnaire
'
,
...
...
src/app/ssh-keys/ssh-keys.component.css
→
src/app/
dialogues/
ssh-keys/ssh-keys.component.css
View file @
889f3187
File moved
src/app/ssh-keys/ssh-keys.component.html
→
src/app/
dialogues/
ssh-keys/ssh-keys.component.html
View file @
889f3187
File moved
src/app/ssh-keys/ssh-keys.component.spec.ts
→
src/app/
dialogues/
ssh-keys/ssh-keys.component.spec.ts
View file @
889f3187
File moved
src/app/ssh-keys/ssh-keys.component.ts
→
src/app/
dialogues/
ssh-keys/ssh-keys.component.ts
View file @
889f3187
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
MatTableDataSource
}
from
'
@angular/material
'
;
import
{
UserService
}
from
'
../user.service
'
;
import
{
SSHKey
,
NewSSHKey
}
from
'
../types/types.module
'
;
import
{
UserService
}
from
'
../
../
user.service
'
;
import
{
SSHKey
,
NewSSHKey
}
from
'
../
../
types/types.module
'
;
@
Component
({
selector
:
'
app-ssh-keys
'
,
...
...
Prev
1
2
Next
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