Compare commits

..

307 Commits

Author SHA1 Message Date
Johannes Zellner f9750e237a We always allow app updates now 2018-06-12 17:46:07 +02:00
Johannes Zellner 908bb75fdc Only update the appstore profile if the root controller is still present 2018-06-12 17:31:52 +02:00
Girish Ramakrishnan a273827166 Make the name of the user non-optional 2018-06-11 14:22:02 -07:00
Girish Ramakrishnan 0cb96f4b03 Change password requirements text 2018-06-11 13:54:17 -07:00
Girish Ramakrishnan af7764253d Fix text 2018-06-11 11:29:31 -07:00
Girish Ramakrishnan af9652f7c8 Remove the email subscription requirement 2018-06-11 11:24:25 -07:00
Johannes Zellner e741ca9216 Support new platform log routes 2018-06-11 20:10:57 +02:00
Girish Ramakrishnan e3950c2fb0 Give user notification about how to resize 2018-06-08 12:22:45 -07:00
Girish Ramakrishnan 3eae49139c Create the terminal ws after fit()
part of cloudron/box#549
2018-06-08 12:04:12 -07:00
Girish Ramakrishnan 97f17916f9 mail: hide the status tab entirely for caas 2018-06-08 09:54:58 -07:00
Johannes Zellner ee0a25962b Show only featured apps first on appstore listing 2018-06-08 09:48:34 +02:00
Girish Ramakrishnan 55fb3b3b55 Fix various text 2018-06-07 19:42:13 -07:00
Johannes Zellner a58d9d1497 Have a better fallback for eventlog source 2018-06-07 23:04:26 +02:00
Johannes Zellner 801dbc9705 Only show terminal button in logs view for apps 2018-06-07 22:44:31 +02:00
Girish Ramakrishnan e3897c4c34 Make user confirm that they use an external disk 2018-06-07 11:36:55 -07:00
Girish Ramakrishnan 04dd8914cd Move logs button to separate section 2018-06-07 10:48:18 -07:00
Johannes Zellner c2651fd8f8 Remove backup related bits from the settings view 2018-06-07 16:30:40 +02:00
Johannes Zellner 27f760fdbf Add separate backups page 2018-06-07 14:22:48 +02:00
Johannes Zellner a74cf0b064 add logs viewer for email server 2018-06-07 11:40:50 +02:00
Girish Ramakrishnan e09d2db7e6 Fix layout on larger screen 2018-06-05 22:46:06 -07:00
Girish Ramakrishnan 28f183f450 Explicitly mark zone name as optional 2018-06-05 21:14:10 -07:00
Girish Ramakrishnan 5126b605f2 Remove redundant "This domain must be hosted" text
If anything we can add them as <sup> info links
2018-06-04 21:47:23 -07:00
Girish Ramakrishnan aaebdda9d6 Remove bizzare color 2018-06-04 21:46:29 -07:00
Girish Ramakrishnan af29a3f498 Remove redundant "This domain must be hosted" text 2018-06-04 21:44:15 -07:00
Girish Ramakrishnan 55b6773d88 Add labels to setup page as well 2018-06-04 21:39:09 -07:00
Girish Ramakrishnan 239ec86c4a Fix setupdns layout 2018-06-04 20:59:23 -07:00
Girish Ramakrishnan 13adca00d6 do not center restore page labels 2018-06-04 20:46:40 -07:00
Girish Ramakrishnan a76631ee3d Add labels
Poeple seem to forget wat those fields are for mid-way through filling
the form. The place holder stuff is not overly obvious apparently.

This makes it consistent with all our other UI nevertheless
2018-06-04 20:30:22 -07:00
Girish Ramakrishnan 7ac99f16cd Fallback -> Self-signed 2018-06-04 16:52:17 -07:00
Girish Ramakrishnan 3b6ca1c59d Fix spacing 2018-06-04 15:51:29 -07:00
Girish Ramakrishnan 3f55064c47 Fix name.com links 2018-06-04 10:13:47 -07:00
Girish Ramakrishnan 917bc2a88c Reduce the padding (like in configure dialog) 2018-05-30 10:08:36 -07:00
Johannes Zellner 85dfa1ccad Always show the restore and clone tabs 2018-05-30 15:13:05 +02:00
Johannes Zellner 606828da1d Show backup create button next to the tabs 2018-05-30 15:07:16 +02:00
Johannes Zellner a182d78566 Give busy feedback when the app clone is initiated 2018-05-29 22:53:51 +02:00
Johannes Zellner 0f294531d3 Do not show backup creation button if we still fetch backups 2018-05-29 22:48:42 +02:00
Johannes Zellner 9189532b83 Fix error reporting of restore form
angular does not attach form elements to the $scope when the DOM
elements are created dynamically!
2018-05-29 22:46:06 +02:00
Johannes Zellner c031253bd4 Use tabs instead of accordion for restore/clone ui 2018-05-29 22:05:18 +02:00
Johannes Zellner 11ae5d4832 Allow the user to setup a subscription when enabling email 2018-05-29 17:17:53 +02:00
Johannes Zellner 3251dc3d73 Show hint to setup subscription if more than allowed apps are installed 2018-05-28 20:26:24 +02:00
Girish Ramakrishnan a671e6acf7 Move the buttons to dialog footer 2018-05-28 10:05:57 -07:00
Girish Ramakrishnan 5ce658125c Make the text less verbose 2018-05-28 10:05:52 -07:00
Girish Ramakrishnan 1d88a935a5 Add clone UI
part of #248
2018-05-28 10:05:47 -07:00
Girish Ramakrishnan 8da07a16b9 dnsConfig is used incorrectly 2018-05-28 10:05:42 -07:00
Girish Ramakrishnan 7ce045ae51 Make it an accordion 2018-05-28 10:05:36 -07:00
Girish Ramakrishnan a3e253436e Allow setting app visibility for non-SSO apps
Fixes #532
2018-05-25 13:59:53 -07:00
Johannes Zellner 08955ce5a4 Do not show cryptic UTC timestamp format for backups 2018-05-25 13:56:15 +02:00
Johannes Zellner 57a4fa2d38 fix the restore dropdown and change some labels 2018-05-25 13:49:38 +02:00
Johannes Zellner 548e652ba2 Update the setup subscription dialog text 2018-05-25 13:39:04 +02:00
Girish Ramakrishnan e92cfae4d9 Fix error handling 2018-05-24 20:15:08 -07:00
Girish Ramakrishnan ed1320c937 Only send mailboxName if it changed 2018-05-24 16:29:36 -07:00
Girish Ramakrishnan abccffd05f Put domain in the mailbox name
part of cloudron/box#558
2018-05-24 16:05:27 -07:00
Girish Ramakrishnan c1106aa32e Save -> Configure 2018-05-24 15:54:50 -07:00
Girish Ramakrishnan a94f5daac9 Allow mailbox name to be configured
part of cloudron/box#558
2018-05-24 15:42:40 -07:00
Girish Ramakrishnan 9d9f16e948 Re-work the configure dialog 2018-05-24 14:13:00 -07:00
Girish Ramakrishnan 0b5bd0b4cd Another take on this layout 2018-05-24 13:43:25 -07:00
Girish Ramakrishnan caa59dd9a9 Better layout 2018-05-24 09:55:33 -07:00
Girish Ramakrishnan 423958dd0e Add links to appstore 2018-05-24 09:45:08 -07:00
Girish Ramakrishnan 6a90cf5102 Fix incoming email section a bit 2018-05-24 09:26:41 -07:00
Johannes Zellner 2d820a3005 Remove label about free trial 2018-05-24 15:23:33 +02:00
Johannes Zellner 7fff55a1ed Style the tab widget to fit our style 2018-05-24 15:17:44 +02:00
Girish Ramakrishnan 52d1d47030 Add setting for mail from validation
Fixes #454
2018-05-23 23:34:11 -07:00
Girish Ramakrishnan 7df1d388f0 ManageSieve is now STARTTLS 2018-05-23 23:15:17 -07:00
Girish Ramakrishnan a34f5f13da Remove panel headers since they appear very heavy 2018-05-23 22:12:09 -07:00
Girish Ramakrishnan bcc1e5f79c Make the email UI tabbed 2018-05-23 22:00:48 -07:00
Girish Ramakrishnan 44d32ea281 add app backup button
Fixes cloudron/box#497
2018-05-23 21:17:12 -07:00
Johannes Zellner 63e16c9bb8 Minor rewording to better fit the free tier 2018-05-22 19:17:14 +02:00
Girish Ramakrishnan 528be0e4c0 Remove redundant auto-update check button 2018-05-21 09:28:30 -07:00
Girish Ramakrishnan 0660a924b7 Add some spacing 2018-05-19 18:11:20 -07:00
Girish Ramakrishnan 6f29d5f3f6 explicitZone is gone 2018-05-19 17:28:43 -07:00
Girish Ramakrishnan 9903004af5 Remove trial expiry display 2018-05-18 22:30:39 -07:00
Girish Ramakrishnan 0c2b250901 Fix article 2018-05-18 12:08:19 -07:00
Girish Ramakrishnan 00f8e96dd2 Remove spurious > 2018-05-17 09:06:27 -07:00
Girish Ramakrishnan 267fa79164 Add advanced settings to setupdns 2018-05-15 16:24:09 -07:00
Girish Ramakrishnan 1528aa9d0c domain: add advanced view for zone name and cert provider 2018-05-15 15:39:43 -07:00
Girish Ramakrishnan 0cd6f7f2e7 Set text based on debugMode
Fixes cloudron/box#553
2018-05-15 12:13:31 -07:00
Johannes Zellner f05967d871 Fix terminal resize on window resize
This still does not update the terminal COLUMNS and ROWS
2018-05-15 18:31:54 +02:00
Girish Ramakrishnan 26087e1580 remove user/ from profile route 2018-05-13 21:51:13 -07:00
Girish Ramakrishnan 9275c4fbfd Fix display of error message in mailbox add 2018-05-11 11:16:38 -07:00
Johannes Zellner a2e03ccf7a Fix the dns check notification link 2018-05-11 11:05:28 +02:00
Johannes Zellner 6605a38eab Add scheduler addon dropdown to webterminal 2018-05-11 10:40:11 +02:00
Johannes Zellner 0a09d89684 Add name.com to setup dns 2018-05-09 18:44:03 +02:00
Johannes Zellner c0d4100dd1 Add name.com DNS provider 2018-05-09 12:24:46 +02:00
Girish Ramakrishnan 791f5af3e0 Fix scope use in logs.js and terminal.js 2018-05-07 14:48:52 -07:00
Girish Ramakrishnan ed57e701bc Revert "route53: set listHostedZonesByName property"
This reverts commit 07b428f051.

We can just do this in the backend entirely
2018-05-07 13:41:36 -07:00
Girish Ramakrishnan c678a9b6d7 lint 2018-05-07 13:18:51 -07:00
Girish Ramakrishnan 07b428f051 route53: set listHostedZonesByName property 2018-05-07 11:27:24 -07:00
Girish Ramakrishnan a1ab8b6aa8 reset the expect dns records on refresh 2018-05-06 23:47:38 -07:00
Girish Ramakrishnan a07848164c Show dialog when disabling email 2018-05-06 23:41:39 -07:00
Girish Ramakrishnan 1b1d4ee431 Add GoDaddy 2018-05-06 22:36:33 -07:00
Girish Ramakrishnan f8e5668c5c typo 2018-05-06 21:51:58 -07:00
Girish Ramakrishnan d8719626d9 Add UI for Gandi LiveDNS
Part of cloudron/box#235
2018-05-06 19:38:30 -07:00
Girish Ramakrishnan 3a06797de0 AppStore now returns 401 2018-05-06 19:38:30 -07:00
Girish Ramakrishnan b9d7149dbb Remove email domain logic from users view 2018-05-01 15:25:43 -07:00
Girish Ramakrishnan 72bbb4ec68 Use the scope to determine what the user has access to 2018-05-01 14:40:59 -07:00
Girish Ramakrishnan d9ec1be9b6 Get the user profile first to determine the scope 2018-05-01 14:19:05 -07:00
Girish Ramakrishnan ecddb6977a Use the version in the status API instead
This is because we want to get the user's profile as the first
thing to know the scopes
2018-05-01 14:15:12 -07:00
Girish Ramakrishnan 77220038a1 clients API has moved up a level 2018-05-01 11:08:34 -07:00
Girish Ramakrishnan 016f194271 typo 2018-04-29 18:02:48 -07:00
Girish Ramakrishnan e34fecee5e Pass scope and expiresAt as body params 2018-04-28 22:02:46 -07:00
Girish Ramakrishnan 7448dc5ec5 Capitalize 2018-04-28 10:19:21 -07:00
Girish Ramakrishnan bfd25a08c2 Use new route to query user apps 2018-04-26 20:07:53 -07:00
Girish Ramakrishnan 8861e61bdf profile routes have moved under /api/v1/user 2018-04-26 19:58:38 -07:00
Girish Ramakrishnan 049c2fca8a Make it a button 2018-04-26 09:58:45 -07:00
Girish Ramakrishnan 63df9df913 Add links to TOTP apps 2018-04-26 09:32:56 -07:00
Johannes Zellner 05b6740e07 Refresh the user profile on 2fa status change 2018-04-26 16:54:03 +02:00
Johannes Zellner 46aac0288c Add 2fa disable flow 2018-04-26 16:38:26 +02:00
Johannes Zellner 4ec0fbd33c Show 2fa status in accounts view 2018-04-26 16:32:43 +02:00
Johannes Zellner 7a24d5fdfa Add 2fa enabling flow to accounts view 2018-04-26 16:30:07 +02:00
Johannes Zellner 3f082ccace Fix typo 2018-04-26 14:49:14 +02:00
Girish Ramakrishnan a37fc3093a Add note to setup subscription 2018-04-26 01:19:48 -07:00
Johannes Zellner 4541940a76 Make the setup billing button more descriptive 2018-04-24 11:49:03 +02:00
Johannes Zellner 3017fe0c95 Remove (in trial) label 2018-04-24 11:47:47 +02:00
Johannes Zellner d3bf9a2478 Avoid further flickering of the subscription buttons 2018-04-24 11:47:00 +02:00
Johannes Zellner 7107672358 Fix trial badge flickering 2018-04-23 20:55:03 +02:00
Johannes Zellner 8519d6665e Add support for appstore 2fa setup 2018-04-22 18:52:37 +02:00
Girish Ramakrishnan 774c9e435e Make it 1.5 since we have some swap to work with 2018-04-19 19:20:45 -07:00
Girish Ramakrishnan e1f35a8d9f Fix wording 2018-04-18 12:40:30 -07:00
Johannes Zellner 67136e418c Encode the email query argument
This is required to correctly transfer characters like +
2018-04-18 21:29:40 +02:00
Johannes Zellner 924cc997aa Hide cloudron.io account section in settings if it is not yet registered 2018-04-18 21:18:31 +02:00
Johannes Zellner 12eda5f507 Improve subscription indicator
We now don't show anything when the cloudron is still in trial period
but the user already has setup billing
2018-04-18 17:56:04 +02:00
Girish Ramakrishnan 96bb979abf Add CRM category 2018-04-17 16:28:31 -07:00
Girish Ramakrishnan f74ad0323c Fix README title 2018-04-17 09:39:32 -07:00
Girish Ramakrishnan 62fd73f1b1 Fix link 2018-04-17 09:39:02 -07:00
Johannes Zellner 44f027eb04 remove unused require 2018-04-15 11:00:25 +02:00
Johannes Zellner c9cf6d610b Revision is not part of OAuth credentials 2018-04-15 11:00:01 +02:00
Johannes Zellner 16d4d28046 Be consistent and make domain list entries edit on click 2018-04-13 21:50:21 +02:00
Johannes Zellner 2280008029 Give a lot more backlog for the app logs 2018-04-13 13:13:51 +02:00
Johannes Zellner a36439314d Fix logviewer autoscroll for chrome
Chrome does not support the scrollTopMax property
2018-04-13 13:12:32 +02:00
Johannes Zellner 290b44fbb7 Fixup catchall to use mailboxes instead of users 2018-04-12 13:02:32 +02:00
Johannes Zellner 404c280595 Catchall property is now addresses 2018-04-12 12:37:32 +02:00
Johannes Zellner b0f8370a31 Make copies of mailbox properties to work with in edit dialog
This avoids local data model updates in the UI on dialog cancel
2018-04-12 12:26:54 +02:00
Johannes Zellner 6abcf4ec3c Remove left over artifacts from inline edit mode 2018-04-12 12:15:23 +02:00
Johannes Zellner db6d7bcefb Refresh the mailinglists on edit 2018-04-12 12:12:22 +02:00
Johannes Zellner 0e1913b0b4 Handle corner case, where mailbox referenced in mailinglist got removed 2018-04-12 12:12:11 +02:00
Johannes Zellner cc6b097dc5 Use a copy of the mailinglist properties on edit 2018-04-12 12:02:20 +02:00
Johannes Zellner c4f7a0c857 Ensure new mailboxes appear in maillinglist options 2018-04-12 11:57:15 +02:00
Johannes Zellner 34187d76b6 Update Chart.js to new version and show full fqdn for apps 2018-04-12 11:45:18 +02:00
Girish Ramakrishnan 87e7e9fa07 Add header to mailing list delete dialog 2018-04-11 19:04:26 -07:00
Girish Ramakrishnan 8643fbb65c Fix typo in mailbox delete dialog 2018-04-11 18:49:41 -07:00
Johannes Zellner 6a2846afeb Show full fqdn for apps in graphs 2018-04-11 19:19:05 +02:00
Johannes Zellner 7bfa23e2b1 Prevent email hash change listener to kick-in on view change 2018-04-11 12:16:44 +02:00
Girish Ramakrishnan bcd55972cd Remove many breaks
When email is disabled, there is just lots of empty space
2018-04-10 14:23:10 -07:00
Johannes Zellner d75e1d04b3 Do not use the same DOM element id twice 2018-04-10 18:05:35 +02:00
Johannes Zellner 02ef77398a Remove now unused apiOriginHostname variable from gulpfile 2018-04-10 18:00:18 +02:00
Johannes Zellner b0b19053a7 We now set the csp headers from nginx
This makes it easier to also support local development on non https
2018-04-10 17:59:46 +02:00
Johannes Zellner 5cc298555a Ensure assets have proper tag attributes and always source from / 2018-04-10 14:49:49 +02:00
Johannes Zellner f2a0dcca31 Cleanup some linter errors and usused classes 2018-04-10 14:49:20 +02:00
Johannes Zellner c274e60868 Remove unused noapp.html 2018-04-10 14:31:37 +02:00
Johannes Zellner bde6ef8797 Make new mailbox/list buttons large but give some space on the bottom 2018-04-10 14:11:16 +02:00
Johannes Zellner df15f63424 Remove unneccessary dashboard/ subfolder 2018-04-10 13:28:55 +02:00
Johannes Zellner 1bd4a0aa8e git ignore node_modules/ 2018-04-10 13:12:46 +02:00
Johannes Zellner f068ce4e85 Add package.json for gulp dependencies to build assets 2018-04-10 13:12:46 +02:00
Girish Ramakrishnan 20093c581c Make the button small instead 2018-04-09 15:37:05 -07:00
Girish Ramakrishnan 814d7bafa8 Remove the content-large to keep all views same size 2018-04-09 14:55:35 -07:00
Girish Ramakrishnan e07fac0335 Fix wording 2018-04-09 12:59:38 -07:00
Girish Ramakrishnan 39730c71ce Move buttons to top right 2018-04-09 12:29:00 -07:00
Johannes Zellner 8565130166 Allow deeplinking of domains into email view 2018-04-09 18:00:08 +02:00
Johannes Zellner 9acde7fe86 Add error feedback when mailbox name is already taken 2018-04-09 16:21:32 +02:00
Johannes Zellner 63e43e8d20 Move new mailinglist form to a dialog 2018-04-09 16:12:18 +02:00
Johannes Zellner 10a3af8e5e Ensure autofocus on dialog open 2018-04-09 15:58:25 +02:00
Johannes Zellner 14536febaf Move mailbox add form to dialog 2018-04-09 15:56:20 +02:00
Johannes Zellner 75b597418c Do not list app mailboxes 2018-04-09 15:45:54 +02:00
Johannes Zellner 435730470b Fix indentation 2018-04-09 15:08:05 +02:00
Johannes Zellner 689ddf6875 edit mailinglists with a dialog instead of inline 2018-04-09 15:01:12 +02:00
Johannes Zellner fa550f57b3 Style the alias input and fix some typos 2018-04-09 12:54:25 +02:00
Johannes Zellner b9b84b661a Remove unused css classes and make all mailbox lines edit on click 2018-04-09 12:49:25 +02:00
Johannes Zellner b7573f449f Remove mailbox inline editing 2018-04-09 12:45:00 +02:00
Johannes Zellner 69f6895bd6 Move mailbox edit to dialog 2018-04-09 12:42:14 +02:00
Johannes Zellner 72a1e0d5ca No need to console.error() if we show the error in the ui already 2018-04-06 16:58:46 +02:00
Johannes Zellner 4eb80eedc0 Avoid reflow of the ui when buttons are shown/hidden 2018-04-06 16:58:27 +02:00
Johannes Zellner 32e6931b46 Remove console.log()s 2018-04-06 16:56:19 +02:00
Johannes Zellner f60258ed71 Add mailbox add error handling 2018-04-06 16:51:57 +02:00
Johannes Zellner 32454ba64a Give the mailbox listing more space 2018-04-06 16:48:04 +02:00
Johannes Zellner de212f49c2 Fixup the mailinglist crud ui 2018-04-06 16:43:43 +02:00
Johannes Zellner c308bd90cb Ensure at least the index application assets are versioned for proper refresh 2018-04-06 00:11:08 +02:00
Johannes Zellner 593bde9d92 Ensure the main controller is aware of the newly setup subscription 2018-04-05 23:27:39 +02:00
Johannes Zellner a16bd7030a Fix the configure/select plan button in the settings 2018-04-05 23:27:14 +02:00
Johannes Zellner 4d248bce39 Give appstore login form more space on the bottom 2018-04-05 22:03:40 +02:00
Johannes Zellner e236264848 Fetch subscription directly after the cloudron was registered to update the ui 2018-04-05 21:49:15 +02:00
Johannes Zellner 20e9877fe9 Give mail view more horizontal space 2018-04-05 21:24:29 +02:00
Johannes Zellner b0c4021d17 Add mailbox delete ui 2018-04-05 21:22:07 +02:00
Johannes Zellner 01bfd84853 Fixup the mailbox edit logic 2018-04-05 21:15:02 +02:00
Johannes Zellner a0dbcc9bb3 Add ui bits to add mailboxes 2018-04-05 21:00:33 +02:00
Johannes Zellner bbe351161f Adjust mailbox wrapper functions 2018-04-05 14:02:56 +02:00
Girish Ramakrishnan 968f515679 Enter works (no need for comma) 2018-04-02 09:27:17 -07:00
Girish Ramakrishnan cbb5cb3702 your -> this 2018-04-02 09:24:24 -07:00
Girish Ramakrishnan 82ed1881ea Remove the mailboxes text 2018-04-02 09:23:29 -07:00
Johannes Zellner 4d13d309d3 Handle reserved alias errors 2018-04-02 15:01:01 +02:00
Johannes Zellner 75eae0d8ec Make asyncForEach available globally to reduce code duplication 2018-04-02 11:35:02 +02:00
Johannes Zellner c329541708 Remove mailinglist handling in users/groups view 2018-04-01 23:10:47 +02:00
Johannes Zellner 10b8e93713 Add mailinglist ui in the mail view 2018-04-01 22:42:21 +02:00
Johannes Zellner 963b1d60b5 Remove mailbox settings from user edit dialog 2018-04-01 20:53:49 +02:00
Johannes Zellner 158271de14 Add alias error reporting 2018-04-01 20:31:16 +02:00
Johannes Zellner baba63889d Add logic to set mailbox aliases 2018-04-01 19:12:06 +02:00
Johannes Zellner d52273a516 move mailbox and catchall sections above relay 2018-04-01 19:11:46 +02:00
Johannes Zellner 1b7556443f Add user table to manage mailboxes per domain
This does not yet handle the aliases
2018-03-30 18:34:00 +02:00
Johannes Zellner 9575a1158a Add user listing to mail view to manage per user mailboxes 2018-03-30 18:06:40 +02:00
Johannes Zellner 8ebcc2f8af Immediately check for new configuration after we check for updates 2018-03-30 15:29:45 +02:00
Johannes Zellner 8d6de76fa0 Show update button and dialog in settings view 2018-03-30 15:12:34 +02:00
Johannes Zellner 0ad813cc8d Move update button into notification instead of pill 2018-03-30 15:12:14 +02:00
Johannes Zellner 63ae9a90cf ensure we call the callback 2018-03-28 14:32:21 +02:00
Johannes Zellner 551912145e Refetch the subscription also on the main controller 2018-03-28 14:19:34 +02:00
Johannes Zellner 611f54c237 LICENSE EXPIRED looks quite harsh 2018-03-28 14:18:58 +02:00
Johannes Zellner 60c9f49b44 Show distinct setup billing button in settings 2018-03-28 12:41:20 +02:00
Johannes Zellner 9f66003755 Show trial state in settings view next to plan name 2018-03-28 12:29:37 +02:00
Johannes Zellner 862e1d94be Remove dead notification code 2018-03-28 12:26:53 +02:00
Johannes Zellner 8196f76847 Show different subscription bubbles based on the billing and subscription status 2018-03-28 12:26:24 +02:00
Johannes Zellner 09f1bb4653 Add alias error reporting 2018-03-27 20:19:17 +02:00
Johannes Zellner f626a1f0b7 Fixup all other async occurances 2018-03-27 19:40:20 +02:00
Johannes Zellner fd609d3e19 Fix poor man's async to break on and report errors 2018-03-27 19:38:09 +02:00
Johannes Zellner 977e83cc22 Do not send empty aliases 2018-03-27 18:34:41 +02:00
Johannes Zellner 59b3cabf7e parent.getSubscription() does not exist anymore 2018-03-26 15:22:39 +02:00
Johannes Zellner 4d85c36c16 Show app message if any on status label hover 2018-03-26 11:08:57 +02:00
Girish Ramakrishnan b762f80812 typo 2018-03-22 12:16:16 -07:00
Girish Ramakrishnan 4e0791eb22 Fix gulpfile to handle rename 2018-03-15 14:32:48 -07:00
Girish Ramakrishnan 392e6d1c98 fix gitignore 2018-03-15 14:25:08 -07:00
Girish Ramakrishnan 5a49a555ad we use the package files from the box repo 2018-03-15 14:24:21 -07:00
Girish Ramakrishnan d59cb63188 move files to dashboard/ 2018-03-15 14:23:51 -07:00
Johannes Zellner 1d0f87f408 Avoid reflow on settings page while fetching current subscription 2018-03-14 23:30:42 +01:00
Johannes Zellner a26264e8ce Remove usage of obsolete undecided subscription plan 2018-03-14 23:28:36 +01:00
Johannes Zellner ed716d7569 Sync the text what a subsription offers 2018-03-14 22:34:57 +01:00
Johannes Zellner f85fca1720 An update is actually a positive action 2018-03-14 20:38:17 +01:00
Johannes Zellner ed2539cbfc Change update dialog title and include version 2018-03-14 20:37:39 +01:00
Johannes Zellner 5405338d20 Remove redundant if condition 2018-03-14 20:10:48 +01:00
Johannes Zellner f8ad2fdc11 currentSubscription is not required anymore 2018-03-14 19:53:36 +01:00
Johannes Zellner a618f2b523 Make update button dependent on the sourceTarballUrl instead of the subscription type 2018-03-14 19:53:36 +01:00
Girish Ramakrishnan 8b5a88ba5e Remove break and just use some margin 2018-03-14 09:09:42 -07:00
Girish Ramakrishnan db9e3b44a1 Revert "Show all apps inactive and blurred in the background of the appstore login form"
This reverts commit b9d6c8f8bb.
2018-03-14 09:04:05 -07:00
Girish Ramakrishnan 634408d3a3 Fix the email instructions 2018-03-13 23:16:15 -07:00
Girish Ramakrishnan 529a668db3 Fix eventlog display 2018-03-13 22:03:25 -07:00
Girish Ramakrishnan c0f01da1cd Make it FREE TRIAL instead 2018-03-13 13:38:19 -07:00
Girish Ramakrishnan 4cbab59fdb Fix the setup billing link 2018-03-13 13:30:33 -07:00
Girish Ramakrishnan ec9c9fb0f5 Fix the subscription dialog text 2018-03-13 13:23:22 -07:00
Girish Ramakrishnan 286d634756 always require terms 2018-03-13 11:06:49 -07:00
Girish Ramakrishnan ca2457bfcb smallcase the Account 2018-03-13 11:00:41 -07:00
Girish Ramakrishnan 459cafdf56 Add description text during signup 2018-03-13 10:59:15 -07:00
Johannes Zellner b9d6c8f8bb Show all apps inactive and blurred in the background of the appstore login form 2018-03-13 10:50:03 +01:00
Johannes Zellner 2da019556b Improve and center appstore login form 2018-03-13 10:21:25 +01:00
Johannes Zellner cbd28bc12f Attempt to better position checkboxes 2018-03-13 10:16:31 +01:00
Johannes Zellner 4332f60cc4 Use the admin domain as the default when installing a new app 2018-03-13 09:38:55 +01:00
Girish Ramakrishnan 950179ee1c Just link to docs instead 2018-03-13 00:29:10 -07:00
Girish Ramakrishnan 803eb4760e Make text clearer 2018-03-13 00:24:33 -07:00
Girish Ramakrishnan 32a41e6c1c Clarify that users need a mailbox to access 2018-03-12 15:49:11 -07:00
Girish Ramakrishnan de195c461b make it text-info 2018-03-12 15:04:37 -07:00
Girish Ramakrishnan 5003a8ea4d Make it text-info for the underline to show 2018-03-12 14:17:58 -07:00
Girish Ramakrishnan caa41b0022 Fix the text to handle multi-domain email 2018-03-12 13:57:50 -07:00
Johannes Zellner c7151d2b8d Reduce newlines 2018-03-12 19:08:15 +01:00
Johannes Zellner 0929ae1a4c Remove unused app feedback dialog 2018-03-12 19:08:05 +01:00
Johannes Zellner 0c79c42c10 Use forum links for missing apps 2018-03-12 19:06:15 +01:00
Girish Ramakrishnan 028b24db03 Don't make the whole dialog red 2018-03-09 15:02:30 -08:00
Johannes Zellner bce3d3f664 Use fqdn instead of location for naked domain apps 2018-03-09 10:17:01 +01:00
Girish Ramakrishnan 828d6f6cc8 Show the provider and format for caas 2018-03-09 00:40:55 -08:00
Girish Ramakrishnan 0a026cc143 Display caas as Managed Cloudron 2018-03-09 00:37:20 -08:00
Girish Ramakrishnan 3bc9a87933 Fix display of caas domain 2018-03-09 00:29:00 -08:00
Girish Ramakrishnan 769f9adc9d Update mail domain when domain is updated 2018-03-08 18:06:50 -08:00
Johannes Zellner b5f53d921e Replace app-request link to point to the new forum 2018-03-08 21:46:16 +01:00
Girish Ramakrishnan 105e9e7825 Use the new app update pattern 2018-03-06 21:30:42 -08:00
Girish Ramakrishnan c8cf050156 Keep it alphabetical 2018-03-05 10:28:22 -08:00
Girish Ramakrishnan b7baafbbe6 actions -> events
also make it all past tense
2018-03-05 10:17:44 -08:00
Girish Ramakrishnan 85dde71ec3 fix display of undefined id
remove id display altogether, it's not very interesting to see it
2018-03-05 10:09:06 -08:00
Girish Ramakrishnan 2970b086a3 Updates -> App Updates 2018-03-05 09:39:03 -08:00
Johannes Zellner 5910709008 Use the correct model attribute for appId in feedback form 2018-03-05 17:10:00 +01:00
Johannes Zellner 2b6ce4f813 Reduce feedback form options and add ability to specify failing app 2018-03-05 12:54:09 +01:00
Johannes Zellner 451c697fb7 Show email as fallback when a user has no username yet 2018-03-05 12:14:20 +01:00
Johannes Zellner 09149318b1 Better format the multiselect element 2018-03-05 12:10:17 +01:00
Johannes Zellner d2d8eb9485 Allow to select multiple actions in the eventlog filter 2018-03-05 12:03:02 +01:00
Johannes Zellner 91265613a9 Prettify eventlog source display 2018-03-02 19:21:24 +01:00
Johannes Zellner 31c414bbe1 Use more readable datetime tooltip format in activity log 2018-03-02 18:58:49 +01:00
Johannes Zellner e2a3654ed7 Give the time more space in the activity log 2018-03-02 18:50:49 +01:00
Johannes Zellner 96d7283534 Do not alternate the background color of the activity log 2018-03-02 18:50:32 +01:00
Girish Ramakrishnan 256a7e322b Keep it all to two words 2018-03-02 09:12:53 -08:00
Johannes Zellner e5b78337ac Show more readable user event data 2018-03-02 13:42:24 +01:00
Johannes Zellner 67ba5aa1c5 fix indentation 2018-03-02 13:19:57 +01:00
Johannes Zellner 848a617f98 Make eventlog entries expandable to show raw event data 2018-03-02 10:50:05 +01:00
Johannes Zellner 1fc7efef0d Improve app related eventlog display 2018-03-02 10:49:46 +01:00
Girish Ramakrishnan 576f6eafbb Rename Chat to Forum 2018-03-01 13:40:10 -08:00
Girish Ramakrishnan 2caf73b5e3 Do not list mail domains and aliases if username is not available 2018-02-28 15:21:42 -08:00
Girish Ramakrishnan 56abb68e0c Link admin link to docs 2018-02-28 13:40:06 -08:00
Girish Ramakrishnan 7aaac5a48a reword email address on domains 2018-02-28 13:26:15 -08:00
Girish Ramakrishnan 8326587886 Give indication that the test is for the relay 2018-02-27 09:24:36 -08:00
Girish Ramakrishnan 466b3f4784 Make the user edit dialog say "Primary email" 2018-02-24 16:42:15 -08:00
Girish Ramakrishnan bccdf548a8 Fix typo making the MX records hidden 2018-02-23 17:04:38 -08:00
Girish Ramakrishnan fa4b1b3d5b Add note that user and group mailboxes must be enabled 2018-02-23 17:02:18 -08:00
Girish Ramakrishnan 9d47fd198f replace chat with forum 2018-02-23 15:53:23 -08:00
Girish Ramakrishnan 5966ee6800 replace terms link with license 2018-02-23 15:25:27 -08:00
Johannes Zellner 2d20e3c13d Scroll to top on category activation 2018-02-23 11:34:39 -08:00
Johannes Zellner 2172f8532d Rework the appstore category list 2018-02-23 11:34:27 -08:00
Johannes Zellner 9dc4318152 Reduce category item size 2018-02-23 11:34:04 -08:00
Johannes Zellner e1a92e7127 Make primary email labels explicit 2018-02-23 10:29:09 -08:00
Girish Ramakrishnan 767b31caa2 Display the pretty domain provider name in the table
This is especially needed to distinguish wildcard/manual.
2018-02-21 10:14:17 -08:00
Johannes Zellner c2232936e0 Replace chat with forum in the support page 2018-02-20 11:55:57 -08:00
Johannes Zellner 4f1bbfd9e3 Make it clear that support ssh button should be enabled only if we ask the user to do so 2018-02-20 11:27:12 -08:00
Johannes Zellner caf57e37dc Add eventlog groups for apps and users 2018-02-20 11:13:51 -08:00
Johannes Zellner 64b8e4ad6c Shorten app ids in eventlog 2018-02-19 01:56:12 -08:00
Johannes Zellner c9d3907124 Add missing whitespace 2018-02-19 01:56:12 -08:00
Girish Ramakrishnan bf6bea800b Add note that user/group mailboxes must be enabled 2018-02-18 12:04:37 -08:00
Johannes Zellner 26f1673d47 Show full fqdn on app grid item hover 2018-02-17 16:01:36 -08:00
Johannes Zellner 08153454a2 Show tooltips immediately for app actions to guide the user 2018-02-09 10:11:23 +01:00
Girish Ramakrishnan efc26ab587 Specify which domain mail should be enabled for 2018-02-08 19:08:00 -08:00
Girish Ramakrishnan e24e0a7e87 br was removed by mistake in 23bc267c46 2018-02-08 15:25:37 -08:00
Johannes Zellner 23bc267c46 Show full fqdn in apps grid for now instead of the domain on the top 2018-02-08 16:17:47 +01:00
Johannes Zellner 35cc592d61 Remove altDomain ui bits 2018-02-08 09:44:35 +01:00
Girish Ramakrishnan 512f6a1166 Remove obsolete action 2018-02-06 23:14:37 -08:00
Johannes Zellner 3160ffec3f The update schedule is only set for the apps now 2018-02-06 19:39:06 +01:00
Johannes Zellner c543d4517f Adjust to new autoupdate pattern rest apis 2018-02-06 19:25:06 +01:00
Girish Ramakrishnan d7334b991b Add DO SGP1 2018-02-05 11:06:40 -08:00
147 changed files with 6148 additions and 11738 deletions
+1 -4
View File
@@ -1,9 +1,6 @@
dist/
node_modules/
coverage/
webadmin/dist/
installer/src/certs/server.key
# vim swap files
*.swp
+3 -3
View File
@@ -1,4 +1,4 @@
# Cloudron
# Cloudron Dashboard
[Cloudron](https://cloudron.io) is the best way to run apps on your server.
@@ -29,7 +29,7 @@ anyone to effortlessly host web applications on their server on their own terms.
* Trivially migrate to another server keeping your apps and data (for example, switch your
infrastructure provider or move to a bigger server).
* Comprehensive [REST API](https://cloudron.io/documentation/developer/api/).
* Comprehensive [REST API](https://cloudron.io/developer/api/).
* [CLI](https://cloudron.io/documentation/cli/) to configure apps.
@@ -59,6 +59,6 @@ the containers in the Cloudron.
## Community
* [Chat](https://chat.cloudron.io/)
* [Forum](https://forum.cloudron.io/)
* [Support](mailto:support@cloudron.io)
+59 -57
View File
@@ -12,26 +12,25 @@ var argv = require('yargs').argv,
sass = require('gulp-sass'),
serve = require('gulp-serve'),
sourcemaps = require('gulp-sourcemaps'),
uglify = require('gulp-uglify'),
url = require('url');
uglify = require('gulp-uglify');
gulp.task('3rdparty', function () {
gulp.src([
'webadmin/src/3rdparty/**/*.js',
'webadmin/src/3rdparty/**/*.map',
'webadmin/src/3rdparty/**/*.css',
'webadmin/src/3rdparty/**/*.otf',
'webadmin/src/3rdparty/**/*.eot',
'webadmin/src/3rdparty/**/*.svg',
'webadmin/src/3rdparty/**/*.gif',
'webadmin/src/3rdparty/**/*.ttf',
'webadmin/src/3rdparty/**/*.woff',
'webadmin/src/3rdparty/**/*.woff2'
'src/3rdparty/**/*.js',
'src/3rdparty/**/*.map',
'src/3rdparty/**/*.css',
'src/3rdparty/**/*.otf',
'src/3rdparty/**/*.eot',
'src/3rdparty/**/*.svg',
'src/3rdparty/**/*.gif',
'src/3rdparty/**/*.ttf',
'src/3rdparty/**/*.woff',
'src/3rdparty/**/*.woff2'
])
.pipe(gulp.dest('webadmin/dist/3rdparty/'));
.pipe(gulp.dest('dist/3rdparty/'));
gulp.src('node_modules/bootstrap-sass/assets/javascripts/bootstrap.min.js')
.pipe(gulp.dest('webadmin/dist/3rdparty/js'));
.pipe(gulp.dest('dist/3rdparty/js'));
});
@@ -44,6 +43,7 @@ if (argv.help || argv.h) {
console.log(' --client-id <clientId>');
console.log(' --client-secret <clientSecret>');
console.log(' --api-origin <cloudron api uri>');
console.log(' --revision <revision>');
process.exit(1);
}
@@ -54,15 +54,17 @@ var oauth = {
clientId: argv.clientId || 'cid-webadmin',
clientSecret: argv.clientSecret || 'unused',
apiOrigin: argv.apiOrigin || '',
apiOriginHostname: argv.apiOrigin ? url.parse(argv.apiOrigin).hostname : ''
};
var revision = argv.revision || '';
console.log();
console.log('Using OAuth credentials:');
console.log(' ClientId: %s', oauth.clientId);
console.log(' ClientSecret: %s', oauth.clientSecret);
console.log(' Cloudron API: %s', oauth.apiOrigin || 'default');
console.log(' Cloudron Host: %s', oauth.apiOriginHostname);
console.log();
console.log('Building for revision: %s', revision);
console.log();
@@ -74,18 +76,18 @@ gulp.task('js-index', function () {
});
gulp.src([
'webadmin/src/js/index.js',
'webadmin/src/js/client.js',
'webadmin/src/js/appstore.js',
'webadmin/src/js/main.js',
'webadmin/src/views/*.js'
'src/js/index.js',
'src/js/client.js',
'src/js/appstore.js',
'src/js/main.js',
'src/views/*.js'
])
.pipe(ejs({ oauth: oauth }, {}, { ext: '.js' }))
.pipe(ejs({ oauth: oauth, revision: revision }, {}, { ext: '.js' }))
.pipe(sourcemaps.init())
.pipe(concat('index.js', { newLine: ';' }))
.pipe(uglifyer)
.pipe(sourcemaps.write())
.pipe(gulp.dest('webadmin/dist/js'));
.pipe(gulp.dest('dist/js'));
});
gulp.task('js-logs', function () {
@@ -95,13 +97,13 @@ gulp.task('js-logs', function () {
console.error(error);
});
gulp.src(['webadmin/src/js/logs.js', 'webadmin/src/js/client.js'])
gulp.src(['src/js/logs.js', 'src/js/client.js'])
.pipe(ejs({ oauth: oauth }, {}, { ext: '.js' }))
.pipe(sourcemaps.init())
.pipe(concat('logs.js', { newLine: ';' }))
.pipe(uglifyer)
.pipe(sourcemaps.write())
.pipe(gulp.dest('webadmin/dist/js'));
.pipe(gulp.dest('dist/js'));
});
gulp.task('js-terminal', function () {
@@ -111,13 +113,13 @@ gulp.task('js-terminal', function () {
console.error(error);
});
gulp.src(['webadmin/src/js/terminal.js', 'webadmin/src/js/client.js'])
gulp.src(['src/js/terminal.js', 'src/js/client.js'])
.pipe(ejs({ oauth: oauth }, {}, { ext: '.js' }))
.pipe(sourcemaps.init())
.pipe(concat('terminal.js', { newLine: ';' }))
.pipe(uglifyer)
.pipe(sourcemaps.write())
.pipe(gulp.dest('webadmin/dist/js'));
.pipe(gulp.dest('dist/js'));
});
gulp.task('js-setup', function () {
@@ -127,13 +129,13 @@ gulp.task('js-setup', function () {
console.error(error);
});
gulp.src(['webadmin/src/js/setup.js', 'webadmin/src/js/client.js'])
gulp.src(['src/js/setup.js', 'src/js/client.js'])
.pipe(ejs({ oauth: oauth }, {}, { ext: '.js' }))
.pipe(sourcemaps.init())
.pipe(concat('setup.js', { newLine: ';' }))
.pipe(uglifyer)
.pipe(sourcemaps.write())
.pipe(gulp.dest('webadmin/dist/js'));
.pipe(gulp.dest('dist/js'));
});
gulp.task('js-setupdns', function () {
@@ -143,13 +145,13 @@ gulp.task('js-setupdns', function () {
console.error(error);
});
gulp.src(['webadmin/src/js/setupdns.js', 'webadmin/src/js/client.js'])
gulp.src(['src/js/setupdns.js', 'src/js/client.js'])
.pipe(ejs({ oauth: oauth }, {}, { ext: '.js' }))
.pipe(sourcemaps.init())
.pipe(concat('setupdns.js', { newLine: ';' }))
.pipe(uglifyer)
.pipe(sourcemaps.write())
.pipe(gulp.dest('webadmin/dist/js'));
.pipe(gulp.dest('dist/js'));
});
gulp.task('js-restore', function () {
@@ -159,13 +161,13 @@ gulp.task('js-restore', function () {
console.error(error);
});
gulp.src(['webadmin/src/js/restore.js', 'webadmin/src/js/client.js'])
gulp.src(['src/js/restore.js', 'src/js/client.js'])
.pipe(ejs({ oauth: oauth }, {}, { ext: '.js' }))
.pipe(sourcemaps.init())
.pipe(concat('restore.js', { newLine: ';' }))
.pipe(uglifyer)
.pipe(sourcemaps.write())
.pipe(gulp.dest('webadmin/dist/js'));
.pipe(gulp.dest('dist/js'));
});
@@ -176,11 +178,11 @@ gulp.task('js-update', function () {
console.error(error);
});
gulp.src(['webadmin/src/js/update.js'])
gulp.src(['src/js/update.js'])
.pipe(sourcemaps.init())
.pipe(uglifyer)
.pipe(sourcemaps.write())
.pipe(gulp.dest('webadmin/dist/js'));
.pipe(gulp.dest('dist/js'));
});
@@ -189,15 +191,15 @@ gulp.task('js-update', function () {
// --------------
gulp.task('html', ['html-views', 'html-templates'], function () {
return gulp.src('webadmin/src/*.html').pipe(ejs({ apiOriginHostname: oauth.apiOriginHostname }, {}, { ext: '.html' })).pipe(gulp.dest('webadmin/dist'));
return gulp.src('src/*.html').pipe(ejs({ revision: revision }, {}, { ext: '.html' })).pipe(gulp.dest('dist'));
});
gulp.task('html-views', function () {
return gulp.src('webadmin/src/views/**/*.html').pipe(gulp.dest('webadmin/dist/views'));
return gulp.src('src/views/**/*.html').pipe(gulp.dest('dist/views'));
});
gulp.task('html-templates', function () {
return gulp.src('webadmin/src/templates/**/*.html').pipe(gulp.dest('webadmin/dist/templates'));
return gulp.src('src/templates/**/*.html').pipe(gulp.dest('dist/templates'));
});
// --------------
@@ -205,18 +207,18 @@ gulp.task('html-templates', function () {
// --------------
gulp.task('css', function () {
return gulp.src('webadmin/src/*.scss')
return gulp.src('src/*.scss')
.pipe(sourcemaps.init())
.pipe(sass({ includePaths: ['node_modules/bootstrap-sass/assets/stylesheets/'] }).on('error', sass.logError))
.pipe(autoprefixer())
.pipe(cssnano())
.pipe(sourcemaps.write())
.pipe(gulp.dest('webadmin/dist'));
.pipe(gulp.dest('dist'));
});
gulp.task('images', function () {
return gulp.src('webadmin/src/img/**')
.pipe(gulp.dest('webadmin/dist/img'));
return gulp.src('src/img/**')
.pipe(gulp.dest('dist/img'));
});
// --------------
@@ -224,25 +226,25 @@ gulp.task('images', function () {
// --------------
gulp.task('watch', ['default'], function () {
gulp.watch(['webadmin/src/*.scss'], ['css']);
gulp.watch(['webadmin/src/img/*'], ['images']);
gulp.watch(['webadmin/src/**/*.html'], ['html']);
gulp.watch(['webadmin/src/views/*.html'], ['html-views']);
gulp.watch(['webadmin/src/templates/*.html'], ['html-templates']);
gulp.watch(['webadmin/src/js/update.js'], ['js-update']);
gulp.watch(['webadmin/src/js/setup.js', 'webadmin/src/js/client.js'], ['js-setup']);
gulp.watch(['webadmin/src/js/setupdns.js', 'webadmin/src/js/client.js'], ['js-setupdns']);
gulp.watch(['webadmin/src/js/restore.js', 'webadmin/src/js/client.js'], ['js-restore']);
gulp.watch(['webadmin/src/js/logs.js', 'webadmin/src/js/client.js'], ['js-logs']);
gulp.watch(['webadmin/src/js/terminal.js', 'webadmin/src/js/client.js'], ['js-terminal']);
gulp.watch(['webadmin/src/js/index.js', 'webadmin/src/js/client.js', 'webadmin/src/js/appstore.js', 'webadmin/src/js/main.js', 'webadmin/src/views/*.js'], ['js-index']);
gulp.watch(['webadmin/src/3rdparty/**/*'], ['3rdparty']);
gulp.watch(['src/*.scss'], ['css']);
gulp.watch(['src/img/*'], ['images']);
gulp.watch(['src/**/*.html'], ['html']);
gulp.watch(['src/views/*.html'], ['html-views']);
gulp.watch(['src/templates/*.html'], ['html-templates']);
gulp.watch(['src/js/update.js'], ['js-update']);
gulp.watch(['src/js/setup.js', 'src/js/client.js'], ['js-setup']);
gulp.watch(['src/js/setupdns.js', 'src/js/client.js'], ['js-setupdns']);
gulp.watch(['src/js/restore.js', 'src/js/client.js'], ['js-restore']);
gulp.watch(['src/js/logs.js', 'src/js/client.js'], ['js-logs']);
gulp.watch(['src/js/terminal.js', 'src/js/client.js'], ['js-terminal']);
gulp.watch(['src/js/index.js', 'src/js/client.js', 'src/js/appstore.js', 'src/js/main.js', 'src/views/*.js'], ['js-index']);
gulp.watch(['src/3rdparty/**/*'], ['3rdparty']);
});
gulp.task('clean', function () {
rimraf.sync('webadmin/dist');
rimraf.sync('dist');
});
gulp.task('default', ['clean', 'html', 'js', '3rdparty', 'images', 'css'], function () {});
gulp.task('develop', ['watch'], serve({ root: 'webadmin/dist', port: 4000 }));
gulp.task('develop', ['watch'], serve({ root: 'dist', port: 4000 }));
+1528 -4612
View File
File diff suppressed because it is too large Load Diff
+17 -100
View File
@@ -1,111 +1,28 @@
{
"name": "cloudron",
"description": "Main code for a cloudron",
"name": "dashboard",
"version": "1.0.0",
"private": true,
"author": {
"name": "Cloudron authors"
"description": "[Cloudron](https://cloudron.io) is the best way to run apps on your server.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.cloudron.io/cloudron/box.git"
},
"engines": {
"node": ">=4.0.0 <=4.1.1"
"url": "ssh://git@git.cloudron.io:6000/cloudron/dashboard.git"
},
"author": "",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@google-cloud/dns": "^0.7.0",
"@google-cloud/storage": "^1.2.1",
"@sindresorhus/df": "^2.1.0",
"async": "^2.6.0",
"aws-sdk": "^2.151.0",
"body-parser": "^1.18.2",
"cloudron-manifestformat": "^2.10.0",
"connect-ensure-login": "^0.1.1",
"connect-lastmile": "^1.0.2",
"connect-timeout": "^1.9.0",
"cookie-parser": "^1.3.5",
"cookie-session": "^1.3.2",
"cron": "^1.3.0",
"csurf": "^1.6.6",
"db-migrate": "^0.10.0-beta.24",
"db-migrate-mysql": "^1.1.10",
"debug": "^3.1.0",
"dockerode": "^2.5.3",
"ejs": "^2.5.7",
"ejs-cli": "^2.0.0",
"express": "^4.16.2",
"express-session": "^1.15.6",
"hat": "0.0.3",
"json": "^9.0.3",
"ldapjs": "^1.0.0",
"lodash.chunk": "^4.2.0",
"mime": "^2.0.3",
"moment-timezone": "^0.5.14",
"morgan": "^1.9.0",
"multiparty": "^4.1.2",
"mysql": "^2.15.0",
"nodemailer": "^4.4.0",
"nodemailer-smtp-transport": "^2.7.4",
"oauth2orize": "^1.11.0",
"once": "^1.3.2",
"parse-links": "^0.1.0",
"passport": "^0.4.0",
"passport-http": "^0.3.0",
"passport-http-bearer": "^1.0.1",
"passport-local": "^1.0.0",
"passport-oauth2-client-password": "^0.1.2",
"password-generator": "^2.2.0",
"progress-stream": "^2.0.0",
"proxy-middleware": "^0.15.0",
"recursive-readdir": "^2.2.1",
"request": "^2.83.0",
"s3-block-read-stream": "^0.2.0",
"safetydance": "^0.7.1",
"semver": "^5.4.1",
"showdown": "^1.8.2",
"split": "^1.0.0",
"superagent": "^3.8.1",
"supererror": "^0.7.1",
"tar-fs": "^1.16.0",
"tar-stream": "^1.5.5",
"tldjs": "^2.2.0",
"underscore": "^1.7.0",
"uuid": "^3.1.0",
"valid-url": "^1.0.9",
"validator": "^9.1.1",
"ws": "^3.3.1"
},
"devDependencies": {
"bootstrap-sass": "^3.3.3",
"expect.js": "*",
"bootstrap-sass": "^3.3.7",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^4.0.0",
"gulp-concat": "^2.4.3",
"gulp-cssnano": "^2.1.0",
"gulp-ejs": "^3.1.0",
"gulp-sass": "^3.1.0",
"gulp-serve": "^1.0.0",
"gulp-sourcemaps": "^2.6.1",
"gulp-autoprefixer": "^5.0.0",
"gulp-concat": "^2.6.1",
"gulp-cssnano": "^2.1.3",
"gulp-ejs": "^3.1.2",
"gulp-sass": "^4.0.1",
"gulp-serve": "^1.4.0",
"gulp-sourcemaps": "^2.6.4",
"gulp-uglify": "^3.0.0",
"hock": "^1.3.2",
"istanbul": "*",
"js2xmlparser": "^3.0.0",
"mocha": "*",
"mock-aws-s3": "git+https://github.com/cloudron-io/mock-aws-s3.git",
"nock": "^9.0.14",
"node-sass": "^4.6.1",
"readdirp": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
"yargs": "^10.0.3"
},
"scripts": {
"migrate_local": "DATABASE_URL=mysql://root:@localhost/box node_modules/.bin/db-migrate up",
"migrate_test": "BOX_ENV=test DATABASE_URL=mysql://root:@localhost/boxtest node_modules/.bin/db-migrate up",
"test": "npm run migrate_test && src/test/setupTest && BOX_ENV=test ./node_modules/istanbul/lib/cli.js test $1 ./node_modules/mocha/bin/_mocha -- --exit -R spec ./src/test ./src/routes/test/[^a]*",
"test_all": "npm run migrate_test && src/test/setupTest && BOX_ENV=test ./node_modules/istanbul/lib/cli.js test $1 ./node_modules/mocha/bin/_mocha -- --exit -R spec ./src/test ./src/routes/test",
"postmerge": "/bin/true",
"precommit": "/bin/true",
"prepush": "npm test",
"webadmin": "node_modules/.bin/gulp"
"rimraf": "^2.6.2",
"yargs": "^11.0.0"
}
}

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB

+10
View File
File diff suppressed because one or more lines are too long
@@ -68,7 +68,7 @@
<footer class="text-center">
<span class="text-muted"><a href="https://cloudron.io" target="_blank">Cloudron</a></span>
<span class="text-muted"><a href="https://twitter.com/cloudron_io" target="_blank">Twitter</a></span>
<span class="text-muted"><a href="https://chat.cloudron.io" target="_blank">Chat <i class="fa fa-comments"></i></a></span>
<span class="text-muted"><a href="https://forum.cloudron.io" target="_blank">Forum <i class="fa fa-comments"></i></a></span>
</footer>
</body>
+8 -9
View File
@@ -3,27 +3,26 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
<meta http-equiv="Content-Security-Policy" content="default-src 'unsafe-inline' 'unsafe-eval' 'self' <%= apiOriginHostname %>; img-src 'self' <%= apiOriginHostname %>;" />
<title> Cloudron Error </title>
<link id="favicon" href="/api/v1/cloudron/avatar" rel="icon" type="image/png">
<link id="favicon" type="image/png" rel="icon" href="/api/v1/cloudron/avatar">
<!-- Theme CSS -->
<link href="theme.css" rel="stylesheet" type="text/css">
<link type="text/css" rel="stylesheet" href="/theme.css">
<!-- external fonts and CSS -->
<link href="3rdparty/css/font-awesome.min.css" rel="stylesheet" rel="stylesheet" type="text/css">
<link type="text/css" rel="stylesheet" href="/3rdparty/css/font-awesome.min.css">
<!-- jQuery-->
<script src="3rdparty/js/jquery.min.js"></script>
<script type="text/javascript" src="/3rdparty/js/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="3rdparty/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/3rdparty/js/bootstrap.min.js"></script>
<!-- Angularjs scripts -->
<script src="3rdparty/js/angular.min.js"></script>
<script src="3rdparty/js/angular-loader.min.js"></script>
<script type="text/javascript" src="/3rdparty/js/angular.min.js"></script>
<script type="text/javascript" src="/3rdparty/js/angular-loader.min.js"></script>
<script>
@@ -92,7 +91,7 @@
<footer class="text-center">
<span class="text-muted">&copy;2018 <a href="https://cloudron.io" target="_blank">Cloudron</a></span>
<span class="text-muted"><a href="https://twitter.com/cloudron_io" target="_blank">Twitter <i class="fa fa-twitter"></i></a></span>
<span class="text-muted"><a href="https://chat.cloudron.io" target="_blank">Chat <i class="fa fa-comments"></i></a></span>
<span class="text-muted"><a href="https://forum.cloudron.io" target="_blank">Forum <i class="fa fa-comments"></i></a></span>
</footer>
</body>

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

+187
View File
@@ -0,0 +1,187 @@
<!DOCTYPE html>
<html ng-app="Application" ng-controller="MainController">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
<!-- this gets changed once we get the config (because angular has not loaded yet, we see template string for a flash) -->
<title> Cloudron </title>
<link id="favicon" type="image/png" rel="icon" href="/api/v1/cloudron/avatar">
<!-- CSS -->
<link type="text/css" rel="stylesheet" href="/3rdparty/slick.css?<%= revision %>"/>
<link type="text/css" rel="stylesheet" href="/3rdparty/angular-ui-notification.min.css?<%= revision %>"/>
<link type="text/css" rel="stylesheet" href="/3rdparty/bootstrap-slider/bootstrap-slider.min.css?<%= revision %>"/>
<link type="text/css" rel="stylesheet" href="/theme.css?<%= revision %>">
<!-- Custom Fonts -->
<link type="text/css" rel="stylesheet" href="/3rdparty/css/font-awesome.min.css?<%= revision %>">
<!-- jQuery-->
<script type="text/javascript" src="/3rdparty/js/jquery.min.js?<%= revision %>"></script>
<!-- toBlob() polyfill-->
<script type="text/javascript" src="/3rdparty/js/canvas-to-blob.min.js?<%= revision %>"></script>
<!-- Bootstrap Core JavaScript -->
<script type="text/javascript" src="/3rdparty/js/bootstrap.min.js?<%= revision %>"></script>
<!-- Slick carousel -->
<script type="text/javascript" src="/3rdparty/js/slick.js?<%= revision %>"></script>
<!-- Angularjs scripts -->
<script type="text/javascript" src="/3rdparty/js/angular.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/angular-loader.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/angular-route.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/angular-animate.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/angular-base64.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/angular-md5.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/angular-sanitize.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/angular-slick.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/angular-ui-notification.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/angular-fittext.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/autofill-event.js?<%= revision %>"></script>
<!-- Angular directives for tldjs -->
<script type="text/javascript" src="/3rdparty/js/tld.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/angular-tld.js?<%= revision %>"></script>
<!-- Angular directives for bootstrap https://angular-ui.github.io/bootstrap/ -->
<script type="text/javascript" src="/3rdparty/js/ui-bootstrap-tpls-1.3.3.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/Chart.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/ansi_up.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/clipboard.min.js?<%= revision %>"></script>
<!-- Showdown (markdown converter) -->
<script type="text/javascript" src="/3rdparty/js/showdown-1.6.4.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/js/showdown-target-blank.min.js?<%= revision %>"></script>
<!-- Bootstrap slider -->
<script type="text/javascript" src="/3rdparty/bootstrap-slider/bootstrap-slider.min.js?<%= revision %>"></script>
<script type="text/javascript" src="/3rdparty/bootstrap-slider/slider.js?<%= revision %>"></script>
<!-- Anugular Multiselect https://github.com/sebastianha/angular-bootstrap-multiselect -->
<script type="text/javascript" src="/3rdparty/js/angular-bootstrap-multiselect.js?<%= revision %>"></script>
<!-- colors -->
<script type="text/javascript" src="/3rdparty/js/colors.js?<%= revision %>"></script>
<!-- moment -->
<script type="text/javascript" src="/3rdparty/js/moment.min.js?<%= revision %>"></script>
<!-- Main Application -->
<script type="text/javascript" src="/js/index.js?<%= revision %>"></script>
</head>
<body>
<script type="text/ng-template" id="notification.html">
<div class="ui-notification">
<h3 ng-show="title" ng-bind-html="title"></h3>
<div class="message">
<a href="{{action}}" ng-show="action" ng-bind-html="message"></a>
<span ng-hide="action" ng-bind-html="message"></span>
</div>
</div>
</script>
<!-- Modal setup subscription -->
<div class="modal fade" id="setupSubscriptionModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Setup Subscription</h4>
</div>
<div class="modal-body">
<p ng-show="config.update.box">
You can update to the next version once you have <a ng-href="{{ config.webServerOrigin + '/console.html#/userprofile?view=subscriptions&email=' + appstoreConfig.profile.emailEncoded + '&cloudronId=' + appstoreConfig.cloudronId }}" target="_blank">setup billing</a>.
</p>
<p>
Our paid plans allow you to install more apps and create more users.
</div>
<div class="modal-footer">
<a class="btn btn-success" ng-click="waitForPlanSelection()" ng-href="{{ config.webServerOrigin + '/console.html#/userprofile?view=subscriptions&email=' + appstoreConfig.profile.emailEncoded + '&cloudronId=' + appstoreConfig.cloudronId }}" target="_blank" ng-disabled="waitingForPlanSelection"><i class="fa fa-circle-o-notch fa-spin" ng-show="waitingForPlanSelection"></i> Setup Subscription</a>
</div>
</div>
</div>
</div>
<div class="animateMe ng-hide layout-root" ng-show="initialized">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top shadow" role="navigation" style="margin-bottom: 0">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand navbar-brand-icon" href="#/"><img ng-src="{{ client.avatar }}" width="40" height="40"/></a>
<a class="navbar-brand" href="#/">{{ config.cloudronName || 'Cloudron' }}</a>
</div>
<!-- /.navbar-header -->
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right" ng-hide="hideNavBarActions">
<li ng-show="ready && subscription.plan.id === 'free'">
<a ng-href="" ng-click="showSubscriptionModal()" style="cursor: pointer">
<!-- trial expired -->
<span class="badge badge-success">Setup Subscription</span>
</a>
</li>
<li ng-show="ready && subscription && subscription.status === 'trialing' && !appstoreConfig.profile.billing">
<a ng-href="{{ config.webServerOrigin + '/console.html#/userprofile?view=credit_card&email=' + appstoreConfig.profile.emailEncoded }}" target="_blank">
<!-- in trial -->
<span class="badge badge-success">Setup Subscription</span>
</a>
</li>
<li>
<a ng-class="{ active: isActive('/apps')}" href="#/apps"><i class="fa fa-cloud-download fa-fw"></i> My Apps</a>
</li>
<li ng-show="user.admin">
<a ng-class="{ active: isActive('/appstore')}" href="#/appstore"><i class="fa fa-th-large fa-fw"></i> App Store</a>
</li>
<li ng-show="user.admin">
<a ng-class="{ active: isActive('/users')}" href="#/users"><i class="fa fa-users fa-fw"></i> Users</a>
</li>
<li class="dropdown">
<a href="" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><img ng-src="{{user.gravatar}}" style="margin-top: -4px;"/> {{user.username}} <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#/account"><i class="fa fa-user fa-fw"></i> Account</a></li>
<li ng-show="user.admin"><a href="#/activity"><i class="fa fa-list-alt fa-fw"></i> Activity</a></li>
<li ng-show="user.admin"><a href="#/tokens"><i class="fa fa-key fa-fw"></i> API Access</a></li>
<li ng-show="user.admin"><a href="#/backups"><i class="fa fa-archive fa-fw"></i> Backups</a></li>
<li ng-show="user.admin"><a href="#/domains"><i class="fa fa-globe fa-fw"></i> Domains</a></li>
<li ng-show="user.admin"><a href="#/email"><i class="fa fa-envelope fa-fw"></i> Email</a></li>
<li ng-show="user.admin"><a href="#/graphs"><i class="fa fa-bar-chart fa-fw"></i> Graphs</a></li>
<li ng-show="user.admin"><a href="#/settings"><i class="fa fa-wrench fa-fw"></i> Settings</a></li>
<li ng-show="user.admin" class="divider"></li>
<li ng-show="user.admin"><a href="#/support"><i class="fa fa-comment fa-fw"></i> Support</a></li>
<li class="divider"></li>
<li><a href="" ng-click="logout($event)"><i class="fa fa-sign-out fa-fw"></i> Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div ng-view id="ng-view" class="layout-content"></div>
<footer class="text-center ng-cloak">
<span class="text-muted">&copy; 2018 <a href="https://cloudron.io" target="_blank">Cloudron</a></span>
<span class="text-muted"> v{{config.version}}</span>
<span class="text-muted"><a href="https://twitter.com/cloudron_io" target="_blank">Twitter <i class="fa fa-twitter"></i></a></span>
<span class="text-muted"><a href="https://forum.cloudron.io" target="_blank">Forum <i class="fa fa-comments"></i></a></span>
</footer>
</div>
</body>
</html>
@@ -143,13 +143,14 @@ angular.module('Application').service('AppStore', ['$http', '$base64', 'Client',
});
};
AppStore.prototype.login = function (email, password, callback) {
AppStore.prototype.login = function (email, password, totpToken, callback) {
if (Client.getConfig().apiServerOrigin === null) return callback(new AppStoreError(420, 'Enhance Your Calm'));
var data = {
email: email,
password: password,
persistent: true
persistent: true,
totpToken: totpToken
};
$http.post(Client.getConfig().apiServerOrigin + '/api/v1/login', data).success(function (data, status) {
@@ -176,6 +177,10 @@ angular.module('Application').service('AppStore', ['$http', '$base64', 'Client',
$http.get(Client.getConfig().apiServerOrigin + '/api/v1/profile', { params: { accessToken: token }}).success(function (data, status) {
if (status !== 200) return callback(new AppStoreError(status, data));
// just some helper property, since angular bindings cannot dot his easily
data.profile.emailEncoded = encodeURIComponent(data.profile.email);
return callback(null, data.profile);
}).error(function (data, status) {
return callback(new AppStoreError(status, data));
+213 -59
View File
@@ -111,7 +111,8 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
id: null,
username: null,
email: null,
admin: false
admin: false,
twoFactorAuthenticationEnabled: false
};
this._config = {
apiServerOrigin: null,
@@ -151,6 +152,10 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
Notification.error({ title: 'Cloudron Error', message: message });
};
Client.prototype.clearNotifications = function () {
Notification.clearAll();
};
/*
Example usage with an action:
@@ -161,10 +166,10 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
Client.notify('title', 'message', true, actionScope);
*/
Client.prototype.notify = function (title, message, persitent, type, actionScope) {
Client.prototype.notify = function (title, message, persistent, type, actionScope) {
var options = { title: title, message: message};
if (persitent) options.delay = 'never'; // any non Number means never timeout
if (persistent) options.delay = 'never'; // any non Number means never timeout
if (actionScope) {
if (typeof actionScope.action !== 'string') throw('an actionScope has to have an action url');
@@ -220,6 +225,8 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
this._userInfo.fallbackEmail = userInfo.fallbackEmail;
this._userInfo.displayName = userInfo.displayName;
this._userInfo.admin = !!userInfo.admin;
this._userInfo.twoFactorAuthenticationEnabled = userInfo.twoFactorAuthenticationEnabled;
this._userInfo.scope = userInfo.scope;
this._userInfo.gravatar = 'https://www.gravatar.com/avatar/' + md5.createHash(userInfo.email) + '.jpg?s=24&d=mm';
this._userInfo.gravatarHuge = 'https://www.gravatar.com/avatar/' + md5.createHash(userInfo.email) + '.jpg?s=128&d=mm';
};
@@ -261,11 +268,17 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
return token;
};
Client.prototype.hasScope = function (scope) {
return this.getUserInfo().scope.split(',').indexOf(scope) !== -1;
};
/*
* Rest API wrappers
*/
Client.prototype.config = function (callback) {
get('/api/v1/cloudron/config').success(function(data, status) {
var configRoute = this.hasScope('cloudron') ? '/api/v1/cloudron/config' : '/api/v1/user/cloudron_config';
get(configRoute).success(function(data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
@@ -329,6 +342,21 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.cloneApp = function (appId, config, callback) {
var data = {
location: config.location,
domain: config.domain,
portBindings: config.portBindings,
backupId: config.backupId
};
post('/api/v1/apps/' + appId + '/clone', data).success(function (data, status) {
if (status !== 201 || typeof data !== 'object') return defaultErrorHandler(callback);
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.restoreApp = function (appId, backupId, password, callback) {
var data = { password: password, backupId: backupId };
post('/api/v1/apps/' + appId + '/restore', data).success(function (data, status) {
@@ -337,6 +365,14 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.backupApp = function (appId, callback) {
var data = { };
post('/api/v1/apps/' + appId + '/backup', data).success(function (data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.uninstallApp = function (appId, password, callback) {
var data = { password: password };
post('/api/v1/apps/' + appId + '/uninstall', data).success(function (data, status) {
@@ -355,12 +391,13 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
cert: config.cert,
key: config.key,
memoryLimit: config.memoryLimit,
altDomain: config.altDomain || null,
xFrameOptions: config.xFrameOptions,
robotsTxt: config.robotsTxt || null,
enableBackup: config.enableBackup
};
if ('mailboxName' in config) data.mailboxName = config.mailboxName;
post('/api/v1/apps/' + id + '/configure', data).success(function (data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
@@ -453,30 +490,38 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.setAutoupdatePattern = function (pattern, callback) {
post('/api/v1/settings/autoupdate_pattern', { pattern: pattern }).success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.checkForUpdates = function (callback) {
var that = this;
if (that._refreshConfigTimer) $interval.cancel(that._refreshConfigTimer);
that._refreshConfigTimer = null;
post('/api/v1/cloudron/check_for_updates', { }).success(function(data, status) {
post('/api/v1/cloudron/check_for_updates', {}).success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
that.refreshConfig(callback);
}).error(defaultErrorHandler(callback));
};
that._refreshConfigTimer = $interval(that.refreshConfig.bind(that), 5000, 20 /* 20 times */);
Client.prototype.setAppAutoupdatePattern = function (pattern, callback) {
post('/api/v1/settings/app_autoupdate_pattern', { pattern: pattern }).success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getAutoupdatePattern = function (callback) {
get('/api/v1/settings/autoupdate_pattern').success(function(data, status) {
Client.prototype.getAppAutoupdatePattern = function (callback) {
get('/api/v1/settings/app_autoupdate_pattern').success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
};
Client.prototype.setBoxAutoupdatePattern = function (pattern, callback) {
post('/api/v1/settings/box_autoupdate_pattern', { pattern: pattern }).success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getBoxAutoupdatePattern = function (callback) {
get('/api/v1/settings/box_autoupdate_pattern').success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
@@ -546,10 +591,10 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.getEventLogs = function (action, search, page, perPage, callback) {
Client.prototype.getEventLogs = function (actions, search, page, perPage, callback) {
var config = {
params: {
action: action,
actions: actions,
search: search,
page: page,
per_page: perPage
@@ -563,12 +608,12 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.getPlatformLogs = function (units, follow, lines, callback) {
Client.prototype.getPlatformLogs = function (unit, follow, lines, callback) {
if (follow) {
var eventSource = new EventSource(client.apiOrigin + '/api/v1/cloudron/logstream?lines=' + lines + '&access_token=' + token + '&units=' + units);
var eventSource = new EventSource(client.apiOrigin + '/api/v1/cloudron/logstream/' + unit + '?lines=' + lines + '&access_token=' + token);
callback(null, eventSource);
} else {
get('/api/v1/cloudron/logs?lines=100&units=' + units).success(function (data, status) {
get('/api/v1/cloudron/logs/' + unit + '?lines=100').success(function (data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
@@ -582,6 +627,13 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.getAppsByUser = function (callback) {
get('/api/v1/user/apps').success(function (data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data.apps);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getAppLogs = function (appId, follow, lines, callback) {
if (follow) {
var eventSource = new EventSource(client.apiOrigin + '/api/v1/apps/' + appId + '/logstream?lines=' + lines + '&access_token=' + token);
@@ -718,14 +770,14 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
if (status !== 201 || typeof data !== 'object') return callback(new ClientError(status, data));
that.setToken(data.token);
that.setUserInfo({ username: username, email: email, admin: true });
that.setUserInfo({ username: username, email: email, admin: true, twoFactorAuthenticationEnabled: false });
callback(null, data.activated);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getOAuthClients = function (callback) {
get('/api/v1/oauth/clients').success(function(data, status) {
get('/api/v1/clients').success(function(data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data.clients);
}).error(defaultErrorHandler(callback));
@@ -738,42 +790,46 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
redirectURI: redirectURI
};
post('/api/v1/oauth/clients', data).success(function(data, status) {
post('/api/v1/clients', data).success(function(data, status) {
if (status !== 201 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data.clients);
}).error(defaultErrorHandler(callback));
};
Client.prototype.delOAuthClient = function (id, callback) {
del('/api/v1/oauth/clients/' + id).success(function(data, status) {
del('/api/v1/clients/' + id).success(function(data, status) {
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.createTokenByClientId = function (id, expiresAt, callback) {
post('/api/v1/oauth/clients/' + id + '/tokens?expiresAt=' + expiresAt).success(function(data, status) {
Client.prototype.createTokenByClientId = function (id, scope, expiresAt, callback) {
var data = {
scope: scope,
expiresAt: expiresAt
};
post('/api/v1/clients/' + id + '/tokens', data).success(function(data, status) {
if (status !== 201) return callback(new ClientError(status, data));
callback(null, data.token);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getTokensByClientId = function (id, callback) {
get('/api/v1/oauth/clients/' + id + '/tokens').success(function(data, status) {
get('/api/v1/clients/' + id + '/tokens').success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.tokens);
}).error(defaultErrorHandler(callback));
};
Client.prototype.delTokensByClientId = function (id, callback) {
del('/api/v1/oauth/clients/' + id + '/tokens').success(function(data, status) {
del('/api/v1/clients/' + id + '/tokens').success(function(data, status) {
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.delToken = function (clientId, tokenId, callback) {
del('/api/v1/oauth/clients/' + clientId + '/tokens/' + tokenId).success(function(data, status) {
del('/api/v1/clients/' + clientId + '/tokens/' + tokenId).success(function(data, status) {
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
@@ -846,11 +902,12 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.feedback = function (type, subject, description, callback) {
Client.prototype.feedback = function (type, subject, description, appId /* optional */, callback) {
var data = {
type: type,
subject: subject,
description: description
description: description,
appId: appId || undefined
};
post('/api/v1/feedback', data).success(function (data, status) {
@@ -922,6 +979,37 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.setTwoFactorAuthenticationSecret = function (callback) {
var data = {};
post('/api/v1/profile/twofactorauthentication', data).success(function(data, status) {
if (status !== 201) return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
};
Client.prototype.enableTwoFactorAuthentication = function (totpToken, callback) {
var data = {
totpToken: totpToken
};
post('/api/v1/profile/twofactorauthentication/enable', data).success(function(data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.disableTwoFactorAuthentication = function (password, callback) {
var data = {
password: password
};
post('/api/v1/profile/twofactorauthentication/disable', data).success(function(data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.refreshUserInfo = function (callback) {
var that = this;
@@ -976,7 +1064,9 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
callback = typeof callback === 'function' ? callback : function () {};
this.getApps(function (error, apps) {
var getAppsFunc = this.hasScope('apps') ? this.getApps : this.getAppsByUser;
getAppsFunc(function (error, apps) {
if (error) return callback(error);
// insert or update new apps
@@ -1066,7 +1156,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
var needed = app.manifest.memoryLimit || DEFAULT_MEMORY_LIMIT; // RAM+Swap
var used = this.getInstalledApps().reduce(function (prev, cur) { return prev + (cur.memoryLimit || cur.manifest.memoryLimit || DEFAULT_MEMORY_LIMIT); }, 0);
var roundedMemory = Math.round(this.getConfig().memory / (1024 * 1024 * 1024)) * 1024 * 1024 * 1024; // round to nearest GB
var totalMemory = roundedMemory * 1.2; // cloudron-system-setup.sh creates equal amount of swap. 1.2 factor is arbitrary
var totalMemory = roundedMemory * 1.5; // cloudron-system-setup.sh creates equal amount of swap. 1.5 factor is arbitrary
var available = (totalMemory || 0) - used;
return (available - needed) >= 0;
@@ -1130,13 +1220,21 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback)); // this doesn't call defaultErrorHandler till we fix domains code to use this directly
};
Client.prototype.addDomain = function (domain, provider, config, fallbackCertificate, tlsConfig, callback) {
Client.prototype.updateMailDomain = function (domain, callback) {
post('/api/v1/mail/' + domain, { }).success(function (data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback)); // this doesn't call defaultErrorHandler till we fix domains code to use this directly
};
Client.prototype.addDomain = function (domain, zoneName, provider, config, fallbackCertificate, tlsConfig, callback) {
var data = {
domain: domain,
provider: provider,
config: config,
tlsConfig: tlsConfig
};
if (zoneName) data.zoneName = zoneName;
var that = this;
if (fallbackCertificate) data.fallbackCertificate = fallbackCertificate;
@@ -1149,18 +1247,21 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.updateDomain = function (domain, provider, config, fallbackCertificate, tlsConfig, callback) {
Client.prototype.updateDomain = function (domain, zoneName, provider, config, fallbackCertificate, tlsConfig, callback) {
var data = {
provider: provider,
config: config,
tlsConfig: tlsConfig
};
if (zoneName) data.zoneName = zoneName;
var that = this;
if (fallbackCertificate) data.fallbackCertificate = fallbackCertificate;
put('/api/v1/domains/' + domain, data).success(function (data, status) {
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
that.updateMailDomain(domain, callback); // this is done so that an out-of-sync dkim key can be synced
}).error(defaultErrorHandler(callback));
};
@@ -1229,7 +1330,14 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
};
Client.prototype.setCatchallAddresses = function (domain, addresses, callback) {
post('/api/v1/mail/' + domain + '/catch_all', { address: addresses }).success(function(data, status) {
post('/api/v1/mail/' + domain + '/catch_all', { addresses: addresses }).success(function(data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.setMailFromValidation = function (domain, enabled, callback) {
post('/api/v1/mail/' + domain + '/mail_from_validation', { enabled: enabled }).success(function(data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
@@ -1239,59 +1347,94 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
Client.prototype.getMailboxes = function (domain, callback) {
get('/api/v1/mail/' + domain + '/mailboxes').success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data);
// filter out app mailboxes
data.mailboxes = data.mailboxes.filter(function (m) { return m.ownerType !== 'app'; });
callback(null, data.mailboxes);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getUserMailbox = function (domain, userId, callback) {
get('/api/v1/mail/' + domain + '/mailboxes/' + userId).success(function(data, status) {
Client.prototype.getMailbox = function (domain, name, callback) {
get('/api/v1/mail/' + domain + '/mailboxes/' + name).success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.mailbox);
}).error(defaultErrorHandler(callback));
};
Client.prototype.enableUserMailbox = function (domain, userId, callback) {
post('/api/v1/mail/' + domain + '/mailboxes/' + userId, {}).success(function(data, status) {
Client.prototype.addMailbox = function (domain, name, userId, callback) {
var data = {
name: name,
userId: userId
};
post('/api/v1/mail/' + domain + '/mailboxes', data).success(function(data, status) {
if (status !== 201) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.disableUserMailbox = function (domain, userId, callback) {
del('/api/v1/mail/' + domain + '/mailboxes/' + userId).success(function(data, status) {
Client.prototype.updateMailbox = function (domain, name, userId, callback) {
var data = {
userId: userId
};
post('/api/v1/mail/' + domain + '/mailboxes/' + name, data).success(function(data, status) {
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.removeMailbox = function (domain, name, callback) {
del('/api/v1/mail/' + domain + '/mailboxes/' + name).success(function(data, status) {
if (status !== 201) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getAliases = function (domain, userId, callback) {
get('/api/v1/mail/' + domain + '/aliases/' + userId).success(function(data, status) {
Client.prototype.listAliases = function (domain, callback) {
get('/api/v1/mail/' + domain + '/aliases').success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.aliases);
}).error(defaultErrorHandler(callback));
};
Client.prototype.setAliases = function (domain, userId, aliases, callback) {
Client.prototype.getAliases = function (domain, name, callback) {
get('/api/v1/mail/' + domain + '/aliases/' + name).success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.aliases);
}).error(defaultErrorHandler(callback));
};
Client.prototype.setAliases = function (domain, name, aliases, callback) {
var data = {
aliases: aliases
};
put('/api/v1/mail/' + domain + '/aliases/' + userId, data).success(function(data, status) {
put('/api/v1/mail/' + domain + '/aliases/' + name, data).success(function(data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getMailingList = function (domain, groupId, callback) {
get('/api/v1/mail/' + domain + '/lists/' + groupId).success(function(data, status) {
Client.prototype.listMailingLists = function (domain, callback) {
get('/api/v1/mail/' + domain + '/lists').success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.lists);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getMailingList = function (domain, name, callback) {
get('/api/v1/mail/' + domain + '/lists/' + name).success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.list);
}).error(defaultErrorHandler(callback));
};
Client.prototype.addMailingList = function (domain, groupId, callback) {
Client.prototype.addMailingList = function (domain, name, members, callback) {
var data = {
groupId: groupId
name: name,
members: members
};
post('/api/v1/mail/' + domain + '/lists', data).success(function(data, status) {
@@ -1300,8 +1443,19 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.removeMailingList = function (domain, groupId, callback) {
del('/api/v1/mail/' + domain + '/lists/' + groupId).success(function(data, status) {
Client.prototype.updateMailingList = function (domain, name, members, callback) {
var data = {
members: members
};
post('/api/v1/mail/' + domain + '/lists/' + name, data).success(function(data, status) {
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.removeMailingList = function (domain, name, callback) {
del('/api/v1/mail/' + domain + '/lists/' + name).success(function(data, status) {
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));

Some files were not shown because too many files have changed in this diff Show More