Skip to content

Commit

Permalink
feat(dg-table-view): fix e2e tests and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alebellu committed Nov 12, 2024
1 parent 7c56022 commit e7ec7f7
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions code/src/cljs/sixsq/nuvla/ui/pages/deployment_sets/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -150,42 +150,12 @@
[tags _row _column]
[uix/Tags tags])


(defn DeploymentSetRow
[{:keys [id name description created state auto-update tags] :as _deployment-set}]
(let [uuid (general-utils/id->uuid id)
tr (subscribe [::i18n-subs/tr])]
[ui/TableRow {:on-click #(dispatch [::routing-events/navigate routes/deployment-groups-details {:uuid uuid}])
:style {:cursor "pointer"}}
[ui/TableCell (or name uuid)]
[ui/TableCell description]
[ui/TableCell state]
[ui/TableCell [uix/TimeAgo created]]
[ui/TableCell (when auto-update [AutoUpdateIcon])]
[ui/TableCell [uix/Tags tags]]]))

(defn DeploymentSetTable
[]
(r/with-let [deployment-sets (subscribe [::subs/deployment-sets])
!resources (subscribe [::subs/deployment-sets-resources])
(r/with-let [!resources (subscribe [::subs/deployment-sets-resources])
!pagination (r/atom {:page-index 0
:page-size 25})]
[:div style/center-items
#_[ui/Table {:compact "very" :selectable true}
[ui/TableHeader
[ui/TableRow
[ui/TableHeaderCell "name"]
[ui/TableHeaderCell "description"]
[ui/TableHeaderCell "state"]
[ui/TableHeaderCell "created"]
[ui/TableHeaderCell "auto update"]
[ui/TableHeaderCell "tags"]]]

[ui/TableBody
(for [{:keys [id] :as deployment-set} (:resources @deployment-sets)]
(when id
^{:key id}
[DeploymentSetRow deployment-set]))]]
[TableController {:!columns (r/atom [{::table-refactor/field-key :name
::table-refactor/header-content "Name"
::table-refactor/field-cell CellName}
Expand Down

0 comments on commit e7ec7f7

Please sign in to comment.