Skip to content

Commit

Permalink
apachegh-31: Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
dinukadesilva committed Oct 8, 2020
1 parent 11f6978 commit 7b296a6
Show file tree
Hide file tree
Showing 11 changed files with 1,037 additions and 1,104 deletions.
9 changes: 4 additions & 5 deletions custos-demo-gateway/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<template>
<div id="app">
<div id="nav">
<Header/>
<div class="p-3" id="nav">
<router-view/>
</div>
</div>
</template>

<script>
import TheNavigator from "./components/TheNavigator.vue";
import Header from "@/components/Header";
export default {
name: 'App',
components: [
TheNavigator
]
components: {Header}
}
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
color: #203a43;
}
.user-avatar-button {
.header .user-avatar-button {
border-radius: 30px;
width: 35px;
height: 35px;
Expand All @@ -177,5 +177,6 @@
.navigation a:focus {
outline: none;
box-shadow: none;
}
</style>
24 changes: 0 additions & 24 deletions custos-demo-gateway/src/components/TheNavigator.vue

This file was deleted.

175 changes: 85 additions & 90 deletions custos-demo-gateway/src/components/workspace/Agents.vue
Original file line number Diff line number Diff line change
@@ -1,110 +1,105 @@
<template>
<div>
<Header/>
<div class="accounttable p-3">
<!-- <div class="enableComAcc">-->
<!-- <b-form-checkbox v-model="checked" :disabled=isCheckedBtnDisabled v-on:change="enableAgents"-->
<!-- name="check-button" switch>-->
<!-- Enable Community Accounts-->
<!-- </b-form-checkbox>-->
<!-- </div>-->
<div v-if="this.loadingAgents" class="d-flex justify-content-center mb-3">
<b-spinner variant="primary" label="Text Centered"></b-spinner>
</div>
<b-table striped hover responsive :items="communityAccounts" :fields="community_fields" selectable
ref="selectableTable"
select-mode="single"
@row-selected="onCommunityAcSelected" caption-top>
<template v-slot:table-caption>Community Accounts</template>
</b-table>
<div class="addAccItem">
<b-button variant="outline-primary" v-on:click="this.addAccount">Add Account</b-button>
</div>
<div class="accounttable">
<!-- <div class="enableComAcc">-->
<!-- <b-form-checkbox v-model="checked" :disabled=isCheckedBtnDisabled v-on:change="enableAgents"-->
<!-- name="check-button" switch>-->
<!-- Enable Community Accounts-->
<!-- </b-form-checkbox>-->
<!-- </div>-->
<div v-if="this.loadingAgents" class="d-flex justify-content-center mb-3">
<b-spinner variant="primary" label="Text Centered"></b-spinner>
</div>
<b-table striped hover responsive :items="communityAccounts" :fields="community_fields" selectable
ref="selectableTable"
select-mode="single"
@row-selected="onCommunityAcSelected" caption-top>
<template v-slot:table-caption>Community Accounts</template>
</b-table>
<div class="addAccItem">
<b-button variant="outline-primary" v-on:click="this.addAccount">Add Account</b-button>
</div>

<b-modal ref="newAcc" scrollable title="New Account" ok-title="Ok" @ok="registerAgent">
<div class="userform">
<div class="userformItem">
<p>Id</p>
<b-form-input v-model="newAccountName"></b-form-input>
</div>
<b-modal ref="newAcc" scrollable title="New Account" ok-title="Ok" @ok="registerAgent">
<div class="userform">
<div class="userformItem">
<p>Id</p>
<b-form-input v-model="newAccountName"></b-form-input>
</div>
</b-modal>
<b-modal ref="exAcc" scrollable title=" Account" ok-title="Ok" hide-footer>
<div class="userform">
<div class="userformItem">
<p>Id</p>
<b-form-input v-model="exAccountId" disabled></b-form-input>
</div>
<div class="userform">
<p>Status</p>
<b-form-select v-model="selectedStatus" v-on:change="changeAccountStatus">
<option v-for="(selectOption, indexOpt) in statusOptions"
:key="indexOpt"
:value="selectOption"
>
{{ selectOption }}
</option>
</b-form-select>
</div>
<div class="userformItem">
<p>Attributes</p>
<b-table striped hover responsive :items="accSelectedAttributes" selectable select-mode="single"
@row-selected="onAccAtrSelected">
</b-table>
<dev class="addAtrCls">
<b-button variant="outline-primary" v-on:click="addActAttribute">Add Attributes</b-button>
</dev>
</div>
</div>
</b-modal>
<b-modal ref="exAcc" scrollable title=" Account" ok-title="Ok" hide-footer>
<div class="userform">
<div class="userformItem">
<p>Id</p>
<b-form-input v-model="exAccountId" disabled></b-form-input>
</div>
</b-modal>
<b-modal ref="accAtrModel" scrollable title="Add Attribute" ok-title="Add" @ok="addAtrOkPressed">
<div class="userform">
<div class="userformItem">
<p>Key</p>
<b-form-input v-model="newAcAtrKey"></b-form-input>
</div>
<div class="userformItem">
<p>Value</p>
<b-form-input v-model="newAcAtrValue"></b-form-input>
</div>
<p>Status</p>
<b-form-select v-model="selectedStatus" v-on:change="changeAccountStatus">
<option v-for="(selectOption, indexOpt) in statusOptions"
:key="indexOpt"
:value="selectOption"
>
{{ selectOption }}
</option>
</b-form-select>
</div>
</b-modal>
<b-modal ref="AccAtrModelSelected" scrollable title="Attribute" ok-title="Delete" @ok="deleteAtrOkPressed">
<div class="userform">
<div class="userformItem">
<p>Key</p>
<b-form-input v-model="exAccountAtrKey" disabled></b-form-input>
</div>
<div class="userformItem">
<p>Value</p>
<b-form-input v-model="exAccountAtrValue" disabled></b-form-input>
</div>
<div class="userformItem">
<p>Attributes</p>
<b-table striped hover responsive :items="accSelectedAttributes" selectable select-mode="single"
@row-selected="onAccAtrSelected">
</b-table>
<dev class="addAtrCls">
<b-button variant="outline-primary" v-on:click="addActAttribute">Add Attributes</b-button>
</dev>
</div>
</b-modal>
<b-modal ref="enablePopOver" scrollable title="Agent Credentials" cancel-disabled>
<div class="userform">
<div class="userformItem">
<p>Id</p>
<b-form-input v-model="agentId" disabled></b-form-input>
</div>
<div class="userformItem">
<p>Secret</p>
<b-form-input v-model="agentSec" disabled></b-form-input>
</div>
</div>
</b-modal>
<b-modal ref="accAtrModel" scrollable title="Add Attribute" ok-title="Add" @ok="addAtrOkPressed">
<div class="userform">
<div class="userformItem">
<p>Key</p>
<b-form-input v-model="newAcAtrKey"></b-form-input>
</div>
</b-modal>
<div class="userformItem">
<p>Value</p>
<b-form-input v-model="newAcAtrValue"></b-form-input>
</div>
</div>
</b-modal>
<b-modal ref="AccAtrModelSelected" scrollable title="Attribute" ok-title="Delete" @ok="deleteAtrOkPressed">
<div class="userform">
<div class="userformItem">
<p>Key</p>
<b-form-input v-model="exAccountAtrKey" disabled></b-form-input>
</div>
<div class="userformItem">
<p>Value</p>
<b-form-input v-model="exAccountAtrValue" disabled></b-form-input>
</div>
</div>
</b-modal>
<b-modal ref="enablePopOver" scrollable title="Agent Credentials" cancel-disabled>
<div class="userform">
<div class="userformItem">
<p>Id</p>
<b-form-input v-model="agentId" disabled></b-form-input>
</div>
<div class="userformItem">
<p>Secret</p>
<b-form-input v-model="agentSec" disabled></b-form-input>
</div>
</div>
</b-modal>

</div>
</div>
</template>

<script>
import config from "@/config";
import Header from "@/components/workspace/Header";
export default {
name: "Agents",
components: {Header},
data: function () {
return {
community_fields: ["id", "status"],
Expand Down
Loading

0 comments on commit 7b296a6

Please sign in to comment.