Skip to content

Commit

Permalink
available global zelapps
Browse files Browse the repository at this point in the history
prepare v66
  • Loading branch information
TheTrunk committed Jul 15, 2020
1 parent 01e8888 commit 888e7d2
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 14 deletions.
4 changes: 2 additions & 2 deletions ZelBack/config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ module.exports = {
ram: 1 * 5, // per 100mb,
hdd: 0.5 * 5, // per 1gb,
},
address: 't1TH5KaFi9CbMQasGB294yYgoWAuzXNfRMR', // apps registration address
epochstart: 640000, // zelapps epoch blockheight start
address: 't1...', // apps registration address
epochstart: 690000, // zelapps epoch blockheight start
portMin: 30001, // originally should have been from 30000 but we got temporary folding there
portMax: 39999,
maxImageSize: 300000000, // 300mb
Expand Down
110 changes: 102 additions & 8 deletions ZelFront/src/components/ZelApps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
sortable
>
<template slot-scope="scope">
{{ scope.row.name.substr(3, scope.row.name.length) }}
{{ getZelAppName(scope.row.name) }}
</template>
</el-table-column>
<el-table-column
Expand Down Expand Up @@ -164,7 +164,86 @@
sortable
>
<template slot-scope="scope">
{{ scope.row.name.substr(3, scope.row.name.length) }}
{{ getZelAppName(scope.row.name) }}
</template>
</el-table-column>
<el-table-column
label="Image"
prop="repotag"
sortable
>
</el-table-column>
<el-table-column
label="Owner"
prop="owner"
sortable
>
</el-table-column>
<el-table-column
label="Port"
prop="port"
sortable
>
</el-table-column>
<el-table-column
label="CPU"
prop="cpu"
sortable
>
<template slot-scope="scope">
{{ resolveCpu(scope.row) }}
</template>
</el-table-column>
<el-table-column
label="RAM"
prop="ram"
sortable
>
<template slot-scope="scope">
{{ resolveRam(scope.row) }}
</template>
</el-table-column>
<el-table-column
label="HDD"
prop="hdd"
sortable
>
<template slot-scope="scope">
{{ resolveHdd(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<br>
<div class='actionCenter'>
<el-input
v-if="output"
type="textarea"
autosize
v-model="stringOutput"
>
</el-input>
</div>
</div>
<div v-if="zelAppsSection === 'globalzelapps'">
<el-tabs v-model="activeNameGlobal">
<el-tab-pane
label="Available"
name="available"
>
<el-table
:data="globalZelAppSpecs.data"
empty-text="No global ZelApp"
style="width: 100%"
>
<el-table-column
label="Name"
prop="name"
sortable
>
<template slot-scope="scope">
{{ getZelAppName(scope.row.name) }}
</template>
</el-table-column>
<el-table-column
Expand Down Expand Up @@ -554,6 +633,7 @@ export default {
data() {
return {
activeName: 'running',
activeNameGlobal: 'available',
getRunningZelAppsResponse: {
status: '',
data: '',
Expand All @@ -570,6 +650,10 @@ export default {
status: '',
data: '',
},
globalZelAppSpecs: {
status: '',
data: '',
},
tier: '',
output: '',
fluxCommunication: false,
Expand Down Expand Up @@ -664,8 +748,8 @@ export default {
ram: 1 * 5, // per 100mb,
hdd: 0.5 * 5, // per 1gb,
},
address: 't1TH5KaFi9CbMQasGB294yYgoWAuzXNfRMR', // apps registration address
epochstart: 640000, // zelapps epoch blockheight start
address: 't1...', // apps registration address
epochstart: 690000, // zelapps epoch blockheight start
portMin: 30001, // originally should have been from 30000 but we got temporary folding there
portMax: 39999,
},
Expand Down Expand Up @@ -714,10 +798,9 @@ export default {
switch (val) {
case 'localzelapps':
this.zelappsGetListRunningZelApps();
// vue.$message.info('ZelApps coming soon!');
break;
case 'globalzelapps':
vue.$message.info('ZelApps coming soon!');
this.zelappsGetListGlobalZelApps();
break;
case 'registerzelapp':
this.registrationInformation();
Expand Down Expand Up @@ -776,10 +859,9 @@ export default {
switch (this.zelAppsSection) {
case 'localzelapps':
this.zelappsGetListRunningZelApps();
// vue.$message.info('ZelApps coming soon!');
break;
case 'globalzelapps':
vue.$message.info('ZelApps coming soon!');
this.zelappsGetListGlobalZelApps();
break;
case 'registerzelapp':
this.registrationInformation();
Expand All @@ -790,6 +872,11 @@ export default {
}
},
methods: {
async zelappsGetListGlobalZelApps() {
const response = await ZelAppsService.globalZelAppSpecifications();
this.globalZelAppSpecs.status = response.data.status;
this.globalZelAppSpecs.data = response.data.data;
},
async zelappsGetAvailableZelApps() {
const response = await ZelAppsService.availableZelApps();
this.availableZelApps.status = response.data.status;
Expand Down Expand Up @@ -1283,6 +1370,13 @@ export default {
onOpen(evt) {
console.log(evt);
},
getZelAppName(zelappName) {
// this id is used for volumes, docker names so we know it reall belongs to zelflux
if (zelappName.startsWith('zel')) {
return zelappName.substr(3, zelappName.length);
}
return zelappName;
},
},
};
</script>
2 changes: 2 additions & 0 deletions ZelFront/src/components/ZelCash.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ export default {
},
async restartZelCashDaemon() {
const zelidauth = localStorage.getItem('zelidauth');
vue.$message.success('Restarting ZelCash...');
const response = await ZelCashService.restart(zelidauth);
console.log(response);
vue.$message({
type: response.data.status,
message: response.data.data.message || response.data.data,
Expand Down
7 changes: 4 additions & 3 deletions ZelFront/src/components/shared/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@
</el-menu-item>
<!--<el-menu-item index="10-4">Active Login Phrases</el-menu-item>-->
</el-submenu>
<el-menu-item
index="50"
>
<el-menu-item index="50">
Very Basic Explorer
</el-menu-item>
<el-menu-item
Expand Down Expand Up @@ -258,6 +256,9 @@ export default {
case '3-1':
this.$store.commit('setZelAppsSection', 'localzelapps');
break;
case '3-2':
this.$store.commit('setZelAppsSection', 'globalzelapps');
break;
case '3-3':
this.$store.commit('setZelAppsSection', 'registerzelapp');
break;
Expand Down
3 changes: 3 additions & 0 deletions ZelFront/src/services/ZelAppsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export default {
zelappsRegInformation() {
return Api().get('/zelapps/registrationinformation');
},
globalZelAppSpecifications() {
return Api().get('/zelapps/globalspecifications');
},
justAPI() {
return Api();
},
Expand Down
1 change: 0 additions & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const path = require('path');
// const CompressionPlugin = require('compression-webpack-plugin');
// const zopfli = require('@gfx/zopfli');


const plugins = [];
// if (process.env.NODE_ENV === 'production') {
// const compressionTest = /\.(js|css|json|txt|html|ico|svg)(\?.*)?$/i;
Expand Down

0 comments on commit 888e7d2

Please sign in to comment.