Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #1187

Merged
merged 38 commits into from
Oct 18, 2023
Merged

Dev #1187

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
fc5bd9d
fix update service & instance
SazukinPavel Oct 12, 2023
a7800f7
add state socket
SazukinPavel Oct 12, 2023
e65b211
fix reports total & colors
SazukinPavel Oct 12, 2023
510a7e4
add account in route params
SazukinPavel Oct 12, 2023
3bbc2c7
add create transaction button
SazukinPavel Oct 12, 2023
01b4dad
fix suspend & resume disabled
SazukinPavel Oct 12, 2023
64e23b9
fix loading & disable buttons
SazukinPavel Oct 12, 2023
5aa6749
fix monitorings min date
SazukinPavel Oct 12, 2023
287bffe
add service preview
SazukinPavel Oct 12, 2023
1eef45a
Merge pull request #1174 from slntopp/dev-fixes
SazukinPavel Oct 13, 2023
43ada95
fix transactions
SazukinPavel Oct 13, 2023
d5685f7
Merge pull request #1176 from slntopp/dev-fixes
SazukinPavel Oct 13, 2023
bc28dec
change quil to jodit
SazukinPavel Oct 16, 2023
55c265b
fix preview init
SazukinPavel Oct 16, 2023
9a5553f
fix editor
SazukinPavel Oct 16, 2023
ea50e3c
Add github oauth
loathedrobot Oct 16, 2023
fcf64b9
Fix github links
loathedrobot Oct 16, 2023
9f02451
Fix static check
loathedrobot Oct 16, 2023
23aedc9
Fix body
loathedrobot Oct 16, 2023
24d12cd
Merge branch 'dev' into dev-fixes
SazukinPavel Oct 17, 2023
f9f18fc
Merge pull request #1180 from slntopp/dev-fixes
SazukinPavel Oct 17, 2023
589045f
- Added table with resources for empty plans
639852 Oct 17, 2023
7344ec6
Merge branch 'dev' into dev-empty-resources
639852 Oct 17, 2023
5b3c564
Merge pull request #1181 from slntopp/dev-empty-resources
639852 Oct 17, 2023
cb71b8b
Fix transactions id
loathedrobot Oct 17, 2023
1919bcf
save sorts
SazukinPavel Oct 17, 2023
0feb71e
fix zero balance not showed
SazukinPavel Oct 17, 2023
6d59a2e
add set sell to all & fixes
SazukinPavel Oct 17, 2023
1092fc5
Merge branch 'dev-fixes' of https://github.com/slntopp/nocloud into d…
SazukinPavel Oct 17, 2023
6560f61
Merge pull request #1182 from slntopp/dev-fixes
SazukinPavel Oct 17, 2023
a2a483c
fix report id to transaction id
SazukinPavel Oct 17, 2023
75c0e6e
fix success message
SazukinPavel Oct 17, 2023
c465f1b
only 2 state of sorting
SazukinPavel Oct 17, 2023
0a0ef68
Merge pull request #1183 from slntopp/dev-fixes
SazukinPavel Oct 17, 2023
196bbef
Bump google.golang.org/grpc from 1.58.3 to 1.59.0 (#1184)
dependabot[bot] Oct 18, 2023
e6b83dd
add autocreate service & fix accounts
SazukinPavel Oct 18, 2023
2cad793
Merge pull request #1186 from slntopp/dev-fixes
SazukinPavel Oct 18, 2023
70b5a6b
Fix
loathedrobot Oct 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion admin-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"core-js": "^3.32.1",
"date-fns": "^2.29.3",
"glob-parent": "^6.0.2",
"jodit-vue": "^2.6.0",
"js-cookie": "^3.0.5",
"json-schema": "^0.4.0",
"nocloud-ui": "^1.0.7",
Expand All @@ -31,7 +32,6 @@
"vue-apexcharts": "^1.6.2",
"vue-i18n": "^8.28.2",
"vue-router": "^3.6.5",
"vue2-editor": "^2.10.3",
"vuetify": "^2.7.1",
"vuex": "^3.4.0",
"yaml": "^2.3.1"
Expand Down
13 changes: 10 additions & 3 deletions admin-ui/src/components/account/info.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<template>
<v-card elevation="0" color="background-light" class="pa-4">
<div style="position: absolute; top: 0; right: 75px">
<div style="position: absolute; top: 0; right: 25px">
<div>
<v-chip color="primary" outlined
>Balance: {{ account.balance?.toFixed(2) }}
<v-chip class="mr-3" color="primary" outlined
>Balance: {{ account.balance?.toFixed(2) || 0 }}
{{ account.currency }}</v-chip
>
<v-btn
:to="{
name: 'Transactions create',
params: { account: account.uuid },
}"
>Create transaction/invoice</v-btn
>
</div>
</div>

Expand Down
7 changes: 1 addition & 6 deletions admin-ui/src/components/dialogs/changeMonitorings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<v-card-title>{{ nextPaymentDates[key].title }}</v-card-title>
</v-col>
<v-col cols="8">
<date-picker :min="min" v-model="nextPaymentDates[key].value" />
<date-picker v-model="nextPaymentDates[key].value" />
</v-col>
</v-row>
</div>
Expand Down Expand Up @@ -58,7 +58,6 @@ const changeDatesLoading = ref(false);
const isChangeAll = ref(true);
const nextPaymentDates = ref({});
const newAllDate = ref();
const min = ref();

const setNextPaymentDate = () => {
const data = JSON.parse(JSON.stringify(template.value.data));
Expand Down Expand Up @@ -138,10 +137,6 @@ const changeDates = async () => {

onMounted(() => {
setNextPaymentDate();
//tommoraw
min.value = new Date(new Date().getTime() + 24 * 60 * 60 * 1000)
.toISOString()
.slice(0, 10);
});
</script>

Expand Down
43 changes: 30 additions & 13 deletions admin-ui/src/components/instance/controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@
class="mr-2"
v-for="btn in vmControlBtns"
:key="btn.action + btn.title"
:disabled="btn.disabled"
:loading="isSendActionLoading"
@click="
sendVmAction({
action: btn.action,
template: { ...template, type: type },
params: btn.data,
})
"
:disabled="btn.disabled || (!!runningActionName && runningActionName!==btn.action)"
:loading="runningActionName === btn.action"
@click="sendAction(btn)"
>
{{ btn.title || btn.action }}
</v-btn>
Expand Down Expand Up @@ -69,6 +63,7 @@ export default {
isLoading: false,
isSaveLoading: false,
isLockLoading: false,
runningActionName: "",
}),
methods: {
...mapActions("actions", ["sendVmAction"]),
Expand Down Expand Up @@ -199,6 +194,18 @@ export default {
this.isSaveLoading = false;
});
},
async sendAction(btn) {
this.runningActionName = btn.action;
try {
await this.sendVmAction({
action: btn.action,
template: { ...this.template, type: this.type },
params: btn.data,
});
} finally {
this.runningActionName = "";
}
},
},
computed: {
...mapGetters("actions", ["isSendActionLoading"]),
Expand Down Expand Up @@ -294,17 +301,27 @@ export default {
(this.template.state.meta.state !== 3 &&
[0, 18, 20].includes(this.template.state.meta.lcm_state)),
reboot:
this.template.state.meta.lcm_state === 6 ||
this.template.state.meta.lcm_state === 21 ||
this.template.state.meta.state === 5 ||
(this.template.state.meta.state !== 3 &&
(this.template.state.meta.lcm_state === 18 ||
this.template.state.meta.lcm_state === 20)) ||
(this.template.state.meta.lcm_state === 0 &&
this.template.state.meta.state === 8),
resume:
this.template.state.meta.state === 3 &&
![18, 20].includes(this.template.state.meta.lcm_state),
suspend: this.template.state.meta.state === 5,
vnc: this.template.state.meta.state === 5,
this.template.state.meta.lcm_state === 21 ||
this.template.state.meta.lcm_state === 6 ||
(this.template.state.meta.state === 3 &&
![18, 20].includes(this.template.state.meta.lcm_state)),
suspend:
this.template.state.meta.state === 5 ||
this.template.state.meta.lcm_state === 21 ||
this.template.state.meta.lcm_state === 6,
vnc:
this.template.state.meta.state === 5 ||
this.template.state.meta.lcm_state === 21 ||
this.template.state.meta.lcm_state === 6,
};
},
ovhActions() {
Expand Down
Loading
Loading