Procházet zdrojové kódy

Remove the '/details' path component

The '/details' path component is redundant as it sends the same output
as skipping it when listing replicas or migrations.
Sergiu Miclea před 6 roky
rodič
revize
9bfce4d599

+ 1 - 1
src/sources/MigrationSource.js

@@ -54,7 +54,7 @@ class MigrationSourceUtils {
 class MigrationSource {
 class MigrationSource {
   async getMigrations(skipLog?: boolean): Promise<MainItem[]> {
   async getMigrations(skipLog?: boolean): Promise<MainItem[]> {
     let response = await Api.send({
     let response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/migrations/detail`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/migrations`,
       skipLog,
       skipLog,
     })
     })
     let migrations = response.data.migrations
     let migrations = response.data.migrations

+ 1 - 1
src/sources/NotificationSource.js

@@ -116,7 +116,7 @@ class NotificationSource {
   async loadData(): Promise<NotificationItemData[]> {
   async loadData(): Promise<NotificationItemData[]> {
     let [migrationsResponse, replicasResponse] = await Promise.all([
     let [migrationsResponse, replicasResponse] = await Promise.all([
       Api.send({ url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/migrations`, skipLog: true, quietError: true }),
       Api.send({ url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/migrations`, skipLog: true, quietError: true }),
-      Api.send({ url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/detail`, skipLog: true, quietError: true }),
+      Api.send({ url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas`, skipLog: true, quietError: true }),
     ])
     ])
 
 
     let migrations = migrationsResponse.data.migrations
     let migrations = migrationsResponse.data.migrations

+ 1 - 1
src/sources/ReplicaSource.js

@@ -118,7 +118,7 @@ class ReplicaSourceUtils {
 class ReplicaSource {
 class ReplicaSource {
   async getReplicas(skipLog?: boolean, quietError?: boolean): Promise<MainItem[]> {
   async getReplicas(skipLog?: boolean, quietError?: boolean): Promise<MainItem[]> {
     let response = await Api.send({
     let response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/detail`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas`,
       skipLog,
       skipLog,
       quietError,
       quietError,
     })
     })

+ 2 - 2
src/stores/LogStore.js

@@ -71,8 +71,8 @@ class LogStore {
     let baseUrl = `${configLoader.config.servicesUrls.coriolis}/${apiCaller.projectId}`
     let baseUrl = `${configLoader.config.servicesUrls.coriolis}/${apiCaller.projectId}`
     let [diagnosticsResp, replicasResp, migrationsResp] = await Promise.all([
     let [diagnosticsResp, replicasResp, migrationsResp] = await Promise.all([
       apiCaller.send({ url: `${baseUrl}/diagnostics` }),
       apiCaller.send({ url: `${baseUrl}/diagnostics` }),
-      apiCaller.send({ url: `${baseUrl}/replicas/detail?show_deleted=true` }),
-      apiCaller.send({ url: `${baseUrl}/migrations/detail?show_deleted=true` }),
+      apiCaller.send({ url: `${baseUrl}/replicas?show_deleted=true` }),
+      apiCaller.send({ url: `${baseUrl}/migrations?show_deleted=true` }),
     ])
     ])
 
 
     const zip = new JSZip()
     const zip = new JSZip()