lazyload
This commit is contained in:
@ -9,9 +9,9 @@
|
||||
data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
if (!window.kuboardSharing) {
|
||||
<!-- if (!window.kuboardSharing) { -->
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
}
|
||||
<!-- } -->
|
||||
</script>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
if (!window.kuboardSharing) {
|
||||
<!-- if (!window.kuboardSharing) { -->
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
}
|
||||
<!-- } -->
|
||||
</script>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,19 +1,21 @@
|
||||
<template>
|
||||
<div v-if="$themeConfig.showAds" :style="$isDev ? 'background-color: grey;' : ''">
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<!-- 正方形-正文 -->
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-3313149841665250"
|
||||
data-ad-slot="9455695764"
|
||||
data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
if (!window.kuboardSharing) {
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<LazyLoad :noAdsOnSharing="true">
|
||||
<div v-if="$themeConfig.showAds" :style="$isDev ? 'background-color: grey;' : ''">
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<!-- 正方形-正文 -->
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-3313149841665250"
|
||||
data-ad-slot="9455695764"
|
||||
data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
if (!window.kuboardSharing) {
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</LazyLoad>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@ -1,19 +1,21 @@
|
||||
<template>
|
||||
<div v-if="$themeConfig.showAds" :style="$isDev ? 'background-color: grey;' : ''">
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<!-- 正文-垂直 -->
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-3313149841665250"
|
||||
data-ad-slot="4549679988"
|
||||
data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
if (!window.kuboardSharing) {
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<LazyLoad :noAdsOnSharing="true">
|
||||
<div v-if="$themeConfig.showAds" :style="$isDev ? 'background-color: grey;' : ''">
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<!-- 正文-垂直 -->
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-3313149841665250"
|
||||
data-ad-slot="4549679988"
|
||||
data-ad-format="auto"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<script>
|
||||
if (!window.kuboardSharing) {
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</LazyLoad>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
42
.vuepress/components/LazyLoad.vue
Normal file
42
.vuepress/components/LazyLoad.vue
Normal file
@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div v-if="load">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
noAdsOnSharing: { type: Boolean, required: false, default: false }
|
||||
},
|
||||
data () {
|
||||
let load = false
|
||||
return {
|
||||
load: load
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
setTimeout( _ => {
|
||||
if (this.noAdsOnSharing) {
|
||||
console.log('noAdsOnSharing')
|
||||
if (typeof window !== 'undefined') {
|
||||
if (this.$isSharing) {
|
||||
this.load = false
|
||||
console.log('noAdsOnSharing', this.load)
|
||||
} else {
|
||||
this.load = true
|
||||
console.log('noAdsOnSharing', this.load)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.load = true
|
||||
console.log('load', this.load)
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@ -1,29 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-for="(item, key) in vssues" :key="key">
|
||||
<Vssue v-if="item && item > 0" v-show="key === $route.path" :issueId="item" :options="options"/>
|
||||
<div v-if="item === undefined && isLocalHost" v-show="key === $route.path" :key="key">
|
||||
<b-button variant="danger" @click="vssues[key] = ''">请创建 VssueId</b-button>
|
||||
<LazyLoad>
|
||||
<div v-for="(item, key) in vssues" :key="key">
|
||||
<Vssue v-if="item && item > 0" v-show="key === $route.path" :issueId="item" :options="options"/>
|
||||
<div v-if="item === undefined && isLocalHost" v-show="key === $route.path" :key="key">
|
||||
<b-button variant="danger" @click="vssues[key] = ''">请创建 VssueId</b-button>
|
||||
</div>
|
||||
<div v-if="item === ''">
|
||||
<b-button variant="warning" @click="refreshId = $refs.vssue[0].vssue.issue.id">请填写 vusseId <span v-if="refreshId"> - {{refreshId}}</span></b-button>
|
||||
<Vssue ref="vssue" :title="$page.path" :options="options"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item === ''">
|
||||
<b-button variant="warning" @click="refreshId = $refs.vssue[0].vssue.issue.id">请填写 vusseId <span v-if="refreshId"> - {{refreshId}}</span></b-button>
|
||||
<Vssue ref="vssue" :title="$page.path" :options="options"/>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var bp = document.createElement('script');
|
||||
var curProtocol = window.location.protocol.split(':')[0];
|
||||
if (curProtocol === 'https') {
|
||||
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
|
||||
}
|
||||
else {
|
||||
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
|
||||
}
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(bp, s);
|
||||
})();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var bp = document.createElement('script');
|
||||
var curProtocol = window.location.protocol.split(':')[0];
|
||||
if (curProtocol === 'https') {
|
||||
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
|
||||
}
|
||||
else {
|
||||
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
|
||||
}
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(bp, s);
|
||||
})();
|
||||
</script>
|
||||
</LazyLoad>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<a aria-label="github" @click="$sendGaEvent('ViewGitHubStar', 'ViewGitHubStarNav', 'ViweGitHubStar:' + $page.path)">
|
||||
<iframe style="display:inline-block;vertical-align:middle;" src="https://ghbtns.com/github-btn.html?user=eip-work&repo=kuboard-press&type=star&count=true&size=small" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
|
||||
</a>
|
||||
<div style="display: inline-block; width: 100px;">
|
||||
<LazyLoad>
|
||||
<a aria-label="github" @click="$sendGaEvent('ViewGitHubStar', 'ViewGitHubStarNav', 'ViweGitHubStar:' + $page.path)">
|
||||
<iframe style="display:inline-block;vertical-align:middle;" src="https://ghbtns.com/github-btn.html?user=eip-work&repo=kuboard-press&type=star&count=true&size=small" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
|
||||
</a>
|
||||
</LazyLoad>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@ -36,16 +36,16 @@ module.exports = {
|
||||
['script', { 'data-ad-client': "ca-pub-3313149841665250", async: true, src: "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"}],
|
||||
// <script data-ad-client="ca-pub-3313149841665250" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
|
||||
['script', { type: 'text/javascript', async: true, src: "https://bot.4paradigm.com/web/assets/ics-web-sdk-js.js" }],
|
||||
['script', { type: 'text/javascript' }, `
|
||||
window.onload = function() {
|
||||
if (window.innerWidth > 1360) {
|
||||
console.log('init-wechat')
|
||||
IcsWebSdkJs.init('https://bot.4paradigm.com/web/chat/15516/bbc69136-e42c-4299-ba85-c57685c8417d')
|
||||
} else {
|
||||
console.log('窗口太小,不显示机器人')
|
||||
}
|
||||
}`],
|
||||
// ['script', { type: 'text/javascript', async: true, src: "https://bot.4paradigm.com/web/assets/ics-web-sdk-js.js" }],
|
||||
// ['script', { type: 'text/javascript' }, `
|
||||
// window.onload = function() {
|
||||
// if (window.innerWidth > 1360) {
|
||||
// console.log('init-wechat')
|
||||
// IcsWebSdkJs.init('https://bot.4paradigm.com/web/chat/15516/bbc69136-e42c-4299-ba85-c57685c8417d')
|
||||
// } else {
|
||||
// console.log('窗口太小,不显示机器人')
|
||||
// }
|
||||
// }`],
|
||||
|
||||
// <script type="text/javascript" src="https://bot.4paradigm.com/web/assets/ics-web-sdk-js.js"></script>
|
||||
|
||||
|
||||
@ -65,9 +65,9 @@ export default ({
|
||||
if (typeof window !== 'undefined') {
|
||||
AOS.init({
|
||||
easing: 'ease-out-back',
|
||||
duration: 1000
|
||||
duration: 1200
|
||||
});
|
||||
if (location.search && location.search.indexOf('sharing') >=0) {
|
||||
if (location.search && (location.search.indexOf('sharing') >=0 || location.search.indexOf('from=timeline') >= 0)) {
|
||||
sharing = true
|
||||
window.kuboardSharing = true
|
||||
} else {
|
||||
|
||||
@ -1,23 +1,25 @@
|
||||
<template>
|
||||
<div class="page-nav" style="max-width: 1000px; padding: 1rem; text-align: center;">
|
||||
<b-alert style="margin-bottom: 0;" show variant="primary">免费答疑</b-alert>
|
||||
<grid :rwd="{compact: 'stack'}">
|
||||
<grid-item size="1/3" :rwd="{tablet: '1/1', compact: '1/1'}" >
|
||||
<b-card style="height: 100%; margin-top: 1rem;" shadow="none" :body-style="{padding: '0rem 1.5rem'}"
|
||||
data-aos="fade-up" data-aos-duration="800">
|
||||
<h4>QQ群</h4>
|
||||
<div>
|
||||
<!-- 一键进群 -->
|
||||
<Qq/>
|
||||
<!-- 808894550 -->
|
||||
</div>
|
||||
<p style="margin-bottom: 0; margin-top: 10px;">
|
||||
<img style="margin: auto; width: 150px;" src="/images/kuboard_qq.png" alt="Kubernetes教程:QQ群在线答疑"/>
|
||||
</p>
|
||||
</b-card>
|
||||
</grid-item>
|
||||
<grid-item size="1/3" :rwd="{tablet: '1/1', compact: '1/1'}">
|
||||
<b-card style="height: 100%; color: #2c3e50; line-height: 1.7; margin-top: 1rem;" shadow="none" :body-style="{padding: '0rem 1.5rem'}"
|
||||
|
||||
<div>
|
||||
<div class="row" style="margin-top: 1rem;">
|
||||
<div class="col-md-4 col-sm-12">
|
||||
<b-card style="height: 100%; " shadow="none" :body-style="{padding: '0rem 1.5rem'}"
|
||||
data-aos="fade-up" data-aos-duration="800">
|
||||
<h4>QQ群</h4>
|
||||
<div>
|
||||
<!-- 一键进群 -->
|
||||
<Qq/>
|
||||
<!-- 808894550 -->
|
||||
</div>
|
||||
<p style="margin-bottom: 0; margin-top: 10px;">
|
||||
<img style="margin: auto; width: 150px;" src="/images/kuboard_qq.png" alt="Kubernetes教程:QQ群在线答疑"/>
|
||||
</p>
|
||||
</b-card>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-12">
|
||||
<b-card style="height: 100%; color: #2c3e50; line-height: 1.7; " shadow="none" :body-style="{padding: '0rem 1.5rem'}"
|
||||
data-aos="fade-up" data-aos-duration="1000">
|
||||
<h4>微信群</h4>
|
||||
<div>
|
||||
@ -30,9 +32,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</b-card>
|
||||
</grid-item>
|
||||
<grid-item size="1/3" :rwd="{tablet: '1/1', compact: '1/1'}">
|
||||
<b-card style="height: 100%; color: #2c3e50; line-height: 1.7; margin-top: 1rem; border-color: #f2be45; background-color: rgba(242, 190, 69, 0.1)" shadow="none" :body-style="{padding: '0rem 1.5rem'}"
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-12">
|
||||
<b-card style="height: 100%; color: #2c3e50; line-height: 1.7; border-color: #f2be45; background-color: rgba(242, 190, 69, 0.1)" shadow="none" :body-style="{padding: '0rem 1.5rem'}"
|
||||
data-aos="fade-up" data-aos-duration="1200">
|
||||
<h4>VIP群</h4>
|
||||
<div>
|
||||
@ -45,8 +47,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</b-card>
|
||||
</grid-item>
|
||||
</grid>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -39,13 +39,17 @@
|
||||
<PageEdit style="max-width: 1000px; padding: 1rem 2.5rem; margin-top: 2rem; background-color: #FFF;"/>
|
||||
<PageNav v-bind="{ sidebarItems }" style="max-width: 1000px; padding: 1rem 2.5rem;"/>
|
||||
<div class="page-nav" style="max-width: 1000px; padding-top:0; margin-top: 1rem;" v-show="!$frontmatter.lessAds && !$isSharing">
|
||||
<AdSensePageBottomInline/>
|
||||
<LazyLoad :noAdsOnSharing="true">
|
||||
<AdSensePageBottomInline/>
|
||||
</LazyLoad>
|
||||
</div>
|
||||
<slot name="bottom" />
|
||||
<PageVssue class="page-nav" style="max-width: 1000px;" v-show="!$isSharing"/>
|
||||
<FriendlyUrl class="page-nav" style="max-width: 1000px;" v-show="!$isSharing"/>
|
||||
<StarGazer/>
|
||||
<AdSenseRightSide v-show="!$isSharing"/>
|
||||
<LazyLoad :noAdsOnSharing="true">
|
||||
<AdSenseRightSide v-show="!$isSharing"/>
|
||||
</LazyLoad>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
</p>
|
||||
<div>
|
||||
<a target="_blank" :href="`http://demo.kuboard.cn/#/dashboard?k8sToken=${$site.themeConfig.kuboardToken}`">
|
||||
<FancyImage src="/images/preview.gif" alt="Kubernetes教程_Kuboard在线体验" title="Kuboard" description="快速在 Kubernetes 上落地微服务"></FancyImage>
|
||||
<FancyImage style="width: 242px;" src="/images/preview.gif" alt="Kubernetes教程_Kuboard在线体验" title="Kuboard" description="快速在 Kubernetes 上落地微服务"></FancyImage>
|
||||
</a>
|
||||
</div>
|
||||
<p>
|
||||
|
||||
@ -75,6 +75,13 @@ Events: <none>
|
||||
### Pod一直是Pending
|
||||
|
||||
如果 Pod 一直停留在 `Pending`,意味着该 Pod 不能被调度到某一个节点上。通常,这是因为集群中缺乏足够的资源或者 ***“合适”*** 的资源。在上述 `kubectl describe...` 命令的输出中的 `Events` 字段,会有对应的事件描述为什么 Pod 不能调度到节点上。可能的原因有:
|
||||
* **资源不就绪**:创建 Pod 时,有时候需要依赖于集群中的其他对象, ConfigMap(配置字典)、PVC(存储卷声明)等,例如
|
||||
* 可能该 Pod 需要的存储卷声明尚未与存储卷绑定,Events 信息如下所示:
|
||||
```
|
||||
Type Reason Age From Message
|
||||
---- ------ ---- ---- -------
|
||||
Warning FailedScheduling <unknown> default-scheduler pod has unbound immediate PersistentVolumeClaims (repated 2 times)
|
||||
```
|
||||
* **缺乏足够的资源**:可能集群中的CPU或内存都已经耗尽,此时,您可以尝试:
|
||||
* 删除某些 Pod
|
||||
* 调整Pod的资源请求
|
||||
|
||||
@ -11,6 +11,11 @@ Kuboard v1.0.x 的更新说明
|
||||
|
||||
**优化**
|
||||
|
||||
* 日志下载功能优化:
|
||||
* 可指定起始时间
|
||||
* 可指定日志文件大小
|
||||
* 可显示下载进度
|
||||
* 可取消下载
|
||||
* 将监控套件的安装脚本从 github 迁移到 https://addons.kuboard.cn
|
||||
|
||||
**BUG 修复**
|
||||
|
||||
Reference in New Issue
Block a user