Skip to content

Commit 3b34747

Browse files
authored
Merge branch 'master' into ba-meyer-master
2 parents 371766f + 9350b56 commit 3b34747

File tree

11 files changed

+70
-45
lines changed

11 files changed

+70
-45
lines changed

Diff for: .docker/features.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"features": {
3-
"designModel": false,
4-
"patternCandidate": false,
5-
"patternViews": false,
6-
"issue": false,
7-
"editing": true,
8-
"showSettings": false
9-
}
2+
"features": {
3+
"designModel": false,
4+
"patternCandidate": false,
5+
"patternViews": true,
6+
"issue": false,
7+
"editing": true,
8+
"showSettings": false
9+
}
1010
}

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"lodash": "^4.17.21",
3838
"madr": "2.1.2",
3939
"markdown-it": "10.0.0",
40-
"markdown-it-katex": "^2.0.3",
40+
"markdown-it-katexx": "3.2.0 ",
4141
"mathjs": "^7.0.2",
4242
"ngx-cookie-service": "2.1.0",
4343
"ngx-md": "8.1.6",

Diff for: src/app/app.component.ts

+10-4
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,16 @@ export class AppComponent implements OnInit {
6363
() => (this.loading = false),
6464
(error: HttpErrorResponse) => {
6565
this.loading = false;
66-
this.toasterService.popAsync(
67-
'error', 'Error while loading config from config server, using default values instead' + error.message).subscribe(
68-
() => console.log('default values applied')
69-
)
66+
if(error.status === globals.statusCodeNotFound){
67+
this.configService.getDefaultConfiguration();
68+
console.log('default values applied')
69+
}
70+
else{
71+
this.toasterService.popAsync(
72+
'error', 'Error while loading config from config server, using default values instead' + error.message).subscribe(
73+
() => console.log('default values applied')
74+
)
75+
}
7076
}
7177
);
7278
this.auth.user.subscribe(_user => {

Diff for: src/app/core/component/markdown-content-container/markdown-pattern-sectioncontent/markdown-pattern-section-content.component.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { DataChange, DataRenderingComponent } from '../interfaces/DataRenderingC
33
import { MatDialog } from '@angular/material/dialog';
44
import { DialogData, MdEditorComponent } from '../../md-editor/md-editor.component';
55
import * as MarkdownIt from 'markdown-it';
6-
import * as markdownitKatex from 'markdown-it-katex';
6+
import * as markdownitKatex from 'markdown-it-katexx';
77
import { ImageService } from '../../../service/image.service';
88
import * as d3 from 'd3';
99
import { MatSnackBar } from '@angular/material/snack-bar';
@@ -56,7 +56,8 @@ export class MarkdownPatternSectionContentComponent extends DataRenderingCompone
5656

5757
ngAfterViewInit() {
5858
this.markdown = new MarkdownIt();
59-
this.markdown.use(markdownitKatex);
59+
this.markdown.set({ breaks: true });
60+
this.markdown.use(markdownitKatex.default, { throwOnError: false, errorColor: ' #cc0000' });
6061
this.changeText(this.renderedData);
6162
}
6263

Diff for: src/app/core/directives/pattern-atlas-ui-repository-configuration.service.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ interface EtcdNode {
4040

4141
const initialValues: PatternAtlasUiConfiguration = {
4242
features: {
43-
designModel: false,
43+
designModel: true,
4444
patternCandidate: true,
4545
patternViews: true,
4646
issue: true,
47-
showSettings: false,
47+
showSettings: true,
4848
editing: true
4949
},
5050
};
@@ -82,6 +82,10 @@ export class PatternAtlasUiRepositoryConfigurationService {
8282
);
8383
}
8484

85+
getDefaultConfiguration():Observable<PatternAtlasUiConfiguration>{
86+
return this.http.get<PatternAtlasUiConfiguration>(environment.defaultFeatures);
87+
}
88+
8589
applyConfig(feature: UiFeatures, checked: boolean): Observable<string> {
8690
const url = environment.CONFIG_SERVER_URL + '/features/' + feature;
8791

Diff for: src/app/globals.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ export const globals = {
2424
patternViews: 'pattern-views',
2525
patternViewURI: 'pattern-view-uri',
2626
designModels: 'design-models'
27-
}
27+
},
28+
statusCodeNotFound : 404
2829
};

Diff for: src/app/pattern-language-management/create-pattern/create-pattern.component.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { PatternLanguageService } from '../../core/service/pattern-language.serv
1010
import PatternLanguage from '../../core/model/hal/pattern-language.model';
1111
import PatternSectionSchema from '../../core/model/hal/pattern-section-schema.model';
1212
import * as MarkdownIt from 'markdown-it';
13-
import * as markdownitKatex from 'markdown-it-katex';
13+
import * as markdownitKatex from 'markdown-it-katexx';
1414
import { PatternService } from '../../core/service/pattern.service';
1515
import { debounceTime, distinctUntilChanged, tap } from 'rxjs/internal/operators';
1616
import { globals } from '../../globals';
@@ -92,7 +92,8 @@ export class CreatePatternComponent implements OnInit {
9292
ngOnInit() {
9393
this.patternLanguageId = UriConverter.doubleDecodeUri(this.activatedRoute.snapshot.paramMap.get(globals.pathConstants.patternLanguageId));
9494
this.markdown = new MarkdownIt();
95-
this.markdown.use(markdownitKatex);
95+
this.markdown.set({ breaks: true });
96+
this.markdown.use(markdownitKatex.default, { throwOnError: false, errorColor: ' #cc0000' });
9697

9798
const patternLanguageObservable = UriConverter.isUUID(this.patternLanguageId) ?
9899
this.patternLanguageService.getPatternLanguageById(this.patternLanguageId)

Diff for: src/assets/settings_features/default_features.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"features": {
3+
"designModel": false,
4+
"patternCandidate": false,
5+
"patternViews": true,
6+
"issue": false,
7+
"editing": true,
8+
"showSettings": false
9+
}
10+
}

Diff for: src/environments/environment.prod.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ export const environment = {
2828
window['env'] && window['env']['CONFIG_SERVER_HOST_NAME'] &&
2929
window['env']['CONFIG_SERVER_PORT']
3030
? `http://${window['env']['CONFIG_SERVER_HOST_NAME']}:${window['env']['CONFIG_SERVER_PORT']}/v2/keys`
31-
: 'http://localhost:2379/v2/keys'
31+
: 'http://localhost:2379/v2/keys',
32+
defaultFeatures: 'assets/settings_features/default_features.json'
3233
};

Diff for: src/environments/environment.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export const environment = {
4040
window['env'] && window['env']['CONFIG_SERVER_HOST_NAME'] &&
4141
window['env']['CONFIG_SERVER_PORT']
4242
? `http://${window['env']['CONFIG_SERVER_HOST_NAME']}:${window['env']['CONFIG_SERVER_PORT']}/v2/keys`
43-
: 'http://localhost:2379/v2/keys'
43+
: 'http://localhost:2379/v2/keys',
44+
defaultFeatures: 'assets/settings_features/default_features.json'
4445
};
4546

4647
/*

Diff for: yarn.lock

+23-23
Original file line numberDiff line numberDiff line change
@@ -2701,7 +2701,7 @@ chokidar@^2.0.3, chokidar@^2.1.8:
27012701
optionalDependencies:
27022702
fsevents "^1.2.7"
27032703

2704-
chownr@^1.1.1, chownr@^1.1.2:
2704+
chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.4:
27052705
version "1.1.4"
27062706
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
27072707
integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==
@@ -2889,9 +2889,9 @@ color-name@^1.0.0, color-name@~1.1.4:
28892889
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
28902890

28912891
color-string@^1.5.2:
2892-
version "1.5.3"
2893-
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc"
2894-
integrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==
2892+
version "1.5.5"
2893+
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.5.tgz#65474a8f0e7439625f3d27a6a19d89fc45223014"
2894+
integrity sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==
28952895
dependencies:
28962896
color-name "^1.0.0"
28972897
simple-swizzle "^0.2.2"
@@ -4697,7 +4697,7 @@ fs-extra@^7.0.1:
46974697
jsonfile "^4.0.0"
46984698
universalify "^0.1.0"
46994699

4700-
fs-minipass@^1.2.5:
4700+
fs-minipass@^1.2.7:
47014701
version "1.2.7"
47024702
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7"
47034703
integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==
@@ -6760,7 +6760,7 @@ minipass-pipeline@^1.2.2:
67606760
dependencies:
67616761
minipass "^3.0.0"
67626762

6763-
minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0:
6763+
minipass@^2.3.5, minipass@^2.6.0, minipass@^2.9.0:
67646764
version "2.9.0"
67656765
resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6"
67666766
integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==
@@ -6775,7 +6775,7 @@ minipass@^3.0.0, minipass@^3.1.1:
67756775
dependencies:
67766776
yallist "^4.0.0"
67776777

6778-
minizlib@^1.2.1:
6778+
minizlib@^1.3.3:
67796779
version "1.3.3"
67806780
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d"
67816781
integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==
@@ -6814,7 +6814,7 @@ mixin-deep@^1.2.0:
68146814
for-in "^1.0.2"
68156815
is-extendable "^1.0.1"
68166816

6817-
mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1, mkdirp@~0.5.x:
6817+
mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.5, mkdirp@~0.5.1, mkdirp@~0.5.x:
68186818
version "0.5.5"
68196819
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
68206820
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
@@ -7566,9 +7566,9 @@ path-key@^2.0.0, path-key@^2.0.1:
75667566
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
75677567

75687568
path-parse@^1.0.6:
7569-
version "1.0.6"
7570-
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
7571-
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
7569+
version "1.0.7"
7570+
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
7571+
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
75727572

75737573
75747574
version "0.1.7"
@@ -8799,7 +8799,7 @@ [email protected], safe-buffer@~5.1.0, safe-buffer@~5.1.1:
87998799
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
88008800
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
88018801

8802-
safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0:
8802+
safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0:
88038803
version "5.2.1"
88048804
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
88058805
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
@@ -9795,17 +9795,17 @@ tapable@^1.0.0, tapable@^1.1.3:
97959795
integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==
97969796

97979797
tar@^4.4.10:
9798-
version "4.4.13"
9799-
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
9800-
integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
9798+
version "4.4.19"
9799+
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3"
9800+
integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==
98019801
dependencies:
9802-
chownr "^1.1.1"
9803-
fs-minipass "^1.2.5"
9804-
minipass "^2.8.6"
9805-
minizlib "^1.2.1"
9806-
mkdirp "^0.5.0"
9807-
safe-buffer "^5.1.2"
9808-
yallist "^3.0.3"
9802+
chownr "^1.1.4"
9803+
fs-minipass "^1.2.7"
9804+
minipass "^2.9.0"
9805+
minizlib "^1.3.3"
9806+
mkdirp "^0.5.5"
9807+
safe-buffer "^5.2.1"
9808+
yallist "^3.1.1"
98099809

98109810
tar@^6.0.1:
98119811
version "6.0.2"
@@ -10775,7 +10775,7 @@ yallist@^2.1.2:
1077510775
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
1077610776
integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=
1077710777

10778-
yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3:
10778+
yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1:
1077910779
version "3.1.1"
1078010780
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
1078110781
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==

0 commit comments

Comments
 (0)