Skip to content

Commit

Permalink
Store container id for use in link/oif naming fallback
Browse files Browse the repository at this point in the history
'link-outer-dev normally creates a friendly name for the outer link
device using a combination of service and device name; however, if that
string is look long, the fallback strategy is to use a portion of the
container id. Unfortunately the id key was removed during a refactoring,
which introduced the regression.
  • Loading branch information
jonsmock committed Jul 19, 2024
1 parent 34f8333 commit f878f31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/conlink/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,8 @@ General Options:
[container (inspect-container container-obj)
clabels (get-compose-labels container)
svc-num (:container-number clabels)]
{:name (->> container :Name (re-seq #"(.*/)?(.*)") first last)
{:id (:Id container)
:name (->> container :Name (re-seq #"(.*/)?(.*)") first last)
:index (if svc-num (js/parseInt svc-num) 1)
:service (:service clabels)
:pid (-> container :State :Pid)
Expand Down

0 comments on commit f878f31

Please sign in to comment.