|
|
@@ -44,19 +44,21 @@
|
|
|
(let [tx-info [0 r (user/user-uuid) (state/get-current-repo)]]
|
|
|
(apply sync/update-graphs-txid! tx-info)
|
|
|
(swap! refresh-file-sync-component not) tx-info)
|
|
|
- (cond
|
|
|
- ;; already processed this exception by events
|
|
|
- ;; - :file-sync/storage-exceed-limit
|
|
|
- ;; - :file-sync/graph-count-exceed-limit
|
|
|
- (or (sync/storage-exceed-limit? r)
|
|
|
- (sync/graph-count-exceed-limit? r))
|
|
|
- nil
|
|
|
-
|
|
|
- (contains? #{400 404} (get-in (ex-data r) [:err :status]))
|
|
|
- (notification/show! (str "Create graph failed: already existed graph: " name) :warning true nil 4000)
|
|
|
-
|
|
|
- :else
|
|
|
- (notification/show! (str "Create graph failed:" r) :warning true nil 4000))))))
|
|
|
+ (do
|
|
|
+ (state/set-state! [:ui/loading? :graph/create-remote?] false)
|
|
|
+ (cond
|
|
|
+ ;; already processed this exception by events
|
|
|
+ ;; - :file-sync/storage-exceed-limit
|
|
|
+ ;; - :file-sync/graph-count-exceed-limit
|
|
|
+ (or (sync/storage-exceed-limit? r)
|
|
|
+ (sync/graph-count-exceed-limit? r))
|
|
|
+ nil
|
|
|
+
|
|
|
+ (contains? #{400 404} (get-in (ex-data r) [:err :status]))
|
|
|
+ (notification/show! (str "Create graph failed: already existed graph: " name) :warning true nil 4000)
|
|
|
+
|
|
|
+ :else
|
|
|
+ (notification/show! (str "Create graph failed:" r) :warning true nil 4000)))))))
|
|
|
|
|
|
(defn <delete-graph
|
|
|
[graph-uuid]
|