Skip to content
Snippets Groups Projects
Commit ddeb3709 authored by Xiao Gui's avatar Xiao Gui
Browse files

fix: sapi endpoint

chore: remove unused connectivity display fn
fix: add feedback when error fetching feature
parent 28c138a8
No related branches found
No related tags found
No related merge requests found
......@@ -11,8 +11,11 @@
- Added reference to Julich Brain 3.1
- Fixed unsupported parcellations
- Fixed navigation to ICBM152/JulichBrain3.1 on startup
- Fixed siibra-api endpoint definition
- Added feedback when fetch feature encounters error
## Behind the Scenes
- Updated CI/CD pipelines
- Removed unused pipes
- Removed unused display function in connectivity component
......@@ -359,10 +359,6 @@ export class ConnectivityBrowserComponent implements OnChanges {
shareReplay(1),
)),
)
subjectDisplayWith(subId: number): string {
return this.selectedDataset?.subjects[subId] || `${subId}`
}
selectedDatasetAdditionalInfos$ = this.selectedDataset$.pipe(
map(ds => ds ? ds.datasets : [])
......
......@@ -77,7 +77,6 @@
</mat-label>
<mat-slider [min]="0"
[max]="(view$ | async | getProperty : 'numSubjects') - 1"
[displayWith]="subjectDisplayWith"
step="1"
[discrete]="true"
class="w-100">
......
......@@ -80,26 +80,36 @@ export class ListDirective extends FeatureBase implements OnDestroy{
return []
}
const results = await this.sapi.v3Get(`/feature/${route}`, {
query: {
...this.queryParams,
...query,
page
}
}).pipe(
switchMap(resp => {
totalPages = resp.pages || 0
this.#total.next(resp.total || 0)
if (resp.items.length === 0) {
return of([] as TranslatedFeature[])
try {
const results = await this.sapi.v3Get(`/feature/${route}`, {
query: {
...this.queryParams,
...query,
page
}
return forkJoin(
resp.items.map(feature => translateV3Entities.translateFeature(feature))
)
})
).toPromise()
page += 1
return results
}).pipe(
switchMap(resp => {
totalPages = resp.pages || 0
this.#total.next(resp.total || 0)
if (resp.items.length === 0) {
return of([] as TranslatedFeature[])
}
return forkJoin(
resp.items.map(feature => translateV3Entities.translateFeature(feature))
)
})
).toPromise()
page += 1
return results
} catch (e) {
console.error(`Datasource Error:`)
console.error(e)
totalPages = 0
this.#total.next(0)
return []
}
},
annotations: {
...this.queryParams,
......
......@@ -51,7 +51,7 @@ import { LayerCtrlEffects } from './viewerModule/nehuba/layerCtrl.service/layerC
import { NehubaNavigationEffects } from './viewerModule/nehuba/navigation.service/navigation.effects';
import { CONST } from "common/constants"
import { ViewerCommonEffects } from './viewerModule';
import { environment } from './environments/environment.common';
import { environment } from './environments/environment';
import { SAPI } from './atlasComponents/sapi';
@NgModule({
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment