-
Notifications
You must be signed in to change notification settings - Fork 326
/
AddNewServicesCode-0938e7bd.js
12 lines (11 loc) 路 2.85 KB
/
AddNewServicesCode-0938e7bd.js
1
2
3
4
5
6
7
8
9
10
11
12
import{L as k}from"./LoadingBox-94dd99f0.js";import{O as w,a as x,b as y}from"./OnboardingPage-15ac0893.js";import{g as A,m as N,e as C,A as T,_ as I,f as P}from"./RouteView.vue_vue_type_script_setup_true_lang-3fa7796e.js";import{_ as D}from"./RouteTitle.vue_vue_type_script_setup_true_lang-b054f500.js";import{_ as m}from"./CodeBlock.vue_vue_type_style_index_0_lang-b366b6e9.js";import{d as E,j as p,c as L,y as O,o as n,a as S,w as s,h as t,b as R,g as e,e as c,F as V,q as o,f as B,p as $,m as q}from"./index-d1d97159.js";const h=d=>($("data-v-159bee77"),d=d(),q(),d),G=h(()=>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)),K=h(()=>o("p",null,"To run execute the following command:",-1)),F={key:1},H={class:"status-box mt-4"},M={key:0,class:"status--is-connected","data-testid":"dpps-connected"},U={key:1,class:"status--is-disconnected","data-testid":"dpps-disconnected"},j={key:0,class:"status-loading-box mt-4"},z=1e3,_="https://github.com/kumahq/kuma-counter-demo/",J="https://github.com/kumahq/kuma-counter-demo/blob/master/README.md",Q="kubectl apply -f https://bit.ly/3Kh2Try",W=E({__name:"AddNewServicesCode",setup(d){const{t:b}=A(),f=N(),g=C(),a=p(!1),l=p(null),v=L(()=>g.getters["config/getEnvironment"]==="kubernetes");r(),O(function(){u()});async function r(){try{const{total:i}=await f.getAllDataplanes();a.value=i>0}catch(i){console.error(i)}finally{a.value||(u(),l.value=window.setTimeout(()=>r(),z))}}function u(){l.value!==null&&window.clearTimeout(l.value)}return(i,X)=>(n(),S(I,null,{default:s(()=>[t(D,{title:R(b)("onboarding.routes.add-services-code.title")},null,8,["title"]),e(),t(T,null,{default:s(()=>[t(w,null,{header:s(()=>[t(x,null,{title:s(()=>[e(`
Add services
`)]),_:1})]),content:s(()=>[G,e(),v.value?(n(),c(V,{key:0},[K,e(),t(m,{id:"code-block-kubernetes-command",language:"bash",code:Q})],64)):(n(),c("div",F,[o("p",{class:"mb-4 text-center"},[e(`
Clone `),o("a",{href:_,target:"_blank"},"the GitHub repository"),e(` for the demo application:
`)]),e(),t(m,{id:"code-block-clone-command",language:"bash",code:`git clone ${_}`},null,8,["code"]),e(),o("p",{class:"mt-4 text-center"},[e(`
And follow the instructions in `),o("a",{href:J,target:"_blank"},"the README"),e(`.
`)])])),e(),o("div",null,[o("p",H,[e(`
DPPs status:
`),a.value?(n(),c("span",M,"Connected")):(n(),c("span",U,"Disconnected"))]),e(),a.value?B("",!0):(n(),c("div",j,[t(k)]))])]),navigation:s(()=>[t(y,{"next-step":"onboarding-dataplanes-overview","previous-step":"onboarding-add-services","should-allow-next":a.value},null,8,["should-allow-next"])]),_:1})]),_:1})]),_:1}))}});const se=P(W,[["__scopeId","data-v-159bee77"]]);export{se as default};