-
Notifications
You must be signed in to change notification settings - Fork 326
/
AddNewServicesCode-2b0ef27e.js
12 lines (11 loc) 路 2.71 KB
/
AddNewServicesCode-2b0ef27e.js
1
2
3
4
5
6
7
8
9
10
11
12
import{L as y}from"./LoadingBox-617d0594.js";import{O as A,a as N,b as R}from"./OnboardingPage-88dd244a.js";import{_ as m}from"./CodeBlock.vue_vue_type_style_index_0_lang-44a047dc.js";import{d as T,R as C,y as _,S as V,r as u,o as n,i as D,w as a,j as t,n as e,l as c,F as P,p as o,m as I,D as L,G as O,t as S}from"./index-71437355.js";const b=d=>(L("data-v-7e9a50ed"),d=d(),O(),d),E=b(()=>o("p",{class:"mb-4 text-center"},`
The demo application includes two services: a Redis backend to store a counter value, and a frontend web UI to show and increment the counter.
`,-1)),B=b(()=>o("p",null,"To run execute the following command:",-1)),G={key:1},q={class:"status-box mt-4"},F={key:0,class:"status--is-connected","data-testid":"dpps-connected"},H={key:1,class:"status--is-disconnected","data-testid":"dpps-disconnected"},K={key:0,class:"status-loading-box mt-4"},M=1e3,h="https://github.com/kumahq/kuma-counter-demo/",U="https://github.com/kumahq/kuma-counter-demo/blob/master/README.md",$="kubectl apply -f https://bit.ly/3Kh2Try",j=T({__name:"AddNewServicesCode",setup(d){const v=C(),s=_(!1),l=_(null);r(),V(function(){p()});async function r(){try{const{total:i}=await v.getAllDataplanes();s.value=i>0}catch(i){console.error(i)}finally{s.value||(p(),l.value=window.setTimeout(()=>r(),M))}}function p(){l.value!==null&&window.clearTimeout(l.value)}return(i,z)=>{const g=u("RouteTitle"),f=u("AppView"),k=u("RouteView");return n(),D(k,{name:"onboarding-add-new-services"},{default:a(({can:w,t:x})=>[t(g,{title:x("onboarding.routes.add-services-code.title")},null,8,["title"]),e(),t(f,null,{default:a(()=>[t(A,null,{header:a(()=>[t(N,null,{title:a(()=>[e(`
Add services
`)]),_:1})]),content:a(()=>[E,e(),w("use kubernetes")?(n(),c(P,{key:0},[B,e(),t(m,{id:"code-block-kubernetes-command",language:"bash",code:$})],64)):(n(),c("div",G,[o("p",{class:"mb-4 text-center"},[e(`
Clone `),o("a",{href:h,target:"_blank"},"the GitHub repository"),e(` for the demo application:
`)]),e(),t(m,{id:"code-block-clone-command",language:"bash",code:`git clone ${h}`},null,8,["code"]),e(),o("p",{class:"mt-4 text-center"},[e(`
And follow the instructions in `),o("a",{href:U,target:"_blank"},"the README"),e(`.
`)])])),e(),o("div",null,[o("p",q,[e(`
DPPs status:
`),s.value?(n(),c("span",F,"Connected")):(n(),c("span",H,"Disconnected"))]),e(),s.value?I("",!0):(n(),c("div",K,[t(y)]))])]),navigation:a(()=>[t(R,{"next-step":"onboarding-dataplanes-overview","previous-step":"onboarding-add-services","should-allow-next":s.value},null,8,["should-allow-next"])]),_:2},1024)]),_:2},1024)]),_:1})}}});const Y=S(j,[["__scopeId","data-v-7e9a50ed"]]);export{Y as default};