Commit 3b6534e0 authored by 智勇's avatar 智勇

loading

parent f76c0cb4
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<el-form-item v-for="(ns, index) in repoNamespaces" :label="ns.type | upper" :key="index"> <el-form-item v-for="(ns, index) in repoNamespaces" :label="ns.type | upper" :key="index">
<el-card> <el-card>
<el-button <el-button
v-loading="listLoading"
v-for="item in ns.repos" v-for="item in ns.repos"
:key="item.domain" :key="item.domain"
:type="dependant[ns.type] && dependant[ns.type].find(sys => sys.appname === item.appname) ? 'success' : ''" :type="dependant[ns.type] && dependant[ns.type].find(sys => sys.appname === item.appname) ? 'success' : ''"
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
</el-card> </el-card>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button v-permission="['admin']" style="margin-right:40px;margin-bottom:40px;float:right" type="primary" @click="createData()">{{ $t('table.confirm') }}</el-button> <el-button v-permission="['admin']" :disabled="loading" style="margin-right:40px;margin-bottom:40px;float:right" type="primary" @click="createData()">{{ $t('table.confirm') }}</el-button>
</div> </div>
</template> </template>
...@@ -57,7 +58,8 @@ export default { ...@@ -57,7 +58,8 @@ export default {
dependant: {}, dependant: {},
repoNamespaces: [], repoNamespaces: [],
currentTemplate: '', currentTemplate: '',
templates: {} templates: {},
loading: true
} }
}, },
...@@ -70,6 +72,7 @@ export default { ...@@ -70,6 +72,7 @@ export default {
getAllRepos() { getAllRepos() {
getBaseRepos().then(res => { getBaseRepos().then(res => {
this.repoNamespaces = res.data.filter(item => item.type === 'base') this.repoNamespaces = res.data.filter(item => item.type === 'base')
this.loading = false
}) })
}, },
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
</div> </div>
</div> </div>
<el-table <el-table
v-loading="listLoading"
:data="FormatTabledata.base" :data="FormatTabledata.base"
:header-cell-style="{background:'#F3F4F7',color:'#555'}" :header-cell-style="{background:'#F3F4F7',color:'#555'}"
size="medium" size="medium"
...@@ -87,6 +88,7 @@ ...@@ -87,6 +88,7 @@
</div> </div>
</div> </div>
<el-table <el-table
v-loading="listLoading"
:data="FormatTabledata[item._id]" :data="FormatTabledata[item._id]"
:header-cell-style="{background:'#F3F4F7',color:'#555'}" :header-cell-style="{background:'#F3F4F7',color:'#555'}"
size="medium" size="medium"
...@@ -346,13 +348,15 @@ export default { ...@@ -346,13 +348,15 @@ export default {
fetchK8sdetail({ 'namespace': this.namespace }).then(res => { fetchK8sdetail({ 'namespace': this.namespace }).then(res => {
const servicelist = res.data.services const servicelist = res.data.services
this.array2Object(servicelist) this.array2Object(servicelist)
this.$message({ // this.$message({
message: '服务状态已拉取', // message: '服务状态已拉取',
type: 'success' // type: 'success'
}) // })
this.listLoading = false
}) })
}, },
refresh() { refresh() {
this.listLoading = true
this.getServicelist() this.getServicelist()
}, },
getRepository(label) { getRepository(label) {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</el-card> </el-card>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button v-permission="['admin']" style="margin-right:40px;margin-bottom:40px;float:right" type="primary" @click="createData()">{{ $t('table.confirm') }}</el-button> <el-button v-permission="['admin']" :disabled="loading" style="margin-right:40px;margin-bottom:40px;float:right" type="primary" @click="createData()">{{ $t('table.confirm') }}</el-button>
</div> </div>
</template> </template>
...@@ -47,7 +47,8 @@ export default { ...@@ -47,7 +47,8 @@ export default {
dependant: {}, dependant: {},
repoNamespaces: [], repoNamespaces: [],
currentTemplate: '', currentTemplate: '',
templates: {} templates: {},
loading: true
} }
}, },
...@@ -60,6 +61,7 @@ export default { ...@@ -60,6 +61,7 @@ export default {
getAllRepos() { getAllRepos() {
getAllRepos().then(res => { getAllRepos().then(res => {
this.repoNamespaces = res.data this.repoNamespaces = res.data
this.loading = false
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment