import{C as h}from"./types-CqiaoBrz.js";import{d as g,a2 as A,c as u,k as r,a as t,l as o,f as s,u as d,F as b,r as v,o as l,j as y,t as C,$ as m}from"./index-CXwCk-SR.js";import{B as p}from"./Btn-C1O3ReU4.js";import{P as _}from"./Pill-CQ5c4klO.js";import{A as k}from"./AdminFeatureWarning-BHIe8rWf.js";import{_ as V}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useAdminFeatures-De7MCLZf.js";import"./useQuery-DB4moXtm.js";import"./Icon.vue_vue_type_script_setup_true_lang-C11sQmoM.js";const w={class:"dump"},D={class:"dump__header"},x={class:"dump__section"},B={class:"dump__actions"},O={class:"dump__section dump__section--disabled"},P={class:"dump__sectionhead"},S=g({__name:"DslDumpView",setup(T){const n=A();function f(){m.dsl.triggerDump()}function c(i){m.dsl.triggerDump(i)}return(i,e)=>(l(),u("div",w,[r(k,{module:"receiver-runtime-rule","feature-label":"Runtime-rule dump"}),t("header",D,[e[1]||(e[1]=t("h1",{class:"dump__h1"},"Dump & restore",-1)),r(_,{tone:"dim"},{default:o(()=>[...e[0]||(e[0]=[s("tar.gz",-1)])]),_:1})]),t("section",x,[e[3]||(e[3]=t("header",{class:"dump__sectionhead"},"dump",-1)),e[4]||(e[4]=t("p",{class:"dump__hint"},[s(" Stream a "),t("code",null,"tar.gz"),s(" snapshot of the runtime-rule rows currently in OAP. ACTIVE rows go under "),t("code",null,"<catalog>/<name>.yaml"),s(", INACTIVE under "),t("code",null,"inactive/<catalog>/<name>.yaml"),s(", and a top-level "),t("code",null,"manifest.yaml"),s(" records sha256 + status + updateTime per row. ")],-1)),t("div",B,[r(p,{kind:"primary",disabled:!d(n).hasVerb("rule:read"),"data-testid":"dump-all",onClick:f},{default:o(()=>[...e[2]||(e[2]=[s(" dump all catalogs ",-1)])]),_:1},8,["disabled"]),(l(!0),u(b,null,v(d(h),a=>(l(),y(p,{key:a,disabled:!d(n).hasVerb("rule:read"),"data-testid":`dump-${a}`,onClick:I=>c(a)},{default:o(()=>[s(" dump · "+C(a),1)]),_:2},1032,["disabled","data-testid","onClick"]))),128))])]),t("section",O,[t("header",P,[e[6]||(e[6]=s(" restore ",-1)),r(_,{tone:"dim"},{default:o(()=>[...e[5]||(e[5]=[s("later release",-1)])]),_:1})]),e[7]||(e[7]=t("p",{class:"dump__hint"},[s(" OAP doesn't expose a restore endpoint yet. Operators recover from a dump by looping "),t("code",null,"POST /runtime/rule/addOrUpdate"),s(" over each YAML file in the archive. A restore upload affordance will land here when the upstream API ships — see Studio's deferred-features memory. ")],-1))])]))}}),R=V(S,[["__scopeId","data-v-1b183d41"]]);export{R as default};
