我想对VueJS使用来自Vuetify框架的分页。
来自Vuetify的分页组件:
<v-pagination
v-model="pagination.page"
:length="pagination.total / 5"
:total-visible="pagination.visible"
></v-pagination>
Run Code Online (Sandbox Code Playgroud)
我想在用户单击按钮时执行一个功能。我想获取页码,然后使用该页码在参数中执行功能。
来自方法的getItems的代码:
this.pagination.page = response.body.page
this.pagination.total = response.body.total
this.pagination.perPage = response.body.perPage
Run Code Online (Sandbox Code Playgroud)
数据:
data () {
return {
items: [],
pagination: {
page: 1,
total: 0,
perPage: 0,
visible: 7
}
}
}
Run Code Online (Sandbox Code Playgroud)
我正在尝试探索 keycloak 但出现错误 http://localhost:8080/auth/realms/claim-dev/protocol/openid-connect/token
错误日志
19:47:49,701 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-52) Uncaught server error: java.lang.NullPointerException
at org.keycloak.protocol.oidc.endpoints.TokenEndpoint.checkSsl(TokenEndpoint.java:220)
at org.keycloak.protocol.oidc.endpoints.TokenEndpoint.processGrantRequest(TokenEndpoint.java:176)
at sun.reflect.GeneratedMethodAccessor551.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:138)
at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:517)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:406)
at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:370)
at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:356)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:372)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:344)
at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:137)
at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:106)
at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:132)
at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:100)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:440)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:229)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:135)
at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:356)
at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:138)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:215)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
at org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:91)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at …Run Code Online (Sandbox Code Playgroud) 当使用Kubespray、CRI-O和Cilium部署集群时,我收到一个关于有多个 CRI 套接字可供选择的错误。
完全错误
fatal: [p3kubemaster1]: FAILED! => {"changed": true, "cmd": " mkdir -p /etc/kubernetes/external_kubeconfig && /usr/local/bin/kubeadm init phase kubeconfig admin --kubeconfig-dir /etc/kubernetes/external_kubeconfig --cert-dir /etc/kubernetes/ssl --apiserver-advertise-address 10.10.3.15 --apiserver-bind-port 6443 >/dev/null && cat /etc/kubernetes/external_kubeconfig/admin.conf && rm -rf /etc/kubernetes/external_kubeconfig ", "delta": "0:00:00.028808", "end": "2019-09-02 13:01:11.472480", "msg": "non-zero return code", "rc": 1, "start": "2019-09-02 13:01:11.443672", "stderr": "Found multiple CRI sockets, please use --cri-socket to select one: /var/run/dockershim.sock, /var/run/crio/crio.sock", "stderr_lines": ["Found multiple CRI sockets, please use --cri-socket to …Run Code Online (Sandbox Code Playgroud) 所以我正在尝试部署 Janusgraph (v 0.3.1) 的 2 个实例以在 ScyllaDb 后端的相同键空间中插入数据。为此,我使用 docker 部署了 2 个 janusgraph 容器。第一个开始时没有错误并在我的 ScyllaDb 中创建键空间,但第二个显示一些错误。
所以我的 Janusgraph 容器在一个集群上工作,而我的后端在另一个集群上工作。实际上,当我的密钥空间 Scylla 已经创建并且我遇到了同样的问题时,我尝试只使用一个容器来重新启动它。我还发现了一个脚本 clean.groovy 允许强制关闭打开的图形实例。但没有任何作用...
5316 [main] INFO org.janusgraph.diskstorage.Backend - Initiated backend operations thread pool of size 8
5648 [main] WARN org.apache.tinkerpop.gremlin.server.GremlinServer - Graph [graph] configured at [/janusgraph-config/janusgraph.properties] could not be instantiated and will not be available in Gremlin Server. GraphFactory message: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory]
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory] …Run Code Online (Sandbox Code Playgroud) 出现此错误。
Error: failed to prepare subPath for volumeMount "solr-collection-config" of container "upload-config-container"
使用 kubernetes 1.10.11
- name: upload-config-container
image: solr:7.4.0-alpine
imagePullPolicy: Always
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "200m"
volumeMounts:
- name: solr-collection-config
mountPath: /tell/carbon/conf
subPath: conf
Run Code Online (Sandbox Code Playgroud)
solr-collection-config是代表 ConfigMap 的卷
volumes:
- name: solr-collection-config
configMap:
name: solr-collection-resources
items:
- key: stopwords_en.txt
path: "conf/lang/stopwords_en.txt"
- key: _rest_managed.json
path: "conf/_rest_managed.json"
- key: currency.xml
path: "conf/currency.xml"
- key: protwords.txt
path: "conf/protwords.txt"
- key: schema.xml
path: "conf/schema.xml"
- key: …Run Code Online (Sandbox Code Playgroud) 我以 .tar 格式导出了 docker 映像。
然后使用 K3S 和 ctr 导入这些图像没有显示任何结果:
$ sudo k3s ctr i import myimage.tar
$
Run Code Online (Sandbox Code Playgroud)
cmd没有输出import?
$ sudo k3s ctr i ls
$
Run Code Online (Sandbox Code Playgroud)
空空如也....
I have this simple JSON in mongodb:
{
"pwd_list": [
{
"pwd": "password1",
"pwd_date": str(int(time.time()))
},
{
"pwd": "password2",
"pwd_date": str(int(time.time()))
},
]
}
Run Code Online (Sandbox Code Playgroud)
What I am simply trying to do is to update one of the row of the pwd_list array using an index...
I tried to use the $position of mongodb but it seems to only work with $push... but I don't want to push !
(I'm using pymongo)
So I tried different things like this one : …
我想将自己放在kubernetes容器中并执行CURL命令。不幸的是,我在任何地方都找不到可以卷曲的工作图像(并且与kubernetes兼容)...
要执行到容器中,我正在做一个简单的 kubectl exec -it POD_ID /bin/bash
有人知道包含CURL二进制文件且不会在kubernetes中崩溃的最小docker镜像吗?
PS:这是出于测试目的,因此不需要坚如磐石或其他任何东西
谢谢
更新1这是我用来部署所有潜在映像的yaml:
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: blue
namespace: default
spec:
replicas: 1
template:
metadata:
labels:
name: blue
spec:
containers:
- name: blue-website
image: SOME_IMAGE:latest
resources:
requests:
cpu: 0.1
memory: 200
Run Code Online (Sandbox Code Playgroud)
我不认为它坏了,因为它适用于某些图像。
kubernetes ×4
docker ×2
alpine-linux ×1
arrays ×1
cilium ×1
configmap ×1
containerd ×1
containers ×1
cri-o ×1
curl ×1
gremlin ×1
janusgraph ×1
jwt ×1
k3s ×1
keycloak ×1
kubespray ×1
mongodb ×1
pagination ×1
pymongo ×1
python ×1
vue.js ×1
vuejs2 ×1
vuetify.js ×1