diff --git a/Cargo.lock b/Cargo.lock index cc3f00006e189e..7d11e144a63db4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1754,15 +1754,6 @@ dependencies = [ "serde", ] -[[package]] -name = "built" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b99c4cdc7b2c2364182331055623bdf45254fcb679fea565c40c3c11c101889a" -dependencies = [ - "cargo-lock", -] - [[package]] name = "bumpalo" version = "3.11.1" @@ -1879,18 +1870,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663" -[[package]] -name = "cargo-lock" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11c675378efb449ed3ce8de78d75d0d80542fc98487c26aba28eb3b82feac72" -dependencies = [ - "semver 1.0.18", - "serde", - "toml 0.7.6", - "url", -] - [[package]] name = "cargo_toml" version = "0.15.3" @@ -9980,7 +9959,6 @@ dependencies = [ name = "vector-vrl-web-playground" version = "0.1.0" dependencies = [ - "built", "cargo_toml", "enrichment", "getrandom 0.2.10", diff --git a/lib/vector-vrl/web-playground/Cargo.toml b/lib/vector-vrl/web-playground/Cargo.toml index a00a3b54d3419e..9bf8aa8e68baae 100644 --- a/lib/vector-vrl/web-playground/Cargo.toml +++ b/lib/vector-vrl/web-playground/Cargo.toml @@ -17,7 +17,6 @@ gloo-utils = { version = "0.2", features = ["serde"] } getrandom = { version = "0.2", features = ["js"] } vector-vrl-functions = { path = "../functions" } enrichment = { path = "../../enrichment" } -built = { version = "0.6.1" } [build-dependencies] cargo_toml = "0.15.3" diff --git a/lib/vector-vrl/web-playground/build.rs b/lib/vector-vrl/web-playground/build.rs index b6997634f20a56..0ae318ef149484 100644 --- a/lib/vector-vrl/web-playground/build.rs +++ b/lib/vector-vrl/web-playground/build.rs @@ -24,11 +24,10 @@ fn write_build_constants(manifest: &Manifest, dest_path: &Path) -> io::Result<() "// AUTOGENERATED CONSTANTS. SEE BUILD.RS AT REPOSITORY ROOT. DO NOT MODIFY.\n".as_ref(), )?; - let vector_version_const = format!( - "pub const {}: &str = \"{}\"", - "VECTOR_VERSION", - manifest.package().version() - ); + let create_const_statement = + |name, value| format!("pub const {}: &str = \"{}\";\n", name, value); + // TODO: For releases, we should use the manifest.package().version(). + let vector_version_const = create_const_statement("VECTOR_VERSION", "master"); output_file .write_all(vector_version_const.as_bytes()) .expect("Failed to write Vector version constant"); @@ -40,18 +39,18 @@ fn write_build_constants(manifest: &Manifest, dest_path: &Path) -> io::Result<() .detail() .unwrap() .version + .clone() .unwrap(); - let vrl_version_const = format!("pub const {}: &str = \"{}\"", "VRL_VERSION", vrl_version); + let vrl_version_const = create_const_statement("VRL_VERSION", vrl_version); output_file - .write_all(vector_version_const.as_bytes()) + .write_all(vrl_version_const.as_bytes()) .expect("Failed to write Vector version constant"); Ok(()) } fn main() { - //println!("cargo:rerun-if-changed(../../../Cargo.toml"); let manifest = - Manifest::from_path(&get_vector_toml_path()).expect("Failed to load Vector Cargo.toml"); - let dst = std::path::Path::new(&env::var("OUT_DIR").unwrap()).join("built.rs"); + Manifest::from_path(get_vector_toml_path()).expect("Failed to load Vector Cargo.toml"); + let dst = Path::new(&env::var("OUT_DIR").unwrap()).join("built.rs"); write_build_constants(&manifest, &dst).expect("Failed to write constants"); } diff --git a/lib/vector-vrl/web-playground/public/index.css b/lib/vector-vrl/web-playground/public/index.css deleted file mode 100644 index 02eecc7c283388..00000000000000 --- a/lib/vector-vrl/web-playground/public/index.css +++ /dev/null @@ -1,317 +0,0 @@ -body { - margin-right: 2vw; - margin-left: 2vw; -} - -div#App { - display: grid; - width: 100%; - height: 100%; - /* the app will have two columns, one for input - one for output, left and right */ - grid-template-columns: repeat(2, 1fr); - grid-template-rows: 15vh 1vh 75vh; - grid-gap: 1rem; - } - - div#summary-section { - display: grid; - grid-row: 1; - grid-template-rows: 35% 65%; - width: 100%; - font-size: 1vw; - grid-gap: 1vw; - } - - div#summary-section p{ - font-size: .9vw; - } - - div#toolbar-section { - display: grid; - grid-row: 2; - grid-column: 1 / span 2; - grid-template-columns: repeat(8, 1fr); - } - - #toolbar-section #run-code-btn { - grid-column: 1; - } - - #toolbar-section #share-code-btn { - grid-column: 3; - } - - /* input pane */ - div#input-section { - display: grid; - grid-column: 1; - grid-row: 3; - overflow: hidden; - } - - #input-section #cell { - display: grid; - grid-template-rows: 6% 94%; - overflow: hidden; - } - - #input-section #cell #input-cell-title { - height: 100%; - grid-row: 1; - } - - #input-section #cell #container-program { - display: grid; - height: 100%; - } - - div#output-section { - display: grid; - grid-column: 2; - grid-row: 3; - grid-template-rows: 50% 50%; - overflow: hidden; - } - - /* event pane */ - #output-section #event-cell { - display: grid; - /* this is double of input-cell-title row - because we are working with half the space */ - grid-template-rows: 12% 88%; - grid-row: 1; - height: 100%; - } - - #output-section #event-cell #event-cell-title { - display: grid; - grid-row: 1; - } - - #output-section #event-cell #container-event { - display: grid; - grid-row: 2; - height: 100%; - } - - /* output pane */ - #output-section #output-cell { - display: grid; - grid-template-rows: 12% 88%; - grid-row: 2; - height: 100%; - } - - #output-section #output-cell #output-cell-title { - display: grid; - grid-row: 1; - } - - #output-section #output-cell #container-output { - display: grid; - grid-row: 2; - height: 100%; - } - - body { - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, - Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, - Segoe UI Symbol, Noto Color Emoji; - } - - .btn-primary { - display: inline-block; - outline: 0; - border: none; - cursor: pointer; - border-radius: 4px; - font-size: 13px; - height: 30px; - background-color: #9147ff; - color: white; - padding: 0 20px; - } - - .btn-primary:hover { - background-color: #772ce8; - } - - .btn-secondary { - display: inline-block; - outline: 0; - border: none; - cursor: pointer; - border-radius: 4px; - font-size: 13px; - height: 30px; - background-color: #0000001a; - color: #000000; - padding: 0 20px; - } - - .btn-secondary:hover { - background-color: #dcdcdc; - } - -/* Portrait and Landscape */ -@media only screen - and (min-width: 200px) - and (max-width: 1000px) { - div#App { - display: grid; - width: 100%; - height: 100%; - /* the app will have multiple rows - stacking each section on top of each other */ - grid-template-rows: 20vh 25vh 10vh 50vh; - grid-template-columns: 100%; - } - - div#summary-section { - display: grid; - grid-row: 1; - grid-template-rows: 20% 80%; - width: 100%; - font-size: 1.5vh; - grid-gap: 2vw; - } - - div#summary-section p { - grid-row: 2; - font-size: 2vh; - } - - div#toolbar-section { - display: grid; - grid-row: 3; - grid-column: 1; - grid-template-columns: 100%; - grid-template-rows: repeat(2, 1fr); - } - - #toolbar-section #run-code-btn { - display: grid; - grid-row: 1; - grid-column: 1; - } - - #toolbar-section #share-code-btn { - display: grid; - grid-row: 2; - grid-column: 1; - } - - /* input pane */ - div#input-section { - display: grid; - grid-column: 1; - grid-row: 2; - overflow: hidden; - } - - #input-section #cell { - display: grid; - grid-column: 1; - grid-template-rows: 23% 77%; - overflow: hidden; - } - - #input-section #cell #input-cell-title { - height: 100%; - grid-column: 1; - grid-row: 1; - } - - #input-section #cell #container-program { - display: grid; - height: 100%; - } - - div#output-section { - display: grid; - grid-row: 4 / 5; - grid-column: 1; - grid-template-rows: 50% 50%; - overflow: hidden; - } - - /* event pane */ - #output-section #event-cell { - display: grid; - grid-template-rows: 20% 80%; - grid-row: 1; - height: 100%; - } - - #output-section #event-cell #event-cell-title { - display: grid; - grid-row: 1; - } - - #output-section #event-cell #container-event { - display: grid; - height: 100%; - } - - /* output pane */ - #output-section #output-cell { - display: grid; - grid-template-rows: 20% 80%; - grid-row: 2; - height: 100%; - } - - #output-section #output-cell #output-cell-title { - display: grid; - grid-row: 1; - } - - #output-section #output-cell #container-output { - display: grid; - grid-row: 2; - height: 100%; - } - - body { - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, - Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, - Segoe UI Symbol, Noto Color Emoji; - } - - .btn-primary { - display: inline-block; - outline: 0; - border: none; - cursor: pointer; - border-radius: 4px; - font-size: 13px; - height: 30px; - background-color: #9147ff; - color: white; - padding: 0 20px; - align-items: center; - } - - .btn-primary:hover { - background-color: #772ce8; - } - - .btn-secondary { - display: inline-block; - outline: 0; - border: none; - cursor: pointer; - border-radius: 4px; - font-size: 13px; - height: 30px; - background-color: #0000001a; - color: #000000; - padding: 0 20px; - align-items: center; - } - - .btn-secondary:hover { - background-color: #dcdcdc; - } -} diff --git a/lib/vector-vrl/web-playground/public/index.html b/lib/vector-vrl/web-playground/public/index.html deleted file mode 100644 index 3b4e31106e182c..00000000000000 --- a/lib/vector-vrl/web-playground/public/index.html +++ /dev/null @@ -1,75 +0,0 @@ - - -
- - - -- Vector Remap Language (VRL) is an expression-oriented language designed for transforming - observability data. This playground lets you write a program, run it against an event or - events, share it, and see how the events are transformed. -
-Program
-Event
-Output
-