Commit graph

1518 commits

Author SHA1 Message Date
PCoder
9fd396363f Center the add ssh key nicely 2019-05-13 07:13:49 +02:00
1faf46cc1b added validation to heck if the user is the one allowed to access 2019-05-12 21:34:10 -04:00
PCoder
641c556bb6 Simplify code 2019-05-12 21:16:46 +02:00
PCoder
f2af1f8708 Rename button id 2019-05-12 21:15:48 +02:00
PCoder
bbe0017fa0 Add missing return statements for error 2019-05-12 21:15:15 +02:00
PCoder
a44d50dd69 Fix wrong comparing of public_key object with a string value 2019-05-12 19:56:14 +02:00
PCoder
d38edb0dfa Add url for AddSshKeyToVMView 2019-05-12 19:22:10 +02:00
PCoder
09ab9a714d Add AddSshKeyToVMView 2019-05-12 19:21:19 +02:00
PCoder
0104a804c2 Do not allow comma in SSH key name 2019-05-12 19:20:35 +02:00
PCoder
c9c91b1ecb JS code to handle the add ssh key functionality 2019-05-12 19:19:40 +02:00
PCoder
61127e56ca Update virtual_machine_detail.html template
To show the Add SSH key button and the modal that pops up after clicking
it.
2019-05-12 19:16:53 +02:00
PCoder
7e538bf37b Add ssh_key_added_to_vm.{html,txt} email templates 2019-05-12 19:12:34 +02:00
PCoder
3133bde0e9 Don't set the key in the live template 2019-05-11 09:15:08 +02:00
PCoder
b189371a7b Call get_all_active_vmids to get the active vmids 2019-05-11 02:38:16 +02:00
PCoder
7f6d4c1c53 Refactor get_all_vmids -> get_all_active_vmids
We now get this info from opennebula
2019-05-11 02:23:51 +02:00
PCoder
65c9ccb671 Use save_key_in_opennebula_user and save_key_in_vm_template 2019-05-11 01:54:35 +02:00
PCoder
1d70563ea2 Save user's key in opennebula 2019-05-10 09:19:42 +02:00
b8ca7286f2 Add view to check if the vm belongs to a user 2019-05-09 01:34:18 -04:00
PCoder
f0dfcccd96 Increase configuration length in VMDetail to 128 chars 2019-05-08 23:42:03 +02:00
PCoder
d8b95abb39 Check private key is true 2019-05-06 08:48:26 +02:00
PCoder
71d1e6e3c9 Add delete method for UserHostingKey 2019-04-28 23:13:54 +02:00
PCoder
1ccb4e9790 Correct the way we get periods for invoices list 2019-04-22 11:40:00 +02:00
PCoder
965cc3adf9 Show correct period start and period end in invoice list
Previously, we used to take the first element in the bill line
item, for invoice start and end date. However, it can be faulty in
cases where the first item does not represent a VM itself (which
we are sure has a monthly subscription and a correct start and end
dates)
2019-04-22 11:08:59 +02:00
PCoder
3a7c209b80 Fallback to Stripe plan name for product description if its set 2019-04-20 19:54:46 +02:00
PCoder
dad4f42dc3 Do not add vm_conf to details if it is None 2019-04-20 19:13:34 +02:00
PCoder
0b99a0cbec Fix getting users email and password from the request object 2019-04-20 18:52:34 +02:00
PCoder
a1a85e6c18 Style the invoice detail page for multiline items 2019-04-20 18:52:01 +02:00
PCoder
2ae0c8629b Add CSS styles for multi line invoice table 2019-04-20 18:51:23 +02:00
PCoder
a811e9f83d Add helper methods in HostingBillLineItem 2019-04-20 18:50:46 +02:00
PCoder
e782d27739 Attempt to show relevant lines when we have more than 1 line item 2019-04-20 15:20:55 +02:00
PCoder
aff197c1b5 Fix getting StripePlan by plan_id and not name 2019-04-20 14:12:45 +02:00
PCoder
c592c0768e Extract stripe plan from invoice and set it to MHB
If the plan does not exist, it implies that it was created in the
dashboard. So, we create it in the backend also.
2019-04-20 12:48:18 +02:00
PCoder
38d074811a Link HostingBillLineItem to StripePlan 2019-04-20 12:41:30 +02:00
PCoder
44ffd042a6 Obtain vm_id from multiple line items
- Remove empty string from VM_IDs string
- If more than one is present, check all of them are the same
  If same return, the unique value
  Else return none, as we don't handle this case
2019-04-20 10:00:53 +02:00
PCoder
9f13253475 Add missing braces 2019-04-20 09:49:26 +02:00
PCoder
2be59cb0c8 Add missing return value 2019-04-20 07:41:07 +02:00
PCoder
86d70a7f0b Count and log the number of invoices actually imported 2019-04-20 07:31:32 +02:00
PCoder
91695eaee4 Check if multiple line items belong to the same subscription
We are just fine in this case to create a Monthly hosting bill
Also return None explicitly if MonthlyHostingBill is not created
2019-04-20 07:23:16 +02:00
PCoder
0969c97eca Add missing string to debug code 2019-04-18 08:13:56 +02:00
PCoder
c3842a5ed5 Get periods from line items in invoice detail also 2019-04-13 15:43:27 +02:00
PCoder
c5f72792d2 Show period of the first line item as the period of the invoice 2019-04-13 15:35:36 +02:00
PCoder
a3a2016cb4 Attempt period from line_items 2019-04-13 15:24:37 +02:00
PCoder
77669c962c Fix passing correct created value 2019-04-13 15:00:19 +02:00
PCoder
869f74e4e6 Fix typo 2019-04-13 14:43:39 +02:00
PCoder
a4427dd3af Set empty string for description if not available 2019-04-13 14:40:20 +02:00
PCoder
ed6059feaa Set unit amount to 0 if not available in Stripe response 2019-04-13 14:34:42 +02:00
PCoder
4a01036ab5 Attempt correction to gt dict to be passed for created greater than 2019-04-13 14:34:17 +02:00
PCoder
94c7873397 Fix getting line_items 2019-04-13 13:50:09 +02:00
PCoder
8816793803 Add Line item 2019-04-13 13:42:04 +02:00
PCoder
061ef7d036 Fetch invoices whose date is greater than given date only 2019-04-13 12:54:57 +02:00
PCoder
9ee21b9bc3 Allow admin to see invoices 2019-04-13 12:37:37 +02:00
PCoder
fefcdb5647 Pass correct key email 2019-04-12 09:10:19 +02:00
PCoder
c232f4c1da Fix error in obtaining customuser for mab 2019-04-12 08:41:05 +02:00
PCoder
6a7b5459ce Allow admin to list invoices 2019-04-12 08:14:52 +02:00
PCoder
8c04acaff8 Check if user has stripecustomer attr 2019-04-06 14:07:26 +02:00
PCoder
92b2504f1e Paginate invoice list view by 10 items on each page 2019-04-05 00:09:52 +02:00
PCoder
5987962414 Add VM ID to invoices list 2019-04-04 23:50:49 +02:00
PCoder
3f3f47888d Fix missing codes 2019-04-04 23:20:11 +02:00
PCoder
73f7831744 Attempt to show IP address instead of invoice number 2019-04-04 23:14:24 +02:00
PCoder
6d4af0c193 Fix getting number of mabs of a user 2019-04-04 08:10:16 +02:00
PCoder
a59cd86fee Fix error: get mab using customer and not email 2019-04-04 07:59:38 +02:00
PCoder
8dfee2bd83 Show invoices only if the user's invoice were imported
Else fallback to orders url as before
2019-04-04 07:55:56 +02:00
PCoder
316646465d Use invoice's username and email 2019-04-04 07:46:28 +02:00
PCoder
bb7107fe80 Remove erroneous space before filter param 2019-04-04 07:28:50 +02:00
PCoder
0c4e0f1070 Show period in invoices page 2019-04-04 07:14:12 +02:00
PCoder
8b6619f788 Invoice pdf generation: use invoice number and not id 2019-04-04 06:52:34 +02:00
PCoder
d4d31dced9 Attempt invoice pdf with invoice_id instead of pk 2019-04-04 06:50:13 +02:00
PCoder
f907837f04 dashboard: Link 'My bills' to invoices 2019-04-04 06:43:47 +02:00
PCoder
e58dcbb44c hosting urls: Change invoices/<pk>/ to invoice/<pk> 2019-04-04 06:41:23 +02:00
PCoder
8f4a02738f Revert back to old price values 2019-04-04 00:15:04 +02:00
PCoder
ef1bdee9a7 Remove more autoformatting 2019-04-04 00:05:45 +02:00
PCoder
13f84a8580 Add missing endif 2019-04-04 00:05:20 +02:00
PCoder
baf62f1924 Simplify showing total price 2019-04-03 23:54:52 +02:00
PCoder
f1a7958f03 Use correct class 2019-04-03 23:34:26 +02:00
PCoder
903fee4db1 Fix more autoformatting issues 2019-04-03 23:31:52 +02:00
PCoder
d00e84a4b6 Fix bug related to proper alignment 2019-04-03 23:24:56 +02:00
PCoder
47422a99af Fix more autoformatting related errors 2019-04-03 23:11:59 +02:00
PCoder
ddd3cebc39 Fix blocktrans reformatted mistakenly 2019-04-03 23:09:57 +02:00
PCoder
ef09ae4dab Obtaing pricing from order 2019-04-03 23:07:37 +02:00
PCoder
3ed5823c93 Add missing self.object initializer 2019-04-03 23:04:35 +02:00
PCoder
76e3d95135 Use invoice_number of invoice pk 2019-04-03 22:59:39 +02:00
PCoder
d07f3d7eba Add missing object param 2019-04-03 22:59:01 +02:00
PCoder
7de2129a00 Implement get invoice 2019-04-03 22:49:45 +02:00
PCoder
ba6fa531db Correct the name of the layout 2019-04-03 22:49:25 +02:00
PCoder
d37a2de6eb Add utility functions 2019-04-03 22:48:56 +02:00
PCoder
94586c854a Add invoice detail 2019-04-03 22:48:23 +02:00
PCoder
ba9e554881 Implement get_object for invoice detail + url fix 2019-04-03 21:52:07 +02:00
PCoder
247bbe622f Add missing invoice_number argument to MHB create 2019-04-03 21:29:49 +02:00
PCoder
e843a6f857 Make invoicelistview not inherit OrderHostingListView 2019-04-03 21:16:19 +02:00
PCoder
def5a3a011 Add invoice urls 2019-04-03 20:34:04 +02:00
PCoder
dbe3b2558c Create an InvoiceListView 2019-04-03 20:31:54 +02:00
PCoder
71832f8afc invoices.html: Replace all order instances by invoice 2019-04-03 20:31:24 +02:00
PCoder
de3734bf20 Add total_in_chf utility method 2019-04-03 20:29:33 +02:00
PCoder
147fd0fe5e Add invoices.html 2019-04-03 20:29:06 +02:00
PCoder
5c31417a37 Convert timestamp to int 2019-04-03 19:34:57 +02:00
PCoder
cc6afa8d2a Fix datetime issue: pass unix timestamp instead of datetime 2019-04-03 19:22:27 +02:00
PCoder
a690ef421f Fix variable name 2019-04-03 09:24:25 +02:00
PCoder
8e1e3e4157 Correct variable names 2019-04-03 09:12:14 +02:00
PCoder
12b8a77862 Fix issues and also include subscription_id 2019-04-03 09:03:58 +02:00
PCoder
444f79eab7 Remove unwanted logger code 2019-04-03 07:35:43 +02:00
PCoder
dbf3b92c06 Add logging and verbosity 2019-04-03 07:08:39 +02:00
PCoder
c85a4f3796 Catch error from stripe call 2019-04-03 06:59:05 +02:00
PCoder
3eaa53ca78 Use stdout instead of logger 2019-04-03 06:36:28 +02:00
PCoder
b1566c4c61 Get the last monthly hosting bill 2019-04-03 06:22:49 +02:00
PCoder
0bc8c35031 Add migration 2019-04-03 06:13:12 +02:00
PCoder
6d42f88be1 Complete implementation of fetch_stripe_bills 2019-04-03 06:12:48 +02:00
PCoder
8dc00c9dd9 Add management command 2019-04-02 09:18:46 +02:00
PCoder
0e84081880 Add monthlyhostingbill model + code 2019-04-02 09:18:15 +02:00
PCoder
1feacc1770 Merge branch 'master' into 5151/gdpr_modal 2018-10-25 22:05:24 +02:00
PCoder
c36554b4d1 Round total_price also to 2 decimal places 2018-10-18 06:58:18 +02:00
PCoder
3ebf932422 Adjust hosting calculator form validation
For 512 MB RAM offer
2018-10-17 09:29:08 +02:00
PCoder
814163e58e Add minRAM js code for hosting also 2018-10-17 09:11:37 +02:00
PCoder
2fbee916cc Correct help text for product slug field 2018-10-05 09:37:57 +02:00
PCoder
e3ec67d32c ProductPaymentForm: Set input fields input-no-border style 2018-10-05 08:58:10 +02:00
PCoder
1100d61b5d Fix flake8 warnings 2018-10-03 23:17:25 +02:00
PCoder
b3e3af1c1a Make ProductPaymentForm's recurring field hidden 2018-10-03 22:54:45 +02:00
PCoder
74ec39498e Update GenericProduct
Remove url field
Make slug mandatory
2018-10-03 09:58:49 +02:00
PCoder
e4bfdec0b6 Update ProductPaymentForm's validation 2018-10-03 09:38:49 +02:00
PCoder
27a92780a6 Add amount label + Reset textarea height 2018-10-03 08:38:20 +02:00
PCoder
97693f0bb3 Format code 2018-10-03 08:27:22 +02:00
PCoder
530bbcd5f6 Create ProductPaymentForm from GenericPaymentForm 2018-10-03 08:18:45 +02:00
PCoder
3bad37c605 Make GenericProduct slug unique 2018-10-02 10:00:59 +02:00
PCoder
930333357e GenericProduct: Remove image field and add slug field 2018-10-02 09:27:38 +02:00
PCoder
dd9e7dde35 Merge branch 'master' into task/5690/generic-payment-page 2018-10-02 09:01:46 +02:00
PCoder
fcc113e9d9 Add locale_date class to date fields so that we can localize 2018-09-26 22:06:14 +02:00
PCoder
1041284866 Refactor moment.js locale date code to virutal_machine_detail.js 2018-09-26 21:52:12 +02:00
PCoder
4feeec23d4 Correct spelling: virutal -> virtual 2018-09-26 20:50:19 +02:00
PCoder
ca578ecf56 Merge branch 'master' of https://github.com/MalcolmA/dynamicweb into MalcolmA-master 2018-09-26 20:46:54 +02:00
PCoder
b021a8ed6e Remove filer dependency in migration 2018-09-26 09:29:10 +02:00
PCoder
99b11f013f Remove old migration 2018-09-26 09:25:03 +02:00
PCoder
1f990b1ab7 Update migration 2018-09-26 09:24:47 +02:00
PCoder
508360472a Add amount/recurring form fields validation 2018-09-26 09:14:11 +02:00
PCoder
48ba6a6166 Remove disabled on amount/recurring fields 2018-09-26 09:13:45 +02:00
PCoder
10e8f0a820 Show product name in hosting order detail 2018-09-26 09:10:15 +02:00
PCoder
5df2080f92 Reset amount and recurring fields on error 2018-09-26 09:09:12 +02:00
PCoder
d54bf84b1e Format code 2018-09-25 02:20:57 +02:00
PCoder
50e5fea339 Add GenericProduct model and associate it to HostingOrder 2018-09-25 02:20:31 +02:00
PCoder
67231275c7 Modify migration 2018-09-25 02:19:28 +02:00
PCoder
1228d3dbc6 Add product_name to GenericPaymentForm 2018-09-25 02:18:31 +02:00
PCoder
69a1d2df71 Add ajax call to fetch price/recurring
Based on selected production
2018-09-25 02:16:44 +02:00
PCoder
b63a572231 Register GenericProduct to adminsite 2018-09-25 02:14:37 +02:00
PCoder
114dbd8242 Make recurring monthly and amount in chf explicit 2018-09-24 08:32:33 +02:00
PCoder
a90bec98ec Make invoice for generic payment showable 2018-09-24 08:22:46 +02:00
PCoder
2a694295ad Refactor payment.js 2018-09-23 17:00:48 +02:00
PCoder
fcfc56e132 Move csrf_token out of the form loop 2018-09-23 16:15:48 +02:00
PCoder
d6e4a86724 Append One time charge/Recurring only for generic payments 2018-09-23 13:34:26 +02:00
PCoder
9ec05e7df4 Merge billing and generic-payment forms and post values as get
parameters
2018-09-23 13:13:32 +02:00
PCoder
e94ecfe52c Change recurring and description to non-required fields + Change
amount to Floatfield
2018-09-23 12:49:57 +02:00
PCoder
332e7d6624 Add generic_payment_id field to HostingOrder migration and
reflect generic payments in adminsite
2018-09-23 12:39:06 +02:00
PCoder
c7edcdc8b1 Change description to CharField and set its height 2018-09-22 23:51:39 +02:00
PCoder
a7fa52490c Create GenericPaymentForm 2018-09-22 08:16:26 +02:00
PCoder
d7be223fcb Change margin bottom for vm terminate error 2018-09-08 12:39:12 +02:00
PCoder
304feb4f7b Update text 2018-09-08 10:46:07 +02:00
PCoder
e376f38baa Correct text 2018-09-08 10:33:00 +02:00
PCoder
84dae63968 Fix: ugettext_lazy doesn't like string format 2018-09-08 10:29:47 +02:00
PCoder
4914280868 Set text for vm terminate timeout 2018-09-08 10:14:57 +02:00
PCoder
a7afbec5b4 Fix flake8 error 2018-09-07 23:14:57 +02:00
PCoder
ff6df8cd58 Simplify logic 2018-09-07 23:11:46 +02:00
PCoder
8e7789462e Merge branch 'master' into bugfix/log_vm_terminate_errors 2018-09-07 22:43:29 +02:00
PCoder
8a30100488 Use price in stripe plan name too 2018-09-05 23:26:51 +02:00
Malcolm Anyakee
c891694dc0 Update Bugfix
Fixed bugs and fixed typo
2018-08-25 23:13:16 +02:00
PCoder
144a780105 Change text: 'Terminated VM can not ...' -> 'Terminated VMs can not ...' 2018-08-24 11:58:01 +02:00
PCoder
06d849c5ce Merge branch 'master' into 5151/gdpr_modal 2018-08-24 11:10:59 +02:00
PCoder
d7f171d710 Change DE translation (beenden instead of terminieren) 2018-08-24 11:07:50 +02:00
PCoder
4f745b607d Merge branch 'master' into task/5487/warn_users_before_terminating_vm 2018-08-24 10:58:24 +02:00
PCoder
e1263ce9b3 Add DE translation fo #5487 2018-08-23 19:40:16 +02:00
PCoder
4baa3a7095 Improve HostingOrder str representation 2018-08-23 09:18:55 +02:00
PCoder
4a1434c514 Make string representation of HostingOrder more readable 2018-08-23 09:07:12 +02:00
PCoder
f9584b4c82 Fix a bug when vm_template is None 2018-08-23 09:06:31 +02:00
PCoder
e230f2ac8c Merge master into 5151/gdpr_modal 2018-08-22 23:25:11 +02:00
PCoder
78e44332b5 Remove an unnecessary question mark 2018-08-22 23:16:26 +02:00
PCoder
af78631ec8 Update hosting's django.po 2018-08-22 23:13:49 +02:00
PCoder
29172a9df7 Use a separate class for warning block 2018-08-22 23:06:20 +02:00
PCoder
4425aa7c88 Change modal text 2018-08-22 22:57:32 +02:00
PCoder
b7ff519624 Reduce bottom padding further by 2px 2018-08-22 22:54:49 +02:00
PCoder
07837c8752 Reduce bottom padding 2018-08-22 22:51:22 +02:00
PCoder
1e5cf08273 Move the warning to the bottom 2018-08-22 22:47:49 +02:00
PCoder
7e790e7027 Add warning div 2018-08-22 22:36:29 +02:00
PCoder
929e7ead1c Add vm-terminate-warning style 2018-08-22 22:36:17 +02:00
PCoder
9c5363ef55 Merge branch 'master' into bugfix/show_meta_description_in_cms_page 2018-08-22 21:42:37 +02:00
PCoder
b69abf3edd Make CC brand 128 characters long 2018-08-21 14:42:01 +02:00
PCoder
8bf6440110 Delete old migrations 2018-08-21 14:41:16 +02:00
PCoder
768b8ca820 Change HostingOrder cc_brand field size to 35 chars 2018-08-21 14:06:58 +02:00
PCoder
770b5e080b Make UserCardDetail brand field 35 chars long 2018-08-21 13:24:54 +02:00
M.Ravi
9381327a12 Change author of various cms pages to ungleich glarus ag
(Being consistent)
2018-08-20 11:52:27 +02:00
PCoder
df10e84418 Add owner's email to the subject 2018-07-25 22:04:44 +02:00
PCoder
a5cdfab306 Send an email to admin if the VM is still there after 30 seconds
of the VM terminate calll
2018-07-25 21:54:15 +02:00
PCoder
59b020c0d4 Replace all occurrences of logger.info with logger.error 2018-07-25 21:41:05 +02:00
PCoder
069cd18268 Add gdpr banner to all base templates 2018-07-21 13:27:15 +02:00
PCoder
33bd2e1760 Improve import_usercarddetails management command 2018-07-07 02:15:38 +02:00
PCoder
34ed51a643 Don't dissociate card if transaction fails 2018-07-07 02:03:42 +02:00
PCoder
0f26917f35 Fix PEP8 warning 2018-07-07 01:54:45 +02:00
PCoder
678167978c Add check to forbid user from deleting the last card 2018-07-07 01:50:46 +02:00
PCoder
ebcbb26276 Add another DE translation - UPDATE 2018-07-07 01:38:03 +02:00
PCoder
e18b8a527a Add missing DE translation 2018-07-07 01:35:52 +02:00
PCoder
e60b93d126 Add management command import_usercarddetails 2018-07-07 01:28:25 +02:00
PCoder
4c06a9e730 Add de translations by MalcolmA 2018-07-06 19:33:26 +02:00
PCoder
1f2743a65d Makemessages for datacenterlight, hosting and utils 2018-07-06 01:19:44 +02:00
PCoder
0db4a113e6 Add some styles and do not let user remove card if he has only one 2018-07-05 23:06:47 +02:00
PCoder
9035f98060 Update UserCardDetail get method 2018-07-05 09:58:57 +02:00