Skip to content

Commit

Permalink
add database handling
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Jul 2, 2016
1 parent aa8e74c commit 7ff43a9
Show file tree
Hide file tree
Showing 15 changed files with 847 additions and 14 deletions.
17 changes: 9 additions & 8 deletions public/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,21 @@ module.exports = function(grunt){
'./dist/fusio-app.min.js': [
'./app/app.js',
'./app/account/change_password.js',
'./app/action/action.js',
'./app/app/app.js',
'./app/config/config.js',
'./app/connection/connection.js',
'./app/dashboard/dashboard.js',
'./app/import/import.js',
'./app/log/log.js',
'./app/login/login.js',
'./app/logout/logout.js',
'./app/dashboard/dashboard.js',
'./app/database/database.js',
'./app/routes/routes.js',
'./app/schema/schema.js',
'./app/action/action.js',
'./app/config/config.js',
'./app/connection/connection.js',
'./app/app/app.js',
'./app/log/log.js',
'./app/user/user.js',
'./app/scope/scope.js',
'./app/statistic/statistic.js',
'./app/user/user.js',
'./app/import/import.js',
'./js/FormBuilder.js',
'./js/HelpLoader.js'
]
Expand Down
12 changes: 6 additions & 6 deletions public/app/account/change_password.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ <h1>Account / Change password</h1>
<form name="changePasswordForm" ng-submit="updatePassword()" style="max-width:400px;">
<div class="form-group">
<label for="oldPassword">Old password:</label>
<input type="password" id="oldPassword" ng-model="account.oldPassword" aria-describedby="oldPassword" required minlength="8" maxlength="128" class="form-control">
<span class="help-block" id="oldPassword"></span>
<input type="password" id="oldPassword" ng-model="account.oldPassword" aria-describedby="oldPasswordHelp" required minlength="8" maxlength="128" class="form-control">
<span class="help-block" id="oldPasswordHelp"></span>
</div>
<div class="form-group">
<label for="newPassword">New password:</label>
<input type="password" id="newPassword" ng-model="account.newPassword" aria-describedby="newPassword" required minlength="8" maxlength="128" class="form-control">
<span class="help-block" id="newPassword"></span>
<input type="password" id="newPassword" ng-model="account.newPassword" aria-describedby="newPasswordHelp" required minlength="8" maxlength="128" class="form-control">
<span class="help-block" id="newPasswordHelp"></span>
</div>
<div class="form-group">
<label for="verifyPassword">Verify password:</label>
<input type="password" id="verifyPassword" ng-model="account.verifyPassword" aria-describedby="verifyPassword" required minlength="8" maxlength="128" class="form-control">
<span class="help-block" id="verifyPassword"></span>
<input type="password" id="verifyPassword" ng-model="account.verifyPassword" aria-describedby="verifyPasswordHelp" required minlength="8" maxlength="128" class="form-control">
<span class="help-block" id="verifyPasswordHelp"></span>
</div>
<button type="submit" class="btn btn-primary">Change password</button>
</form>
1 change: 1 addition & 0 deletions public/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var fusioApp = angular.module('fusioApp', [
'fusioApp.config',
'fusioApp.connection',
'fusioApp.dashboard',
'fusioApp.database',
'fusioApp.import',
'fusioApp.log',
'fusioApp.login',
Expand Down
17 changes: 17 additions & 0 deletions public/app/database/confirm.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

<div class="modal-header">
<h3 class="modal-title">Confirmation</h3>
</div>

<div class="modal-body">
<uib-alert type="danger">
<b>Fusio executes the following SQL queries on confirmation. Be aware
that changes to the structure of the database may affect the
functionality of your API.</b>
<ul>
<li ng-repeat="query in response.queries">{{query}}</li>
</ul>
</uib-alert>
<button type="button" ng-click="confirm()" class="btn btn-danger">Confirm</button>
<button type="button" ng-click="close()" class="btn btn-default">Cancel</button>
</div>
58 changes: 58 additions & 0 deletions public/app/database/create.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

<div class="modal-header">
<h3 class="modal-title">Create</h3>
</div>

<div class="modal-body">
<uib-alert type="danger" close="closeResponse()" ng-if="response.success === false">
{{response.message}}
</uib-alert>
<form name="tableCreateForm" ng-submit="create(table)">
<div class="form-group">
<label for="name">Name:</label>
<input type="text" id="name" ng-model="table.name" aria-describedby="nameHelp" class="form-control">
<span class="help-block" id="nameHelp"></span>
</div>

<table class="table">
<colgroup>
<col width="*" />
<col width="150" />
<col width="100" />
<col width="100" />
<col width="150" />
<col width="50" />
</colgroup>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Length</th>
<th>Null</th>
<th>Default</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="column in table.columns">
<td><input type="text" ng-model="column.name" class="form-control"></td>
<td><select ng-model="column.type" ng-options="type as type for type in types" class="form-control"></select></td>
<td><input type="number" ng-model="column.length" class="form-control"></td>
<td><input type="checkbox" ng-model="column.null"></td>
<td><input type="text" ng-model="column.default" class="form-control"></td>
<td>
<div class="fusio-options">
<a ng-click="removeColumn(column.name)" class="btn btn-default"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a>
</div>
</td>
</tr>
</tbody>
</table>

<button type="button" ng-click="addColumn()" class="btn btn-default">Add column</button>
<button type="button" ng-click="openIndexesDialog(table)" class="btn btn-default">Indexes</button>
<button type="button" ng-click="openFksDialog(table)" class="btn btn-default">Foreign-Keys</button>
<button type="submit" class="btn btn-primary">Save</button>
<button type="button" ng-click="close()" class="btn btn-default">Cancel</button>
</form>
</div>

0 comments on commit 7ff43a9

Please sign in to comment.