Browse Source

Formatting fixed

pull/65/head
Sebastian Stehle 9 years ago
parent
commit
728527fb9a
  1. 21
      src/Squidex/app/app.routes.ts
  2. 17
      src/Squidex/app/features/administration/module.ts
  3. 2
      src/Squidex/app/features/assets/pages/assets-page.component.html
  4. 6
      src/Squidex/app/features/content/module.ts
  5. 48
      src/Squidex/app/features/dashboard/pages/dashboard-page.component.ts
  6. 6
      src/Squidex/app/features/settings/module.ts
  7. 21
      src/Squidex/app/shared/services/app-clients.service.spec.ts
  8. 17
      src/Squidex/app/shared/services/app-contributors.service.spec.ts
  9. 19
      src/Squidex/app/shared/services/app-languages.service.spec.ts
  10. 29
      src/Squidex/app/shared/services/apps.service.spec.ts
  11. 61
      src/Squidex/app/shared/services/assets.service.spec.ts
  12. 41
      src/Squidex/app/shared/services/contents.service.spec.ts
  13. 29
      src/Squidex/app/shared/services/event-consumers.service.spec.ts
  14. 18
      src/Squidex/app/shared/services/help.service.spec.ts
  15. 25
      src/Squidex/app/shared/services/history.service.spec.ts
  16. 17
      src/Squidex/app/shared/services/languages.service.spec.ts
  17. 169
      src/Squidex/app/shared/services/schemas.service.spec.ts
  18. 42
      src/Squidex/app/shared/services/usages.service.spec.ts
  19. 116
      src/Squidex/app/shared/services/users.service.spec.ts

21
src/Squidex/app/app.routes.ts

@ -28,7 +28,8 @@ export const routes: Routes = [
path: '',
component: HomePageComponent,
canActivate: [MustBeNotAuthenticatedGuard]
}, {
},
{
path: 'app',
component: InternalAreaComponent,
canActivate: [MustBeAuthenticatedGuard],
@ -36,10 +37,12 @@ export const routes: Routes = [
{
path: '',
loadChildren: './features/apps/module#SqxFeatureAppsModule'
}, {
},
{
path: 'administration',
loadChildren: './features/administration/module#SqxFeatureAdministrationModule'
}, {
},
{
path: ':appName',
component: AppAreaComponent,
canActivate: [AppMustExistGuard],
@ -47,16 +50,20 @@ export const routes: Routes = [
{
path: '',
loadChildren: './features/dashboard/module#SqxFeatureDashboardModule'
}, {
},
{
path: 'content',
loadChildren: './features/content/module#SqxFeatureContentModule'
}, {
},
{
path: 'schemas',
loadChildren: './features/schemas/module#SqxFeatureSchemasModule'
}, {
},
{
path: 'assets',
loadChildren: './features/assets/module#SqxFeatureAssetsModule'
}, {
},
{
path: 'settings',
loadChildren: './features/settings/module#SqxFeatureSettingsModule'
}

17
src/Squidex/app/features/administration/module.ts

@ -26,13 +26,16 @@ const routes: Routes = [
children: [
{
path: '',
children: [{
path: 'event-consumers',
component: EventConsumersPageComponent
}, {
path: 'users',
component: UsersPageComponent
}]
children: [
{
path: 'event-consumers',
component: EventConsumersPageComponent
},
{
path: 'users',
component: UsersPageComponent
}
]
}
]
}

2
src/Squidex/app/features/assets/pages/assets-page.component.html

@ -18,7 +18,7 @@
<h3 class="panel-title">Assets</h3>
</div>
<a class="panel-close" routerLink="../">
<a class="panel-close" routerLink="./../">
<i class="icon-close"></i>
</a>
</div>

6
src/Squidex/app/features/content/module.ts

@ -51,7 +51,8 @@ const routes: Routes = [
loadChildren: './../assets/module#SqxFeatureAssetsModule'
}
]
}, {
},
{
path: ':contentId',
component: ContentPageComponent,
canDeactivate: [CanDeactivateGuard],
@ -65,7 +66,8 @@ const routes: Routes = [
data: {
channel: 'contents.{contentId}'
}
}, {
},
{
path: 'assets',
loadChildren: './../assets/module#SqxFeatureAssetsModule'
}

48
src/Squidex/app/features/dashboard/pages/dashboard-page.component.ts

@ -42,9 +42,11 @@ export class DashboardPageComponent extends AppComponentBase implements OnInit,
public chartOptions = {
responsive: true,
scales: {
xAxes: [{
display: true
}]
xAxes: [
{
display: true
}
]
},
maintainAspectRatio: false
};
@ -94,28 +96,32 @@ export class DashboardPageComponent extends AppComponentBase implements OnInit,
.subscribe(dtos => {
this.chartStorageCount = {
labels: createLabels(dtos),
datasets: [{
label: 'Number of Assets',
lineTension: 0,
fill: false,
backgroundColor: 'rgba(61, 135, 213, 0.6)',
borderColor: 'rgba(61, 135, 213, 1)',
borderWidth: 1,
data: dtos.map(x => x.count)
}]
datasets: [
{
label: 'Number of Assets',
lineTension: 0,
fill: false,
backgroundColor: 'rgba(61, 135, 213, 0.6)',
borderColor: 'rgba(61, 135, 213, 1)',
borderWidth: 1,
data: dtos.map(x => x.count)
}
]
};
this.chartStorageSize = {
labels: createLabels(dtos),
datasets: [ {
label: 'Size of Assets (MB)',
lineTension: 0,
fill: false,
backgroundColor: 'rgba(61, 135, 213, 0.6)',
borderColor: 'rgba(61, 135, 213, 1)',
borderWidth: 1,
data: dtos.map(x => Math.round(10 * (x.size / (1024 * 1024))) / 10)
}]
datasets: [
{
label: 'Size of Assets (MB)',
lineTension: 0,
fill: false,
backgroundColor: 'rgba(61, 135, 213, 0.6)',
borderColor: 'rgba(61, 135, 213, 1)',
borderWidth: 1,
data: dtos.map(x => Math.round(10 * (x.size / (1024 * 1024))) / 10)
}
]
};
});

6
src/Squidex/app/features/settings/module.ts

@ -50,7 +50,8 @@ const routes: Routes = [
}
}
]
}, {
},
{
path: 'contributors',
component: ContributorsPageComponent,
children: [
@ -69,7 +70,8 @@ const routes: Routes = [
}
}
]
}, {
},
{
path: 'languages',
component: LanguagesPageComponent,
children: [

21
src/Squidex/app/shared/services/app-clients.service.spec.ts

@ -38,15 +38,18 @@ describe('AppClientsService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
id: 'client1',
name: 'Client 1',
secret: 'secret1'
}, {
id: 'client2',
name: 'Client 2',
secret: 'secret2'
}]
body: [
{
id: 'client1',
name: 'Client 1',
secret: 'secret1'
},
{
id: 'client2',
name: 'Client 2',
secret: 'secret2'
}
]
})
)
))

17
src/Squidex/app/shared/services/app-contributors.service.spec.ts

@ -32,13 +32,16 @@ describe('AppContributorsService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
contributorId: '123',
permission: 'Owner'
}, {
contributorId: '456',
permission: 'Owner'
}]
body: [
{
contributorId: '123',
permission: 'Owner'
},
{
contributorId: '456',
permission: 'Owner'
}
]
})
)
))

19
src/Squidex/app/shared/services/app-languages.service.spec.ts

@ -34,14 +34,17 @@ describe('AppLanguagesService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
iso2Code: 'de',
englishName: 'German',
isMasterLanguage: true
}, {
iso2Code: 'en',
englishName: 'English'
}]
body: [
{
iso2Code: 'de',
englishName: 'German',
isMasterLanguage: true
},
{
iso2Code: 'en',
englishName: 'English'
}
]
})
)
))

29
src/Squidex/app/shared/services/apps.service.spec.ts

@ -33,19 +33,22 @@ describe('AppsService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
id: '123',
name: 'name1',
permission: 'Owner',
created: '2016-01-01',
lastModified: '2016-02-02'
}, {
id: '456',
name: 'name2',
permission: 'Owner',
created: '2017-01-01',
lastModified: '2017-02-02'
}]
body: [
{
id: '123',
name: 'name1',
permission: 'Owner',
created: '2016-01-01',
lastModified: '2016-02-02'
},
{
id: '456',
name: 'name2',
permission: 'Owner',
created: '2017-01-01',
lastModified: '2017-02-02'
}
]
})
)
))

61
src/Squidex/app/shared/services/assets.service.spec.ts

@ -53,35 +53,38 @@ describe('AssetsService', () => {
new ResponseOptions({
body: {
total: 10,
items: [{
id: 'id1',
created: '2016-12-12T10:10',
createdBy: 'Created1',
lastModified: '2017-12-12T10:10',
lastModifiedBy: 'LastModifiedBy1',
fileName: 'my-asset1.png',
fileSize: 1024,
fileVersion: 2000,
mimeType: 'text/plain',
isImage: true,
pixelWidth: 1024,
pixelHeight: 2048,
version: 11
}, {
id: 'id2',
created: '2016-10-12T10:10',
createdBy: 'Created2',
lastModified: '2017-10-12T10:10',
lastModifiedBy: 'LastModifiedBy2',
fileName: 'my-asset2.png',
fileSize: 1024,
fileVersion: 2000,
mimeType: 'text/plain',
isImage: true,
pixelWidth: 1024,
pixelHeight: 2048,
version: 22
}]
items: [
{
id: 'id1',
created: '2016-12-12T10:10',
createdBy: 'Created1',
lastModified: '2017-12-12T10:10',
lastModifiedBy: 'LastModifiedBy1',
fileName: 'my-asset1.png',
fileSize: 1024,
fileVersion: 2000,
mimeType: 'text/plain',
isImage: true,
pixelWidth: 1024,
pixelHeight: 2048,
version: 11
},
{
id: 'id2',
created: '2016-10-12T10:10',
createdBy: 'Created2',
lastModified: '2017-10-12T10:10',
lastModifiedBy: 'LastModifiedBy2',
fileName: 'my-asset2.png',
fileSize: 1024,
fileVersion: 2000,
mimeType: 'text/plain',
isImage: true,
pixelWidth: 1024,
pixelHeight: 2048,
version: 22
}
]
}
})
)

41
src/Squidex/app/shared/services/contents.service.spec.ts

@ -36,25 +36,28 @@ describe('ContentsService', () => {
new ResponseOptions({
body: {
total: 10,
items: [{
id: 'id1',
isPublished: true,
created: '2016-12-12T10:10',
createdBy: 'Created1',
lastModified: '2017-12-12T10:10',
lastModifiedBy: 'LastModifiedBy1',
version: 11,
data: {}
}, {
id: 'id2',
isPublished: true,
created: '2016-10-12T10:10',
createdBy: 'Created2',
lastModified: '2017-10-12T10:10',
lastModifiedBy: 'LastModifiedBy2',
version: 22,
data: {}
}]
items: [
{
id: 'id1',
isPublished: true,
created: '2016-12-12T10:10',
createdBy: 'Created1',
lastModified: '2017-12-12T10:10',
lastModifiedBy: 'LastModifiedBy1',
version: 11,
data: {}
},
{
id: 'id2',
isPublished: true,
created: '2016-10-12T10:10',
createdBy: 'Created2',
lastModified: '2017-10-12T10:10',
lastModifiedBy: 'LastModifiedBy2',
version: 22,
data: {}
}
]
}
})
)

29
src/Squidex/app/shared/services/event-consumers.service.spec.ts

@ -30,19 +30,22 @@ describe('EventConsumersService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
name: 'event-consumer1',
lastHandledEventNumber: 13,
isStopped: true,
isResetting: true,
error: 'an error 1'
}, {
name: 'event-consumer2',
lastHandledEventNumber: 29,
isStopped: true,
isResetting: true,
error: 'an error 2'
}]
body: [
{
name: 'event-consumer1',
lastHandledEventNumber: 13,
isStopped: true,
isResetting: true,
error: 'an error 1'
},
{
name: 'event-consumer2',
lastHandledEventNumber: 29,
isStopped: true,
isResetting: true,
error: 'an error 2'
}
]
})
)
))

18
src/Squidex/app/shared/services/help.service.spec.ts

@ -27,13 +27,17 @@ describe('AppClientsService', () => {
new Response(
new ResponseOptions({
body: {
sections: [{
content: 'A test content with'
}, {
content: 'A test content with a <a href="https://squidex.io">A Link</a>'
}, {
content: 'A test content with a <a href="../GLOSSARY.html#content">Glossary Link</a>'
}]
sections: [
{
content: 'A test content with'
},
{
content: 'A test content with a <a href="https://squidex.io">A Link</a>'
},
{
content: 'A test content with a <a href="../GLOSSARY.html#content">Glossary Link</a>'
}
]
}
})
)

25
src/Squidex/app/shared/services/history.service.spec.ts

@ -32,17 +32,20 @@ describe('HistoryService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
actor: 'User1',
eventId: '1',
message: 'Message 1',
created: '2016-12-12T10:10'
}, {
actor: 'User2',
eventId: '2',
message: 'Message 2',
created: '2016-12-13T10:10'
}]
body: [
{
actor: 'User1',
eventId: '1',
message: 'Message 1',
created: '2016-12-12T10:10'
},
{
actor: 'User2',
eventId: '2',
message: 'Message 2',
created: '2016-12-13T10:10'
}
]
})
)
))

17
src/Squidex/app/shared/services/languages.service.spec.ts

@ -30,13 +30,16 @@ describe('LanguageService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
iso2Code: 'de',
englishName: 'German'
}, {
iso2Code: 'en',
englishName: 'English'
}]
body: [
{
iso2Code: 'de',
englishName: 'German'
},
{
iso2Code: 'en',
englishName: 'English'
}
]
})
)
))

169
src/Squidex/app/shared/services/schemas.service.spec.ts

@ -45,29 +45,32 @@ describe('SchemasService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
id: 'id1',
name: 'name1',
label: 'label1',
isPublished: true,
created: '2016-12-12T10:10',
createdBy: 'Created1',
lastModified: '2017-12-12T10:10',
lastModifiedBy: 'LastModifiedBy1',
version: 11,
data: {}
}, {
id: 'id2',
name: 'name2',
label: 'label2',
isPublished: true,
created: '2016-10-12T10:10',
createdBy: 'Created2',
lastModified: '2017-10-12T10:10',
lastModifiedBy: 'LastModifiedBy2',
version: 22,
data: {}
}]
body: [
{
id: 'id1',
name: 'name1',
label: 'label1',
isPublished: true,
created: '2016-12-12T10:10',
createdBy: 'Created1',
lastModified: '2017-12-12T10:10',
lastModifiedBy: 'LastModifiedBy1',
version: 11,
data: {}
},
{
id: 'id2',
name: 'name2',
label: 'label2',
isPublished: true,
created: '2016-10-12T10:10',
createdBy: 'Created2',
lastModified: '2017-10-12T10:10',
lastModifiedBy: 'LastModifiedBy2',
version: 22,
data: {}
}
]
})
)
))
@ -109,63 +112,71 @@ describe('SchemasService', () => {
lastModified: '2017-12-12T10:10',
lastModifiedBy: 'LastModifiedBy1',
version: 11,
fields: [{
fieldId: 1,
name: 'field1',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'Number'
}
}, {
fieldId: 2,
name: 'field2',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'String'
}
}, {
fieldId: 3,
name: 'field3',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'Boolean'
}
}, {
fieldId: 4,
name: 'field4',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'DateTime'
}
}, {
fieldId: 5,
name: 'field5',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'Json'
}
}, {
fieldId: 6,
name: 'field6',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'Geolocation'
}
}, {
fieldId: 7,
name: 'field7',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'Assets'
fields: [
{
fieldId: 1,
name: 'field1',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'Number'
}
},
{
fieldId: 2,
name: 'field2',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'String'
}
},
{
fieldId: 3,
name: 'field3',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'Boolean'
}
},
{
fieldId: 4,
name: 'field4',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'DateTime'
}
},
{
fieldId: 5,
name: 'field5',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'Json'
}
},
{
fieldId: 6,
name: 'field6',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'Geolocation'
}
},
{
fieldId: 7,
name: 'field7',
isHidden: true,
isDisabled: true,
properties: {
fieldType: 'Assets'
}
}
}]
]
}
})
)

42
src/Squidex/app/shared/services/usages.service.spec.ts

@ -34,15 +34,18 @@ describe('UsagesService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
date: '2017-10-12',
count: 10,
averageMs: 130
}, {
date: '2017-10-13',
count: 13,
averageMs: 170
}]
body: [
{
date: '2017-10-12',
count: 10,
averageMs: 130
},
{
date: '2017-10-13',
count: 13,
averageMs: 170
}
]
})
)
))
@ -90,15 +93,18 @@ describe('UsagesService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
date: '2017-10-12',
count: 10,
size: 130
}, {
date: '2017-10-13',
count: 13,
size: 170
}]
body: [
{
date: '2017-10-12',
count: 10,
size: 130
},
{
date: '2017-10-13',
count: 13,
size: 170
}
]
})
)
))

116
src/Squidex/app/shared/services/users.service.spec.ts

@ -32,19 +32,22 @@ describe('UsersService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
id: '123',
email: 'mail1@domain.com',
displayName: 'User1',
pictureUrl: 'path/to/image1',
isLocked: true
}, {
id: '456',
email: 'mail2@domain.com',
displayName: 'User2',
pictureUrl: 'path/to/image2',
isLocked: true
}]
body: [
{
id: '123',
email: 'mail1@domain.com',
displayName: 'User1',
pictureUrl: 'path/to/image1',
isLocked: true
},
{
id: '456',
email: 'mail2@domain.com',
displayName: 'User2',
pictureUrl: 'path/to/image2',
isLocked: true
}
]
})
)
))
@ -70,19 +73,22 @@ describe('UsersService', () => {
.returns(() => Observable.of(
new Response(
new ResponseOptions({
body: [{
id: '123',
email: 'mail1@domain.com',
displayName: 'User1',
pictureUrl: 'path/to/image1',
isLocked: true
}, {
id: '456',
email: 'mail2@domain.com',
displayName: 'User2',
pictureUrl: 'path/to/image2',
isLocked: true
}]
body: [
{
id: '123',
email: 'mail1@domain.com',
displayName: 'User1',
pictureUrl: 'path/to/image1',
isLocked: true
},
{
id: '456',
email: 'mail2@domain.com',
displayName: 'User2',
pictureUrl: 'path/to/image2',
isLocked: true
}
]
})
)
))
@ -148,19 +154,22 @@ describe('UserManagementService', () => {
new ResponseOptions({
body: {
total: 100,
items: [{
id: '123',
email: 'mail1@domain.com',
displayName: 'User1',
pictureUrl: 'path/to/image1',
isLocked: true
}, {
id: '456',
email: 'mail2@domain.com',
displayName: 'User2',
pictureUrl: 'path/to/image2',
isLocked: true
}]
items: [
{
id: '123',
email: 'mail1@domain.com',
displayName: 'User1',
pictureUrl: 'path/to/image1',
isLocked: true
},
{
id: '456',
email: 'mail2@domain.com',
displayName: 'User2',
pictureUrl: 'path/to/image2',
isLocked: true
}
]
}
})
)
@ -189,19 +198,22 @@ describe('UserManagementService', () => {
new ResponseOptions({
body: {
total: 100,
items: [{
id: '123',
email: 'mail1@domain.com',
displayName: 'User1',
pictureUrl: 'path/to/image1',
isLocked: true
}, {
id: '456',
email: 'mail2@domain.com',
displayName: 'User2',
pictureUrl: 'path/to/image2',
isLocked: true
}]
items: [
{
id: '123',
email: 'mail1@domain.com',
displayName: 'User1',
pictureUrl: 'path/to/image1',
isLocked: true
},
{
id: '456',
email: 'mail2@domain.com',
displayName: 'User2',
pictureUrl: 'path/to/image2',
isLocked: true
}
]
}
})
)

Loading…
Cancel
Save