mirror of
https://github.com/simon987/sist2.git
synced 2025-12-20 10:36:00 +00:00
Compare commits
16 Commits
2.9.0
...
b1e87a2a42
| Author | SHA1 | Date | |
|---|---|---|---|
| b1e87a2a42 | |||
| e075d1e525 | |||
| 7a3ebca919 | |||
| 2766f2419f | |||
| 7a88a2c956 | |||
| c229a0bd05 | |||
| 7fce56da03 | |||
|
|
50a1ed43fe | ||
|
|
4117b88cbb | ||
| c6bfe6ec83 | |||
| 3ae6e9b604 | |||
| c82b1658fe | |||
| 9386f75d78 | |||
| 31cc2c0c39 | |||
| a468cab46d | |||
| 2aea57b985 |
72
.drone.yml
72
.drone.yml
@@ -1,72 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: amd64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build
|
|
||||||
image: simon987/ubuntu_ci
|
|
||||||
commands:
|
|
||||||
- ./ci/build.sh
|
|
||||||
- name: docker
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
username:
|
|
||||||
from_secret: DOCKER_USER
|
|
||||||
password:
|
|
||||||
from_secret: DOCKER_PASSWORD
|
|
||||||
repo: simon987/sist2
|
|
||||||
context: ./Docker/
|
|
||||||
dockerfile: ./Docker/Dockerfile
|
|
||||||
auto_tag: true
|
|
||||||
auto_tag_suffix: x64-linux
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
- name: scp files
|
|
||||||
image: appleboy/drone-scp
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: SSH_HOST
|
|
||||||
port:
|
|
||||||
from_secret: SSH_PORT
|
|
||||||
user:
|
|
||||||
from_secret: SSH_USER
|
|
||||||
key:
|
|
||||||
from_secret: SSH_KEY
|
|
||||||
target: /files/sist2/${DRONE_REPO_OWNER}_${DRONE_REPO_NAME}/${DRONE_BRANCH}_${DRONE_BUILD_NUMBER}_${DRONE_COMMIT}/
|
|
||||||
source:
|
|
||||||
- ./VERSION
|
|
||||||
- ./sist2-x64-linux
|
|
||||||
- ./sist2-x64-linux-debug.tar.gz
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: arm64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
arch: arm64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build
|
|
||||||
image: simon987/ubuntu_ci_arm
|
|
||||||
commands:
|
|
||||||
- ./ci/build_arm64.sh
|
|
||||||
- name: scp files
|
|
||||||
image: appleboy/drone-scp
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: SSH_HOST
|
|
||||||
port:
|
|
||||||
from_secret: SSH_PORT
|
|
||||||
user:
|
|
||||||
from_secret: SSH_USER
|
|
||||||
key:
|
|
||||||
from_secret: SSH_KEY
|
|
||||||
target: /files/sist2/${DRONE_REPO_OWNER}_${DRONE_REPO_NAME}/arm_${DRONE_BRANCH}_${DRONE_BUILD_NUMBER}_${DRONE_COMMIT}/
|
|
||||||
source:
|
|
||||||
- ./sist2-arm64-linux
|
|
||||||
69
.teamcity/settings.kts
vendored
Normal file
69
.teamcity/settings.kts
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.*
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.ExecBuildStep
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.exec
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
|
||||||
|
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot
|
||||||
|
|
||||||
|
/*
|
||||||
|
The settings script is an entry point for defining a TeamCity
|
||||||
|
project hierarchy. The script should contain a single call to the
|
||||||
|
project() function with a Project instance or an init function as
|
||||||
|
an argument.
|
||||||
|
|
||||||
|
VcsRoots, BuildTypes, Templates, and subprojects can be
|
||||||
|
registered inside the project using the vcsRoot(), buildType(),
|
||||||
|
template(), and subProject() methods respectively.
|
||||||
|
|
||||||
|
To debug settings scripts in command-line, run the
|
||||||
|
|
||||||
|
mvnDebug org.jetbrains.teamcity:teamcity-configs-maven-plugin:generate
|
||||||
|
|
||||||
|
command and attach your debugger to the port 8000.
|
||||||
|
|
||||||
|
To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View
|
||||||
|
-> Tool Windows -> Maven Projects), find the generate task node
|
||||||
|
(Plugins -> teamcity-configs -> teamcity-configs:generate), the
|
||||||
|
'Debug' option is available in the context menu for the task.
|
||||||
|
*/
|
||||||
|
|
||||||
|
version = "2019.2"
|
||||||
|
|
||||||
|
project {
|
||||||
|
|
||||||
|
vcsRoot(HttpsGithubComSimon987sist2refsHeadsMaster)
|
||||||
|
|
||||||
|
buildType(Build)
|
||||||
|
}
|
||||||
|
|
||||||
|
object Build : BuildType({
|
||||||
|
name = "Build"
|
||||||
|
|
||||||
|
artifactRules = """
|
||||||
|
sist2
|
||||||
|
sist2_scan
|
||||||
|
""".trimIndent()
|
||||||
|
|
||||||
|
vcs {
|
||||||
|
root(HttpsGithubComSimon987sist2refsHeadsMaster)
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
exec {
|
||||||
|
name = "Build"
|
||||||
|
path = "./ci/build.sh"
|
||||||
|
dockerImage = "simon987/general_ci"
|
||||||
|
dockerImagePlatform = ExecBuildStep.ImagePlatform.Linux
|
||||||
|
dockerPull = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
triggers {
|
||||||
|
vcs {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
object HttpsGithubComSimon987sist2refsHeadsMaster : GitVcsRoot({
|
||||||
|
name = "https://github.com/simon987/sist2#refs/heads/master"
|
||||||
|
url = "https://github.com/simon987/sist2"
|
||||||
|
})
|
||||||
@@ -5,7 +5,7 @@ project(sist2 C)
|
|||||||
|
|
||||||
option(SIST_DEBUG "Build a debug executable" on)
|
option(SIST_DEBUG "Build a debug executable" on)
|
||||||
|
|
||||||
set(BUILD_TESTS off)
|
set(BUILD_TESTS on)
|
||||||
add_subdirectory(third-party/libscan)
|
add_subdirectory(third-party/libscan)
|
||||||
set(ARGPARSE_SHARED off)
|
set(ARGPARSE_SHARED off)
|
||||||
add_subdirectory(third-party/argparse)
|
add_subdirectory(third-party/argparse)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM ubuntu:20.04
|
FROM ubuntu:19.10
|
||||||
MAINTAINER simon987 <me@simon987.net>
|
MAINTAINER simon987 <me@simon987.net>
|
||||||
|
|
||||||
RUN apt update
|
RUN apt update
|
||||||
|
|||||||
14
Docker/build.sh
Executable file
14
Docker/build.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
rm ./sist2 sist2_debug
|
||||||
|
cp ../sist2.gz .
|
||||||
|
gzip -d sist2.gz
|
||||||
|
strip sist2
|
||||||
|
|
||||||
|
version=$(./sist2 --version)
|
||||||
|
|
||||||
|
echo "Version ${version}"
|
||||||
|
docker build . -t simon987/sist2:${version} -t simon987/sist2:latest
|
||||||
|
|
||||||
|
docker push simon987/sist2:${version}
|
||||||
|
docker push simon987/sist2:latest
|
||||||
|
|
||||||
|
docker run --rm simon987/sist2 -v
|
||||||
@@ -1,6 +1,6 @@
|
|||||||

|

|
||||||
[](https://www.codefactor.io/repository/github/simon987/sist2)
|
[](https://www.codefactor.io/repository/github/simon987/sist2)
|
||||||
[](https://files.simon987.net/sist2/simon987_sist2/)
|
[/statusIcon)](https://files.simon987.net/artifacts/Sist2/Build/)
|
||||||
|
|
||||||
**Demo**: [sist2.simon987.net](https://sist2.simon987.net/?i=Demo%20files)
|
**Demo**: [sist2.simon987.net](https://sist2.simon987.net/?i=Demo%20files)
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ sist2 (Simple incremental search tool)
|
|||||||
```
|
```
|
||||||
1. Download sist2 executable
|
1. Download sist2 executable
|
||||||
1. Download the [latest sist2 release](https://github.com/simon987/sist2/releases) *
|
1. Download the [latest sist2 release](https://github.com/simon987/sist2/releases) *
|
||||||
1. *(or)* Download a [development snapshot](https://files.simon987.net/sist2/simon987_sist2/) *(Not recommended!)*
|
1. *(or)* Download a [development snapshot](https://files.simon987.net/artifacts/Sist2/Build/) *(Not recommended!)*
|
||||||
1. *(or)* `docker pull simon987/sist2:latest`
|
1. *(or)* `docker pull simon987/sist2:latest`
|
||||||
|
|
||||||
1. See [Usage guide](docs/USAGE.md)
|
1. See [Usage guide](docs/USAGE.md)
|
||||||
|
|||||||
17
ci/build.sh
17
ci/build.sh
@@ -4,19 +4,14 @@ VCPKG_ROOT="/vcpkg"
|
|||||||
|
|
||||||
rm *.gz
|
rm *.gz
|
||||||
|
|
||||||
git submodule update --init --recursive
|
|
||||||
|
|
||||||
rm -rf CMakeFiles CMakeCache.txt
|
rm -rf CMakeFiles CMakeCache.txt
|
||||||
cmake -DSIST_DEBUG=off -DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" .
|
cmake -DSIST_DEBUG=off -DVCPKG_BUILD_TYPE=release -DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" .
|
||||||
make -j 33
|
make -j 12
|
||||||
strip sist2
|
strip sist2
|
||||||
./sist2 -v > VERSION
|
gzip -9 sist2
|
||||||
cp sist2 Docker/
|
|
||||||
mv sist2 sist2-x64-linux
|
|
||||||
|
|
||||||
rm -rf CMakeFiles CMakeCache.txt
|
rm -rf CMakeFiles CMakeCache.txt
|
||||||
cmake -DSIST_DEBUG=on -DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" .
|
cmake -DSIST_DEBUG=on -DVCPKG_BUILD_TYPE=debug -DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" .
|
||||||
make -j 33
|
make -j 12
|
||||||
cp /usr/lib/x86_64-linux-gnu/libasan.so.2.0.0 libasan.so.2
|
cp /usr/lib/x86_64-linux-gnu/libasan.so.2.0.0 libasan.so.2
|
||||||
mv sist2_debug sist2-x64-linux-debug
|
tar -czf sist2_debug.tar.gz sist2_debug libasan.so.2
|
||||||
tar -czf sist2-x64-linux-debug.tar.gz sist2-x64-linux-debug libasan.so.2
|
|
||||||
|
|||||||
@@ -4,10 +4,9 @@ VCPKG_ROOT="/vcpkg"
|
|||||||
|
|
||||||
rm *.gz
|
rm *.gz
|
||||||
|
|
||||||
git submodule update --init --recursive
|
|
||||||
|
|
||||||
rm -rf CMakeFiles CMakeCache.txt
|
rm -rf CMakeFiles CMakeCache.txt
|
||||||
cmake -DSIST_DEBUG=off -DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" .
|
cmake -DSIST_DEBUG=off -DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" .
|
||||||
make -j 4
|
make -j 4
|
||||||
strip sist2
|
strip sist2
|
||||||
mv sist2 sist2-arm64-linux
|
mv sist2 sist2_arm64
|
||||||
|
gzip -9 sist2_arm64
|
||||||
@@ -165,9 +165,6 @@ window.onload = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
initTagTree();
|
|
||||||
updateTagTree();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function saveTag(tag, hit) {
|
function saveTag(tag, hit) {
|
||||||
@@ -191,8 +188,6 @@ function saveTag(tag, hit) {
|
|||||||
hideAfter: 3000,
|
hideAfter: 3000,
|
||||||
loaderBg: "#08c7e8",
|
loaderBg: "#08c7e8",
|
||||||
});
|
});
|
||||||
|
|
||||||
window.setTimeout(updateTagTree, 2000);
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,7 +198,7 @@ function deleteTag(tag, hit) {
|
|||||||
delete: true,
|
delete: true,
|
||||||
name: tag,
|
name: tag,
|
||||||
doc_id: hit["_id"],
|
doc_id: hit["_id"],
|
||||||
path_md5: md5(relPath)
|
relpath: relPath
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
$.toast({
|
$.toast({
|
||||||
heading: "Tag deleted",
|
heading: "Tag deleted",
|
||||||
@@ -215,8 +210,6 @@ function deleteTag(tag, hit) {
|
|||||||
hideAfter: 3000,
|
hideAfter: 3000,
|
||||||
loaderBg: "#08c7e8",
|
loaderBg: "#08c7e8",
|
||||||
});
|
});
|
||||||
|
|
||||||
window.setTimeout(updateTagTree, 2000);
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,8 +313,25 @@ $.jsonPost("es", {
|
|||||||
mimeTree.node("any").select();
|
mimeTree.node("any").select();
|
||||||
});
|
});
|
||||||
|
|
||||||
function initTagTree() {
|
// Tags tree
|
||||||
tagMap = [{text: "All", id: "any"}];
|
$.jsonPost("es", {
|
||||||
|
aggs: {
|
||||||
|
tags: {
|
||||||
|
terms: {
|
||||||
|
field: "tag",
|
||||||
|
size: 10000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
size: 0,
|
||||||
|
}).then(resp => {
|
||||||
|
resp["aggregations"]["tags"]["buckets"]
|
||||||
|
.sort((a, b) => a["key"].localeCompare(b["key"]))
|
||||||
|
.forEach(bucket => {
|
||||||
|
addTag(tagMap, bucket["key"], bucket["key"], bucket["doc_count"])
|
||||||
|
});
|
||||||
|
|
||||||
|
tagMap.push({"text": "All", "id": "any"});
|
||||||
tagTree = new InspireTree({
|
tagTree = new InspireTree({
|
||||||
selection: {
|
selection: {
|
||||||
mode: 'checkbox'
|
mode: 'checkbox'
|
||||||
@@ -336,34 +346,8 @@ function initTagTree() {
|
|||||||
});
|
});
|
||||||
tagTree.on("node.state.changed", handleTreeClick(tagTree));
|
tagTree.on("node.state.changed", handleTreeClick(tagTree));
|
||||||
tagTree.node("any").select();
|
tagTree.node("any").select();
|
||||||
}
|
|
||||||
|
|
||||||
function updateTagTree() {
|
|
||||||
$.jsonPost("es", {
|
|
||||||
aggs: {
|
|
||||||
tags: {
|
|
||||||
terms: {
|
|
||||||
field: "tag",
|
|
||||||
size: 10000
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
size: 0,
|
|
||||||
}).then(resp => {
|
|
||||||
tagMap = [];
|
|
||||||
resp["aggregations"]["tags"]["buckets"]
|
|
||||||
.sort((a, b) => a["key"].localeCompare(b["key"]))
|
|
||||||
.forEach(bucket => {
|
|
||||||
addTag(tagMap, bucket["key"], bucket["key"], bucket["doc_count"])
|
|
||||||
});
|
|
||||||
|
|
||||||
tagTree.removeAll();
|
|
||||||
tagMap.push({text: "All", id: "any"})
|
|
||||||
tagTree.addNodes(tagMap);
|
|
||||||
searchBusy = false;
|
searchBusy = false;
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function addTag(map, tag, id, count) {
|
function addTag(map, tag, id, count) {
|
||||||
// let tags = tag.split("#")[0].split(".");
|
// let tags = tag.split("#")[0].split(".");
|
||||||
|
|||||||
@@ -29,13 +29,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="treemap-card" class="stats-card">
|
<div id="treemap-card" class="stats-card">
|
||||||
<button class="btn stats-btn" onclick="fullScreen('treemap-card')" id="treemap-card-enlarge">Enlarge</button>
|
<button class="btn stats-btn" onclick="fullScreen('treemap-card')">Enlarge</button>
|
||||||
<button class="btn stats-btn" onclick="exportTreemap()">Export</button>
|
<button class="btn stats-btn" onclick="exportTreemap()">Export</button>
|
||||||
<svg id="treemap"></svg>
|
<svg id="treemap"></svg>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="graphs-card" class="stats-card">
|
<div id="graphs-card" class="stats-card">
|
||||||
<button class="btn stats-btn" onclick="fullScreen('graphs-card')" id="graphs-card-enlarge">Enlarge</button>
|
<button class="btn stats-btn" onclick="fullScreen('graphs-card')">Enlarge</button>
|
||||||
<div class="graph">
|
<div class="graph">
|
||||||
<svg id="agg_mime_size"></svg>
|
<svg id="agg_mime_size"></svg>
|
||||||
</div>
|
</div>
|
||||||
@@ -789,15 +789,7 @@ window.onload = function () {
|
|||||||
|
|
||||||
function fullScreen(selector) {
|
function fullScreen(selector) {
|
||||||
const card = document.getElementById(selector);
|
const card = document.getElementById(selector);
|
||||||
const btn = document.getElementById(selector + "-enlarge");
|
|
||||||
|
|
||||||
card.classList.toggle("full-screen");
|
card.classList.toggle("full-screen");
|
||||||
|
|
||||||
if (card.classList.contains("full-screen")) {
|
|
||||||
btn.innerText = "Shrink";
|
|
||||||
} else {
|
|
||||||
btn.innerText = "Enlarge";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportTreemap() {
|
function exportTreemap() {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
third-party/argparse
vendored
2
third-party/argparse
vendored
Submodule third-party/argparse updated: 3f4e3594a6...d3e67a8070
Reference in New Issue
Block a user