Commit Graph

3371 Commits

Author SHA1 Message Date
Dave Page
a36cb5ae10 Make context menu items hookable. 2015-02-20 09:56:02 -05:00
Dave Page
37be918074 Move the JS code for the main browser out of the HTML template
and into the browser.js view.
2015-02-20 09:37:42 -05:00
Dave Page
b43580a19e Add a context menu to the treeview, with options to delete and rename server nodes.
TODO: Make the menu items hook in.
2015-02-18 22:06:12 -05:00
Dave Page
89cc11fb80 This is a big one campers; Add initial support for treeview nodes.
This commit adds the following:

- Storage of server groups in the configuration database
- Creation of a default server group on in the database
- A mechanism for plugging in treeview node types
- A node type for server groups with:
  - Treeview display
  - Custom per-node javascript implementing a menu option/dialogue to add new groups
  - Custom per-node CSS to style the treeview node
- JSON formatted data in response to AJAX requests, including:
  - Success/failure indication
  - Error message
  - Extra info (e.g. stack trace)
  - The original request data
  - Additional return data, e.g. node ID and label etc.
2015-02-15 17:10:53 -05:00
Dave Page
e2832351ed Miscellaneous fixes and cleanups. 2015-02-13 15:19:08 +00:00
Dave Page
b5abf2c640 Cleanup the way stylesheets and scripts are injected into pages by modules. 2015-02-13 14:48:31 +00:00
Dave Page
45d536f524 Remove "vendor" from the global JS path. 2015-02-13 13:36:00 +00:00
Dave Page
567c567351 Add the CodeMirror addons. I can see us needing the majority of these. 2015-02-13 13:29:24 +00:00
Dave Page
6b3b9fdea1 Add aciTree to the libraries list. 2015-02-13 13:27:37 +00:00
Dave Page
2f154bbed4 The previous commit inadvertently added parts of the browser treeview implementation.
This adds the rest (which still requires further work to make it do anything useful).
2015-02-13 13:24:13 +00:00
Dave Page
b09c1b6c68 Fix the gutter height of the editor when the parent is resized. 2015-02-13 13:13:36 +00:00
Dave Page
f4982efb19 Oh look, a syntax highlighting, line numbering, block folding, auto-complete-capable editor. 2015-02-13 11:57:23 +00:00
Dave Page
075bce2b40 Fix the navbar so it's responsive 2015-02-12 14:59:28 +00:00
Dave Page
dbd7974e2a Render settings related JS from the settings blueprint. 2015-02-12 10:57:09 +00:00
Dave Page
4c29f4385f Render browser settings into the template rather than using synchronous AJAX calls to get them. 2015-02-12 10:46:21 +00:00
Dave Page
bb6a3f9b5b Use minified output when not in debug mode, and non-minified when debugging.
Update jQuery while we're at it.
2015-02-12 10:28:15 +00:00
Dave Page
afb029e284 Factor out client side settings functions into their own JS file,
and add additional variations for getting ints, floats and bools.
2015-02-11 15:50:36 +00:00
Dave Page
adeb2f9e84 Allow multiple settings to be stored at once to avoid multiple requests. 2015-02-11 12:50:45 +00:00
Dave Page
e995104000 Initial cut at saving/retrieving the main browser layout.
Still needs some work to:

- Minimise AJAX calls by writing multiple settings at once.
- Move the settings storage/retrieval JS code into a global file
- Avoid using synchronous AJAX calls in the main thread
2015-02-11 10:00:57 +00:00
Thom Brown
506dd6437f Various HTML 5 fixes. 2015-02-06 13:15:36 +00:00
Dave Page
50c6b42273 Add a list of libraries used. 2015-02-06 11:13:22 +00:00
Dave Page
1b6d7edd01 Add the core of the main browser layout. 2015-02-05 14:06:20 +00:00
Dave Page
afd5626fe4 Add a simple module for storing and retrieving settings from the
config database.
2015-02-03 11:48:15 +00:00
Dave Page
e4bec5ad1e Use the full screen width. 2015-01-28 18:02:13 +00:00
Dave Page
9d94848af4 Minor tweaks to the dialog code. 2015-01-28 17:56:13 +00:00
Dave Page
65dc4320f1 Replace bootstrap-dialog with Alertify.js, which is more configurable
and supports non-modal dialogs.
2015-01-28 15:57:03 +00:00
Dave Page
53d649de70 Add support for creating dialogs, and add an About dialog.
This adds bootstrap-dialog to help with creation of nice dialogs,
and adds the ability for modules to render Javascript into the
browser, and specify onclick handlers in the menu system.

Also add a basic About dialog, using the new infrastructure and
showing some useful info about the application.
2015-01-27 16:54:39 +00:00
Dave Page
d86c90fa73 Blacklist the test module by default. 2015-01-27 14:25:40 +00:00
Dave Page
89bfc54ec4 Update .gitignore file with a few more bits of junk. 2015-01-27 14:22:52 +00:00
Dave Page
d492da3ca1 Add automatic browser menu integration for modules.
Modules may now include functions that return lists of menu items
that will be included on the main browser window menu. While we're
at it, move the test views into a separate module.
2015-01-27 14:18:27 +00:00
Dave Page
0cff5fca2c Restructure templates to avoid conflicts between modules. 2015-01-26 16:27:16 +00:00
Dave Page
7c60fb3377 Support a desktop authentication mode.
This uses a single default user in the config database, which is
auto-logged into the app when SERVER_MODE = False. In this mode we
also hide/remove user-related functions in the UI.
2015-01-26 15:20:28 +00:00
Dave Page
10515431c7 Add authentication and the basis of the browser module.
A user authentication module based on flask-security is added, which
allows users to login and change/recover passwords etc. Custom templates
are included for the user/password UIs.

A new setup script will initialise the user (and later settings) DB,
adding the first user and granting them an Administrator role.

A redirects blueprint module is added to handle simple URL redirects.

A browser module is added and currently renders a skeleton page with
a menu bar, gravatar and jumbotron.

NOTE FOR LATER: Currently this code might make the nice basis for any
web app that needs user management and plugins. Hmmm....
2015-01-22 15:56:23 +00:00
Dave Page
7fa40d7671 Use Python docsctrings 2015-01-21 12:00:13 +00:00
Dave Page
df5054f253 No need for content here now. 2015-01-21 11:18:02 +00:00
Dave Page
5a485e7ab8 Add a base template with Bootstrap and jQuery ready to go. 2015-01-20 17:02:04 +00:00
Dave Page
47e779266b Enable templates and static files in the utils module. Refactor to
ease use as a template for other modules in the future.
2015-01-20 13:57:51 +00:00
Dave Page
5cffcabc70 Update the runtime to use URLs provided by the utils module. 2015-01-20 13:56:37 +00:00
Dave Page
dd40207617 Don't run the webserver in debug mode as it breaks the runtime. 2015-01-20 13:51:20 +00:00
Dave Page
0df7225561 Put the favicon in the right place. 2015-01-20 12:32:44 +00:00
Dave Page
7b8cb207ab Support dynamically loaded modules. 2015-01-20 12:32:06 +00:00
Dave Page
bb3efff063 Remove incorrectly placed static dir. 2015-01-20 12:29:29 +00:00
Dave Page
2c1688e6f4 Use Flask blueprints for modularisation, per Khushboo Vashi. 2015-01-19 16:38:47 +00:00
Dave Page
ca6ef66b61 Disable the DEBUG log handler so our own is used. 2014-12-18 17:56:17 +00:00
Dave Page
51117f26a9 Add a .gitignore file. 2014-12-18 17:52:53 +00:00
Dave Page
b9bf6d9aa3 Restructure to enable use of modules for different components of pgAdmin. 2014-12-18 17:49:09 +00:00
Dave Page
255d6c1437 Improve commenting 2014-12-17 15:27:54 +00:00
Dave Page
417ad2c6ee Make the application name and version details configurable. 2014-12-17 12:52:43 +00:00
Dave Page
3e6436bc9b Prevent werkzeug starting up it's own stream handler so that all
messages are routed through pgAdmin's handlers.
2014-12-17 12:44:07 +00:00
Dave Page
a0628f4a84 Ensure requests to the web server hit the file log too. 2014-12-16 18:21:26 +00:00