瀏覽代碼

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 6 年之前
父節點
當前提交
9bfce4d599
共有 4 個文件被更改,包括 5 次插入5 次删除
  1. 1 1
      src/sources/MigrationSource.js
  2. 1 1
      src/sources/NotificationSource.js
  3. 1 1
      src/sources/ReplicaSource.js
  4. 2 2
      src/stores/LogStore.js

+ 1 - 1
src/sources/MigrationSource.js

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

+ 1 - 1
src/sources/NotificationSource.js

@@ -116,7 +116,7 @@ class NotificationSource {
   async loadData(): Promise<NotificationItemData[]> {
     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}/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

+ 1 - 1
src/sources/ReplicaSource.js

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

+ 2 - 2
src/stores/LogStore.js

@@ -71,8 +71,8 @@ class LogStore {
     let baseUrl = `${configLoader.config.servicesUrls.coriolis}/${apiCaller.projectId}`
     let [diagnosticsResp, replicasResp, migrationsResp] = await Promise.all([
       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()