Skip to content

Commit

Permalink
fix(Apps detail page): Minimum requirements architectures bugfix (#1675)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbase12 authored Oct 30, 2024
1 parent 79e1cd8 commit 58acbb7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
5 changes: 3 additions & 2 deletions code/src/cljs/sixsq/nuvla/ui/pages/apps/spec.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@
(def valid-architectures ["386" "x86" "x86_64" "amd64" "amd64p32" "aarch64"
"arm" "armbe" "arm64" "arm64/v8" "arm64be"
"arm/v5" "arm/v6" "arm/v7" "armv7l"
"mips" "mipsle" "mips64" "mips64le" "mips64n32" "mips64p32" "mips64p32le"
"mipsel64" "mips3l64n32" "mipsle"
"mips" "mipsel" "mipsel64" "mipsle" "mips64" "mips64le" "mips64n32" "mips64p32" "mips64p32le"
"mips3l64n32"
"ppc" "ppc64" "ppc64le"
"riscv64" "s390" "s390x" "sparc" "sparc64"])
(def architectures-options (mapv (fn [arch] {:key arch :value arch :text arch}) valid-architectures))

(s/def ::architecture (s/and string? (set valid-architectures)))
(s/def ::architectures (s/nilable (s/coll-of ::architecture :min-count 1)))
Expand Down
6 changes: 0 additions & 6 deletions code/src/cljs/sixsq/nuvla/ui/pages/apps/subs.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,6 @@
(fn [db]
(get-in db [::spec/module-common ::spec/architectures])))

(reg-sub
::architecture-options
(fn [_ _]
(mapv (fn [arch] {:key arch :value arch :text arch}) spec/valid-architectures)))


(reg-sub
::minimum-requirements
(fn [db]
Expand Down
3 changes: 1 addition & 2 deletions code/src/cljs/sixsq/nuvla/ui/pages/apps/views_detail.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,6 @@
architectures (subscribe [::subs/architectures])
min-requirements (subscribe [::subs/minimum-requirements])
editable? (subscribe [::subs/editable?])
arch-options (subscribe [::subs/architecture-options])
on-change (fn [update-event-kw value-fn value]
(dispatch [update-event-kw (if value-fn (value-fn value) value)])
(dispatch [::main-events/changes-protection? true])
Expand All @@ -1443,7 +1442,7 @@
:definition true}
[ui/TableBody
[uix/TableRowField (@tr [:architecture]), :key "architecture", :editable? @editable?,
:type :dropdown, :options @arch-options
:type :dropdown, :options spec/architectures-options
:style (when @editable? {:padding-left edit-cell-left-padding})
:spec ::spec/architectures, :validate-form? true, :required? false,
:default-value @architectures, :show-pencil? false
Expand Down

0 comments on commit 58acbb7

Please sign in to comment.