Server IP : 13.213.54.232 / Your IP : 216.73.216.166 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ip-172-31-17-110 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 7.1.33-67+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /snap/lxd/current/share/lxd-ui/assets/ |
Upload File : |
import{d as s,r,j as e,a as o,u as d,L as p,N as h,C as x,b as j}from"./index-13b2882d.js";const m=()=>{const i=s.useNotify(),[t,n]=r.useState(""),l=()=>{const a=t.trim().split(/\r?\n|\r|\n/g).at(-1)??"";o(a).then(()=>{location.reload()}).catch(c=>i.failure("Error using token",c))};return e.jsxs(s.Form,{children:[e.jsx(s.Textarea,{id:"token",name:"token",label:"Paste the token from the previous step",placeholder:"Paste your token here",rows:3,onChange:a=>n(a.target.value)}),e.jsx(s.Button,{appearance:"positive",disabled:t.length<1,type:"button",onClick:l,children:"Import"})]})},_=()=>{const{isAuthenticated:i,isAuthLoading:t}=d(),n=s.useNotify();return t?e.jsx(p,{}):i?e.jsx(h,{to:"/ui",replace:!0}):e.jsxs(x,{mainClassName:"certificate-generate",header:e.jsx("div",{className:"p-panel__header is-sticky",children:e.jsx("h1",{className:"p-panel__title",children:"Add existing certificate"})}),children:[n.notification?e.jsx(j,{}):e.jsx(s.Row,{children:e.jsx(s.Notification,{severity:"caution",children:"A client certificate must be present and selected in your browser"})}),e.jsx(s.Row,{className:"u-no-margin--left",children:e.jsx(s.Col,{size:12,children:e.jsxs("ol",{className:"p-stepped-list--detailed",children:[e.jsx("li",{className:"p-stepped-list__item",children:e.jsxs(s.Row,{children:[e.jsx(s.Col,{size:3,children:e.jsx("h2",{className:"p-stepped-list__title p-heading--5",children:"Create token"})}),e.jsx(s.Col,{size:6,children:e.jsxs("div",{className:"p-stepped-list__content",children:[e.jsx("p",{children:"Generate a token on the command line"}),e.jsx("div",{className:"p-code-snippet",children:e.jsx("pre",{className:"p-code-snippet__block--icon",children:e.jsx("code",{children:"lxc config trust add --name lxd-ui"})})})]})})]})}),e.jsx("li",{className:"p-stepped-list__item",children:e.jsxs(s.Row,{children:[e.jsx(s.Col,{size:3,children:e.jsx("h2",{className:"p-stepped-list__title p-heading--5",children:"Import"})}),e.jsx(s.Col,{size:6,children:e.jsx("div",{className:"p-stepped-list__content",children:e.jsx(m,{})})})]})}),e.jsx("li",{className:"p-stepped-list__item u-no-margin--bottom",children:e.jsxs(s.Row,{children:[e.jsx(s.Col,{size:3,children:e.jsx("h2",{className:"p-stepped-list__title p-heading--5",children:"Done"})}),e.jsx(s.Col,{size:6,children:e.jsx("div",{className:"p-stepped-list__content",children:e.jsx("p",{children:"Enjoy LXD UI."})})})]})})]})})})]})};export{_ as default};