Browse Source

accounts progress

Torkel Ödegaard 11 years ago
parent
commit
639a44d996
2 changed files with 17 additions and 0 deletions
  1. 7 0
      src/app/controllers/pro/accountCtrl.js
  2. 10 0
      src/app/partials/pro/account.html

+ 7 - 0
src/app/controllers/pro/accountCtrl.js

@@ -15,7 +15,12 @@ function (angular) {
     };
 
     $scope.getAccountInfo = function() {
+      $http.get('/api/account').then(function(result) {
+        $scope.account = result.data;
+        console.log("value", result.data);
+      }, function(err) {
 
+      });
     };
 
     $scope.addCollaborator = function() {
@@ -35,5 +40,7 @@ function (angular) {
       });
     };
 
+    $scope.init();
+
   });
 });

+ 10 - 0
src/app/partials/pro/account.html

@@ -80,6 +80,7 @@
 	</div>
 
 	<div class="dashboard-editor-body">
+
 		<div class="editor-row">
 			<div class="editor-option">
 				<form name="addCollaboratorForm" class="form-inline">
@@ -89,6 +90,15 @@
 				</form>
 			</div>
 		</div>
+
+		<div class="editor-row row">
+			<table class="grafana-options-table span5">
+				<tr ng-repeat="collaborator in account.collaborators">
+					<td>{{collaborator.accountId}}<td>
+				</tr>
+			</table>
+		</div>
+
 	</div>
 </div>