Revision 53603
Added by Myrto Koukouli about 6 years ago
modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-interface-form.component.ts | ||
---|---|---|
71 | 71 |
this.data.splice(0,1); |
72 | 72 |
this.oldInterface = true; |
73 | 73 |
console.log(`received an interface!`); |
74 |
if (this.currentInterface.baseUrl && this.currentInterface.accessParams['set'] && this.currentInterface.desiredCompatibilityLevel) {
|
|
74 |
if (this.currentInterface.baseUrl && this.currentInterface.desiredCompatibilityLevel) { |
|
75 | 75 |
this.wasSaved = true; |
76 | 76 |
} |
77 | 77 |
} |
... | ... | |
166 | 166 |
this.existingCompLevel = this.compClasses[this.currentInterface.desiredCompatibilityLevel]; |
167 | 167 |
} |
168 | 168 |
if (this.group.valid ) { |
169 |
if ( this.getMyControl('selectValidationSet').value || this.getMyControl('customValidationSet').value ) { |
|
170 |
this.exportedData = this.currentInterface; |
|
171 |
} |
|
169 |
this.exportedData = this.currentInterface; |
|
172 | 170 |
} |
173 | 171 |
} |
174 | 172 |
|
... | ... | |
221 | 219 |
} |
222 | 220 |
|
223 | 221 |
checkIfCompatibilityLevelWasChosen() { |
224 |
return ( this.getMyControl('compatibilityLevel').value != '' || (this.existingCompLevel && this.existingCompLevel != '') );
|
|
222 |
return ( this.getMyControl('compatibilityLevel').value != '' || (this.existingCompLevel && (this.existingCompLevel != '')) );
|
|
225 | 223 |
} |
226 | 224 |
|
227 | 225 |
checkIfValid() { |
228 |
console.log(this.existingCompLevel); |
|
229 | 226 |
if (this.inRegister) { |
230 | 227 |
// if decided that valset is required add && this.checkIfValsetWasChosen() to the condition |
231 | 228 |
if ( this.group.valid && this.checkIfCompatibilityLevelWasChosen() ) { |
... | ... | |
241 | 238 |
|
242 | 239 |
let compLvl: string = ''; |
243 | 240 |
if (this.getMyControl('compatibilityLevel').value) { |
241 |
this.existingCompLevel = this.compClasses[this.getMyControl('compatibilityLevel').value]; |
|
242 |
console.log('this.existingCompLevel is',this.existingCompLevel); |
|
244 | 243 |
compLvl = this.getMyControl('compatibilityLevel').value; |
245 | 244 |
} else { |
246 | 245 |
compLvl = this.existingCompLevel; |
... | ... | |
314 | 313 |
this.currentInterface = null; |
315 | 314 |
}, |
316 | 315 |
() => { |
316 |
this.loadingMessage = ''; |
|
317 | 317 |
if (this.currentInterface.id) { |
318 | 318 |
this.successMessage = formSuccessAddedInterface; |
319 | 319 |
this.wasSaved = true; |
320 |
if ( !this.currentInterface.desiredCompatibilityLevel || !this.classCodes.some( x => x == this.currentInterface.desiredCompatibilityLevel ) ) { |
|
321 |
this.patchData.next({compatibilityLevel:''}); |
|
322 |
this.existingCompLevel = this.currentInterface.desiredCompatibilityLevel; |
|
323 |
} else { |
|
324 |
this.existingCompLevel = this.compClasses[this.currentInterface.desiredCompatibilityLevel]; |
|
325 |
} |
|
320 | 326 |
} else { |
321 | 327 |
this.errorMessage = formErrorWasntSaved; |
322 | 328 |
} |
323 |
this.loadingMessage = ''; |
|
324 | 329 |
} |
325 | 330 |
); |
326 | 331 |
|
... | ... | |
344 | 349 |
}, |
345 | 350 |
() => { |
346 | 351 |
this.loadingMessage = ''; |
352 |
if ( !this.currentInterface.desiredCompatibilityLevel || !this.classCodes.some( x => x == this.currentInterface.desiredCompatibilityLevel ) ) { |
|
353 |
this.patchData.next({compatibilityLevel:''}); |
|
354 |
this.existingCompLevel = this.currentInterface.desiredCompatibilityLevel; |
|
355 |
} else { |
|
356 |
this.existingCompLevel = this.compClasses[this.currentInterface.desiredCompatibilityLevel]; |
|
357 |
} |
|
347 | 358 |
} |
348 | 359 |
); |
349 | 360 |
} |
modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-update-form.component.html | ||
---|---|---|
6 | 6 |
</div> |
7 | 7 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger">{{ errorMessage }}</div> |
8 | 8 |
<div *ngIf="successMessage" class="uk-alert uk-alert-success">{{ successMessage }}</div> |
9 |
<form *ngIf="selectedRepo" [formGroup]="updateGroup"> |
|
9 |
<form *ngIf="selectedRepo && !loadingMessage" [formGroup]="updateGroup">
|
|
10 | 10 |
<div> |
11 | 11 |
<h4 class="uk-h4 uk-text-primary uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class=""> |
12 | 12 |
Basic information |
modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-update-repo.component.html | ||
---|---|---|
24 | 24 |
<div class="whiteFilm"></div> |
25 | 25 |
</div> |
26 | 26 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger">{{ errorMessage }}</div> |
27 |
<div *ngIf="repo" class="uk-margin-medium-bottom"> |
|
27 |
<div *ngIf="!loadingMessage && repo" class="uk-margin-medium-bottom">
|
|
28 | 28 |
<h1 class="uk-article-title"> |
29 | 29 |
<a id="updateLogoURL" (click)="updateLogoUrl(repo.logoUrl)"> |
30 | 30 |
<img *ngIf="!logoURL" src="/assets/imgs/yourLogoHere.jpg" style="margin-right: 15px; margin-top:-8px" width="60"> |
... | ... | |
33 | 33 |
{{ repo.officialName }} |
34 | 34 |
</h1> |
35 | 35 |
</div> |
36 |
<div *ngIf="repo && repoInterfaces"> |
|
36 |
<div *ngIf="!loadingMessage && repo && repoInterfaces">
|
|
37 | 37 |
<div> |
38 | 38 |
<ul class="uk-margin el-nav uk-tab" uk-switcher="connect: .uk-switcher"> |
39 | 39 |
<li routerLinkActive="uk-active"> |
modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-update-repo.component.ts | ||
---|---|---|
56 | 56 |
this.repoId = this.route.snapshot.paramMap.get('id'); |
57 | 57 |
console.log(`repoId is ${this.repoId}`); |
58 | 58 |
this.getRepo(); |
59 |
this.getRepoInterfaces(); |
|
60 | 59 |
} |
61 | 60 |
|
62 | 61 |
getRepo() { |
... | ... | |
72 | 71 |
this.errorMessage = loadingRepoError; |
73 | 72 |
}, |
74 | 73 |
() => { |
75 |
this.loadingMessage = ''; |
|
76 |
this.logoURL = this.repo.logoUrl; |
|
77 | 74 |
if ( this.authService.activateFrontAuthorization && (this.authService.getUserEmail() !== this.repo.registeredBy.trim()) ) { |
78 | 75 |
this.router.navigateByUrl('/403-forbidden', { skipLocationChange: true }); |
76 |
} else { |
|
77 |
this.logoURL = this.repo.logoUrl; |
|
78 |
this.getRepoInterfaces(); |
|
79 | 79 |
} |
80 | 80 |
} |
81 | 81 |
); |
Also available in: Unified diff
fixed a bug