Skip to content

Commit

Permalink
update database help and display table only if a table is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Jul 3, 2016
1 parent 409c30e commit 5f8ab44
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 37 deletions.
76 changes: 39 additions & 37 deletions public/app/database/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,46 +32,48 @@ <h4>{{table.name}}</h4>
</table>
</div>

<uib-alert type="success" close="closeResponse()" ng-if="response.success === true">
{{response.message}}
</uib-alert>
<div ng-if="table">
<uib-alert type="success" close="closeResponse()" ng-if="response.success === true">
{{response.message}}
</uib-alert>

<uib-alert type="danger" close="closeResponse()" ng-if="response.success === false">
{{response.message}}
</uib-alert>
<uib-alert type="danger" close="closeResponse()" ng-if="response.success === false">
{{response.message}}
</uib-alert>

<div class="fusio-grid">
<table class="table">
<colgroup>
<col width="*" />
<col width="150" />
<col width="100" />
<col width="100" />
<col width="150" />
</colgroup>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Length</th>
<th>Null</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="column in table.columns">
<td title="{{column.comment}}">{{column.name}}</td>
<td>{{column.type}}</td>
<td>{{column.length}}</td>
<td>{{column.null}}</td>
<td><div ng-if="column.null === true && column.default === undefined"><span class="label label-info">NULL</span></div><div ng-if="column.default !== undefined">{{column.default}}</div></td>
</tr>
</tbody>
</table>
<div class="fusio-grid">
<table class="table">
<colgroup>
<col width="*" />
<col width="150" />
<col width="100" />
<col width="100" />
<col width="150" />
</colgroup>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Length</th>
<th>Null</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="column in table.columns">
<td title="{{column.comment}}">{{column.name}}</td>
<td>{{column.type}}</td>
<td>{{column.length}}</td>
<td>{{column.null}}</td>
<td><div ng-if="column.null === true && column.default === undefined"><span class="label label-info">NULL</span></div><div ng-if="column.default !== undefined">{{column.default}}</div></td>
</tr>
</tbody>
</table>
</div>

<a ng-click="openUpdateDialog(table)" class="btn btn-default"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Update</a>
<a ng-click="openDeleteDialog(table)" class="btn btn-danger"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</a>
</div>

<a ng-click="openUpdateDialog(table)" class="btn btn-default"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Update</a>
<a ng-click="openDeleteDialog(table)" class="btn btn-danger"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</a>
</div>

</div>
5 changes: 5 additions & 0 deletions public/help/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ Through the database it is possible to manage tables from the provided
connections. You can create, update and delete tables. Note the changes are
reflected to the database on save so please be cautious with your actions.

### Types

Fusio uses internally the doctrine DBAL library to create database vendor
compatible SQL. Take a look at the [mapping] matrix for more detailed
informations about the mapping from the type to a concrete database type.

[mapping]: http://doctrine-orm.readthedocs.io/projects/doctrine-dbal/en/latest/reference/types.html#mapping-matrix

0 comments on commit 5f8ab44

Please sign in to comment.