Skip to content

Commit

Permalink
added display of the engine also in the class form #111
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf4ood committed Aug 25, 2014
1 parent 2e2dbce commit afa5b74
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/scripts/controllers/configuration-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ configModule.controller("ConfigurationController", ['$scope', '$routeParams', '$

$scope.active = $routeParams.tab || "structure";
$scope.db = $routeParams.database;
$scope.tabs = ['structure', 'allocation', 'configuration', 'import-export', 'uml'];
$scope.tabs = ['structure', 'configuration', 'import-export', 'uml'];

$scope.tabsI18n = new Array;

Expand All @@ -22,7 +22,7 @@ configModule.controller("ConfigurationController", ['$scope', '$routeParams', '$
Database.setWiki("https://github.com/orientechnologies/orientdb-studio/wiki/Uml");
}
$scope.tabsI18n['structure'] = 'Structure';
$scope.tabsI18n['allocation'] = 'Defragmentation';
// $scope.tabsI18n['allocation'] = 'Defragmentation';
$scope.tabsI18n['configuration'] = 'Configuration';
$scope.tabsI18n['import-export'] = 'Export';
$scope.tabsI18n['uml'] = 'UML Class Diagram';
Expand Down
12 changes: 12 additions & 0 deletions app/scripts/controllers/schema-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,18 @@ schemaModule.controller("ClassEditController", ['$scope', '$routeParams', '$loca
$scope.indexes = null;
$scope.indexes = Database.listIndexesForClass(clazz);


$scope.getEngine = function (index) {
var engine = '';
Database.getMetadata()["indexes"].forEach(function (e) {
if (index.name == e.name) {
engine = e.configuration.algorithm;
}
});

return engine;
}

$scope.queryText = ""
$scope.modificati = new Array;
$scope.listTypes = ['BINARY', 'BOOLEAN', 'EMBEDDED', 'EMBEDDEDLIST', 'EMBEDDEDMAP', 'EMBEDDEDSET', 'DECIMAL', 'FLOAT', 'DATE', 'DATETIME', 'DOUBLE', 'INTEGER', 'LINK', 'LINKLIST', 'LINKMAP', 'LINKSET', 'LONG', 'SHORT', 'STRING'];
Expand Down
1 change: 0 additions & 1 deletion app/scripts/services/database-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ database.factory('Database', function (DatabaseApi, localStorageService) {
var props = classes[entry]['indexes'];
for (var f in props) {


fields.push(props[f]);
}
;
Expand Down
6 changes: 6 additions & 0 deletions app/views/database/editclass.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ <h4>Indexes</h4>
<th>
Properties
</th>
<th>
Engine
</th>
<th>
Actions
</th>
Expand All @@ -184,6 +187,9 @@ <h4>Indexes</h4>
<td>
{{index.fields}}
</td>
<td>
{{getEngine(index)}}
</td>
<td>
<button href="javascript:void(0)" class="btn btn-default btn-xs"
ng-click="rebuildIndex(index.name)">
Expand Down

0 comments on commit afa5b74

Please sign in to comment.