Skip to content

Commit

Permalink
#60 Refactored chaincode and peer operations are now functional
Browse files Browse the repository at this point in the history
  • Loading branch information
anilhelvaci committed Sep 21, 2021
1 parent b494374 commit 257d5be
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
16 changes: 5 additions & 11 deletions Client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,13 @@ import AppProfile from './AppProfile.vue';
import AppMenu from './AppMenu.vue';
import ProgressBar from "@/components/ProgressBar";
import { MENU_TYPES } from "@/utilities/Utils";
// import AppConfig from './AppConfig.vue';
// import AppFooter from './AppFooter.vue';
// import Splash from "@/views/Splash";
export default {
components: {
'AppTopBar': AppTopBar,
'AppProfile': AppProfile,
'AppMenu': AppMenu,
'ProgressBar': ProgressBar
// 'AppConfig': AppConfig,
// 'AppFooter': AppFooter,
// 'Splash': Splash
},
data() {
Expand Down Expand Up @@ -156,10 +150,10 @@ export default {
],
showTopBarItems : false,
peerMenu: [
{label: 'Yeni Peer', to: '/newPeer'},
{label: 'Channel', to: '/joinChannel'},
{label: 'Chaincode', to: '/chaincode'},
{label: 'Peer Operations', to: '/peerOperations'}
// {label: 'Yeni Peer', to: '/newPeer'},
// {label: 'Channel', to: '/joinChannel'},
// {label: 'Chaincode', to: '/chaincode'},
{label: 'Peer Operations', disabled : true}
],
baseMenu: [],
selecedTab: ''
Expand All @@ -176,7 +170,7 @@ export default {
this.baseMenu = this.caMenu;
}
if(to.fullPath === "/") this.$router.push({name: "splash"});
if (to.name === 'newPeer' || to.name === 'joinChannel' || to.name === 'chaincode' || to.name === 'peerOperations') this.updateMenuAndTab(MENU_TYPES.PEER);
if (to.name === 'peerOperations') this.updateMenuAndTab(MENU_TYPES.PEER);
if (to.name === 'caInput' && this.showTopBarItems) this.updateMenuAndTab(MENU_TYPES.CA);
}
},
Expand Down
2 changes: 1 addition & 1 deletion Client/src/AppTopbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default {
this.ordererBackground = '';
break;
case MENU_TYPES.PEER:
this.$router.push({name: 'newPeer'})
this.$router.push({name: 'peerOperations'})
this.peerBackground = BACKGROUND_WHITE;
this.ordererBackground = '';
this.caBackground = '';
Expand Down
2 changes: 1 addition & 1 deletion Client/src/components/CaInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default {
this.initOrg();
} else {
this.$emit(EVENTS.SHOW_TOP_BAR_ITEMS);
this.$router.push({name: 'newPeer'});
this.$router.push({name: 'peerOperations'});
}
},
onBackBtnClick() {
Expand Down
6 changes: 3 additions & 3 deletions Common/lib/Utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
CHAINCODE_STATES: {
INSTALLED: 1,
APPROVED: 2,
COMMITTED: 3
INSTALLED: "installed",
APPROVED: "approved",
COMMITTED: "committed"
}
}

0 comments on commit 257d5be

Please sign in to comment.