Compare commits

..

482 Commits

Author SHA1 Message Date
Girish Ramakrishnan 53fed09a5d copy/paste error 2018-09-26 22:21:50 -07:00
Girish Ramakrishnan 4e2d1bd26e Set default cert provider to wildcard
Change it to non-wildcard for manual/noop/wildcard dns

(cherry picked from commit dfa4e20a8f)
2018-09-26 19:54:56 -07:00
Girish Ramakrishnan 477128c586 Change the cert provider selection box text
(cherry picked from commit ee1a194305)
2018-09-26 19:54:48 -07:00
Girish Ramakrishnan 4dec09f639 Move information text out of advanced view
(cherry picked from commit 0fa88855e5)
2018-09-26 19:54:42 -07:00
Girish Ramakrishnan eda3d5c143 Remove invalid dns config notification
The issue is that this value is never really updated unless the box
code is restarted.

Instead, we will fix it to check all domains periodically and send
some email notification.

Fixes cloudron/box#586
2018-09-26 15:13:44 -07:00
Girish Ramakrishnan b450efe5c2 Add SFO2 region in restore UI 2018-09-26 12:02:03 -07:00
Girish Ramakrishnan ca76626d55 Add checkbox UI for mailbox location
part of cloudron/box#587
2018-09-25 11:27:43 -07:00
Girish Ramakrishnan ed887953b6 typo 2018-09-12 20:19:40 -07:00
Girish Ramakrishnan 04debe3ea3 port80 requirement is more complex 2018-09-12 15:57:01 -07:00
Girish Ramakrishnan 4312096dd2 Add a wildcard provider option 2018-09-12 13:12:40 -07:00
Girish Ramakrishnan 94b079fa7b Show the title in port bindings instead of the long description 2018-09-12 11:22:02 -07:00
Girish Ramakrishnan 0373d86349 Fix error code 2018-09-10 11:22:29 -07:00
Girish Ramakrishnan 0f5c290785 we now return 424 2018-09-10 10:37:15 -07:00
Girish Ramakrishnan c79f43bb27 do spaces: sfo2 is now available 2018-09-10 09:27:08 -07:00
Girish Ramakrishnan 184ad3bc4e wildcard dns is now a provider 2018-09-06 20:12:25 -07:00
Girish Ramakrishnan aa0a4ae3e9 Handle locked domains 2018-09-05 23:23:27 -07:00
Girish Ramakrishnan ff9c4b407f Add help text 2018-09-05 21:46:26 -07:00
Girish Ramakrishnan c3b01d477e Typo 2018-09-05 21:31:44 -07:00
Girish Ramakrishnan 3c0641745b backups: Hide prefix for noop 2018-09-05 17:32:53 -07:00
Girish Ramakrishnan 7186a0c41b information text for hyphenated subdomain 2018-09-05 17:20:17 -07:00
Girish Ramakrishnan 4c3bc7450e domain: hide del button for admin domain 2018-09-05 17:15:30 -07:00
Girish Ramakrishnan 02f04e2d33 Disable various views for non-operators 2018-09-05 15:35:30 -07:00
Johannes Zellner 97b6e4c672 Just display subscription error message in the ui 2018-09-05 17:14:01 +02:00
Girish Ramakrishnan 2fd1caa2aa caas: Fix display of alternateDomain 2018-09-04 12:10:21 -07:00
Girish Ramakrishnan cb25217c48 Fix the edition name 2018-08-31 08:06:04 -07:00
Johannes Zellner ab70bc663d No need to show button to setup billing
Either it has a subscription or not, no trials anymore
This will not show any cc setup button now for other plans like
education
2018-08-29 23:24:24 +02:00
Johannes Zellner 0cfe931cd1 We do not have trials anymore 2018-08-29 23:22:47 +02:00
Girish Ramakrishnan 29bddb5fcb Fix derivation of adminFqdn 2018-08-28 22:35:02 -07:00
Girish Ramakrishnan cb7d160346 Add more backup interval secs 2018-08-28 22:10:17 -07:00
Girish Ramakrishnan 507c8b8786 Add hyphenatedSubdomains checkbox to setup page 2018-08-28 21:59:03 -07:00
Girish Ramakrishnan 60107147c2 derive features from edition 2018-08-28 21:58:59 -07:00
Girish Ramakrishnan be2afec86b spaces: Fix text 2018-08-28 20:32:07 -07:00
Girish Ramakrishnan d316d216db spaces: use edition instead of setting 2018-08-28 19:36:26 -07:00
Girish Ramakrishnan dd53d0d575 caas+spaces: location suffix fix 2018-08-28 14:22:40 -07:00
Girish Ramakrishnan 0f6c0a2ccd Use spaces suffix that replaces dots in username
This assumes usernames only have . or - but not both
2018-08-28 12:23:14 -07:00
Girish Ramakrishnan 937a165711 spaces: Strip the trailing username when configuring 2018-08-28 10:38:53 -07:00
Girish Ramakrishnan 22c402ca3d clone: subdomain hyphenation 2018-08-27 21:40:49 -07:00
Girish Ramakrishnan eddbd4fddc Do the filter later 2018-08-27 21:06:07 -07:00
Girish Ramakrishnan 0e43ca31a3 spaces: add username suffix when installing apps 2018-08-27 20:45:09 -07:00
Girish Ramakrishnan 9c90a20b4d Get token name as input 2018-08-27 16:04:16 -07:00
Girish Ramakrishnan 764e7e7d1f Fix indent 2018-08-27 15:40:23 -07:00
Girish Ramakrishnan 0e8cb00233 Display token name 2018-08-27 15:34:46 -07:00
Girish Ramakrishnan 0a1a011338 Move the API token to account page
The OAuth page is less and less useful. Moreover, the tokens are
actually tied to the user and not for the system.
2018-08-27 15:26:52 -07:00
Girish Ramakrishnan 3dfcd9324d invite -> setup link 2018-08-27 15:08:09 -07:00
Girish Ramakrishnan 3e4ac4a0ca Keep it short (and abstract) 2018-08-27 13:50:13 -07:00
Girish Ramakrishnan be1795d50d domains: make the certs setup more descriptive 2018-08-27 13:19:57 -07:00
Girish Ramakrishnan 0b0b06baa9 certs: Rename Self-Signed to custom 2018-08-27 12:04:55 -07:00
Girish Ramakrishnan b789cd2af0 Fix incorrect title of invitation dialog 2018-08-27 11:43:24 -07:00
Johannes Zellner 0871403c0a Support hyphenated subdomains in install and configure dialogs 2018-08-22 17:25:27 +02:00
Johannes Zellner 53a34d9352 Support hyphenatedSubdomains property in domains view 2018-08-22 11:54:37 +02:00
Girish Ramakrishnan fe23551b04 Show the doc link in the post install confirm body 2018-08-21 19:21:03 -07:00
Girish Ramakrishnan 484b6477d3 Fix duplicate id in app configure form 2018-08-20 09:44:30 -07:00
Girish Ramakrishnan 8ebe04c2ff Do not send invite email when invite button is pressed 2018-08-17 16:26:16 -07:00
Girish Ramakrishnan 672d6b0856 Add backup interval
Part of cloudron/box#568
2018-08-13 22:40:05 -07:00
Girish Ramakrishnan 0c066fafa2 remove backup default comment 2018-08-13 22:22:46 -07:00
Girish Ramakrishnan 6c574ead94 Make UDP ports configurable
Part of cloudron/box#504
2018-08-13 09:15:21 -07:00
Girish Ramakrishnan 31a62313bb Reconfigure email apps when email is enabled/disabled 2018-08-12 13:21:17 -07:00
Johannes Zellner 4dacf7064f Apps already use singular document tag 2018-08-06 22:22:49 +02:00
Johannes Zellner e900e4de77 Add Documents category 2018-08-06 21:46:24 +02:00
Girish Ramakrishnan 4ce6939b79 spaces: show based on plan id 2018-08-06 10:53:16 -07:00
Girish Ramakrishnan 8430fd1473 Fix more errors in clone UI 2018-08-06 00:46:10 -07:00
Girish Ramakrishnan ac7c54e273 Fix errors in the clone form 2018-08-06 00:34:40 -07:00
Girish Ramakrishnan 6c9a3b530d Display restore error on page load 2018-08-05 23:30:22 -07:00
Girish Ramakrishnan 2f2c70d1df Set the users when creating group 2018-08-05 22:19:54 -07:00
Girish Ramakrishnan a78c991330 Give some fixed width to the columns 2018-08-05 22:10:45 -07:00
Girish Ramakrishnan 8f9349ec53 Remove double "this" 2018-08-05 21:43:34 -07:00
Girish Ramakrishnan bc6be6a9ad Fix indent 2018-08-05 21:40:18 -07:00
Girish Ramakrishnan a9b7c2795a Fix styling 2018-08-05 21:34:47 -07:00
Girish Ramakrishnan cd81cc8cb8 Refine the text 2018-08-05 21:09:16 -07:00
Girish Ramakrishnan 473b35d807 Query backup config only for admins 2018-08-03 23:35:37 -07:00
Girish Ramakrishnan 0c04d5bfc8 spaces: fetch users/groups/domains 2018-08-03 23:27:21 -07:00
Girish Ramakrishnan eed460f435 Fetch complete app object for owner 2018-08-03 23:00:25 -07:00
Girish Ramakrishnan d742982973 spaces: default the access restriction to just the user 2018-08-03 22:51:53 -07:00
Girish Ramakrishnan c8263077a2 appstore app object has no location or accessRestriction 2018-08-03 22:29:52 -07:00
Girish Ramakrishnan eae01bdbd9 appId is not needed in configure route 2018-08-03 18:44:30 -07:00
Girish Ramakrishnan 1ebafbbc20 spaces: fixup user interface 2018-08-03 18:38:00 -07:00
Girish Ramakrishnan a525bb0257 Missed this 2018-08-03 17:47:02 -07:00
Girish Ramakrishnan cf5cf9e42f Remove usage of tokenScopes and caps 2018-08-03 10:13:57 -07:00
Girish Ramakrishnan 7969dff043 Add UI for enabling spaces 2018-08-03 09:44:56 -07:00
Girish Ramakrishnan d73f7304b3 Copy admin flag 2018-08-03 09:34:58 -07:00
Johannes Zellner 4400b0117a Fix linter issues 2018-08-02 22:17:27 +02:00
Johannes Zellner 739c91b1c6 Do not throw errors if a group has a uid which is not yet known
This can happen if the users have not yet loaded fully
2018-08-02 22:16:57 +02:00
Girish Ramakrishnan 510115ade9 Show danger color if update fails 2018-08-01 17:02:09 -07:00
Girish Ramakrishnan 8c2d79b75e Show app id in info dialog 2018-08-01 12:37:17 -07:00
Johannes Zellner 1a31fb78e5 Add homescreen icons for mobile 2018-07-30 22:05:20 +02:00
Girish Ramakrishnan 97f4d5e3ac Show busy indicator when toggling email 2018-07-30 11:30:49 -07:00
Girish Ramakrishnan d0b17f7e7b Delete any endpoint configuration when using s3 2018-07-30 07:29:22 -07:00
Girish Ramakrishnan eb74aaff3b Display restore errors
Part of cloudron/box#505
2018-07-29 20:48:37 -07:00
Girish Ramakrishnan 9108b665a8 restore: show encrytion field for rsync format 2018-07-29 19:51:44 -07:00
Girish Ramakrishnan e449147ed4 setup: Make it wider 2018-07-29 19:46:52 -07:00
Girish Ramakrishnan 53e82876dd setup: add link to hide advanced settings 2018-07-29 19:43:36 -07:00
Girish Ramakrishnan dd4a4518b3 Allow backup key to be set for rsync format
Part of #440
2018-07-28 09:13:42 -07:00
Girish Ramakrishnan a9e46c64b1 Show group members 2018-07-26 23:58:25 -07:00
Girish Ramakrishnan fb85770fd3 admin group is now gone 2018-07-26 23:42:38 -07:00
Girish Ramakrishnan 9e9e651714 admin is now simply a flag 2018-07-26 15:54:21 -07:00
Girish Ramakrishnan 314da7ace8 Fix API of Client.createUser 2018-07-26 15:52:10 -07:00
Girish Ramakrishnan 54103ca120 Revert role support 2018-07-26 11:38:20 -07:00
Girish Ramakrishnan be86a3022f Call the new setDnsRecords route 2018-07-25 10:52:06 -07:00
Girish Ramakrishnan 91ecab08da Fix typo 2018-07-24 22:40:27 -07:00
Girish Ramakrishnan cae445556e Allow groups to be set during user add 2018-07-24 22:38:53 -07:00
Girish Ramakrishnan 8c2af87857 Fix coding style 2018-07-24 22:31:22 -07:00
Girish Ramakrishnan 2d44e356d3 Add user multi-select to group edit dialog 2018-07-24 22:25:44 -07:00
Girish Ramakrishnan dec1931f07 Make groups a multiselect
With many groups, it overflows and very cluttered
2018-07-24 21:36:52 -07:00
Girish Ramakrishnan 46473c3756 Show displayName in user listing 2018-07-24 15:20:25 -07:00
Girish Ramakrishnan cd893edfcf Add display name to user edit 2018-07-24 15:17:51 -07:00
Girish Ramakrishnan 84302c1739 Fix the text 2018-07-24 14:38:47 -07:00
Girish Ramakrishnan d6f6b4bfe5 Display hostname in mail status
Many are copy/pasting the domain directly into the DNS UI and it fails.
2018-07-24 14:34:26 -07:00
Girish Ramakrishnan 8c6531b6fb Add Mailjet 2018-07-23 16:47:24 -07:00
Girish Ramakrishnan f4993a7e58 Change redirection text 2018-07-16 18:39:22 -07:00
Girish Ramakrishnan cc812c2177 Add user transfer event 2018-07-05 13:54:05 -07:00
Girish Ramakrishnan e11dc028d1 Transfer deleted user's resources 2018-07-05 13:44:00 -07:00
Johannes Zellner e314910a76 Ensure we uri encode the email query param for setup links 2018-07-04 11:10:13 +02:00
Johannes Zellner ee9140c365 Use the correct object to reset alternateDomains 2018-07-03 18:04:25 +02:00
Johannes Zellner ce4ccc21dd Set better defaults and placeholder text for alternate domains 2018-07-03 18:04:03 +02:00
Johannes Zellner 6108fcf17b Put the alternate domain settings behind a checkbox 2018-07-03 18:00:22 +02:00
Johannes Zellner cd3fb77033 Add support for one alternate domain which redirects 2018-06-29 23:42:13 +02:00
Johannes Zellner 0697274311 Remove very odd unused line 2018-06-29 23:42:13 +02:00
Girish Ramakrishnan 11f5aaaf3b Pass on the tokenScopes 2018-06-29 09:09:25 -07:00
Girish Ramakrishnan 8f0b66bd98 Rework config routes
The config route now returns non-sensitive information under the
profile scope.

Caas config is a separate route

Update config is a separate route
2018-06-28 17:50:33 -07:00
Girish Ramakrishnan 3be660dcd9 If user has no appstore scope, we cannot get subscription info 2018-06-27 18:15:48 -07:00
Girish Ramakrishnan 3bb82d5e68 Use app ts to determine whether to refetch app 2018-06-26 19:54:18 -07:00
Girish Ramakrishnan 3f9f1480d3 The uninstall id gets cleared 2018-06-26 19:47:48 -07:00
Girish Ramakrishnan 948c446362 typo 2018-06-26 19:47:48 -07:00
Girish Ramakrishnan 25f888e0d8 Get detailed app information if user can manage apps 2018-06-26 17:56:23 -07:00
Girish Ramakrishnan 98661de24e Fix error message display in configure dialog 2018-06-26 17:35:48 -07:00
Girish Ramakrishnan a833ceb737 Insert the app sorted into the cache 2018-06-26 17:12:55 -07:00
Girish Ramakrishnan b41d0379f0 Only refresh the individual app that is being managed 2018-06-26 10:22:38 -07:00
Girish Ramakrishnan df6da7dd1c logs: installedApps is not used 2018-06-26 10:21:43 -07:00
Girish Ramakrishnan 24ca5bc990 Refactor logic into _updateAppCache 2018-06-26 10:21:36 -07:00
Girish Ramakrishnan e3e62b8407 refresh immediately 2018-06-26 10:19:50 -07:00
Girish Ramakrishnan 0c98e6f4ca Mark it as internal function 2018-06-26 08:34:05 -07:00
Girish Ramakrishnan 6034121695 Make clone return data 2018-06-26 08:33:04 -07:00
Girish Ramakrishnan afe837e30a Remove used of Client.onApps 2018-06-25 20:15:24 -07:00
Girish Ramakrishnan f3cf640e21 terminal: use Client.getApp instead of refreshInstalledApps 2018-06-25 19:19:56 -07:00
Girish Ramakrishnan 8d98cefcca terminal: Remove unused dropdown logic 2018-06-25 19:10:26 -07:00
Girish Ramakrishnan bdf57a5c0a remove dead code 2018-06-25 19:10:00 -07:00
Girish Ramakrishnan 37f108d9f7 logs: remove dep on refreshInstalledApps 2018-06-25 18:58:11 -07:00
Girish Ramakrishnan 091663afe0 Add Client.getApp that uses REST API 2018-06-25 18:55:07 -07:00
Girish Ramakrishnan a77918bef9 Client.onReady has already loaded the app list 2018-06-25 18:27:40 -07:00
Girish Ramakrishnan f167714ea1 add note 2018-06-25 18:27:05 -07:00
Girish Ramakrishnan 1cab172169 Adapt UI logic to get user/group configuration for each user/group 2018-06-25 16:23:28 -07:00
Girish Ramakrishnan 35c3df5a18 Adapt UI logic to get domain configuration for each domain 2018-06-25 15:33:21 -07:00
Girish Ramakrishnan b9a6f46543 Check for 403 for incorrect password 2018-06-18 18:57:00 -07:00
Girish Ramakrishnan 12b1909c7a Add roles UI creating and editing a group 2018-06-18 18:48:54 -07:00
Girish Ramakrishnan 5bd57b6dbd lint 2018-06-18 18:34:19 -07:00
Girish Ramakrishnan 961220be3f tokenScope -> tokenScopes 2018-06-18 15:09:16 -07:00
Girish Ramakrishnan 4db703aeb1 Make the UI capability based 2018-06-17 18:24:45 -07:00
Girish Ramakrishnan cec1cc7086 scope -> tokenScope 2018-06-17 15:29:10 -07:00
Girish Ramakrishnan 2bacbe6701 caas: disable enable email button instead of hiding it 2018-06-16 11:28:13 -07:00
Girish Ramakrishnan 3c65d88c65 caas: disable editing managed domain 2018-06-16 11:22:41 -07:00
Girish Ramakrishnan 726a1c37cc caas: show the backups view, just not the configure button 2018-06-16 11:14:45 -07:00
Girish Ramakrishnan 63f2bbb253 wrong password is 401 2018-06-15 20:54:15 -07:00
Girish Ramakrishnan 7f11cc0daf add note 2018-06-15 17:16:50 -07:00
Girish Ramakrishnan f32884b3b2 Add button for backup logs 2018-06-15 09:55:19 -07:00
Johannes Zellner 97465c1bd8 Last one to open the terminal in a new tab from within the logs view 2018-06-15 17:03:00 +02:00
Johannes Zellner ce0a1ce38a Also open platform and email logs in a new tab instead of a window 2018-06-15 16:45:34 +02:00
Johannes Zellner f5060a0d4f Open logs and terminal in a new tab instead of a window 2018-06-15 16:42:04 +02:00
Johannes Zellner bb34c8a242 Ignore button clicks when post install is not yet confirmed
Angular does not remove the click handler on ng-disabled :-/
2018-06-15 13:39:33 +02:00
Johannes Zellner 34fd733bb7 Fix mouse cursor state in app grid 2018-06-15 13:39:07 +02:00
Johannes Zellner 19b65460ff Do not show postinstall if the app is not ready yet 2018-06-15 13:35:46 +02:00
Girish Ramakrishnan edf277fcaf Feedback API has moved to cloudron scope 2018-06-14 20:04:38 -07:00
Girish Ramakrishnan 9db334c2a4 Show backup notification in main.js instead 2018-06-14 12:59:25 -07:00
Johannes Zellner 1039d9c95e Remove postinstall message from the appstore view
This is now shown on first click
2018-06-14 16:07:29 +02:00
Johannes Zellner 37c8b2b57f Make the user confirm the post install message on first time clicking the app icon 2018-06-14 15:46:55 +02:00
Girish Ramakrishnan 461fb0144e Fix wording 2018-06-13 12:25:29 -07:00
Girish Ramakrishnan 60a9c60f40 Fix typo preventing email from getting enabled 2018-06-12 19:18:47 -07:00
Girish Ramakrishnan 869a6b5a51 Add email to setupLink 2018-06-12 17:59:04 -07:00
Girish Ramakrishnan 133e101f83 Fix download logs button 2018-06-12 14:50:18 -07:00
Girish Ramakrishnan 6ecadb2308 Remove unused readFileLocally 2018-06-12 14:33:19 -07:00
Girish Ramakrishnan 0d3ff81d6c Fix UI jumpiness 2018-06-12 14:24:17 -07:00
Girish Ramakrishnan e938886629 Add box logs to support view 2018-06-12 14:05:58 -07:00
Girish Ramakrishnan aa32055aa8 lint 2018-06-12 13:37:31 -07:00
Girish Ramakrishnan 59481c37bc Remove redundant user.admin check 2018-06-12 13:31:23 -07:00
Girish Ramakrishnan 0b868dad2d remove the thanks (it is a bug report) 2018-06-12 13:20:08 -07:00
Girish Ramakrishnan 3c063a2263 Remove one section since I want to add the logs section 2018-06-12 12:55:44 -07:00
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
151 changed files with 7860 additions and 12743 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

+182
View File
@@ -0,0 +1,182 @@
<!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">
<link rel="apple-touch-icon" href="/api/v1/cloudron/avatar">
<link 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">
<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 || config.features.spaces">
<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 && config.features.operatorActions" class="divider"></li>
<li ng-show="user.admin && config.features.operatorActions"><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));
+371 -111
View File
@@ -2,6 +2,7 @@
/* global angular */
/* global EventSource */
/* global asyncForEach */
angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'Notification', function ($http, $interval, md5, Notification) {
var client = null;
@@ -105,13 +106,12 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
function Client() {
this._ready = false;
this._configListener = [];
this._appsListener = [];
this._readyListener = [];
this._userInfo = {
id: null,
username: null,
email: null,
admin: false
twoFactorAuthenticationEnabled: false
};
this._config = {
apiServerOrigin: null,
@@ -123,17 +123,17 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
progress: {},
region: null,
size: null,
memory: 0
memory: 0,
edition: null
};
this._installedApps = [];
this._installedAppsById = {};
this._clientId = '<%= oauth.clientId %>';
this._clientSecret = '<%= oauth.clientSecret %>';
// window.location fallback for websocket connections which do not have relative uris
this.apiOrigin = '<%= oauth.apiOrigin %>' || window.location.origin;
this.avatar = '';
this._refreshConfigTimer = null;
this.resetAvatar();
this.setToken(localStorage.token);
@@ -151,6 +151,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 +165,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');
@@ -200,11 +204,6 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
if (this._config && this._config.apiServerOrigin) callback(this._config);
};
Client.prototype.onApps = function (callback) {
this._appsListener.push(callback);
callback(this._installedApps);
};
Client.prototype.resetAvatar = function () {
this.avatar = this.apiOrigin + '/api/v1/cloudron/avatar?' + String(Math.random()).slice(2);
@@ -219,7 +218,8 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
this._userInfo.email = userInfo.email;
this._userInfo.fallbackEmail = userInfo.fallbackEmail;
this._userInfo.displayName = userInfo.displayName;
this._userInfo.admin = !!userInfo.admin;
this._userInfo.twoFactorAuthenticationEnabled = userInfo.twoFactorAuthenticationEnabled;
this._userInfo.admin = userInfo.admin;
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';
};
@@ -230,6 +230,13 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
// provide fallback to caas
if (!config.provider) config.provider = 'caas';
// derive feature flags from edition
config.features = {
spaces: config.edition === 'education',
hyphenatedSubdomains: config.edition === 'hostingprovider',
operatorActions: config.edition !== 'hostingprovider'
};
angular.copy(config, this._config);
this._configListener.forEach(function (callback) {
@@ -265,7 +272,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
* Rest API wrappers
*/
Client.prototype.config = function (callback) {
get('/api/v1/cloudron/config').success(function(data, status) {
get('/api/v1/config').success(function(data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
@@ -329,6 +336,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, data);
}).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 +359,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) {
@@ -347,7 +377,6 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
Client.prototype.configureApp = function (id, config, callback) {
var data = {
appId: id,
location: config.location,
domain: config.domain,
portBindings: config.portBindings,
@@ -355,12 +384,14 @@ 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
enableBackup: config.enableBackup,
};
if ('mailboxName' in config) data.mailboxName = config.mailboxName;
if ('alternateDomains' in config) data.alternateDomains = config.alternateDomains;
post('/api/v1/apps/' + id + '/configure', data).success(function (data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
@@ -453,30 +484,45 @@ 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) {
Client.prototype.getUpdateInfo = function (callback) {
get('/api/v1/cloudron/update').success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null);
callback(null, data);
}).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));
@@ -498,6 +544,13 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.getCaasConfig = function (callback) {
get('/api/v1/caas/config').success(function(data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
};
Client.prototype.addAuthorizedKey = function (key, callback) {
put('/api/v1/cloudron/ssh/authorized_keys', { key: key }).success(function (data, status) {
if (status !== 201) return callback(new ClientError(status, data));
@@ -546,10 +599,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 +616,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));
@@ -608,6 +661,13 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.getUser = function (userId, callback) {
get('/api/v1/users/' + userId).success(function (data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getGroups = function (callback) {
get('/api/v1/groups').success(function (data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
@@ -640,6 +700,29 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.updateGroup = function (id, name, callback) {
var data = {
name: name
};
post('/api/v1/groups/' + id, data).success(function(data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
};
Client.prototype.setGroupMembers = function (id, userIds, callback) {
var data = {
userIds: userIds
};
put('/api/v1/groups/' + id + '/members', data).success(function(data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
};
Client.prototype.removeGroup = function (groupId, password, callback) {
var config = {
data: {
@@ -657,6 +740,13 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
};
Client.prototype.getApp = function (appId, callback) {
get('/api/v1/apps/' + appId).success(function (data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getCachedApp = function (appId, callback) {
var appFound = null;
this._installedApps.some(function (app) {
if (app.id === appId) {
@@ -678,17 +768,24 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
};
};
Client.prototype.sendInvite = function (user, callback) {
post('/api/v1/users/' + user.id + '/invite').success(function (data, status) {
Client.prototype.createInvite = function (userId, callback) {
post('/api/v1/users/' + userId + '/create_invite').success(function (data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.resetToken);
}).error(defaultErrorHandler(callback));
};
Client.prototype.sendInvite = function (userId, callback) {
post('/api/v1/users/' + userId + '/send_invite').success(function (data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.setupDnsConfig = function (domain, zoneName, provider, dnsConfig, tlsConfig, callback) {
var data = {
domain: domain,
adminFqdn: 'my.' + domain,
adminFqdn: 'my' + (dnsConfig.hyphenatedSubdomains ? '-' : '.' ) + domain,
zoneName: zoneName,
provider: provider,
config: dnsConfig,
@@ -718,14 +815,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 +835,47 @@ 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, name, callback) {
var data = {
scope: scope,
expiresAt: expiresAt,
name: name || ''
};
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 +948,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) {
@@ -859,14 +962,14 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.createUser = function (username, email, displayName, sendInvite, callback) {
Client.prototype.createUser = function (user, callback) {
var data = {
email: email,
displayName: displayName,
invite: !!sendInvite
email: user.email,
displayName: user.displayName,
admin: user.admin
};
if (username !== null) data.username = username;
if (user.username !== null) data.username = user.username;
post('/api/v1/users', data).success(function(data, status) {
if (status !== 201 || typeof data !== 'object') return callback(new ClientError(status, data));
@@ -878,7 +981,8 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
var data = {
email: user.email,
displayName: user.displayName,
fallbackEmail: user.fallbackEmail
fallbackEmail: user.fallbackEmail,
admin: user.admin
};
post('/api/v1/users/' + user.id, data).success(function(data, status) {
@@ -887,6 +991,17 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.transferOwnership = function (oldOwnerId, newOwnerId, callback) {
var data = {
ownerId: newOwnerId
};
post('/api/v1/users/' + oldOwnerId + '/transfer', data).success(function (data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.removeUser = function (userId, password, callback) {
var config = {
data: {
@@ -922,6 +1037,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;
@@ -943,13 +1089,16 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
this.config(function (error, result) {
if (error) return callback(error);
that.setConfig(result);
that.getUpdateInfo(function (error, info) { // note: non-admin users may get access denied for this
if (!error) result.update = info.update; // attach update information to config object
callback(null);
that.setConfig(result);
callback(null);
});
});
};
Client.prototype.appPostProcess = function (app) {
Client.prototype._appPostProcess = function (app) {
// calculate the icon paths
var icons = this.getAppIconUrls(app);
app.iconUrl = icons.cloudron;
@@ -968,9 +1117,69 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
app.message = installationProgress.replace(/.*, /,'');
}
// amend the post install confirm state
app.pendingPostInstallConfirmation = !!localStorage['confirmPostInstall_' + app.id];
return app;
};
function binarySearch(array, pred) {
var lo = -1, hi = array.length;
while (1 + lo !== hi) {
var mi = lo + ((hi - lo) >> 1);
if (pred(array[mi])) {
hi = mi;
} else {
lo = mi;
}
}
return hi;
}
Client.prototype._updateAppCache = function (app) {
var found = -1;
// find by id and not by loc because the app's fqdn might have changed between invokations
for (var i = 0; i < this._installedApps.length; ++i) {
if (this._installedApps[i].id === app.id) {
found = i;
break;
}
}
var tmp = {};
angular.copy(app, tmp);
this._appPostProcess(tmp);
// only replace if the app is already known
if (found !== -1 && this._installedApps[found].fqdn === tmp.fqdn) { // app location has not changed
angular.copy(tmp, this._installedApps[found]);
} else {
if (found !== -1) this._installedApps.splice(found, 1); // remove it
var loc = binarySearch(this._installedApps, function (item) { return item.fqdn.localeCompare(app.fqdn) <= 0; });
this._installedApps.splice(loc, 0, tmp); // insert into sorted fqdn array
}
this._installedAppsById[app.id] = this._installedApps[found];
};
// this requires app:manage permissions
Client.prototype.refreshAppCache = function (id, callback) {
var that = this;
callback = typeof callback === 'function' ? callback : function () {};
this.getApp(id, function (error, app) {
if (error) return callback(error);
that._updateAppCache(app);
callback(null, app);
});
};
Client.prototype.refreshInstalledApps = function (callback) {
var that = this;
@@ -979,44 +1188,30 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
this.getApps(function (error, apps) {
if (error) return callback(error);
// insert or update new apps
apps.forEach(function (app) {
var found = false;
asyncForEach(apps, function (app, iteratorCallback) {
var canManageApp = that._userInfo.admin || that._userInfo.id === app.ownerId;
for (var i = 0; i < that._installedApps.length; ++i) {
if (that._installedApps[i].id === app.id) {
found = i;
break;
if (!canManageApp) {
that._updateAppCache(app);
return iteratorCallback();
}
if (that._installedAppsById[app.id] && that._installedAppsById[app.id].ts === app.ts) return iteratorCallback(); // app has not changed
that.refreshAppCache(app.id, iteratorCallback);
}, function iteratorDone(error) {
if (error) return callback(error);
// filter out old apps, going backwards to allow splicing
for (var i = that._installedApps.length - 1; i >= 0; --i) {
if (!apps.some(function (elem) { return (elem.id === that._installedApps[i].id); })) {
var removed = that._installedApps.splice(i, 1);
delete that._installedAppsById[removed[0].id];
}
}
var tmp = {};
angular.copy(app, tmp);
that.appPostProcess(tmp);
// only replace if the app is already known
if (found !== false) {
angular.copy(tmp, that._installedApps[found]);
} else {
that._installedApps.push(tmp);
}
callback(null);
});
// filter out old entries, going backwards to allow splicing
for(var i = that._installedApps.length - 1; i >= 0; --i) {
if (!apps.some(function (elem) { return (elem.id === that._installedApps[i].id); })) {
that._installedApps.splice(i, 1);
}
}
that._installedApps = that._installedApps.sort(function (app1, app2) { return app1.fqdn.localeCompare(app2.fqdn); });
that._appsListener.forEach(function (callback) {
callback(that._installedApps);
});
callback(null);
});
};
@@ -1046,6 +1241,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
window.location.href = this.apiOrigin + '/api/v1/session/logout?redirect=' + origin;
};
// this is ununsed because webadmin uses implicit grant flow
Client.prototype.exchangeCodeForToken = function (code, callback) {
var data = {
grant_type: 'authorization_code',
@@ -1066,7 +1262,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 +1326,14 @@ 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.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 +1346,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.setDnsRecords(domain, callback); // this is done so that an out-of-sync dkim key can be synced
}).error(defaultErrorHandler(callback));
};
@@ -1214,6 +1414,13 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.setDnsRecords = function (domain, callback) {
post('/api/v1/mail/' + domain + '/dns', { }).success(function (data, status) {
if (status !== 201) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getMailStatusForDomain = function (domain, callback) {
get('/api/v1/mail/' + domain + '/status').success(function (data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
@@ -1229,7 +1436,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 +1453,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 +1549,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