1
0
forked from x/ContextOS

add cli.project.stats

This commit is contained in:
shaoying 2019-08-31 00:40:17 +08:00
parent 307c15fad2
commit 3c2da603ae
7 changed files with 7 additions and 107 deletions

View File

@ -776,7 +776,11 @@ var Index = &ctx.Context{Name: "cli", Help: "管理中心",
case "stat":
// 代码统计
m.Cmdy("nfs.dir", "src", "dir_deep", "dir_type", "file", "dir_sort", "line", "int_r")
m.Cmdy("nfs.dir", kit.Select("src", arg, 1), "dir_deep", "dir_type", "file", "dir_sort", "line", "int_r")
case "stats":
// 代码统计
m.Cmdy("nfs.dir", kit.Select("src", arg, 1), "dir_deep", "dir_type", "file", "dir_sort", "line", "int_r", "dir_select", "group", "")
case "trend":
// 提交记录

View File

@ -4,5 +4,5 @@ var version = struct {
host string
self int
}{
"2019-08-31 00:24:43", "mac", 493,
"2019-08-31 00:31:59", "mac", 495,
}

View File

@ -1,6 +1,6 @@
kit project "项目" private \
select "" values plugin values review values submit values trend values stat values init action auto \
select "" values plugin values review values submit values trend values stats values stat values init action auto \
text "" name see imports plugin_see action auto \
button "执行" \
exports see name see

View File

@ -1,15 +0,0 @@
{
show: function(event, item, option, plugin) {
var args = item.value == "所有"? ["all"]: []
option.Run(event, args, function(msg) {
option.ondaemon(msg)
})
},
init: function(page, pane, plugin, option, output) {
option.ondaemon = function(msg) {
output.innerHTML = ""
kit.AppendChild(output, [{type: "code", list: [{text: [msg.result.join(""), "pre"]}]}])
}
output.innerHTML = "hello"
}
}

View File

@ -1,9 +0,0 @@
{init: function(page, pane, field, option, output) {
this.Runs = function(event) {
var value = option.txt.value
var url = page.login.Pane.Share({cmds: ["qrcode", value]})
kit.AppendChilds(output, [{img: [url]}])
event.ctrlKey && page.target.Pane.Send("icon", url)
event.shiftKey && page.target.Pane.Send("field", this.Format(value))
}
}}

View File

@ -1,79 +0,0 @@
# Common builder
ARG GO_IMAGE
FROM ${GO_IMAGE} as builder
COPY hack/dockerfile/install/tini.installer /
COPY hack/dockerfile/install/proxy.installer /
RUN apt-get update && apt-get install -y \
bash \
btrfs-tools \
ca-certificates \
cmake \
gcc \
git \
libc-dev \
libgcc-6-dev \
libltdl-dev \
libtool \
make
RUN grep "_COMMIT=" /*.installer |cut -f2- -d: > /binaries-commits
# dockerd
FROM builder as dockerd-builder
WORKDIR /go/src/github.com/docker/docker
COPY . /go/src/github.com/docker/docker
ARG VERSION
ARG GITCOMMIT
ARG BUILDTIME
ARG PLATFORM
ARG PRODUCT
ARG DEFAULT_PRODUCT_LICENSE
ENV VERSION ${VERSION}
ENV GITCOMMIT ${GITCOMMIT}
ENV BUILDTIME ${BUILDTIME}
ENV PLATFORM ${PLATFORM}
ENV PRODUCT ${PRODUCT}
ENV DEFAULT_PRODUCT_LICENSE ${DEFAULT_PRODUCT_LICENSE}
# TODO The way we set the version could easily be simplified not to depend on hack/...
RUN bash ./hack/make/.go-autogen
RUN go build -o /sbin/dockerd \
-tags 'autogen netgo static_build selinux journald' \
-installsuffix netgo -a -buildmode=pie -ldflags '-w -extldflags "-static" ' \
github.com/docker/docker/cmd/dockerd
# docker-proxy
# TODO if libnetwork folds into the docker tree this can be combined above
FROM builder as proxy-builder
RUN git clone https://github.com/docker/libnetwork.git /go/src/github.com/docker/libnetwork
WORKDIR /go/src/github.com/docker/libnetwork
RUN . /binaries-commits && \
git checkout -q "$LIBNETWORK_COMMIT" && \
CGO_ENABLED=0 go build -buildmode=pie -ldflags="$PROXY_LDFLAGS" \
-o /sbin/docker-proxy \
github.com/docker/libnetwork/cmd/proxy
# docker-init - TODO move this out, last time we bumped was 2016!
FROM builder as init-builder
RUN git clone https://github.com/krallin/tini.git /tini
WORKDIR /tini
RUN . /binaries-commits && \
git checkout -q "$TINI_COMMIT" && \
cmake . && make tini-static && \
cp tini-static /sbin/docker-init
# runc
FROM builder as runc-builder
RUN apt-get install -y libseccomp-dev
RUN git clone https://github.com/opencontainers/runc.git /go/src/github.com/opencontainers/runc
WORKDIR /go/src/github.com/opencontainers/runc
RUN . /binaries-commits && \
git checkout -q "$RUNC_COMMIT" && \
make BUILDTAGS='seccomp apparmor' static && make install
# Final docker image
FROM scratch
COPY --from=dockerd-builder /sbin/dockerd /sbin/
COPY --from=proxy-builder /sbin/docker-proxy /sbin/
COPY --from=init-builder /sbin/docker-init /sbin/
COPY --from=runc-builder /usr/local/sbin/runc /sbin/
ENTRYPOINT ["/sbin/dockerd"]

@ -1 +0,0 @@
Subproject commit 007921611b04d8fca5ad0b1d4e7b0461b47cd435