The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Diagnostics cleanup pulled from the metrics branch (#69926)
Alexander Polyankinba302fc0ef51
diff --git a/e2e/test/scenarios/data-studio/transforms/transforms.cy.spec.ts b/e2e/test/scenarios/data-studio/transforms/transforms.cy.spec.tsindex 48f1b9ed41a..64677e61dbe 100644--- a/e2e/test/scenarios/data-studio/transforms/transforms.cy.spec.ts+++ b/e2e/test/scenarios/data-studio/transforms/transforms.cy.spec.ts@@ -50,7 +50,7 @@ describe("scenarios > admin > transforms", () => {cy.intercept("POST", "/api/transform-tag").as("createTag");cy.intercept("PUT", "/api/transform-tag/*").as("updateTag");cy.intercept("DELETE", "/api/transform-tag/*").as("deleteTag");- cy.intercept("POST", "/api/ee/dependencies/check_transform").as(+ cy.intercept("POST", "/api/ee/dependencies/check-transform").as("checkTransformDependencies",);});diff --git a/enterprise/backend/src/metabase_enterprise/dependencies/api.clj b/enterprise/backend/src/metabase_enterprise/dependencies/api.cljindex 6cd10364d80..e81a013ef0b 100644--- a/enterprise/backend/src/metabase_enterprise/dependencies/api.clj+++ b/enterprise/backend/src/metabase_enterprise/dependencies/api.clj@@ -68,10 +68,7 @@broken-cards):bad_transforms (into [] broken-transforms)}))-;; TODO (Cam 10/28/25) -- fix this endpoint route to use kebab-case for consistency with the rest of our REST API-;;-#_{:clj-kondo/ignore [:metabase/validate-defendpoint-route-uses-kebab-case]}-(api.macros/defendpoint :post "/check_card" :- ::broken-cards-response+(api.macros/defendpoint :post "/check-card" :- ::broken-cards-response"Check a proposed edit to a card, and return the card IDs for those cards this edit will break."[_route-params_query-params@@ -106,10 +103,7 @@[:query {:optional true} ::queries.schema/query]]]][:target {:optional true} [:maybe ms/Map]]])-;; TODO (Cam 10/28/25) -- fix this endpoint route to use kebab-case for consistency with the rest of our REST API-;;-#_{:clj-kondo/ignore [:metabase/validate-defendpoint-route-uses-kebab-case]}-(api.macros/defendpoint :post "/check_transform" :- ::broken-cards-response+(api.macros/defendpoint :post "/check-transform" :- ::broken-cards-response"Check a proposed edit to a transform, and return the card, transform, etc. IDs for things that will break."[_route-params_query-params@@ -130,10 +124,7 @@;; if this isn't a sql query, just claim it works{:success true}))-;; TODO (Cam 10/28/25) -- fix this endpoint route to use kebab-case for consistency with the rest of our REST API-;;-#_{:clj-kondo/ignore [:metabase/validate-defendpoint-route-uses-kebab-case]}-(api.macros/defendpoint :post "/check_snippet" :- ::broken-cards-response+(api.macros/defendpoint :post "/check-snippet" :- ::broken-cards-response"Check a proposed edit to a native snippet, and return the cards, etc. which will be broken."[_route-params_query-params@@ -700,20 +691,20 @@[:map[:id ms/PositiveInt][:type ::deps.dependency-types/dependency-types]- [:dependent_types {:optional true}+ [:dependent-types {:optional true}[:or::deps.dependency-types/dependency-types[:sequential ::deps.dependency-types/dependency-types]]]- [:dependent_card_types {:optional true}+ [:dependent-card-types {:optional true}[:or(ms/enum-decode-keyword lib.schema.metadata/card-types)[:sequential (ms/enum-decode-keyword lib.schema.metadata/card-types)]]][:archived {:optional true} :boolean][:broken {:optional true} :boolean][:query {:optional true} :string]- [:include_personal_collections {:optional true} :boolean]- [:sort_column {:optional true} (ms/enum-decode-keyword dependents-sort-columns)]- [:sort_direction {:optional true} (ms/enum-decode-keyword sort-directions)]])+ [:include-personal-collections {:optional true} :boolean]+ [:sort-column {:optional true} (ms/enum-decode-keyword dependents-sort-columns)]+ [:sort-direction {:optional true} (ms/enum-decode-keyword sort-directions)]])(api.macros/defendpoint :get "/graph/dependents" :- [:sequential ::entity]"Returns a list of dependents for the specified entity.@@ -723,22 +714,22 @@- `type`: The type of the entity (card, table, dashboard, etc.)Optional parameters:- - `dependent_types`: Dependency types to filter by. Can be single value or array.- If not provided, returns all types. Example: ?dependent_types=card&dependent_types=dashboard- - `dependent_card_types`: Card types to filter by when dependent_types includes :card.- Ignored if dependent_types doesn't include :card. Example: ?dependent_card_types=question&dependent_card_types=model+ - `dependent-types`: Dependency types to filter by. Can be single value or array.+ If not provided, returns all types. Example: ?dependent-types=card&dependent-types=dashboard+ - `dependent-card-types`: Card types to filter by when dependent-types includes :card.+ Ignored if dependent-types doesn't include :card. Example: ?dependent-card-types=question&dependent-card-types=model- `archived`: Include entities in archived collections (default: false)- `broken`: Return only broken entities (default: false)- `query`: Search string to filter results by name or location (case-insensitive)- - `include_personal_collections`: Include items in personal collections (default: false)- - `sort_column`: Column to sort by - name, location, or view-count (default: name)- - `sort_direction`: Sort direction - asc or desc (default: asc)"+ - `include-personal-collections`: Include items in personal collections (default: false)+ - `sort-column`: Column to sort by - name, location, or view-count (default: name)+ - `sort-direction`: Sort direction - asc or desc (default: asc)"[_route-params- {:keys [id type dependent_types dependent_card_types archived broken- query include_personal_collections sort_column sort_direction]- :or {include_personal_collections false- sort_column :name- sort_direction :asc}} :- dependents-args]+ {:keys [id type dependent-types dependent-card-types archived broken+ query include-personal-collections sort-column sort-direction]+ :or {include-personal-collections false+ sort-column :name+ sort-direction :asc}} :- dependents-args](api/read-check (deps.dependency-types/dependency-type->model type) id)(lib-be/with-metadata-provider-cache(let [graph-opts {:include-archived-items (if archived :all :exclude)@@ -747,13 +738,13 @@nodes (-> (graph/children-of downstream-graph [[type id]])(get [type id]))dep-types-set (cond- (nil? dependent_types) deps.dependency-types/dependency-types- (sequential? dependent_types) (set dependent_types)- :else #{dependent_types})+ (nil? dependent-types) deps.dependency-types/dependency-types+ (sequential? dependent-types) (set dependent-types)+ :else #{dependent-types})card-types-set (cond- (nil? dependent_card_types) lib.schema.metadata/card-types- (sequential? dependent_card_types) (set dependent_card_types)- :else #{dependent_card_types})+ (nil? dependent-card-types) lib.schema.metadata/card-types+ (sequential? dependent-card-types) (set dependent-card-types)+ :else #{dependent-card-types})dependents-filter(comp;; Filter by dependent types and card types@@ -764,7 +755,7 @@(nil? card-types-set)(contains? card-types-set (-> node :data :type))))));; Filter out personal collections unless explicitly included- (if include_personal_collections+ (if include-personal-collectionsidentity(remove in-personal-collection?));; Filter by query (sandboxes are excluded since they have no name or location)@@ -772,7 +763,7 @@(filter #(entity-matches-query? % query))identity))](-> (into [] dependents-filter (expanded-nodes downstream-graph nodes {:include-errors? false}))- (sort-dependents sort_column sort_direction)))))+ (sort-dependents sort-column sort-direction)))))(defn- entity-type-config[entity-type]@@ -949,14 +940,14 @@[:types {:optional true} [:or::deps.dependency-types/dependency-types[:sequential ::deps.dependency-types/dependency-types]]]- [:card_types {:optional true} [:or+ [:card-types {:optional true} [:or(ms/enum-decode-keyword lib.schema.metadata/card-types)[:sequential (ms/enum-decode-keyword lib.schema.metadata/card-types)]]][:query {:optional true} :string][:archived {:optional true} :boolean]- [:include_personal_collections {:optional true} :boolean]- [:sort_column {:optional true} (ms/enum-decode-keyword breaking-items-sort-columns)]- [:sort_direction {:optional true} (ms/enum-decode-keyword sort-directions)]])+ [:include-personal-collections {:optional true} :boolean]+ [:sort-column {:optional true} (ms/enum-decode-keyword breaking-items-sort-columns)]+ [:sort-direction {:optional true} (ms/enum-decode-keyword sort-directions)]])(def ^:private dependency-items-response[:map@@ -971,12 +962,12 @@Accepts optional parameters for filtering:- `types`: List of entity types to include (e.g., [:card :transform :snippet :dashboard])- - `card_types`: List of card types to include when filtering cards (e.g., [:question :model :metric])+ - `card-types`: List of card types to include when filtering cards (e.g., [:question :model :metric])- `query`: Search string to filter by name or location- `archived`: Controls whether archived entities are included- - `include_personal_collections`: Controls whether items in personal collections are included (default: false)- - `sort_column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`)- - `sort_direction`: Sort direction - `:asc` or `:desc` (default: `:asc`)+ - `include-personal-collections`: Controls whether items in personal collections are included (default: false)+ - `sort-column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`)+ - `sort-direction`: Sort direction - `:asc` or `:desc` (default: `:asc`)- `offset`: Default 0- `limit`: Default 50@@ -986,12 +977,12 @@- `offset`: Applied offset- `limit`: Applied limit"[_route-params- {:keys [types card_types query archived include_personal_collections sort_column sort_direction]+ {:keys [types card-types query archived include-personal-collections sort-column sort-direction]:or {types (vec deps.dependency-types/dependency-types)- card_types (vec lib.schema.metadata/card-types)- include_personal_collections false- sort_column :name- sort_direction :asc}} :- dependency-items-args]+ card-types (vec lib.schema.metadata/card-types)+ include-personal-collections false+ sort-column :name+ sort-direction :asc}} :- dependency-items-args](let [offset (or (request/offset) 0)limit (or (request/limit) 50)include-archived-items (if archived :all :exclude)@@ -999,18 +990,18 @@selected-types (cond->> (if (sequential? types) types [types]);; Sandboxes don't support query filtering, so exclude them when a query is providedquery (remove #{:sandbox}))- card-types (if (sequential? card_types) card_types [card_types])+ card-types (if (sequential? card-types) card-types [card-types])union-queries (map #(dependency-items-query {:query-type :unreferenced:entity-type %:card-types card-types:query query:include-archived-items include-archived-items- :include-personal-collections include_personal_collections- :sort-column sort_column})+ :include-personal-collections include-personal-collections+ :sort-column sort-column})selected-types)union-query {:union-all union-queries}all-ids (->> (t2/query (assoc union-query- :order-by [[:sort_key sort_direction] [:entity_id sort_direction] [:entity_type sort_direction]]+ :order-by [[:sort_key sort-direction] [:entity_id sort-direction] [:entity_type sort-direction]]:offset offset:limit limit))(map (fn [{:keys [entity_id entity_type]}]@@ -1032,12 +1023,12 @@Accepts optional parameters for filtering:- `types`: List of source entity types - only `:card` or `:table` (default: both)- - `card_types`: List of card types to include when filtering cards (e.g., `[:question :model :metric]`)+ - `card-types`: List of card types to include when filtering cards (e.g., `[:question :model :metric]`)- `query`: Search string to filter by name or location- `archived`: Controls whether archived entities are included- - `include_personal_collections`: Controls whether items in personal collections are included (default: false)- - `sort_column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`)- - `sort_direction`: Sort direction - `:asc` or `:desc` (default: `:asc`)+ - `include-personal-collections`: Controls whether items in personal collections are included (default: false)+ - `sort-column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`)+ - `sort-direction`: Sort direction - `:asc` or `:desc` (default: `:asc`)- `offset`: Default 0- `limit`: Default 50@@ -1047,12 +1038,12 @@- `offset`: Applied offset- `limit`: Applied limit"[_route-params- {:keys [types card_types query archived include_personal_collections sort_column sort_direction]+ {:keys [types card-types query archived include-personal-collections sort-column sort-direction]:or {types [:card :table]- card_types (vec lib.schema.metadata/card-types)- include_personal_collections false- sort_column :name- sort_direction :asc}} :- dependency-items-args]+ card-types (vec lib.schema.metadata/card-types)+ include-personal-collections false+ sort-column :name+ sort-direction :asc}} :- dependency-items-args](let [offset (or (request/offset) 0)limit (or (request/limit) 50)include-archived-items (if archived :all :exclude)@@ -1060,18 +1051,18 @@selected-types (cond->> (if (sequential? types) types [types]);; Sandboxes don't support query filtering, so exclude them when a query is providedquery (remove #{:sandbox}))- card-types (if (sequential? card_types) card_types [card_types])+ card-types (if (sequential? card-types) card-types [card-types])union-queries (map #(dependency-items-query {:query-type :breaking:entity-type %:card-types card-types:query query:include-archived-items include-archived-items- :include-personal-collections include_personal_collections- :sort-column sort_column})+ :include-personal-collections include-personal-collections+ :sort-column sort-column})selected-types)union-query {:union-all union-queries}all-ids (->> (t2/query (assoc union-query- :order-by [[:sort_key sort_direction] [:entity_id sort_direction] [:entity_type sort_direction]]+ :order-by [[:sort_key sort-direction] [:entity_id sort-direction] [:entity_type sort-direction]]:offset offset:limit limit))(map (fn [{:keys [entity_id entity_type]}]@@ -1103,17 +1094,17 @@[:map[:id ms/PositiveInt][:type ::deps.dependency-types/dependency-types]- [:dependent_types {:optional true}+ [:dependent-types {:optional true}[:or::deps.dependency-types/dependency-types[:sequential ::deps.dependency-types/dependency-types]]]- [:dependent_card_types {:optional true}+ [:dependent-card-types {:optional true}[:or(ms/enum-decode-keyword lib.schema.metadata/card-types)[:sequential (ms/enum-decode-keyword lib.schema.metadata/card-types)]]]- [:include_personal_collections {:optional true} :boolean]- [:sort_column {:optional true} (ms/enum-decode-keyword dependents-sort-columns)]- [:sort_direction {:optional true} (ms/enum-decode-keyword sort-directions)]])+ [:include-personal-collections {:optional true} :boolean]+ [:sort-column {:optional true} (ms/enum-decode-keyword dependents-sort-columns)]+ [:sort-direction {:optional true} (ms/enum-decode-keyword sort-directions)]])(mr/def ::broken-dependent-entity"Entity returned by /graph/broken endpoint - includes errors but no dependents_count."@@ -1131,25 +1122,25 @@- `type`: The type of the source entity (card, table)Optional parameters:- - `dependent_types`: Dependency types to filter by. Can be single value or array.- - `dependent_card_types`: Card types to filter by when dependent_types includes :card.- - `include_personal_collections`: Include items in personal collections (default: false)- - `sort_column`: Column to sort by - name, location, or view-count (default: name)- - `sort_direction`: Sort direction - asc or desc (default: asc)"+ - `dependent-types`: Dependency types to filter by. Can be single value or array.+ - `dependent-card-types`: Card types to filter by when dependent-types includes :card.+ - `include-personal-collections`: Include items in personal collections (default: false)+ - `sort-column`: Column to sort by - name, location, or view-count (default: name)+ - `sort-direction`: Sort direction - asc or desc (default: asc)"[_route-params- {:keys [id dependent_types dependent_card_types include_personal_collections sort_column sort_direction]+ {:keys [id dependent-types dependent-card-types include-personal-collections sort-column sort-direction]entity-type :type- :or {include_personal_collections false- sort_column :name- sort_direction :asc}} :- broken-dependents-args]+ :or {include-personal-collections false+ sort-column :name+ sort-direction :asc}} :- broken-dependents-args](api/read-check (deps.dependency-types/dependency-type->model entity-type) id)(lib-be/with-metadata-provider-cache(let [normalize-types (fn normalize-types [types](if (keyword? types)[(name types)](not-empty (map name types))))- dep-types (normalize-types dependent_types)- card-types (normalize-types dependent_card_types)+ dep-types (normalize-types dependent-types)+ card-types (normalize-types dependent-card-types)where-clause (cond-> [:and[:= :afe.source_entity_type (name entity-type)][:= :afe.source_entity_id id]@@ -1185,9 +1176,9 @@:type entity-type:data (-> (select-keys entity (entity-keys entity-type))(update-vals format-subentity))}))- (not include_personal_collections) (comp (remove in-personal-collection?)))+ (not include-personal-collections) (comp (remove in-personal-collection?)))(fetch-and-hydrate-nodes nodes-by-type))- (sort-dependents sort_column sort_direction)))))+ (sort-dependents sort-column sort-direction)))))(def ^{:arglists '([request respond raise])} routes"`/api/ee/dependencies` routes."diff --git a/enterprise/backend/test/metabase_enterprise/dependencies/api_test.clj b/enterprise/backend/test/metabase_enterprise/dependencies/api_test.cljindex abe4818359e..076e93d0ff1 100644--- a/enterprise/backend/test/metabase_enterprise/dependencies/api_test.clj+++ b/enterprise/backend/test/metabase_enterprise/dependencies/api_test.clj@@ -130,12 +130,12 @@(dependencies.findings/upsert-analysis! (t2/select-one :model/Card :id card-id)))(deftest check-card-test- (testing "POST /api/ee/dependencies/check_card"+ (testing "POST /api/ee/dependencies/check-card"(mt/with-premium-features #{:dependencies}(mt/with-temp [:model/User user {:email "[email protected]"}](mt/with-model-cleanup [:model/Card :model/Dependency](let [card (card/create-card! (basic-card) user)- response (mt/user-http-request :rasta :post 200 "ee/dependencies/check_card"+ response (mt/user-http-request :rasta :post 200 "ee/dependencies/check-card"(assoc (card/create-card! (basic-card "Product question" :products)user):id (:id card)))]@@ -143,7 +143,7 @@response))))))))(deftest check-card-hydrates-dashboard-and-document-test- (testing "POST /api/ee/dependencies/check_card hydrates dashboard and document for cards"+ (testing "POST /api/ee/dependencies/check-card hydrates dashboard and document for cards"(mt/dataset test-data(mt/with-premium-features #{:dependencies}(mt/with-current-user (mt/user->id :rasta)@@ -180,10 +180,10 @@:document_id (:id document):document (select-keys document [:id :name])}]:bad_transforms []}- (mt/user-http-request :rasta :post 200 "ee/dependencies/check_card" proposed-card)))))))))))+ (mt/user-http-request :rasta :post 200 "ee/dependencies/check-card" proposed-card)))))))))))(deftest check-card-removing-column-breaks-downstream-test- (testing "POST /api/ee/dependencies/check_card detects when removing a column breaks downstream cards"+ (testing "POST /api/ee/dependencies/check-card detects when removing a column breaks downstream cards"(mt/dataset test-data(mt/with-premium-features #{:dependencies}(mt/with-temp [:model/User user {:email "[email protected]"}]@@ -206,14 +206,14 @@:type :question:dataset_query proposed-query:result_metadata nil}- response (mt/user-http-request :rasta :post 200 "ee/dependencies/check_card" proposed-card)]+ response (mt/user-http-request :rasta :post 200 "ee/dependencies/check-card" proposed-card)](is (=? {:success false:bad_cards [{:id (:id dependent-card)}]:bad_transforms []}response)))))))))(deftest check-card-renaming-expression-breaks-downstream-test- (testing "POST /api/ee/dependencies/check_card detects when renaming an expression breaks downstream cards"+ (testing "POST /api/ee/dependencies/check-card detects when renaming an expression breaks downstream cards"(mt/dataset test-data(mt/with-premium-features #{:dependencies}(mt/with-temp [:model/User user {:email "[email protected]"}]@@ -243,7 +243,7 @@:type :question:dataset_query proposed-query:result_metadata nil}- response (mt/user-http-request :rasta :post 200 "ee/dependencies/check_card"+ response (mt/user-http-request :rasta :post 200 "ee/dependencies/check-card"proposed-card)](is (=? {:success false:bad_cards [{:id (:id dependent-card)}]@@ -251,7 +251,7 @@response)))))))))(deftest check-card-breaks-multiple-downstream-cards-test- (testing "POST /api/ee/dependencies/check_card detects when one change breaks multiple downstream cards"+ (testing "POST /api/ee/dependencies/check-card detects when one change breaks multiple downstream cards"(mt/dataset test-data(mt/with-premium-features #{:dependencies}(mt/with-temp [:model/User user {:email "[email protected]"}]@@ -282,14 +282,14 @@:type :question:dataset_query proposed-query:result_metadata nil}- response (mt/user-http-request :rasta :post 200 "ee/dependencies/check_card" proposed-card)]+ response (mt/user-http-request :rasta :post 200 "ee/dependencies/check-card" proposed-card)](is (=? {:success false:bad_cards #{(:id dependent-card-1) (:id dependent-card-2)}:bad_transforms []}(update response :bad_cards #(into #{} (map :id) %)))))))))))(deftest check-card-skips-native-cards-test- (testing "POST /api/ee/dependencies/check_card does not validate native cards"+ (testing "POST /api/ee/dependencies/check-card does not validate native cards"(mt/dataset test-data(mt/with-premium-features #{:dependencies}(mt/with-temp [:model/User user {:email "[email protected]"}]@@ -310,31 +310,31 @@:type :question:dataset_query proposed-query:result_metadata nil}- response (mt/user-http-request :rasta :post 200 "ee/dependencies/check_card" proposed-card)]+ response (mt/user-http-request :rasta :post 200 "ee/dependencies/check-card" proposed-card)](is (=? {:success false:bad_cards [{:id (:id dependent-card)}]:bad_transforms []}response)))))))))(deftest check-transform-test- (testing "POST /api/ee/dependencies/check_transform"+ (testing "POST /api/ee/dependencies/check-transform"(mt/with-premium-features #{:dependencies :transforms}(mt/with-temp [:model/Transform {_transform-id :id :as transform} {}]- (let [response (mt/user-http-request :crowberto :post 200 "ee/dependencies/check_transform" transform)]+ (let [response (mt/user-http-request :crowberto :post 200 "ee/dependencies/check-transform" transform)](is (= {:bad_cards [], :bad_transforms [], :success true}response)))))))(deftest check-snippet-test- (testing "POST /api/ee/dependencies/check_snippet"+ (testing "POST /api/ee/dependencies/check-snippet"(mt/with-premium-features #{:dependencies}(mt/with-temp [:model/NativeQuerySnippet {_snippet-id :id :as snippet} {:name "test-snippet":content "WHERE ID > 10"}]- (let [response (mt/user-http-request :crowberto :post 200 "ee/dependencies/check_snippet" snippet)]+ (let [response (mt/user-http-request :crowberto :post 200 "ee/dependencies/check-snippet" snippet)](is (= {:bad_cards [], :bad_transforms [], :success true}response)))))))(deftest check-snippet-content-change-doest-not-break-cards-test- (testing "POST /api/ee/dependencies/check_snippet doesn't catch when a change would break a card, because native query validation is disabled"+ (testing "POST /api/ee/dependencies/check-snippet doesn't catch when a change would break a card, because native query validation is disabled"(mt/dataset test-data(mt/with-premium-features #{:dependencies}(mt/with-temp [:model/User user {:email "[email protected]"}@@ -355,7 +355,7 @@:visualization_settings {}}user)proposed-content "WHERE NONEXISTENT_COLUMN > 100"- response (mt/user-http-request :rasta :post 200 "ee/dependencies/check_snippet"+ response (mt/user-http-request :rasta :post 200 "ee/dependencies/check-snippet"{:id snippet-id:content proposed-content})](is (=? {:success true@@ -451,8 +451,8 @@response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id card-id-1:type "card"- :dependent_types "card"- :dependent_card_types "question")]+ :dependent-types "card"+ :dependent-card-types "question")](is (=? [{:data{:collection{:id "root"@@ -473,7 +473,7 @@response))))))))(deftest ^:sequential dependents-multiple-types-test- (testing "GET /api/ee/dependencies/graph/dependents with multiple dependent_types"+ (testing "GET /api/ee/dependencies/graph/dependents with multiple dependent-types"(mt/with-premium-features #{:dependencies}(mt/with-model-cleanup [:model/Card :model/Dependency :model/DashboardCard](mt/with-temp [:model/User user {:email "[email protected]"}@@ -487,22 +487,22 @@:size_x 4:size_y 4})(while (#'dependencies.backfill/backfill-dependencies!))- (testing "single dependent_types value (backward compatibility)"+ (testing "single dependent-types value (backward compatibility)"(let [response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id card-id-1:type "card"- :dependent_types "card")]+ :dependent-types "card")](is (= 1 (count response)))(is (every? #(= "card" (:type %)) response))))- (testing "multiple dependent_types via repeated params"+ (testing "multiple dependent-types via repeated params"(let [response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id card-id-1:type "card"- :dependent_types "card"- :dependent_types "dashboard")]+ :dependent-types "card"+ :dependent-types "dashboard")](is (= 2 (count response)))(is (= #{"card" "dashboard"} (set (map :type response))))))- (testing "no dependent_types returns all types"+ (testing "no dependent-types returns all types"(let [response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id card-id-1:type "card")]@@ -511,43 +511,43 @@(is (contains? (set (map :type response)) "dashboard"))))))))))(deftest ^:sequential dependents-multiple-card-types-test- (testing "GET /api/ee/dependencies/graph/dependents with multiple dependent_card_types"+ (testing "GET /api/ee/dependencies/graph/dependents with multiple dependent-card-types"(mt/with-premium-features #{:dependencies}(mt/with-model-cleanup [:model/Card :model/Dependency](mt/with-temp [:model/User user {:email "[email protected]"}](let [{dependency-card-id :id :as dependency-card} (card/create-card! (basic-card "Base card - cardtypes") user)_question-card (card/create-card! (assoc (wrap-card dependency-card) :name "Question card") user)_model-card (card/create-card! (assoc (wrap-card dependency-card) :name "Model card" :type :model) user)]- (testing "single dependent_card_types value"+ (testing "single dependent-card-types value"(let [response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id dependency-card-id:type "card"- :dependent_types "card"- :dependent_card_types "question")]+ :dependent-types "card"+ :dependent-card-types "question")](is (= 1 (count response)))(is (= "question" (-> response first :data :type)))))- (testing "multiple dependent_card_types via repeated params"+ (testing "multiple dependent-card-types via repeated params"(let [response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id dependency-card-id:type "card"- :dependent_types "card"- :dependent_card_types "question"- :dependent_card_types "model")]+ :dependent-types "card"+ :dependent-card-types "question"+ :dependent-card-types "model")](is (= 2 (count response)))(is (= #{"question" "model"} (set (map #(-> % :data :type) response))))))- (testing "no dependent_card_types returns all card types"+ (testing "no dependent-card-types returns all card types"(let [response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id dependency-card-id:type "card"- :dependent_types "card")]+ :dependent-types "card")](is (= 2 (count response)))(is (= #{"question" "model"} (set (map #(-> % :data :type) response))))))- (testing "dependent_card_types ignored when dependent_types doesn't include card"+ (testing "dependent-card-types ignored when dependent-types doesn't include card"(let [response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id dependency-card-id:type "card"- :dependent_types "dashboard"- :dependent_card_types "question")]+ :dependent-types "dashboard"+ :dependent-card-types "question")](is (every? #(= "dashboard" (:type %)) response))))))))))(deftest graph-archived-card-test@@ -589,14 +589,14 @@(let [response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id (:id base-card):type "card"- :dependent_types "card")]+ :dependent-types "card")](is (empty? response))))(testing "archived=true includes archived dependent"(let [response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id (:id base-card):type "card"- :dependent_types "card"- :dependent_card_types "question"+ :dependent-types "card"+ :dependent-card-types "question":archived true)dependent-ids (set (map :id response))](is (contains? dependent-ids (:id dependent-card)))))))))))@@ -626,7 +626,7 @@"There should two dependents total"))))))))))(deftest check-card-permissions-test- (testing "POST /api/ee/dependencies/check_card requires read permissions on the input card"+ (testing "POST /api/ee/dependencies/check-card requires read permissions on the input card"(mt/with-premium-features #{:dependencies}(mt/with-non-admin-groups-no-root-collection-perms(mt/with-temp [:model/Collection collection {}@@ -635,16 +635,16 @@(let [card (card/create-card! (assoc (basic-card) :collection_id (u/the-id collection)) user)](testing "Returns 403 when user lacks read permissions"(is (= "You don't have permissions to do that."- (mt/user-http-request :rasta :post 403 "ee/dependencies/check_card"+ (mt/user-http-request :rasta :post 403 "ee/dependencies/check-card"(assoc card :name "Modified name")))))(testing "Returns 200 when user has read permissions"(perms/grant-collection-read-permissions! (perms/all-users-group) collection)(is (=? {:success true}- (mt/user-http-request :rasta :post 200 "ee/dependencies/check_card"+ (mt/user-http-request :rasta :post 200 "ee/dependencies/check-card"(assoc card :name "Modified name"))))))))))))(deftest check-snippet-permissions-test- (testing "POST /api/ee/dependencies/check_snippet requires native query execution permissions"+ (testing "POST /api/ee/dependencies/check-snippet requires native query execution permissions"(mt/with-premium-features #{:dependencies}(mt/with-non-admin-groups-no-root-collection-perms(mt/with-temp [:model/NativeQuerySnippet snippet {:name "test snippet"@@ -654,28 +654,28 @@(with-redefs [snippet.perms/has-any-native-permissions? (constantly false)](testing "Returns 403 when user lacks native query execution permissions"(is (= "You don't have permissions to do that."- (mt/user-http-request :rasta :post 403 "ee/dependencies/check_snippet"+ (mt/user-http-request :rasta :post 403 "ee/dependencies/check-snippet"{:id (:id snippet):content "SELECT 2"})))));; Grant native query permissions(testing "Returns 200 when user has native query execution permissions"- (mt/user-http-request :rasta :post 200 "ee/dependencies/check_snippet"+ (mt/user-http-request :rasta :post 200 "ee/dependencies/check-snippet"{:id (:id snippet):content "SELECT 2"})))))))(deftest check-transform-permissions-test- (testing "POST /api/ee/dependencies/check_transform requires read permissions on the input transform"+ (testing "POST /api/ee/dependencies/check-transform requires read permissions on the input transform"(mt/with-premium-features #{:dependencies :transforms}(mt/with-temp [:model/Transform transform {:name "test transform"}](testing "Returns 403 when user is not an admin (only admins can read transforms)"(is (= "You don't have permissions to do that."- (mt/user-http-request :rasta :post 403 "ee/dependencies/check_transform"+ (mt/user-http-request :rasta :post 403 "ee/dependencies/check-transform"{:id (:id transform):source (:source transform):target (:target transform)}))))(testing "Returns 200 when user is an admin"(is (=? {:success true}- (mt/user-http-request :crowberto :post 200 "ee/dependencies/check_transform"+ (mt/user-http-request :crowberto :post 200 "ee/dependencies/check-transform"{:id (:id transform):source (:source transform):target (:target transform)}))))))))@@ -712,15 +712,15 @@(mt/user-http-request :rasta :get 403 "ee/dependencies/graph/dependents":id card-id:type "card"- :dependent_types "card"- :dependent_card_types "question"))))+ :dependent-types "card"+ :dependent-card-types "question"))))(testing "Returns 200 when user has read permissions"(perms/grant-collection-read-permissions! (perms/all-users-group) collection)(mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id card-id:type "card"- :dependent_types "card"- :dependent_card_types "question")))))))))+ :dependent-types "card"+ :dependent-card-types "question")))))))))(deftest graph-filtering-test(testing "GET /api/ee/dependencies/graph filters out upstream nodes the user cannot read"@@ -783,8 +783,8 @@(let [response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id (:id base-card):type "card"- :dependent_types "card"- :dependent_card_types "question")+ :dependent-types "card"+ :dependent-card-types "question")dependent-ids (set (map :id response))](is (contains? dependent-ids (:id readable-dependent)))(is (not (contains? dependent-ids (:id unreadable-dependent)))))))))))))@@ -904,8 +904,8 @@(let [response (mt/user-http-request :rasta :get 200 "ee/dependencies/graph/dependents":id snippet-id:type "snippet"- :dependent_types "card"- :dependent_card_types "question")+ :dependent-types "card"+ :dependent-card-types "question")dependent-ids (set (map :id response))](is (contains? dependent-ids (:id readable-card))"Should see readable card as dependent")@@ -965,8 +965,8 @@(let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/dependents":id (:id base-card):type :card- :dependent_types :card- :dependent_card_types :question)+ :dependent-types :card+ :dependent-card-types :question)card-node (first (filter #(= (:id %) (:id dashboard-card)) response))](is (some? card-node))(is (= {:id (:id dashboard) :name "Test Dashboard"}@@ -997,8 +997,8 @@(let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/dependents":id (:id base-card):type :card- :dependent_types :card- :dependent_card_types :question)+ :dependent-types :card+ :dependent-card-types :question)card-node (first (filter #(= (:id %) (:id document-card)) response))](is (some? card-node))(is (= {:id (:id document) :name "Test Document"}@@ -1047,8 +1047,8 @@response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/dependents":id segment-id:type "segment"- :dependent_types "card"- :dependent_card_types "question")]+ :dependent-types "card"+ :dependent-card-types "question")](testing "returns card that uses the segment"(is (= 1 (count response)))(is (= (:id card) (:id (first response))))))))))))@@ -1136,8 +1136,8 @@response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/dependents":id measure-id:type "measure"- :dependent_types "card"- :dependent_card_types "question")]+ :dependent-types "card"+ :dependent-card-types "question")](testing "returns card that uses the measure"(is (= 1 (count response)))(is (= (:id card) (:id (first response))))))))))))@@ -1264,7 +1264,7 @@(lib.metadata/card mp)(lib/query mp))}](while (#'dependencies.backfill/backfill-dependencies!))- (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card_types=question&query=unreftest")]+ (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card-types=question&query=unreftest")](is (=? {:data [{:id unreffed-card-id:type "card":data {:name "Unreferenced Card - unreftest"}}]}@@ -1399,7 +1399,7 @@response))))))))(deftest ^:sequential unreferenced-card-types-test- (testing "GET /api/ee/dependencies/unreferenced - unreferenced models and metrics are filtered by card_types and pagination"+ (testing "GET /api/ee/dependencies/unreferenced - unreferenced models and metrics are filtered by card-types and pagination"(mt/with-premium-features #{:dependencies}(let [mp (mt/metadata-provider)products (lib.metadata/table mp (mt/id :products))]@@ -1411,14 +1411,14 @@:dataset_query (lib/query mp products)}](while (#'dependencies.backfill/backfill-dependencies!))(testing "filtering by model only"- (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card_types=model&query=cardtype")]+ (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card-types=model&query=cardtype")](is (=? {:data [{:id unreffed-model-id:type "card":data {:name "A - Unreferenced Model - cardtype":type "model"}}]}response))))(testing "filtering by metric only"- (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card_types=metric&query=cardtype")]+ (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card-types=metric&query=cardtype")](is (=? {:data [{:id unreffed-metric-id:type "card":data {:name "B - Unreferenced Metric - cardtype"@@ -1450,12 +1450,12 @@:dataset_query (lib/query mp products)}](while (#'dependencies.backfill/backfill-dependencies!))(testing "archived=false (default) excludes archived card"- (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card_types=question&query=archivedtest")+ (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card-types=question&query=archivedtest")card-ids (set (map :id (:data response)))](is (contains? card-ids unreffed-card-id))(is (not (contains? card-ids archived-card-id)))))(testing "archived=true includes archived card"- (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card_types=question&query=archivedtest&archived=true")+ (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card-types=question&query=archivedtest&archived=true")card-ids (set (map :id (:data response)))](is (contains? card-ids unreffed-card-id))(is (contains? card-ids archived-card-id)))))))))@@ -1636,7 +1636,7 @@(is (contains? measure-ids archived-measure-id)))))))))(deftest ^:sequential unreferenced-personal-collection-card-test- (testing "GET /api/ee/dependencies/graph/unreferenced with include_personal_collections parameter for cards"+ (testing "GET /api/ee/dependencies/graph/unreferenced with include-personal-collections parameter for cards"(mt/with-premium-features #{:dependencies}(binding [collection/*allow-deleting-personal-collections* true](let [mp (mt/metadata-provider)@@ -1658,21 +1658,21 @@:type :question:dataset_query (lib/query mp products)}](while (#'dependencies.backfill/backfill-dependencies!))- (testing "include_personal_collections=false (default) excludes cards in personal collections"- (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card_types=question&query=personalcolltest")+ (testing "include-personal-collections=false (default) excludes cards in personal collections"+ (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card-types=question&query=personalcolltest")card-ids (set (map :id (:data response)))](is (not (contains? card-ids card-in-personal)))(is (not (contains? card-ids card-in-sub-personal)))(is (contains? card-ids card-regular))))- (testing "include_personal_collections=true includes cards in personal collections"- (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card_types=question&query=personalcolltest&include_personal_collections=true")+ (testing "include-personal-collections=true includes cards in personal collections"+ (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=card&card-types=question&query=personalcolltest&include-personal-collections=true")card-ids (set (map :id (:data response)))](is (contains? card-ids card-in-personal))(is (contains? card-ids card-in-sub-personal))(is (contains? card-ids card-regular))))))))))(deftest ^:sequential unreferenced-personal-collection-dashboard-test- (testing "GET /api/ee/dependencies/graph/unreferenced with include_personal_collections parameter for dashboards"+ (testing "GET /api/ee/dependencies/graph/unreferenced with include-personal-collections parameter for dashboards"(mt/with-premium-features #{:dependencies}(binding [collection/*allow-deleting-personal-collections* true](mt/with-temp [:model/User {user-id :id} {}@@ -1682,13 +1682,13 @@:collection_id personal-coll-id}:model/Dashboard {dash-regular :id} {:name "Dashboard Regular - personalcolltest"}](while (#'dependencies.backfill/backfill-dependencies!))- (testing "include_personal_collections=false (default) excludes dashboards in personal collections"+ (testing "include-personal-collections=false (default) excludes dashboards in personal collections"(let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=dashboard&query=personalcolltest")dashboard-ids (set (map :id (:data response)))](is (not (contains? dashboard-ids dash-in-personal)))(is (contains? dashboard-ids dash-regular))))- (testing "include_personal_collections=true includes dashboards in personal collections"- (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=dashboard&query=personalcolltest&include_personal_collections=true")+ (testing "include-personal-collections=true includes dashboards in personal collections"+ (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/unreferenced?types=dashboard&query=personalcolltest&include-personal-collections=true")dashboard-ids (set (map :id (:data response)))](is (contains? dashboard-ids dash-in-personal))(is (contains? dashboard-ids dash-regular)))))))))@@ -1710,8 +1710,8 @@(let [response (mt/user-http-request :crowberto :get 200"ee/dependencies/graph/unreferenced":query "sorttest"- :sort_column :name- :sort_direction sort-direction)+ :sort-column :name+ :sort-direction sort-direction)names (mapv #(get-in % [:data :name]) (:data response))](is (= (cond-> ["A Card sorttest""B Table sorttest"@@ -1775,8 +1775,8 @@(let [response (mt/user-http-request :crowberto :get 200"ee/dependencies/graph/unreferenced":query "sorttest"- :sort_column :location- :sort_direction sort-direction)+ :sort-column :location+ :sort-direction sort-direction)names (mapv #(get-in % [:data :name]) (:data response))](is (= (cond-> ["Table with Database sorttest""Segment with Table 1 sorttest"@@ -1805,8 +1805,8 @@(let [response (mt/user-http-request :crowberto :get 200"ee/dependencies/graph/unreferenced":query "sorttest"- :sort_column :location- :sort_direction sort-direction)+ :sort-column :location+ :sort-direction sort-direction)names (mapv #(get-in % [:data :name]) (:data response))](is (= (cond-> ["Collection 1 sorttest""Our analytics sorttest"@@ -1929,7 +1929,7 @@(is (= 1 (count model-ids)) "Model should appear exactly once even with multiple broken dependents"))))))))(deftest ^:sequential breaking-entities-personal-collection-card-test- (testing "GET /api/ee/dependencies/graph/breaking with include_personal_collections parameter"+ (testing "GET /api/ee/dependencies/graph/breaking with include-personal-collections parameter"(mt/with-premium-features #{:dependencies}(binding [collection/*allow-deleting-personal-collections* true](mt/with-temp [:model/User {user-id :id} {}@@ -1955,13 +1955,13 @@(while (#'dependencies.backfill/backfill-dependencies!))(run-analysis-for-card! (:id dependent-card-1))(run-analysis-for-card! (:id dependent-card-2)))- (testing "include_personal_collections=false (default) excludes source cards in personal collections"+ (testing "include-personal-collections=false (default) excludes source cards in personal collections"(let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/breaking?types=card&query=personalcollbrokentest")card-ids (set (map :id (:data response)))](is (not (contains? card-ids (:id model-in-personal))))(is (contains? card-ids (:id model-regular)))))- (testing "include_personal_collections=true includes source cards in personal collections"- (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/breaking?types=card&query=personalcollbrokentest&include_personal_collections=true")+ (testing "include-personal-collections=true includes source cards in personal collections"+ (let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph/breaking?types=card&query=personalcollbrokentest&include-personal-collections=true")card-ids (set (map :id (:data response)))](is (contains? card-ids (:id model-in-personal)))(is (contains? card-ids (:id model-regular))))))))))))@@ -2026,8 +2026,8 @@"ee/dependencies/graph/breaking":types "card":query "sortnametest"- :sort_column :name- :sort_direction sort-direction)+ :sort-column :name+ :sort-direction sort-direction)names (mapv #(get-in % [:data :name]) (:data response))](is (= (cond-> ["A Card sortnametest""B Card sortnametest"]@@ -2063,8 +2063,8 @@"ee/dependencies/graph/breaking":types "card":query "sortloctest"- :sort_column :location- :sort_direction sort-direction)+ :sort-column :location+ :sort-direction sort-direction)names (mapv #(get-in % [:data :name]) (:data response))](is (= (cond-> ["Card with Collection 2 sortloctest""Card with Collection 1 sortloctest"]@@ -2101,8 +2101,8 @@"ee/dependencies/graph/breaking":types "card":query "sortdepstest"- :sort_column :dependents-with-errors- :sort_direction sort-direction)+ :sort-column :dependents-with-errors+ :sort-direction sort-direction)names (mapv #(get-in % [:data :name]) (:data response))](is (= (cond-> ["Card 2 sortdepstest""Card 1 sortdepstest"]@@ -2140,8 +2140,8 @@"ee/dependencies/graph/breaking":types "card":query "sorterrorstest"- :sort_column :dependents-with-errors- :sort_direction sort-direction)+ :sort-column :dependents-with-errors+ :sort-direction sort-direction)names (mapv #(get-in % [:data :name]) (:data response))];; Card 2 has 1 broken dependent, Card 1 has 2 broken dependents;; Ascending: fewer errors first, Descending: more errors first@@ -2195,7 +2195,7 @@(get-dependents base-card-id :query "SpecialCollection")))))))(deftest ^:sequential dependents-personal-collections-test- (testing "GET /api/ee/dependencies/graph/dependents with include_personal_collections parameter"+ (testing "GET /api/ee/dependencies/graph/dependents with include-personal-collections parameter"(binding [collection/*allow-deleting-personal-collections* true](with-dependents-test! [{user-id :id :as user} {base-card-id :id :as base-card}](mt/with-temp [:model/Collection {personal-coll-id :id} {:personal_owner_id user-id}@@ -2206,8 +2206,8 @@(testing "default excludes personal collections"(is (=? [{:data {:name "Regular"}}](get-dependents base-card-id))))- (testing "include_personal_collections=true includes them"- (is (= 3 (count (get-dependents base-card-id :include_personal_collections true))))))))))+ (testing "include-personal-collections=true includes them"+ (is (= 3 (count (get-dependents base-card-id :include-personal-collections true))))))))))(deftest ^:sequential dependents-sort-by-name-test(testing "GET /api/ee/dependencies/graph/dependents - sorting by name"@@ -2216,9 +2216,9 @@(create-dependent! base-card user "A Card")(create-dependent! base-card user "B Card")(is (=? [{:data {:name "A Card"}} {:data {:name "B Card"}} {:data {:name "C Card"}}]- (get-dependents base-card-id :sort_column :name :sort_direction :asc)))+ (get-dependents base-card-id :sort-column :name :sort-direction :asc)))(is (=? [{:data {:name "C Card"}} {:data {:name "B Card"}} {:data {:name "A Card"}}]- (get-dependents base-card-id :sort_column :name :sort_direction :desc))))))+ (get-dependents base-card-id :sort-column :name :sort-direction :desc))))))(deftest ^:sequential dependents-sort-by-location-test(testing "GET /api/ee/dependencies/graph/dependents - sorting by location"@@ -2230,9 +2230,9 @@(create-dependent! base-card user "In A" :collection_id coll-a)(create-dependent! base-card user "In B" :collection_id coll-b)(is (=? [{:data {:name "In A"}} {:data {:name "In B"}} {:data {:name "In C"}}]- (get-dependents base-card-id :sort_column :location :sort_direction :asc)))+ (get-dependents base-card-id :sort-column :location :sort-direction :asc)))(is (=? [{:data {:name "In C"}} {:data {:name "In B"}} {:data {:name "In A"}}]- (get-dependents base-card-id :sort_column :location :sort_direction :desc)))))))+ (get-dependents base-card-id :sort-column :location :sort-direction :desc)))))))(deftest ^:sequential dependents-sort-by-view-count-test(testing "GET /api/ee/dependencies/graph/dependents - sorting by view-count"@@ -2244,9 +2244,9 @@(t2/update! :model/Card mid-id {:view_count 50})(t2/update! :model/Card high-id {:view_count 100})(is (=? [{:data {:view_count 10}} {:data {:view_count 50}} {:data {:view_count 100}}]- (get-dependents base-card-id :sort_column :view-count :sort_direction :asc)))+ (get-dependents base-card-id :sort-column :view-count :sort-direction :asc)))(is (=? [{:data {:view_count 100}} {:data {:view_count 50}} {:data {:view_count 10}}]- (get-dependents base-card-id :sort_column :view-count :sort_direction :desc)))))))+ (get-dependents base-card-id :sort-column :view-count :sort-direction :desc)))))))(deftest ^:sequential dependents-sort-view-count-mixed-types-test(testing "GET /api/ee/dependencies/graph/dependents - view-count sorting with mixed entity types"@@ -2261,9 +2261,9 @@(t2/update! :model/Card low-id {:view_count 10})(t2/update! :model/Card high-id {:view_count 100})(is (=? [{:data {:view_count 10}} {:data {:view_count 100}} {:data {:view_count 200}}]- (get-dependents base-card-id :sort_column :view-count :sort_direction :asc)))+ (get-dependents base-card-id :sort-column :view-count :sort-direction :asc)))(is (=? [{:data {:view_count 200}} {:data {:view_count 100}} {:data {:view_count 10}}]- (get-dependents base-card-id :sort_column :view-count :sort_direction :desc)))))))))+ (get-dependents base-card-id :sort-column :view-count :sort-direction :desc)))))))))(deftest ^:sequential dependents-query-and-sort-combined-test(testing "GET /api/ee/dependencies/graph/dependents with query and sort together"@@ -2273,7 +2273,7 @@(create-dependent! base-card user "B Match")(create-dependent! base-card user "Should not appear")(is (=? [{:data {:name "A Match"}} {:data {:name "B Match"}} {:data {:name "C Match"}}]- (get-dependents base-card-id :query "Match" :sort_column :name :sort_direction :asc))))))+ (get-dependents base-card-id :query "Match" :sort-column :name :sort-direction :asc))))))(deftest ^:sequential node-errors-filtering-test(testing "node-errors filters by source visibility"@@ -2375,16 +2375,16 @@:query "errvistest":offset 0:limit 1- :sort_column "name"- :sort_direction "asc")+ :sort-column "name"+ :sort-direction "asc")page-2 (mt/user-http-request :crowberto :get 200"ee/dependencies/graph/breaking":types "card":query "errvistest":offset 1:limit 1- :sort_column "name"- :sort_direction "asc")]+ :sort-column "name"+ :sort-direction "asc")](testing "total count reflects all breaking entities"(is (= 2 (:total page-1)))(is (= 2 (:total page-2))))@@ -2419,14 +2419,14 @@"ee/dependencies/graph/breaking":types "card":query "errvistest"- :sort_column "dependents-errors"- :sort_direction "asc")+ :sort-column "dependents-errors"+ :sort-direction "asc")desc-response (mt/user-http-request :crowberto :get 200"ee/dependencies/graph/breaking":types "card":query "errvistest"- :sort_column "dependents-errors"- :sort_direction "desc")]+ :sort-column "dependents-errors"+ :sort-direction "desc")](testing "ascending order puts fewer errors first"(is (= (:id model-card-a) (-> asc-response :data first :id))))(testing "descending order puts more errors first"@@ -2491,8 +2491,8 @@"ee/dependencies/graph/breaking":types "card":query "sortviserr"- :sort_column "dependents-errors"- :sort_direction "asc")]+ :sort-column "dependents-errors"+ :sort-direction "asc")](testing "ascending order should put A first (1 visible error < 2 visible errors)";; BUG: Without fix, this fails because sort counts total errors (A=3, B=2);; so B comes first. With fix, sort counts visible errors (A=1, B=2) so A comes first.@@ -2512,8 +2512,8 @@:query "unreftest":offset 0:limit 2- :sort_column "name"- :sort_direction "asc")]+ :sort-column "name"+ :sort-direction "asc")](is (=? {:data [{:id card2-id} {:id card3-id}]:total 2:offset 0@@ -2539,8 +2539,8 @@"ee/dependencies/graph/unreferenced":types "card":query "unreftest"- :sort_column "name"- :sort_direction "asc")]+ :sort-column "name"+ :sort-direction "asc")](is (=? {:data [{:id card1-id}, {:id card4-id}]:total 2}response))))))))@@ -2649,13 +2649,13 @@(testing "sort by name ascending"(let [response (mt/user-http-request :crowberto :get 200(str "ee/dependencies/graph/broken?id=" (:id model-card)- "&type=card&sort_column=name&sort_direction=asc"))+ "&type=card&sort-column=name&sort-direction=asc"))names (mapv #(get-in % [:data :name]) response)](is (= ["A Dependent - countsorttest" "B Dependent - countsorttest"] names))))(testing "sort by name descending"(let [response (mt/user-http-request :crowberto :get 200(str "ee/dependencies/graph/broken?id=" (:id model-card)- "&type=card&sort_column=name&sort_direction=desc"))+ "&type=card&sort-column=name&sort-direction=desc"))names (mapv #(get-in % [:data :name]) response)](is (= ["B Dependent - countsorttest" "A Dependent - countsorttest"] names))))))))))@@ -2732,7 +2732,7 @@"Should return only model-2 (direct dependent), not card (transitive)"))))))))(deftest ^:synchronized broken-filter-by-dependent-types-test- (testing "GET /api/ee/dependencies/graph/broken - filters by dependent_types"+ (testing "GET /api/ee/dependencies/graph/broken - filters by dependent-types"(mt/with-premium-features #{:dependencies}(mt/with-temp [:model/User user {:email "[email protected]"}](mt/with-model-cleanup [:model/Card :model/Dependency :model/AnalysisFinding :model/AnalysisFindingError]@@ -2749,16 +2749,16 @@(testing "filtering by card type returns the dependent card"(let [response (mt/user-http-request :crowberto :get 200(str "ee/dependencies/graph/broken?id=" (:id model-card)- "&type=card&dependent_types=card&dependent_card_types=question"))]+ "&type=card&dependent-types=card&dependent-card-types=question"))](is (= [(:id dependent-card)] (mapv :id response)))))(testing "filtering by dashboard returns empty (no dashboards in this test)"(let [response (mt/user-http-request :crowberto :get 200(str "ee/dependencies/graph/broken?id=" (:id model-card)- "&type=card&dependent_types=dashboard"))]+ "&type=card&dependent-types=dashboard"))](is (empty? response))))))))))(deftest ^:synchronized broken-personal-collections-test- (testing "GET /api/ee/dependencies/graph/broken with include_personal_collections parameter"+ (testing "GET /api/ee/dependencies/graph/broken with include-personal-collections parameter"(mt/with-premium-features #{:dependencies}(binding [collection/*allow-deleting-personal-collections* true](mt/with-temp [:model/User {user-id :id} {}@@ -2782,16 +2782,16 @@(while (#'dependencies.backfill/backfill-dependencies!))(run-analysis-for-card! (:id dependent-in-personal))(run-analysis-for-card! (:id dependent-regular)))- (testing "include_personal_collections=false (default) excludes broken dependents in personal collections"+ (testing "include-personal-collections=false (default) excludes broken dependents in personal collections"(let [response (mt/user-http-request :crowberto :get 200(str "ee/dependencies/graph/broken?id=" (:id model-card) "&type=card"))card-ids (set (map :id response))](is (not (contains? card-ids (:id dependent-in-personal))))(is (contains? card-ids (:id dependent-regular)))))- (testing "include_personal_collections=true includes broken dependents in personal collections"+ (testing "include-personal-collections=true includes broken dependents in personal collections"(let [response (mt/user-http-request :crowberto :get 200(str "ee/dependencies/graph/broken?id=" (:id model-card)- "&type=card&include_personal_collections=true"))+ "&type=card&include-personal-collections=true"))card-ids (set (map :id response))](is (contains? card-ids (:id dependent-in-personal)))(is (contains? card-ids (:id dependent-regular))))))))))))@@ -2808,7 +2808,7 @@(let [response (mt/user-http-request :crowberto :get 200"ee/dependencies/graph/unreferenced":types "table" :query "ownertest"- :sort_column "name" :sort_direction "asc")]+ :sort-column "name" :sort-direction "asc")](is (=? {:data [{:id table2-id:type "table":data {:name "Email Owned Table - ownertest"@@ -2842,7 +2842,7 @@(let [response (mt/user-http-request :crowberto :get 200"ee/dependencies/graph/unreferenced":types "transform" :query "ownertest"- :sort_column "name" :sort_direction "asc")]+ :sort-column "name" :sort-direction "asc")](is (=? {:data [{:id transform2-id:type "transform":data {:name "Email Owned Transform - ownertest"diff --git a/enterprise/backend/test/metabase_enterprise/transforms/api_test.clj b/enterprise/backend/test/metabase_enterprise/transforms/api_test.cljindex a5a5b645f57..fb2a28e54f0 100644--- a/enterprise/backend/test/metabase_enterprise/transforms/api_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms/api_test.clj@@ -214,9 +214,9 @@(doseq [sort-direction [:asc :desc]](testing (str sort-direction)(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :sort_column "transform-name"- :sort_direction sort-direction- :transform_ids [transform-a-id transform-b-id])]+ :sort-column "transform-name"+ :sort-direction sort-direction+ :transform-ids [transform-a-id transform-b-id])](is (= (cond-> [run-a-id run-b-id](= sort-direction :desc) reverse)(->> response :data (map :id)))))))))))@@ -231,9 +231,9 @@(doseq [sort-direction [:asc :desc]](testing (str sort-direction)(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :sort_column "transform-name"- :sort_direction sort-direction- :transform_ids [transform-1-id transform-2-id])]+ :sort-column "transform-name"+ :sort-direction sort-direction+ :transform-ids [transform-1-id transform-2-id])](is (= (cond-> [run-1-id run-2-id](= sort-direction :desc) reverse)(->> response :data (map :id)))))))))))@@ -249,9 +249,9 @@(doseq [sort-direction [:asc :desc]](testing (str sort-direction)(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :sort_column "start-time"- :sort_direction sort-direction- :transform_ids [transform-id])]+ :sort-column "start-time"+ :sort-direction sort-direction+ :transform-ids [transform-id])](is (= (cond-> [earlier-run-id later-run-id](= sort-direction :desc) reverse)(->> response :data (map :id)))))))))))@@ -267,9 +267,9 @@(doseq [sort-direction [:asc :desc]](testing (str sort-direction)(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :sort_column "end-time"- :sort_direction sort-direction- :transform_ids [transform-id])]+ :sort-column "end-time"+ :sort-direction sort-direction+ :transform-ids [transform-id])](is (= (cond-> [earlier-run-id later-run-id](= sort-direction :desc) reverse)(->> response :data (map :id)))))))))))@@ -284,9 +284,9 @@(doseq [sort-direction [:asc :desc]](testing (str sort-direction)(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :sort_column "run-method"- :sort_direction sort-direction- :transform_ids [transform-id])]+ :sort-column "run-method"+ :sort-direction sort-direction+ :transform-ids [transform-id])](is (= (cond-> [manual-run-id schedule-run-id](= sort-direction :desc) reverse)(->> response :data (map :id)))))))))))@@ -306,9 +306,9 @@(doseq [sort-direction [:asc :desc]](testing (str sort-direction)(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :sort_column "status"- :sort_direction sort-direction- :transform_ids [transform-id])]+ :sort-column "status"+ :sort-direction sort-direction+ :transform-ids [transform-id])](is (= (cond-> [canceled-run-id canceling-run-id failed-run-idin-progress-run-id success-run-id timeout-run-id](= sort-direction :desc) reverse)@@ -332,9 +332,9 @@(doseq [sort-direction [:asc :desc]](testing (str sort-direction)(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :sort_column "transform-tags"- :sort_direction sort-direction- :transform_ids [transform-a-id transform-b-id])]+ :sort-column "transform-tags"+ :sort-direction sort-direction+ :transform-ids [transform-a-id transform-b-id])](is (= (cond-> [run-a-id run-b-id](= sort-direction :desc) reverse)(->> response :data (map :id)))))))))))@@ -389,9 +389,9 @@(doseq [sort-direction [:asc :desc]](testing (str sort-direction)(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :sort_column "transform-tags"- :sort_direction sort-direction- :transform_ids [transform-daily-id transform-hourly-id+ :sort-column "transform-tags"+ :sort-direction sort-direction+ :transform-ids [transform-daily-id transform-hourly-idtransform-monthly-id transform-weekly-id])](is (= (cond-> [daily-run-id hourly-run-id monthly-run-id weekly-run-id](= sort-direction :desc) reverse)@@ -406,7 +406,7 @@:model/TransformRun {run-in-collection-id :id} {:transform_id transform-in-collection-id}:model/TransformRun {run-in-root-id :id} {:transform_id transform-in-root-id}](let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :transform_ids [transform-in-collection-id+ :transform-ids [transform-in-collection-idtransform-in-root-id])runs-by-id (m/index-by :id (:data response))](testing "transform in explicit collection has that collection hydrated"diff --git a/enterprise/frontend/src/metabase-enterprise/api/dependencies.ts b/enterprise/frontend/src/metabase-enterprise/api/dependencies.tsindex 63b413822eb..3fd94ee0571 100644--- a/enterprise/frontend/src/metabase-enterprise/api/dependencies.ts+++ b/enterprise/frontend/src/metabase-enterprise/api/dependencies.ts@@ -87,7 +87,7 @@ export const dependencyApi = EnterpriseApi.injectEndpoints({>({query: (body) => ({method: "POST",- url: "/api/ee/dependencies/check_card",+ url: "/api/ee/dependencies/check-card",body,}),}),@@ -97,7 +97,7 @@ export const dependencyApi = EnterpriseApi.injectEndpoints({>({query: (body) => ({method: "POST",- url: "/api/ee/dependencies/check_snippet",+ url: "/api/ee/dependencies/check-snippet",body,}),}),@@ -107,7 +107,7 @@ export const dependencyApi = EnterpriseApi.injectEndpoints({>({query: (body) => ({method: "POST",- url: "/api/ee/dependencies/check_transform",+ url: "/api/ee/dependencies/check-transform",body,}),}),diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyList.module.css b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DependencyDiagnostics.module.csssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyList.module.cssrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DependencyDiagnostics.module.cssdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyList.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DependencyDiagnostics.tsxsimilarity index 81%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyList.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DependencyDiagnostics.tsxindex 1e4573f0ef1..beccb13226e 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyList.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DependencyDiagnostics.tsx@@ -19,14 +19,17 @@ import type {} from "../../types";import { getCardTypes, getDependencyTypes, isSameNode } from "../../utils";-import { DependencyFilterBar } from "./DependencyFilterBar";-import { DependencyHeader } from "./DependencyHeader";-import S from "./DependencyList.module.css";-import { DependencyPagination } from "./DependencyPagination";-import { DependencySidebar } from "./DependencySidebar";-import { DependencyTable } from "./DependencyTable";+import S from "./DependencyDiagnostics.module.css";+import { DiagnosticsFilterBar } from "./DiagnosticsFilterBar";+import { DiagnosticsHeader } from "./DiagnosticsHeader";+import { DiagnosticsPagination } from "./DiagnosticsPagination";+import { DiagnosticsSidebar } from "./DiagnosticsSidebar";+import { DiagnosticsTable } from "./DiagnosticsTable";import { PAGE_SIZE } from "./constants";-import type { DependencyListMode, DependencyListParamsOptions } from "./types";+import type {+ DependencyDiagnosticsMode,+ DependencyDiagnosticsParamsOptions,+} from "./types";import {getAvailableGroupTypes,getFilterOptions,@@ -34,22 +37,22 @@ import {getSortOptions,} from "./utils";-type DependencyListProps = {- mode: DependencyListMode;- params: Urls.DependencyListParams;+type DependencyDiagnosticsProps = {+ mode: DependencyDiagnosticsMode;+ params: Urls.DependencyDiagnosticsParams;isLoadingParams: boolean;onParamsChange: (- params: Urls.DependencyListParams,- options?: DependencyListParamsOptions,+ params: Urls.DependencyDiagnosticsParams,+ options?: DependencyDiagnosticsParamsOptions,) => void;};-export function DependencyList({+export function DependencyDiagnostics({mode,params,isLoadingParams,onParamsChange,-}: DependencyListProps) {+}: DependencyDiagnosticsProps) {const { ref: containerRef, width: containerWidth } = useElementSize();const [isResizing, { open: startResizing, close: stopResizing }] =useDisclosure();@@ -77,11 +80,11 @@ export function DependencyList({} = useListGraphNodesQuery({types: getDependencyTypes(groupTypes),- card_types: getCardTypes(groupTypes),+ "card-types": getCardTypes(groupTypes),query,- include_personal_collections: includePersonalCollections,- sort_column: sortColumn,- sort_direction: sortDirection,+ "include-personal-collections": includePersonalCollections,+ "sort-column": sortColumn,+ "sort-direction": sortDirection,offset: page * PAGE_SIZE,limit: PAGE_SIZE,},@@ -101,8 +104,8 @@ export function DependencyList({: undefined;const handleParamsChange = (- params: Urls.DependencyListParams,- options?: DependencyListParamsOptions,+ params: Urls.DependencyDiagnosticsParams,+ options?: DependencyDiagnosticsParamsOptions,) => {onParamsChange(getParamsWithoutDefaults(mode, params), options);};@@ -167,8 +170,8 @@ export function DependencyList({wrap="nowrap"><Stack className={S.main} flex={1} px="3.5rem" pb="md" gap="md">- <DependencyHeader />- <DependencyFilterBar+ <DiagnosticsHeader />+ <DiagnosticsFilterBarmode={mode}query={query}filterOptions={getFilterOptions(mode, params)}@@ -182,7 +185,7 @@ export function DependencyList({<DelayedLoadingAndErrorWrapper loading={isLoading} error={error} /></Center>) : (- <DependencyTable+ <DiagnosticsTablenodes={nodes}mode={mode}sortOptions={getSortOptions(params)}@@ -192,7 +195,7 @@ export function DependencyList({/>)}{!isLoading && error == null && (- <DependencyPagination+ <DiagnosticsPaginationpage={page}pageNodesCount={nodes.length}totalNodesCount={totalNodesCount}@@ -201,7 +204,7 @@ export function DependencyList({)}</Stack>{selectedNode != null && (- <DependencySidebar+ <DiagnosticsSidebarnode={selectedNode}mode={mode}containerWidth={containerWidth}diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyEmptyState/DependencyEmptyState.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsEmptyState/DiagnosticsEmptyState.tsxsimilarity index 77%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyEmptyState/DependencyEmptyState.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsEmptyState/DiagnosticsEmptyState.tsxindex 0d9e1c60beb..d19483ff2c7 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyEmptyState/DependencyEmptyState.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsEmptyState/DiagnosticsEmptyState.tsx@@ -3,11 +3,11 @@ import { t } from "ttag";import EmptyDashboardBot from "assets/img/dashboard-empty.svg";import { Stack, Text } from "metabase/ui";-type DependencyEmptyStateProps = {+type DiagnosticsEmptyStateProps = {label: string;};-export function DependencyEmptyState({ label }: DependencyEmptyStateProps) {+export function DiagnosticsEmptyState({ label }: DiagnosticsEmptyStateProps) {return (<Stack p="xl" align="center"><imgdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsEmptyState/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsEmptyState/index.tsnew file mode 100644index 00000000000..6e414045ce4--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsEmptyState/index.ts@@ -0,0 +1 @@+export * from "./DiagnosticsEmptyState";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyFilterBar/DependencyFilterBar.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsFilterBar/DiagnosticsFilterBar.tsxsimilarity index 91%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyFilterBar/DependencyFilterBar.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsFilterBar/DiagnosticsFilterBar.tsxindex 8202397fa4e..d55ec7f0f2c 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyFilterBar/DependencyFilterBar.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsFilterBar/DiagnosticsFilterBar.tsx@@ -8,11 +8,11 @@ import { FixedSizeIcon, Group, Loader, TextInput } from "metabase/ui";import type { DependencyFilterOptions } from "../../../types";import { areFilterOptionsEqual, getSearchQuery } from "../../../utils";import { FilterOptionsPicker } from "../../FilterOptionsPicker";-import type { DependencyListMode } from "../types";+import type { DependencyDiagnosticsMode } from "../types";import { getAvailableGroupTypes, getDefaultFilterOptions } from "../utils";-type DependencyFilterBarProps = {- mode: DependencyListMode;+type DiagnosticsFilterBarProps = {+ mode: DependencyDiagnosticsMode;query?: string;filterOptions: DependencyFilterOptions;isFetching: boolean;@@ -21,7 +21,7 @@ type DependencyFilterBarProps = {onFilterOptionsChange: (filterOptions: DependencyFilterOptions) => void;};-export const DependencyFilterBar = memo(function DependencyFilterBar({+export const DiagnosticsFilterBar = memo(function DiagnosticsFilterBar({mode,query,filterOptions,@@ -29,7 +29,7 @@ export const DependencyFilterBar = memo(function DependencyFilterBar({isLoading,onQueryChange,onFilterOptionsChange,-}: DependencyFilterBarProps) {+}: DiagnosticsFilterBarProps) {const [searchValue, setSearchValue] = useState(query ?? "");const hasLoader = isFetching && !isLoading;const hasDefaultFilterOptions = areFilterOptionsEqual(diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsFilterBar/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsFilterBar/index.tsnew file mode 100644index 00000000000..6909e473888--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsFilterBar/index.ts@@ -0,0 +1 @@+export * from "./DiagnosticsFilterBar";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyHeader/DependencyHeader.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsHeader/DiagnosticsHeader.tsxsimilarity index 92%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyHeader/DependencyHeader.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsHeader/DiagnosticsHeader.tsxindex 6986354a84f..fad6c7d875f 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyHeader/DependencyHeader.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsHeader/DiagnosticsHeader.tsx@@ -9,7 +9,7 @@ import {} from "metabase/data-studio/common/components/PaneHeader";import * as Urls from "metabase/lib/urls";-export const DependencyHeader = memo(function DependencyHeader() {+export const DiagnosticsHeader = memo(function DiagnosticsHeader() {const tabs: PaneHeaderTab[] = [{label: t`Broken dependencies`,diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsHeader/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsHeader/index.tsnew file mode 100644index 00000000000..82bcc69b372--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsHeader/index.ts@@ -0,0 +1 @@+export * from "./DiagnosticsHeader";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyPagination/DependencyPagination.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsPagination/DiagnosticsPagination.tsxsimilarity index 85%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyPagination/DependencyPagination.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsPagination/DiagnosticsPagination.tsxindex 8f5b57a9987..914e9c3108f 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyPagination/DependencyPagination.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsPagination/DiagnosticsPagination.tsx@@ -3,19 +3,19 @@ import { Flex } from "metabase/ui";import { PAGE_SIZE } from "../constants";-type DependencyPaginationProps = {+type DiagnosticsPaginationProps = {page: number;pageNodesCount: number;totalNodesCount: number;onPageChange: (page: number) => void;};-export function DependencyPagination({+export function DiagnosticsPagination({page,pageNodesCount,totalNodesCount,onPageChange,-}: DependencyPaginationProps) {+}: DiagnosticsPaginationProps) {return (<Flex justify="end"><PaginationControlsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsPagination/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsPagination/index.tsnew file mode 100644index 00000000000..7f108105504--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsPagination/index.ts@@ -0,0 +1 @@+export * from "./DiagnosticsPagination";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/BrokenDependentsSection/BrokenDependentsSection.module.css b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/BrokenDependentsSection/BrokenDependentsSection.module.csssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/BrokenDependentsSection/BrokenDependentsSection.module.cssrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/BrokenDependentsSection/BrokenDependentsSection.module.cssdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/BrokenDependentsSection/BrokenDependentsSection.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/BrokenDependentsSection/BrokenDependentsSection.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/BrokenDependentsSection/BrokenDependentsSection.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/BrokenDependentsSection/BrokenDependentsSection.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/BrokenDependentsSection/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/BrokenDependentsSection/index.tssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/BrokenDependentsSection/index.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/BrokenDependentsSection/index.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/BrokenDependentsSection/utils.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/BrokenDependentsSection/utils.tssimilarity index 76%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/BrokenDependentsSection/utils.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/BrokenDependentsSection/utils.tsindex d5ef7bc0de8..af1450c8ab5 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/BrokenDependentsSection/utils.ts+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/BrokenDependentsSection/utils.ts@@ -19,11 +19,11 @@ export function getListRequest(return {id: node.id,type: node.type,- dependent_types: getDependencyTypes(filterOptions.groupTypes),- dependent_card_types: getCardTypes(filterOptions.groupTypes),- include_personal_collections: filterOptions.includePersonalCollections,- sort_column: sortOptions.column,- sort_direction: sortOptions.direction,+ "dependent-types": getDependencyTypes(filterOptions.groupTypes),+ "dependent-card-types": getCardTypes(filterOptions.groupTypes),+ "include-personal-collections": filterOptions.includePersonalCollections,+ "sort-column": sortOptions.column,+ "sort-direction": sortOptions.direction,};}diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/DependencySidebar.module.css b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/DiagnosticsSidebar.module.csssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/DependencySidebar.module.cssrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/DiagnosticsSidebar.module.cssdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/DependencySidebar.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/DiagnosticsSidebar.tsxsimilarity index 84%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/DependencySidebar.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/DiagnosticsSidebar.tsxindex ab3ce8f6225..625f0d5f846 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/DependencySidebar.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/DiagnosticsSidebar.tsx@@ -3,10 +3,10 @@ import { memo } from "react";import { Stack } from "metabase/ui";import type { DependencyNode } from "metabase-types/api";-import type { DependencyListMode } from "../types";+import type { DependencyDiagnosticsMode } from "../types";import { BrokenDependentsSection } from "./BrokenDependentsSection";-import S from "./DependencySidebar.module.css";+import S from "./DiagnosticsSidebar.module.css";import { ErrorsSection } from "./ErrorsSection";import { FieldsSection } from "./FieldsSection";import { InfoSection } from "./InfoSection";@@ -14,23 +14,23 @@ import { LocationSection } from "./LocationSection";import { SidebarHeader } from "./SidebarHeader";import { SidebarResizableBox } from "./SidebarResizableBox";-type DependencySidebarProps = {+type DiagnosticsSidebarProps = {node: DependencyNode;- mode: DependencyListMode;+ mode: DependencyDiagnosticsMode;containerWidth: number;onResizeStart: () => void;onResizeStop: () => void;onClose: () => void;};-export const DependencySidebar = memo(function DependencySidebar({+export const DiagnosticsSidebar = memo(function DiagnosticsSidebar({node,mode,containerWidth,onResizeStart,onResizeStop,onClose,-}: DependencySidebarProps) {+}: DiagnosticsSidebarProps) {return (<SidebarResizableBoxcontainerWidth={containerWidth}diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/DependencySidebar.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/DiagnosticsSidebar.unit.spec.tsxsimilarity index 93%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/DependencySidebar.unit.spec.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/DiagnosticsSidebar.unit.spec.tsxindex 91658ed7853..e26c04c6a44 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/DependencySidebar.unit.spec.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/DiagnosticsSidebar.unit.spec.tsx@@ -11,13 +11,13 @@ import {createMockTableDependencyNodeData,} from "metabase-types/api/mocks";-import type { DependencyListMode } from "../types";+import type { DependencyDiagnosticsMode } from "../types";-import { DependencySidebar } from "./DependencySidebar";+import { DiagnosticsSidebar } from "./DiagnosticsSidebar";type SetupOpts = {node?: DependencyNode;- mode?: DependencyListMode;+ mode?: DependencyDiagnosticsMode;};function setup({@@ -33,7 +33,7 @@ function setup({<Routepath="/"component={() => (- <DependencySidebar+ <DiagnosticsSidebarnode={node}mode={mode}containerWidth={1000}@@ -49,7 +49,7 @@ function setup({return { onResizeStart, onResizeStop, onClose };}-describe("DependencySidebar", () => {+describe("DiagnosticsSidebar", () => {it("should render the sidebar container", () => {setup();expect(screen.getByTestId("dependency-list-sidebar")).toBeInTheDocument();diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/ErrorsSection/ErrorsSection.module.css b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/ErrorsSection/ErrorsSection.module.csssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/ErrorsSection/ErrorsSection.module.cssrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/ErrorsSection/ErrorsSection.module.cssdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/ErrorsSection/ErrorsSection.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/ErrorsSection/ErrorsSection.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/ErrorsSection/ErrorsSection.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/ErrorsSection/ErrorsSection.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/ErrorsSection/ErrorsSection.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/ErrorsSection/ErrorsSection.unit.spec.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/ErrorsSection/ErrorsSection.unit.spec.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/ErrorsSection/ErrorsSection.unit.spec.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/ErrorsSection/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/ErrorsSection/index.tssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/ErrorsSection/index.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/ErrorsSection/index.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/FieldsSection/FieldsSection.module.css b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/FieldsSection/FieldsSection.module.csssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/FieldsSection/FieldsSection.module.cssrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/FieldsSection/FieldsSection.module.cssdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/FieldsSection/FieldsSection.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/FieldsSection/FieldsSection.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/FieldsSection/FieldsSection.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/FieldsSection/FieldsSection.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/FieldsSection/FieldsSection.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/FieldsSection/FieldsSection.unit.spec.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/FieldsSection/FieldsSection.unit.spec.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/FieldsSection/FieldsSection.unit.spec.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/FieldsSection/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/FieldsSection/index.tssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/FieldsSection/index.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/FieldsSection/index.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/InfoSection/InfoSection.module.css b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/InfoSection/InfoSection.module.csssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/InfoSection/InfoSection.module.cssrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/InfoSection/InfoSection.module.cssdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/InfoSection/InfoSection.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/InfoSection/InfoSection.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/InfoSection/InfoSection.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/InfoSection/InfoSection.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/InfoSection/InfoSection.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/InfoSection/InfoSection.unit.spec.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/InfoSection/InfoSection.unit.spec.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/InfoSection/InfoSection.unit.spec.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/InfoSection/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/InfoSection/index.tssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/InfoSection/index.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/InfoSection/index.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/LocationSection/LocationSection.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/LocationSection/LocationSection.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/LocationSection/LocationSection.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/LocationSection/LocationSection.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/LocationSection/LocationSection.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/LocationSection/LocationSection.unit.spec.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/LocationSection/LocationSection.unit.spec.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/LocationSection/LocationSection.unit.spec.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/LocationSection/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/LocationSection/index.tssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/LocationSection/index.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/LocationSection/index.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarHeader/SidebarHeader.module.css b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarHeader/SidebarHeader.module.csssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarHeader/SidebarHeader.module.cssrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarHeader/SidebarHeader.module.cssdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarHeader/SidebarHeader.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarHeader/SidebarHeader.tsxsimilarity index 94%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarHeader/SidebarHeader.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarHeader/SidebarHeader.tsxindex 38a0742a0b0..1476f5fbdf6 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarHeader/SidebarHeader.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarHeader/SidebarHeader.tsx@@ -6,16 +6,16 @@ import CS from "metabase/css/core/index.css";import { trackDependencyEntitySelected } from "metabase/data-studio/analytics";import * as Urls from "metabase/lib/urls";import { ActionIcon, Anchor, FixedSizeIcon, Group, Tooltip } from "metabase/ui";-import type { DependencyListMode } from "metabase-enterprise/dependencies/components/DependencyList/types";import type { DependencyNode } from "metabase-types/api";import { TOOLTIP_OPEN_DELAY_MS } from "../../../../constants";import { getNodeLabel, getNodeLink } from "../../../../utils";+import type { DependencyDiagnosticsMode } from "../../types";import S from "./SidebarHeader.module.css";type SidebarHeaderProps = {- mode: DependencyListMode;+ mode: DependencyDiagnosticsMode;node: DependencyNode;onClose: () => void;};diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarHeader/SidebarHeader.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarHeader/SidebarHeader.unit.spec.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarHeader/SidebarHeader.unit.spec.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarHeader/SidebarHeader.unit.spec.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarHeader/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarHeader/index.tssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarHeader/index.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarHeader/index.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarResizableBox/SidebarResizableBox.module.css b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarResizableBox/SidebarResizableBox.module.csssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarResizableBox/SidebarResizableBox.module.cssrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarResizableBox/SidebarResizableBox.module.cssdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarResizableBox/SidebarResizableBox.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarResizableBox/SidebarResizableBox.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarResizableBox/SidebarResizableBox.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarResizableBox/SidebarResizableBox.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarResizableBox/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarResizableBox/index.tssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/SidebarResizableBox/index.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/SidebarResizableBox/index.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/index.tsnew file mode 100644index 00000000000..8de7fbb411a--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsSidebar/index.ts@@ -0,0 +1 @@+export * from "./DiagnosticsSidebar";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/DependencyTable.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/DiagnosticsTable.tsxsimilarity index 84%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/DependencyTable.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/DiagnosticsTable.tsxindex 13150176b78..deb122d4fc6 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/DependencyTable.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/DiagnosticsTable.tsx@@ -11,8 +11,8 @@ import type { DependencyNode } from "metabase-types/api";import type { DependencySortOptions } from "../../../types";import { getNodeId } from "../../../utils";-import { DependencyEmptyState } from "../DependencyEmptyState";-import type { DependencyListMode } from "../types";+import { DiagnosticsEmptyState } from "../DiagnosticsEmptyState";+import type { DependencyDiagnosticsMode } from "../types";import {getColumnWidths,@@ -22,23 +22,23 @@ import {getSortingState,} from "./utils";-type DependencyTableProps = {+type DiagnosticsTableProps = {nodes: DependencyNode[];- mode: DependencyListMode;+ mode: DependencyDiagnosticsMode;sortOptions: DependencySortOptions | undefined;isLoading?: boolean;onSelect: (node: DependencyNode) => void;onSortOptionsChange: (sortOptions: DependencySortOptions | undefined) => void;};-export const DependencyTable = function DependencyTable({+export const DiagnosticsTable = function DiagnosticsTable({nodes,mode,sortOptions,isLoading = false,onSelect,onSortOptionsChange,-}: DependencyTableProps) {+}: DiagnosticsTableProps) {const columns = useMemo(() => getColumns(mode), [mode]);const sortingState = useMemo(() => getSortingState(sortOptions),@@ -82,7 +82,9 @@ export const DependencyTable = function DependencyTable({) : (<TreeTableinstance={treeTableInstance}- emptyState={<DependencyEmptyState label={getNotFoundMessage(mode)} />}+ emptyState={+ <DiagnosticsEmptyState label={getNotFoundMessage(mode)} />+ }onRowClick={handleRowActivate}/>)}diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/ErrorsCell/ErrorsCell.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/ErrorsCell/ErrorsCell.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/ErrorsCell/ErrorsCell.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/ErrorsCell/ErrorsCell.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/ErrorsCell/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/ErrorsCell/index.tssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/ErrorsCell/index.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/ErrorsCell/index.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/LocationCell/LocationCell.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/LocationCell/LocationCell.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/LocationCell/LocationCell.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/LocationCell/LocationCell.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/LocationCell/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/LocationCell/index.tssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/LocationCell/index.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/LocationCell/index.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/NameCell/NameCell.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/NameCell/NameCell.tsxsimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/NameCell/NameCell.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/NameCell/NameCell.tsxdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/NameCell/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/NameCell/index.tssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/NameCell/index.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/NameCell/index.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/index.tsnew file mode 100644index 00000000000..998b3b7d626--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/index.ts@@ -0,0 +1 @@+export * from "./DiagnosticsTable";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/utils.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/utils.tsxsimilarity index 69%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/utils.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/utils.tsxindex 4e58f238743..6b861f0202f 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/utils.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/DiagnosticsTable/utils.tsx@@ -1,6 +1,9 @@import type { SortingState } from "@tanstack/react-table";import { t } from "ttag";+import { DateTime } from "metabase/common/components/DateTime";+import { Ellipsified } from "metabase/common/components/Ellipsified";+import { getUserName } from "metabase/lib/user";import type { TreeTableColumnDef } from "metabase/ui";import {DEPENDENCY_SORT_COLUMNS,@@ -12,20 +15,22 @@ import type { DependencySortOptions } from "../../../types";import {getDependentErrorNodesCount,getNodeLabel,+ getNodeLastEditedAt,+ getNodeLastEditedBy,getNodeLocationInfo,} from "../../../utils";-import type { DependencyListMode } from "../types";+import type { DependencyDiagnosticsMode } from "../types";import { ErrorsCell } from "./ErrorsCell";import { LocationCell } from "./LocationCell";import { NameCell } from "./NameCell";function getNameColumn(- mode: DependencyListMode,+ header: string = t`Name`,): TreeTableColumnDef<DependencyNode> {return {id: "name" satisfies DependencySortColumn,- header: mode === "broken" ? t`Dependency` : t`Name`,+ header,width: "auto",maxAutoWidth: 520,enableSorting: true,@@ -91,18 +96,50 @@ function getDependentsWithErrorsColumn(): TreeTableColumnDef<DependencyNode> {};}-export function getColumns(- mode: DependencyListMode,-): TreeTableColumnDef<DependencyNode>[] {+export function getLastEditedByColumn(): TreeTableColumnDef<DependencyNode> {+ return {+ id: "last-edited-by",+ header: t`Last edited by`,+ width: "auto",+ maxAutoWidth: 520,+ accessorFn: (node) => getUserName(getNodeLastEditedBy(node) ?? undefined),+ cell: ({ row }) => {+ const user = getNodeLastEditedBy(row.original);+ if (user == null) {+ return null;+ }+ return <Ellipsified>{getUserName(user)}</Ellipsified>;+ },+ };+}++export function getLastEditedAtColumn(): TreeTableColumnDef<DependencyNode> {+ return {+ id: "last-edited-at",+ header: t`Last edited at`,+ width: "auto",+ maxAutoWidth: 520,+ accessorFn: (node) => getNodeLastEditedAt(node),+ cell: ({ row }) => {+ const timestamp = getNodeLastEditedAt(row.original);+ if (timestamp == null) {+ return null;+ }+ return <DateTime value={timestamp} unit="minute" />;+ },+ };+}++export function getColumns(mode: DependencyDiagnosticsMode) {return [- getNameColumn(mode),+ getNameColumn(mode === "broken" ? t`Dependency` : t`Name`),getLocationColumn(),...(mode === "broken" ? [getDependentsErrorsColumn()] : []),...(mode === "broken" ? [getDependentsWithErrorsColumn()] : []),];}-export function getColumnWidths(mode: DependencyListMode): number[] {+export function getColumnWidths(mode: DependencyDiagnosticsMode): number[] {if (mode === "broken") {return [0.3, 0.3, 0.3, 0.1];} else {@@ -137,7 +174,7 @@ export function getSortingOptions(};}-export function getNotFoundMessage(mode: DependencyListMode) {+export function getNotFoundMessage(mode: DependencyDiagnosticsMode) {return mode === "broken"? t`No broken dependencies found`: t`No unreferenced entities found`;diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/constants.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/constants.tssimilarity index 100%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/constants.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/constants.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/index.tsnew file mode 100644index 00000000000..3a1473750ac--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/index.ts@@ -0,0 +1 @@+export * from "./DependencyDiagnostics";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/types.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/types.tsnew file mode 100644index 00000000000..16434a064c9--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/types.ts@@ -0,0 +1,5 @@+export type DependencyDiagnosticsMode = "broken" | "unreferenced";++export type DependencyDiagnosticsParamsOptions = {+ withSetLastUsedParams?: boolean;+};diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/utils.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/utils.tssimilarity index 77%rename from enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/utils.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/utils.tsindex 7b41dc5d073..bb0d80274b6 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/utils.ts+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyDiagnostics/utils.ts@@ -7,18 +7,18 @@ import type {} from "../../types";import { BROKEN_GROUP_TYPES, UNREFERENCED_GROUP_TYPES } from "./constants";-import type { DependencyListMode } from "./types";+import type { DependencyDiagnosticsMode } from "./types";-export function getAvailableGroupTypes(mode: DependencyListMode) {+export function getAvailableGroupTypes(mode: DependencyDiagnosticsMode) {return mode === "broken" ? BROKEN_GROUP_TYPES : UNREFERENCED_GROUP_TYPES;}export function getFilterOptions(- mode: DependencyListMode,+ mode: DependencyDiagnosticsMode,{groupTypes = getAvailableGroupTypes(mode),includePersonalCollections = DEFAULT_INCLUDE_PERSONAL_COLLECTIONS,- }: Urls.DependencyListParams,+ }: Urls.DependencyDiagnosticsParams,): DependencyFilterOptions {return {groupTypes,@@ -27,7 +27,7 @@ export function getFilterOptions(}export function getDefaultFilterOptions(- mode: DependencyListMode,+ mode: DependencyDiagnosticsMode,): DependencyFilterOptions {return getFilterOptions(mode, {});}@@ -35,21 +35,21 @@ export function getDefaultFilterOptions(export function getSortOptions({sortColumn,sortDirection,-}: Urls.DependencyListParams): DependencySortOptions | undefined {+}: Urls.DependencyDiagnosticsParams): DependencySortOptions | undefined {return sortColumn != null && sortDirection != null? { column: sortColumn, direction: sortDirection }: undefined;}export function getParamsWithoutDefaults(- mode: DependencyListMode,+ mode: DependencyDiagnosticsMode,{page,groupTypes,includePersonalCollections,...params- }: Urls.DependencyListParams,-): Urls.DependencyListParams {+ }: Urls.DependencyDiagnosticsParams,+): Urls.DependencyDiagnosticsParams {const defaultGroupTypes = getAvailableGroupTypes(mode);return {diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/DependencyGraph.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/DependencyGraph.tsxindex b86632a0864..7e17318fb9d 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/DependencyGraph.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/DependencyGraph.tsx@@ -15,6 +15,7 @@ import { useMetadataToasts } from "metabase/metadata/hooks";import { Group, useColorScheme } from "metabase/ui";import { useGetDependencyGraphQuery } from "metabase-enterprise/api";import type {+ DependencyEntry,DependencyGraph,WorkspaceDependencyGraph,} from "metabase-types/api";@@ -47,11 +48,11 @@ const PRO_OPTIONS = {type DependencyGraphProps = {graph?: DependencyGraph | WorkspaceDependencyGraph | null;isFetching?: boolean;- error?: any;- getGraphUrl: (entry?: any) => string;+ error?: unknown;+ getGraphUrl: (entry?: DependencyEntry) => string;withEntryPicker?: boolean;headerRightSide?: React.ReactNode;- entry?: any;+ entry?: DependencyEntry;nodeTypes?: typeof NODE_TYPES;edgeTypes?: typeof EDGE_TYPES;openLinksInNewTab?: boolean;@@ -74,8 +75,8 @@ export function DependencyGraph({shouldFetch ? entry : skipToken,);const isFetching = isFetchingExternally || dependencyGraph.isFetching;- const graph = externalGraph || dependencyGraph.data;- const error = externalError || dependencyGraph.error;+ const graph = externalGraph ?? dependencyGraph.data;+ const error = externalError ?? dependencyGraph.error;const [nodes, setNodes, onNodesChange] = useNodesState<NodeType>([]);const [edges, setEdges, onEdgesChange] = useEdgesState<Edge>([]);diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphDependencyPanel/PanelBody/PanelBody.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphDependencyPanel/PanelBody/PanelBody.tsxindex 379b04c15e5..91aefdb5792 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphDependencyPanel/PanelBody/PanelBody.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphDependencyPanel/PanelBody/PanelBody.tsx@@ -65,7 +65,7 @@ function ListItem({ node, getGraphUrl }: ListItemProps) {{getNodeViewCountLabel(viewCount)}</Box>) : link != null ? (- <GraphExternalLink label={link.label} url={link.url} />+ <GraphExternalLink label={link.label} url={link.url} isCompact />) : null}</Group>{(location != null || (link != null && viewCount != null)) && (@@ -77,7 +77,7 @@ function ListItem({ node, getGraphUrl }: ListItemProps) {<GraphBreadcrumbs links={location.links} ml="1rem" pl="sm" />)}{link != null && viewCount != null && (- <GraphExternalLink label={link.label} url={link.url} />+ <GraphExternalLink label={link.label} url={link.url} isCompact />)}</Group>)}diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphDependencyPanel/utils.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphDependencyPanel/utils.tsindex 258d856a2b0..b1620416b7c 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphDependencyPanel/utils.ts+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphDependencyPanel/utils.ts@@ -29,12 +29,12 @@ export function getListRequest(return {id: node.id,type: node.type,- dependent_types: [type],- dependent_card_types: cardType != null ? [cardType] : undefined,+ "dependent-types": [type],+ "dependent-card-types": cardType != null ? [cardType] : undefined,query: query,- include_personal_collections: filterOptions.includePersonalCollections,- sort_column: sortOptions.column,- sort_direction: sortOptions.direction,+ "include-personal-collections": filterOptions.includePersonalCollections,+ "sort-column": sortOptions.column,+ "sort-direction": sortOptions.direction,};}diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphExternalLink/GraphExternalLink.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphExternalLink/GraphExternalLink.tsxindex 4cb88d5b89d..41a68cd3db5 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphExternalLink/GraphExternalLink.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphExternalLink/GraphExternalLink.tsx@@ -9,9 +9,14 @@ import { GraphContext } from "../GraphContext";type GraphExternalLinkProps = {label: string;url: string;+ isCompact?: boolean;};-export function GraphExternalLink({ label, url }: GraphExternalLinkProps) {+export function GraphExternalLink({+ label,+ url,+ isCompact,+}: GraphExternalLinkProps) {const { openLinksInNewTab } = useContext(GraphContext);return (@@ -20,7 +25,7 @@ export function GraphExternalLink({ label, url }: GraphExternalLinkProps) {component={ForwardRefLink}to={url}target={openLinksInNewTab ? "_blank" : undefined}- m="-sm"+ m={isCompact ? "-sm" : undefined}aria-label={label}><FixedSizeIcon name="external" />diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphInfoPanel/PanelBody/PanelBody.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphInfoPanel/PanelBody/PanelBody.tsxindex f31d27b38e9..71cfd26cd56 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphInfoPanel/PanelBody/PanelBody.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyGraph/GraphInfoPanel/PanelBody/PanelBody.tsx@@ -124,6 +124,7 @@ function TableSection({ node, getGraphUrl }: TableSectionProps) {<GraphExternalLinklabel={info.metadata.label}url={info.metadata.url}+ isCompact/></Group>{info.location && (diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyEmptyState/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyEmptyState/index.tsdeleted file mode 100644index 27a2a8474c0..00000000000--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyEmptyState/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from "./DependencyEmptyState";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyFilterBar/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyFilterBar/index.tsdeleted file mode 100644index e5a3ab75d91..00000000000--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyFilterBar/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from "./DependencyFilterBar";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyHeader/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyHeader/index.tsdeleted file mode 100644index 2d02ca06ed2..00000000000--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyHeader/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from "./DependencyHeader";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyPagination/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyPagination/index.tsdeleted file mode 100644index 81d7ab57cfb..00000000000--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyPagination/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from "./DependencyPagination";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/index.tsdeleted file mode 100644index b1ac4bf11ee..00000000000--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencySidebar/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from "./DependencySidebar";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/index.tsdeleted file mode 100644index fa6481bbf6e..00000000000--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/DependencyTable/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from "./DependencyTable";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/index.tsdeleted file mode 100644index 45be276a60d..00000000000--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from "./DependencyList";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/types.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/types.tsdeleted file mode 100644index e661edc4817..00000000000--- a/enterprise/frontend/src/metabase-enterprise/dependencies/components/DependencyList/types.ts+++ /dev/null@@ -1,5 +0,0 @@-export type DependencyListMode = "broken" | "unreferenced";--export type DependencyListParamsOptions = {- withSetLastUsedParams?: boolean;-};diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/DependencyListPage.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/DependencyDiagnosticsPage.tsxsimilarity index 60%rename from enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/DependencyListPage.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/DependencyDiagnosticsPage.tsxindex fb624b4e453..9c7b1a82b54 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/DependencyListPage.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/DependencyDiagnosticsPage.tsx@@ -6,11 +6,11 @@ import { useUserKeyValue } from "metabase/common/hooks/use-user-key-value";import { useDispatch } from "metabase/lib/redux";import type * as Urls from "metabase/lib/urls";-import { DependencyList } from "../../components/DependencyList";+import { DependencyDiagnostics } from "../../components/DependencyDiagnostics";import type {- DependencyListMode,- DependencyListParamsOptions,-} from "../../components/DependencyList/types";+ DependencyDiagnosticsMode,+ DependencyDiagnosticsParamsOptions,+} from "../../components/DependencyDiagnostics/types";import {getPageUrl,@@ -20,15 +20,18 @@ import {parseUserParams,} from "./utils";-type DependencyListPageProps = {+type DependencyDiagnosticsPageProps = {location: Location;};-type DependencyListPageOwnProps = DependencyListPageProps & {- mode: DependencyListMode;+type DependencyDiagnosticsPageOwnProps = DependencyDiagnosticsPageProps & {+ mode: DependencyDiagnosticsMode;};-function DependencyListPage({ mode, location }: DependencyListPageOwnProps) {+function DependencyDiagnosticsPage({+ mode,+ location,+}: DependencyDiagnosticsPageOwnProps) {const isInitializingRef = useRef(false);const dispatch = useDispatch();@@ -37,7 +40,7 @@ function DependencyListPage({ mode, location }: DependencyListPageOwnProps) {isLoading: isLoadingParams,setValue: setLastUsedParams,} = useUserKeyValue({- namespace: "dependency_list",+ namespace: "dependency_diagnostics",key: mode,});@@ -48,8 +51,8 @@ function DependencyListPage({ mode, location }: DependencyListPageOwnProps) {}, [location, rawLastUsedParams]);const handleParamsChange = (- params: Urls.DependencyListParams,- { withSetLastUsedParams = false }: DependencyListParamsOptions = {},+ params: Urls.DependencyDiagnosticsParams,+ { withSetLastUsedParams = false }: DependencyDiagnosticsParamsOptions = {},) => {if (withSetLastUsedParams) {setLastUsedParams(getUserParams(params));@@ -65,7 +68,7 @@ function DependencyListPage({ mode, location }: DependencyListPageOwnProps) {}, [mode, params, isLoadingParams, dispatch]);return (- <DependencyList+ <DependencyDiagnosticsmode={mode}params={params}isLoadingParams={isLoadingParams}@@ -74,14 +77,14 @@ function DependencyListPage({ mode, location }: DependencyListPageOwnProps) {);}-export function BrokenDependencyListPage({+export function BrokenDependencyDiagnosticsPage({location,-}: DependencyListPageProps) {- return <DependencyListPage mode="broken" location={location} />;+}: DependencyDiagnosticsPageProps) {+ return <DependencyDiagnosticsPage mode="broken" location={location} />;}-export function UnreferencedDependencyListPage({+export function UnreferencedDependencyDiagnosticsPage({location,-}: DependencyListPageProps) {- return <DependencyListPage mode="unreferenced" location={location} />;+}: DependencyDiagnosticsPageProps) {+ return <DependencyDiagnosticsPage mode="unreferenced" location={location} />;}diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/DependencyListPage.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/DependencyDiagnosticsPage.unit.spec.tsxsimilarity index 94%rename from enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/DependencyListPage.unit.spec.tsxrename to enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/DependencyDiagnosticsPage.unit.spec.tsxindex 48923e563b9..4f08fbf59d1 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/DependencyListPage.unit.spec.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/DependencyDiagnosticsPage.unit.spec.tsx@@ -14,7 +14,7 @@ import {} from "__support__/ui";import type * as Urls from "metabase/lib/urls";import type {- DependencyListUserParams,+ DependencyDiagnosticsUserParams,DependencyNode,} from "metabase-types/api";import {@@ -25,12 +25,12 @@ import {createMockUser,} from "metabase-types/api/mocks";-import type { DependencyListMode } from "../../components/DependencyList/types";+import type { DependencyDiagnosticsMode } from "../../components/DependencyDiagnostics/types";import {- BrokenDependencyListPage,- UnreferencedDependencyListPage,-} from "./DependencyListPage";+ BrokenDependencyDiagnosticsPage,+ UnreferencedDependencyDiagnosticsPage,+} from "./DependencyDiagnosticsPage";import { getPageUrl } from "./utils";const CARD_NODES = [@@ -45,11 +45,11 @@ const CARD_NODES = [];type SetupOpts = {- mode?: DependencyListMode;+ mode?: DependencyDiagnosticsMode;nodes?: DependencyNode[];total?: number;- urlParams?: Urls.DependencyListParams;- lastUsedParams?: DependencyListUserParams;+ urlParams?: Urls.DependencyDiagnosticsParams;+ lastUsedParams?: DependencyDiagnosticsUserParams;};function setup({@@ -76,7 +76,7 @@ function setup({}setupUserKeyValueEndpoints({- namespace: "dependency_list",+ namespace: "dependency_diagnostics",key: mode,value: lastUsedParams,});@@ -85,8 +85,8 @@ function setup({const PageComponent =mode === "broken"- ? BrokenDependencyListPage- : UnreferencedDependencyListPage;+ ? BrokenDependencyDiagnosticsPage+ : UnreferencedDependencyDiagnosticsPage;const { history } = renderWithProviders(<Route path={getPageUrl(mode, {})} component={PageComponent} />,@@ -118,7 +118,7 @@ async function waitForListToLoad() {expect(await screen.findByRole("treegrid")).toBeInTheDocument();}-describe("DependencyListPage", () => {+describe("DependencyDiagnosticsPage", () => {describe("list", () => {it("renders provided nodes in the list", async () => {setup({ nodes: CARD_NODES });diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/index.tsnew file mode 100644index 00000000000..f32df603808--- /dev/null+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/index.ts@@ -0,0 +1 @@+export * from "./DependencyDiagnosticsPage";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/utils.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/utils.tssimilarity index 78%rename from enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/utils.tsrename to enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/utils.tsindex 7a69c671026..a669876bfca 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/utils.ts+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyDiagnosticsPage/utils.ts@@ -4,22 +4,24 @@ import * as Urls from "metabase/lib/urls";import {DEPENDENCY_GROUP_TYPES,DEPENDENCY_SORT_COLUMNS,- type DependencyListUserParams,+ type DependencyDiagnosticsUserParams,SORT_DIRECTIONS,} from "metabase-types/api";-import type { DependencyListMode } from "../../components/DependencyList/types";+import type { DependencyDiagnosticsMode } from "../../components/DependencyDiagnostics/types";export function getPageUrl(- mode: DependencyListMode,- params: Urls.DependencyListParams,+ mode: DependencyDiagnosticsMode,+ params: Urls.DependencyDiagnosticsParams,): string {return mode === "broken"? Urls.brokenDependencies(params): Urls.unreferencedDependencies(params);}-export function parseUrlParams(location: Location): Urls.DependencyListParams {+export function parseUrlParams(+ location: Location,+): Urls.DependencyDiagnosticsParams {const {page,query,@@ -45,8 +47,8 @@ export function parseUrlParams(location: Location): Urls.DependencyListParams {// when the value is not previously set, the BE returns an empty stringexport function parseUserParams(- params: DependencyListUserParams | undefined | "",-): Urls.DependencyListParams {+ params: DependencyDiagnosticsUserParams | undefined | "",+): Urls.DependencyDiagnosticsParams {if (typeof params !== "object" || params == null) {return {};}@@ -60,8 +62,8 @@ export function parseUserParams(}export function getUserParams(- params: Urls.DependencyListParams,-): DependencyListUserParams {+ params: Urls.DependencyDiagnosticsParams,+): DependencyDiagnosticsUserParams {return {group_types: params.groupTypes,include_personal_collections: params.includePersonalCollections,diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/index.ts b/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/index.tsdeleted file mode 100644index a426cf3ed59..00000000000--- a/enterprise/frontend/src/metabase-enterprise/dependencies/pages/DependencyListPage/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from "./DependencyListPage";diff --git a/enterprise/frontend/src/metabase-enterprise/dependencies/routes.tsx b/enterprise/frontend/src/metabase-enterprise/dependencies/routes.tsxindex b5d948a27ca..208b2207855 100644--- a/enterprise/frontend/src/metabase-enterprise/dependencies/routes.tsx+++ b/enterprise/frontend/src/metabase-enterprise/dependencies/routes.tsx@@ -1,10 +1,10 @@import { IndexRedirect, IndexRoute, Route } from "react-router";-import { DependencyGraphPage } from "./pages/DependencyGraphPage";import {- BrokenDependencyListPage,- UnreferencedDependencyListPage,-} from "./pages/DependencyListPage";+ BrokenDependencyDiagnosticsPage,+ UnreferencedDependencyDiagnosticsPage,+} from "./pages/DependencyDiagnosticsPage";+import { DependencyGraphPage } from "./pages/DependencyGraphPage";export function getDataStudioDependencyRoutes() {return <IndexRoute component={DependencyGraphPage} />;@@ -14,8 +14,11 @@ export function getDataStudioDependencyDiagnosticsRoutes() {return (<><IndexRedirect to="broken" />- <Route path="broken" component={BrokenDependencyListPage} />- <Route path="unreferenced" component={UnreferencedDependencyListPage} />+ <Route path="broken" component={BrokenDependencyDiagnosticsPage} />+ <Route+ path="unreferenced"+ component={UnreferencedDependencyDiagnosticsPage}+ /></>);}diff --git a/frontend/src/metabase-types/api/dependencies.ts b/frontend/src/metabase-types/api/dependencies.tsindex 19b360edd78..e3041511789 100644--- a/frontend/src/metabase-types/api/dependencies.ts+++ b/frontend/src/metabase-types/api/dependencies.ts@@ -271,13 +271,13 @@ export type GetDependencyGraphRequest = {export type ListNodeDependentsRequest = {id: DependencyId;type: DependencyType;- dependent_types?: DependencyType[];- dependent_card_types?: CardType[];+ "dependent-types"?: DependencyType[];+ "dependent-card-types"?: CardType[];query?: string;- include_personal_collections?: boolean;+ "include-personal-collections"?: boolean;archived?: boolean;- sort_column?: DependencySortColumn;- sort_direction?: SortDirection;+ "sort-column"?: DependencySortColumn;+ "sort-direction"?: SortDirection;};export type CheckDependenciesResponse = {@@ -306,11 +306,11 @@ export type DependencySortColumn = (typeof DEPENDENCY_SORT_COLUMNS)[number];export type ListBreakingGraphNodesRequest = PaginationRequest & {types?: DependencyType[];- card_types?: CardType[];+ "card-types"?: CardType[];query?: string;- include_personal_collections?: boolean;- sort_column?: DependencySortColumn;- sort_direction?: SortDirection;+ "include-personal-collections"?: boolean;+ "sort-column"?: DependencySortColumn;+ "sort-direction"?: SortDirection;};export type ListBreakingGraphNodesResponse = PaginationResponse & {@@ -320,27 +320,27 @@ export type ListBreakingGraphNodesResponse = PaginationResponse & {export type ListBrokenGraphNodesRequest = {id: DependencyId;type: DependencyType;- dependent_types?: DependencyType[];- dependent_card_types?: CardType[];- include_personal_collections?: boolean;- sort_column?: DependencySortColumn;- sort_direction?: SortDirection;+ "dependent-types"?: DependencyType[];+ "dependent-card-types"?: CardType[];+ "include-personal-collections"?: boolean;+ "sort-column"?: DependencySortColumn;+ "sort-direction"?: SortDirection;};export type ListUnreferencedGraphNodesRequest = PaginationRequest & {types?: DependencyType[];- card_types?: CardType[];+ "card-types"?: CardType[];query?: string;- include_personal_collections?: boolean;- sort_column?: DependencySortColumn;- sort_direction?: SortDirection;+ "include-personal-collections"?: boolean;+ "sort-column"?: DependencySortColumn;+ "sort-direction"?: SortDirection;};export type ListUnreferencedGraphNodesResponse = PaginationResponse & {data: DependencyNode[];};-export type DependencyListUserParams = {+export type DependencyDiagnosticsUserParams = {group_types?: DependencyGroupType[];include_personal_collections?: boolean;sort_column?: DependencySortColumn;diff --git a/frontend/src/metabase-types/api/transform.ts b/frontend/src/metabase-types/api/transform.tsindex 75f05b64f2d..8899a52d2b9 100644--- a/frontend/src/metabase-types/api/transform.ts+++ b/frontend/src/metabase-types/api/transform.ts@@ -233,27 +233,27 @@ export type RunTransformResponse = {};export type ListTransformsRequest = {- last_run_start_time?: string;- last_run_statuses?: TransformRunStatus[];- tag_ids?: TransformTagId[];+ "last-run-start-time"?: string;+ "last-run-statuses"?: TransformRunStatus[];+ "tag-ids"?: TransformTagId[];};export type ListTransformJobsRequest = {- last_run_start_time?: string;- last_run_statuses?: TransformRunStatus[];- next_run_start_time?: string;- tag_ids?: TransformTagId[];+ "last-run-start-time"?: string;+ "last-run-statuses"?: TransformRunStatus[];+ "next-run-start-time"?: string;+ "tag-ids"?: TransformTagId[];};export type ListTransformRunsRequest = {statuses?: TransformRunStatus[];- transform_ids?: TransformId[];- transform_tag_ids?: TransformTagId[];- start_time?: string;- end_time?: string;- run_methods?: TransformRunMethod[];- sort_column?: TransformRunSortColumn;- sort_direction?: SortDirection;+ "transform-ids"?: TransformId[];+ "transform-tag-ids"?: TransformTagId[];+ "start-time"?: string;+ "end-time"?: string;+ "run-methods"?: TransformRunMethod[];+ "sort-column"?: TransformRunSortColumn;+ "sort-direction"?: SortDirection;} & PaginationRequest;export type ListTransformRunsResponse = {diff --git a/frontend/src/metabase-types/api/user.ts b/frontend/src/metabase-types/api/user.tsindex ad262a55a9c..f794b576b59 100644--- a/frontend/src/metabase-types/api/user.ts+++ b/frontend/src/metabase-types/api/user.ts@@ -1,6 +1,6 @@import type { CollectionId } from "./collection";import type { DashboardId } from "./dashboard";-import type { DependencyListUserParams } from "./dependencies";+import type { DependencyDiagnosticsUserParams } from "./dependencies";import type { PaginationRequest, PaginationResponse } from "./pagination";export type UserId = number;@@ -189,9 +189,9 @@ export type UserKeyValue =value: boolean;}| {- namespace: "dependency_list";+ namespace: "dependency_diagnostics";key: string;- value: DependencyListUserParams;+ value: DependencyDiagnosticsUserParams;};export type UserKeyValueKey = Pick<UserKeyValue, "namespace" | "key">;diff --git a/frontend/src/metabase/data-studio/app/pages/TasksSectionLayout/TasksSectionLayout.tsx b/frontend/src/metabase/data-studio/app/pages/DependencyDiagnosticsSectionLayout/DependencyDiagnosticsSectionLayout.tsxsimilarity index 100%rename from frontend/src/metabase/data-studio/app/pages/TasksSectionLayout/TasksSectionLayout.tsxrename to frontend/src/metabase/data-studio/app/pages/DependencyDiagnosticsSectionLayout/DependencyDiagnosticsSectionLayout.tsxdiff --git a/frontend/src/metabase/data-studio/app/pages/DependencyDiagnosticsSectionLayout/index.ts b/frontend/src/metabase/data-studio/app/pages/DependencyDiagnosticsSectionLayout/index.tsnew file mode 100644index 00000000000..e07baaef43d--- /dev/null+++ b/frontend/src/metabase/data-studio/app/pages/DependencyDiagnosticsSectionLayout/index.ts@@ -0,0 +1 @@+export * from "./DependencyDiagnosticsSectionLayout";diff --git a/frontend/src/metabase/data-studio/data-model/components/TableSection/TableSection.tsx b/frontend/src/metabase/data-studio/data-model/components/TableSection/TableSection.tsxindex 296fe49a11e..dc7751df00a 100644--- a/frontend/src/metabase/data-studio/data-model/components/TableSection/TableSection.tsx+++ b/frontend/src/metabase/data-studio/data-model/components/TableSection/TableSection.tsx@@ -265,11 +265,9 @@ const TableSectionBase = ({entry: { id: Number(table.id), type: "table" },})}p="sm"+ w="2.5rem"+ flex="0 1 auto"leftSection={<Icon name="dependencies" />}- style={{- flexGrow: 0,- width: 40,- }}aria-label={t`Dependency graph`}onClickCapture={registerDependencyGraphTrackingEvent}onAuxClick={registerDependencyGraphTrackingEvent}diff --git a/frontend/src/metabase/data-studio/routes.tsx b/frontend/src/metabase/data-studio/routes.tsxindex 5226dd929b6..6577a8786e2 100644--- a/frontend/src/metabase/data-studio/routes.tsx+++ b/frontend/src/metabase/data-studio/routes.tsx@@ -17,7 +17,6 @@ import { DataSectionLayout } from "./app/pages/DataSectionLayout";import { DataStudioLayout } from "./app/pages/DataStudioLayout";import { DependenciesSectionLayout } from "./app/pages/DependenciesSectionLayout";import { GitSyncSectionLayout } from "./app/pages/GitSyncSectionLayout";-import { DependencyDiagnosticsSectionLayout } from "./app/pages/TasksSectionLayout/TasksSectionLayout";import { TransformsSectionLayout } from "./app/pages/TransformsSectionLayout";import { WorkspacesSectionLayout } from "./app/pages/WorkspacesSectionLayout";import { getDataStudioMetadataRoutes } from "./data-model/routes";@@ -71,7 +70,7 @@ export function getDataStudioRoutes({PLUGIN_DEPENDENCIES.isEnabled ? (<Routepath="dependency-diagnostics"- component={DependencyDiagnosticsSectionLayout}+ component={DependenciesSectionLayout}>{PLUGIN_DEPENDENCIES.getDataStudioDependencyDiagnosticsRoutes()}</Route>diff --git a/frontend/src/metabase/lib/urls/dependencies.ts b/frontend/src/metabase/lib/urls/dependencies.tsindex 72497062d2c..63737de1721 100644--- a/frontend/src/metabase/lib/urls/dependencies.ts+++ b/frontend/src/metabase/lib/urls/dependencies.ts@@ -31,7 +31,7 @@ export function dependencyDiagnostics() {return DIAGNOSTICS_URL;}-export type DependencyListParams = {+export type DependencyDiagnosticsParams = {page?: number;query?: string;groupTypes?: DependencyGroupType[];@@ -40,14 +40,14 @@ export type DependencyListParams = {sortDirection?: SortDirection;};-function dependencyListQueryString({+function dependencyDiagnosticsQueryString({page,query,groupTypes,includePersonalCollections,sortColumn,sortDirection,-}: DependencyListParams = {}) {+}: DependencyDiagnosticsParams = {}) {const searchParams = new URLSearchParams();if (page != null) {@@ -78,10 +78,10 @@ function dependencyListQueryString({return queryString.length > 0 ? `?${queryString}` : "";}-export function brokenDependencies(params?: DependencyListParams) {- return `${dependencyDiagnostics()}/broken${dependencyListQueryString(params)}`;+export function brokenDependencies(params?: DependencyDiagnosticsParams) {+ return `${dependencyDiagnostics()}/broken${dependencyDiagnosticsQueryString(params)}`;}-export function unreferencedDependencies(params?: DependencyListParams) {- return `${dependencyDiagnostics()}/unreferenced${dependencyListQueryString(params)}`;+export function unreferencedDependencies(params?: DependencyDiagnosticsParams) {+ return `${dependencyDiagnostics()}/unreferenced${dependencyDiagnosticsQueryString(params)}`;}diff --git a/frontend/src/metabase/transforms/pages/RunListPage/RunListPage.tsx b/frontend/src/metabase/transforms/pages/RunListPage/RunListPage.tsxindex a30d0f7bd44..96c802be0b5 100644--- a/frontend/src/metabase/transforms/pages/RunListPage/RunListPage.tsx+++ b/frontend/src/metabase/transforms/pages/RunListPage/RunListPage.tsx@@ -63,13 +63,13 @@ export function RunListPage({ location }: RunListPageProps) {offset: page * PAGE_SIZE,limit: PAGE_SIZE,statuses: params.statuses,- transform_ids: params.transformIds,- transform_tag_ids: params.transformTagIds,- start_time: params.startTime,- end_time: params.endTime,- run_methods: params.runMethods,- sort_column: params.sortColumn,- sort_direction: params.sortDirection,+ "transform-ids": params.transformIds,+ "transform-tag-ids": params.transformTagIds,+ "start-time": params.startTime,+ "end-time": params.endTime,+ "run-methods": params.runMethods,+ "sort-column": params.sortColumn,+ "sort-direction": params.sortDirection,},{pollingInterval: isPolling ? POLLING_INTERVAL : undefined,diff --git a/frontend/test/__support__/server-mocks/dependencies.ts b/frontend/test/__support__/server-mocks/dependencies.tsindex 9c58f1f0aee..c496249b8b4 100644--- a/frontend/test/__support__/server-mocks/dependencies.ts+++ b/frontend/test/__support__/server-mocks/dependencies.ts@@ -11,23 +11,23 @@ import type {export function setupCheckCardDependenciesEndpoint(response: CheckDependenciesResponse,) {- fetchMock.post("path:/api/ee/dependencies/check_card", response);+ fetchMock.post("path:/api/ee/dependencies/check-card", response);}export function setupCheckCardDependenciesEndpointError() {- fetchMock.post("path:/api/ee/dependencies/check_card", { status: 500 });+ fetchMock.post("path:/api/ee/dependencies/check-card", { status: 500 });}export function setupCheckSnippetDependenciesEndpoint(response: CheckDependenciesResponse,) {- fetchMock.post("path:/api/ee/dependencies/check_snippet", response);+ fetchMock.post("path:/api/ee/dependencies/check-snippet", response);}export function setupCheckTransformDependenciesEndpoint(response: CheckDependenciesResponse,) {- fetchMock.post("path:/api/ee/dependencies/check_transform", response);+ fetchMock.post("path:/api/ee/dependencies/check-transform", response);}export function setupListGraphNodeDependentsEndpoint(nodes: DependencyNode[]) {diff --git a/resources/user_key_value_types/dependency_list.edn b/resources/user_key_value_types/dependency_diagnostics.ednsimilarity index 100%rename from resources/user_key_value_types/dependency_list.ednrename to resources/user_key_value_types/dependency_diagnostics.edndiff --git a/src/metabase/models/transforms/transform_run.clj b/src/metabase/models/transforms/transform_run.cljindex b5c0415814a..50e2d3da817 100644--- a/src/metabase/models/transforms/transform_run.clj+++ b/src/metabase/models/transforms/transform_run.clj@@ -185,31 +185,31 @@(defn- paged-runs-join-clause"Returns a `:left-join` clause for transform runs sort columns that require joining other tables."- [{:keys [sort_column]}]- (case (keyword sort_column)+ [{:keys [sort-column]}]+ (case (keyword sort-column):transform-name [:transform [:= :transform_run.transform_id :transform.id]]nil))(defn- paged-runs-where-clause"Builds a `:where` clause for transform runs from the given filter parameters."- [{:keys [start_time end_time run_methods transform_ids transform_tag_ids statuses]}]+ [{:keys [start-time end-time run-methods transform-ids transform-tag-ids statuses]}](let [where-cond (cond-> []- (some? start_time)- (conj (timestamp-constraint :start_time start_time))+ (some? start-time)+ (conj (timestamp-constraint :start_time start-time))- (some? end_time)- (conj (timestamp-constraint :end_time end_time))+ (some? end-time)+ (conj (timestamp-constraint :end_time end-time))- (seq run_methods)- (conj [:in :run_method (set run_methods)])+ (seq run-methods)+ (conj [:in :run_method (set run-methods)])- (seq transform_ids)- (conj [:in :transform_id transform_ids])+ (seq transform-ids)+ (conj [:in :transform_id transform-ids])- (seq transform_tag_ids)+ (seq transform-tag-ids)(conj [:in :transform_id {:select [:transform_id]:from [:transform_transform_tag]- :where [:in :tag_id transform_tag_ids]}])+ :where [:in :tag_id transform-tag-ids]}])(seq statuses)(conj [:in :status (set statuses)])@@ -268,9 +268,9 @@(defn- paged-runs-order-by-clause"Builds a HoneySQL `:order-by` clause for transform runs, translating display values for sortable columns."- [{:keys [sort_column sort_direction]}]- (let [sort-column (or (keyword sort_column) :start-time)- sort-direction (or (keyword sort_direction) :desc)+ [{:keys [sort-column sort-direction]}]+ (let [sort-column (or (keyword sort-column) :start-time)+ sort-direction (or (keyword sort-direction) :desc)nulls-sort (if (= sort-direction :asc):nulls-last:nulls-first)]diff --git a/src/metabase/transforms/api/transform.clj b/src/metabase/transforms/api/transform.cljindex fc9c4db224b..8efb7fafdbe 100644--- a/src/metabase/transforms/api/transform.clj+++ b/src/metabase/transforms/api/transform.clj@@ -186,32 +186,29 @@(defn get-transforms"Get a list of transforms."- [& {:keys [last_run_start_time last_run_statuses tag_ids]}]+ [& {:keys [last-run-start-time last-run-statuses tag-ids]}](let [enabled-types (transforms.util/enabled-source-types-for-user)](api/check-403 (seq enabled-types))(let [transforms (t2/select :model/Transform {:where [:in :source_type enabled-types]:order-by [[:id :asc]]})](->> (t2/hydrate transforms :last_run :transform_tag_ids :creator :owner)(into []- (comp (transforms.util/->date-field-filter-xf [:last_run :start_time] last_run_start_time)- (transforms.util/->status-filter-xf [:last_run :status] last_run_statuses)- (transforms.util/->tag-filter-xf [:tag_ids] tag_ids)+ (comp (transforms.util/->date-field-filter-xf [:last_run :start_time] last-run-start-time)+ (transforms.util/->status-filter-xf [:last_run :status] last-run-statuses)+ (transforms.util/->tag-filter-xf [:tag_ids] tag-ids)(map #(update % :last_run transforms.util/localize-run-timestamps))(map python-source-table-ref->table-id)))transforms.util/add-source-readable))))-;; TODO (Cam 10/28/25) -- fix this endpoint so it uses kebab-case for query parameters for consistency with the rest-;; of the REST API-#_{:clj-kondo/ignore [:metabase/validate-defendpoint-query-params-use-kebab-case]}(api.macros/defendpoint :get "/" :- [:sequential TransformResponse]"Get a list of transforms."[_route-paramsquery-params :-[:map- [:last_run_start_time {:optional true} [:maybe ms/NonBlankString]]- [:last_run_statuses {:optional true} [:maybe (ms/QueryVectorOf [:enum "started" "succeeded" "failed" "timeout"])]]- [:tag_ids {:optional true} [:maybe (ms/QueryVectorOf ms/IntGreaterThanOrEqualToZero)]]- [:database_id {:optional true} [:maybe ms/PositiveInt]]]]+ [:last-run-start-time {:optional true} [:maybe ms/NonBlankString]]+ [:last-run-statuses {:optional true} [:maybe (ms/QueryVectorOf [:enum "started" "succeeded" "failed" "timeout"])]]+ [:tag-ids {:optional true} [:maybe (ms/QueryVectorOf ms/IntGreaterThanOrEqualToZero)]]+ [:database-id {:optional true} [:maybe ms/PositiveInt]]]](get-transforms query-params))(defn- extract-all-columns-from-query@@ -407,9 +404,6 @@{:where [:= :transform_id id]:order-by [[:created_at :desc]]}))-;; TODO (Cam 10/28/25) -- fix this endpoint so it uses kebab-case for query parameters for consistency with the rest-;; of the REST API-#_{:clj-kondo/ignore [:metabase/validate-defendpoint-query-params-use-kebab-case]}(api.macros/defendpoint :get "/run" :- [:map {:closed true}[:data [:sequential TransformRunResponse]][:limit pos-int?]@@ -419,14 +413,14 @@[_route-paramsquery-params :-[:map- [:sort_column {:optional true} [:enum "transform-name" "start-time" "end-time" "status" "run-method" "transform-tags"]]- [:sort_direction {:optional true} [:enum "asc" "desc"]]- [:transform_ids {:optional true} [:maybe (ms/QueryVectorOf ms/IntGreaterThanOrEqualToZero)]]+ [:sort-column {:optional true} [:enum "transform-name" "start-time" "end-time" "status" "run-method" "transform-tags"]]+ [:sort-direction {:optional true} [:enum "asc" "desc"]]+ [:transform-ids {:optional true} [:maybe (ms/QueryVectorOf ms/IntGreaterThanOrEqualToZero)]][:statuses {:optional true} [:maybe (ms/QueryVectorOf [:enum "started" "succeeded" "failed" "timeout"])]]- [:transform_tag_ids {:optional true} [:maybe (ms/QueryVectorOf ms/IntGreaterThanOrEqualToZero)]]- [:start_time {:optional true} [:maybe ms/NonBlankString]]- [:end_time {:optional true} [:maybe ms/NonBlankString]]- [:run_methods {:optional true} [:maybe (ms/QueryVectorOf [:enum "manual" "cron"])]]]]+ [:transform-tag-ids {:optional true} [:maybe (ms/QueryVectorOf ms/IntGreaterThanOrEqualToZero)]]+ [:start-time {:optional true} [:maybe ms/NonBlankString]]+ [:end-time {:optional true} [:maybe ms/NonBlankString]]+ [:run-methods {:optional true} [:maybe (ms/QueryVectorOf [:enum "manual" "cron"])]]]](api/check-data-analyst)(-> (transform-run/paged-runs (assoc query-params:offset (request/offset)diff --git a/src/metabase/transforms/api/transform_job.clj b/src/metabase/transforms/api/transform_job.cljindex 2adaad96988..00df1ae90ab 100644--- a/src/metabase/transforms/api/transform_job.clj+++ b/src/metabase/transforms/api/transform_job.clj@@ -221,27 +221,24 @@(t2/hydrate :creator)transforms.util/add-source-readable))-;; TODO (Cam 10/28/25) -- fix this endpoint so it uses kebab-case for query parameters for consistency with the rest-;; of the REST API-#_{:clj-kondo/ignore [:metabase/validate-defendpoint-query-params-use-kebab-case]}(api.macros/defendpoint :get "/" :- [:sequential TransformJobResponse]"Get all transform jobs."[_route-params- {:keys [last_run_start_time next_run_start_time last_run_statuses tag_ids]} :-+ {:keys [last-run-start-time next-run-start-time last-run-statuses tag-ids]} :-[:map- [:last_run_start_time {:optional true} [:maybe ms/NonBlankString]]- [:next_run_start_time {:optional true} [:maybe ms/NonBlankString]]- [:last_run_statuses {:optional true} [:maybe (ms/QueryVectorOf [:enum "started" "succeeded" "failed" "timeout"])]]- [:tag_ids {:optional true} [:maybe (ms/QueryVectorOf ms/IntGreaterThanOrEqualToZero)]]]]+ [:last-run-start-time {:optional true} [:maybe ms/NonBlankString]]+ [:next-run-start-time {:optional true} [:maybe ms/NonBlankString]]+ [:last-run-statuses {:optional true} [:maybe (ms/QueryVectorOf [:enum "started" "succeeded" "failed" "timeout"])]]+ [:tag-ids {:optional true} [:maybe (ms/QueryVectorOf ms/IntGreaterThanOrEqualToZero)]]]](log/info "Getting all transform jobs")(api/check-data-analyst)(let [jobs (t2/select :model/TransformJob {:order-by [[:created_at :desc]]})](into [](comp (map add-next-run)- (transforms.util/->date-field-filter-xf [:last_run :start_time] last_run_start_time)- (transforms.util/->date-field-filter-xf [:next_run :start_time] next_run_start_time)- (transforms.util/->status-filter-xf [:last_run :status] last_run_statuses)- (transforms.util/->tag-filter-xf [:tag_ids] tag_ids)+ (transforms.util/->date-field-filter-xf [:last_run :start_time] last-run-start-time)+ (transforms.util/->date-field-filter-xf [:next_run :start_time] next-run-start-time)+ (transforms.util/->status-filter-xf [:last_run :status] last-run-statuses)+ (transforms.util/->tag-filter-xf [:tag_ids] tag-ids)(map #(update % :last_run transforms.util/localize-run-timestamps))(map #(update % :next_run transforms.util/localize-run-timestamps)))(t2/hydrate jobs :tag_ids :last_run))))diff --git a/test/metabase/transforms/api/transform_job_test.clj b/test/metabase/transforms/api/transform_job_test.cljindex 8adb9b4dcb4..ecabab1bccf 100644--- a/test/metabase/transforms/api/transform_job_test.clj+++ b/test/metabase/transforms/api/transform_job_test.clj@@ -115,26 +115,26 @@(let [response (mt/user-http-request :lucky :get 200 "transform-job")](is (= our-job-ids (returned-job-ids response)))))(testing "filtering by tag_ids"- (let [response (mt/user-http-request :lucky :get 200 "transform-job" :tag_ids [t2-id])]+ (let [response (mt/user-http-request :lucky :get 200 "transform-job" :tag-ids [t2-id])](is (=? [{:schedule "0 0 0 * * ?":tag_ids [t2-id]:name "Job 3":id j3-id}](returned-jobs response)))))(testing "filtering by last_run_start_time"- (let [response (mt/user-http-request :lucky :get 200 "transform-job" :last_run_start_time "2025-08-26~")]+ (let [response (mt/user-http-request :lucky :get 200 "transform-job" :last-run-start-time "2025-08-26~")](is (= #{j2-id} (returned-job-ids response)))))(testing "filtering by last_run_statuses"- (let [response (mt/user-http-request :lucky :get 200 "transform-job" :last_run_statuses ["started" "succeeded"])]+ (let [response (mt/user-http-request :lucky :get 200 "transform-job" :last-run-statuses ["started" "succeeded"])](is (= #{j2-id} (returned-job-ids response)))))(testing "filtering by last_run_end_time without scheduled job"- (let [response (mt/user-http-request :lucky :get 200 "transform-job" :next_run_start_time "2025-08-26~")]+ (let [response (mt/user-http-request :lucky :get 200 "transform-job" :next-run-start-time "2025-08-26~")](is (= #{} (returned-job-ids response)))))(testing "filtering by last_run_end_time with scheduled job"(mt/with-temp-scheduler!(transforms.schedule/initialize-job! {:id j1-id, :schedule at-5-second-schedule})(try- (let [response (mt/user-http-request :lucky :get 200 "transform-job" :next_run_start_time "2025-08-27~")]+ (let [response (mt/user-http-request :lucky :get 200 "transform-job" :next-run-start-time "2025-08-27~")](is (=? [{:id j1-id:last_run {:job_id j1-id:run_method "cron"diff --git a/test/metabase/transforms/api/transform_test.clj b/test/metabase/transforms/api/transform_test.cljindex 6a7ca537100..c476e43e85a 100644--- a/test/metabase/transforms/api/transform_test.clj+++ b/test/metabase/transforms/api/transform_test.clj@@ -491,15 +491,15 @@(mt/user-http-request :lucky :get 200 "transform"))))(testing "last_run_start_time filter"(is (=? [{:id t1-id}]- (mt/user-http-request :lucky :get 200 "transform" :last_run_start_time "2025-08-26T10:12:11"))))+ (mt/user-http-request :lucky :get 200 "transform" :last-run-start-time "2025-08-26T10:12:11"))))(testing "last_run_statuses filter"(is (=? [{:id t1-id}]- (mt/user-http-request :lucky :get 200 "transform" :last_run_statuses ["started" "succeeded"]))))+ (mt/user-http-request :lucky :get 200 "transform" :last-run-statuses ["started" "succeeded"]))))(testing "tag_ids filter"(is (=? [{:id t1-id}]- (mt/user-http-request :lucky :get 200 "transform" :tag_ids [tag1-id])))+ (mt/user-http-request :lucky :get 200 "transform" :tag-ids [tag1-id])))(is (=? [{:id t2-id}]- (mt/user-http-request :lucky :get 200 "transform" :tag_ids [tag2-id]))))))))))+ (mt/user-http-request :lucky :get 200 "transform" :tag-ids [tag2-id]))))))))))(deftest get-transforms-test(mt/with-premium-features #{}@@ -803,13 +803,13 @@:model/TransformRun run2 {:transform_id (:id transform2)}](testing "Filter by transform1 ID only returns transform1 runs"(let [response (mt/user-http-request :lucky :get 200 "transform/run"- :transform_ids [(:id transform1)])]+ :transform-ids [(:id transform1)])](assert-run-count response 1)(assert-transform-ids response #{(:id transform1)})(is (= (:id run1) (-> response :data first :id)))))(testing "Filter by transform2 ID only returns transform2 runs"(let [response (mt/user-http-request :lucky :get 200 "transform/run"- :transform_ids [(:id transform2)])]+ :transform-ids [(:id transform2)])](assert-run-count response 1)(assert-transform-ids response #{(:id transform2)})(is (= (:id run2) (-> response :data first :id))))))))))@@ -825,7 +825,7 @@:model/TransformRun _run3 {:transform_id (:id transform3)}](testing "Filter by transform1 and transform2 IDs returns only those runs"(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :transform_ids [(:id transform1) (:id transform2)])]+ :transform-ids [(:id transform1) (:id transform2)])](assert-run-count response 2)(assert-transform-ids response #{(:id transform1) (:id transform2)})))))))@@ -923,10 +923,10 @@:status "succeeded":transform {:id t0-id}:transform_id t0-id}]- (transform-runs our-run-pred :start_time "2025-08-26~")))- (let [our-runs (transform-runs our-run-pred :start_time "~2025-08-25")]+ (transform-runs our-run-pred :start-time "2025-08-26~")))+ (let [our-runs (transform-runs our-run-pred :start-time "~2025-08-25")](is (= 6 (count our-runs))))- (let [our-runs (transform-runs our-run-pred :start_time "2025-08-22~2025-08-23")]+ (let [our-runs (transform-runs our-run-pred :start-time "2025-08-22~2025-08-23")](is (=? [{:transform {:id t1-id}:run_method "manual":is_active nil@@ -946,16 +946,16 @@our-runs))))(testing "Filter by 'end_time'"(is (=? t0-runs- (transform-runs our-run-pred :end_time "2025-08-26~")))- (is (empty? (transform-runs our-run-pred :end_time "~2025-08-21"))))+ (transform-runs our-run-pred :end-time "2025-08-26~")))+ (is (empty? (transform-runs our-run-pred :end-time "~2025-08-21"))))(testing "Filter by 'run_methods'"- (let [our-runs (transform-runs our-run-pred :run_methods ["manual"])]+ (let [our-runs (transform-runs our-run-pred :run-methods ["manual"])](is (= 3 (count our-runs)))(is (every? (comp #{"manual"} :run_method) our-runs)))- (let [our-runs (transform-runs our-run-pred :run_methods ["cron"])]+ (let [our-runs (transform-runs our-run-pred :run-methods ["cron"])](is (= 4 (count our-runs)))(is (every? (comp #{"cron"} :run_method) our-runs)))- (let [our-runs (transform-runs our-run-pred :run_methods ["cron" "manual"])]+ (let [our-runs (transform-runs our-run-pred :run-methods ["cron" "manual"])](is (= 7 (count our-runs)))))(testing "Filter by a combination"(is (=? [{:id r3-id@@ -965,7 +965,7 @@:end_time (utc-timestamp "2025-08-23T00:17:41"):transform {:id t1-id}:transform_id t1-id}]- (transform-runs our-run-pred :run_methods ["manual"] :start_time "~2025-08-25" :end_time "~2025-08-23"))))))))))+ (transform-runs our-run-pred :run-methods ["manual"] :start-time "~2025-08-25" :end-time "~2025-08-23"))))))))))(deftest get-runs-filter-by-single-tag-test(mt/with-premium-features #{}@@ -983,7 +983,7 @@:model/TransformRun _run3 {:transform_id (:id transform3)}](testing "Filter by tag1 returns only tagged transforms' runs"(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :transform_tag_ids [(:id tag1)])]+ :transform-tag-ids [(:id tag1)])](assert-run-count response 2)(assert-transform-ids response #{(:id transform1) (:id transform2)})(is (not (contains? (set (map :transform_id (:data response)))@@ -1037,7 +1037,7 @@;; Associate tags with transforms(testing "Filter by tag1 and tag2 returns union (transforms with either tag)"(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :transform_tag_ids [(:id tag1) (:id tag2)])+ :transform-tag-ids [(:id tag1) (:id tag2)])returned-transform-ids (set (map :transform_id (:data response)))](assert-run-count response 3)(assert-transform-ids response #{(:id transform1) (:id transform2) (:id transform3)})@@ -1069,7 +1069,7 @@;; Create multiple runs with different statuses for transform1(testing "Filter by transform1 ID and failed status"(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :transform_ids [(:id transform1)]+ :transform-ids [(:id transform1)]:statuses ["failed"])](assert-run-count response 2)(is (every? #(and (= (:id transform1) (:transform_id %))@@ -1092,7 +1092,7 @@;; Associate tag1 with transform1 and transform2(testing "Filter by tag1 and failed status returns only failed runs of tagged transforms"(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :transform_tag_ids [(:id tag1)]+ :transform-tag-ids [(:id tag1)]:statuses ["failed"])](assert-run-count response 1)(is (= (:id transform2) (-> response :data first :transform_id)))@@ -1111,19 +1111,19 @@:model/TransformRun _run1 {:transform_id (:id transform2)}](testing "Filter by transform1 ID and tag1 returns transform1 (has both)"(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :transform_ids [(:id transform1)]- :transform_tag_ids [(:id tag1)])]+ :transform-ids [(:id transform1)]+ :transform-tag-ids [(:id tag1)])](assert-run-count response 1)(assert-transform-ids response #{(:id transform1)})))(testing "Filter by transform1 ID and tag2 returns empty (transform1 doesn't have tag2)"(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :transform_ids [(:id transform1)]- :transform_tag_ids [(:id tag2)])]+ :transform-ids [(:id transform1)]+ :transform-tag-ids [(:id tag2)])](assert-run-count response 0)))(testing "Filter by both transform IDs and tag1 returns only transform1"(let [response (mt/user-http-request :crowberto :get 200 "transform/run"- :transform_ids [(:id transform1) (:id transform2)]- :transform_tag_ids [(:id tag1)])]+ :transform-ids [(:id transform1) (:id transform2)]+ :transform-tag-ids [(:id tag1)])](assert-run-count response 1)(assert-transform-ids response #{(:id transform1)})))))))