Browse Source

ux: removed unused stuff form style guide

Torkel Ödegaard 8 years ago
parent
commit
9f7560b6f9

+ 0 - 8
public/app/features/styleguide/styleguide.html

@@ -14,14 +14,6 @@
 		</div>
 	</div>
 
-	<div class="tab-pane style-guide-icon-list">
-		<div class="row">
-			<div ng-repeat="icon in ctrl.icons" class="col-md-2 col-sm-3 col-xs-4">
-				<i class="icon-gf icon-gf-{{icon}}" bs-tooltip="'icon-gf icon-gf-{{icon}}'"></i>
-			</div>
-		</div>
-	</div>
-
 	<h3 class="page-heading">Forms</h3>
 
 	<div class="gf-form-inline">

+ 0 - 34
public/app/features/styleguide/styleguide.ts

@@ -1,51 +1,17 @@
 import coreModule from 'app/core/core_module';
 import config from 'app/core/config';
-import _ from 'lodash';
 
 class StyleGuideCtrl {
-  colors: any = [];
   theme: string;
   buttonNames = ['primary', 'secondary', 'inverse', 'success', 'warning', 'danger'];
   buttonSizes = ['btn-small', '', 'btn-large'];
   buttonVariants = ['-'];
-  icons: any = [];
-  page: any;
-  pages = ['colors', 'buttons', 'icons', 'plugins'];
   navModel: any;
 
   /** @ngInject **/
   constructor(private $http, private $routeParams, private backendSrv, navModelSrv) {
     this.navModel = navModelSrv.getNav('cfg', 'admin', 'styleguide', 1);
     this.theme = config.bootData.user.lightTheme ? 'light' : 'dark';
-    this.page = {};
-
-    if ($routeParams.page) {
-      this.page[$routeParams.page] = 1;
-    } else {
-      this.page.colors = true;
-    }
-
-    if (this.page.colors) {
-      this.loadColors();
-    }
-
-    if (this.page.icons) {
-      this.loadIcons();
-    }
-  }
-
-  loadColors() {
-    this.$http.get('public/build/styleguide.json').then(res => {
-      this.colors = _.map(res.data[this.theme], (value, key) => {
-        return { name: key, value: value };
-      });
-    });
-  }
-
-  loadIcons() {
-    this.$http.get('public/sass/icons.json').then(res => {
-      this.icons = res.data;
-    });
   }
 
   switchTheme() {

+ 1 - 0
public/app/stores/ServerStatsStore.tsx

@@ -15,6 +15,7 @@ export const ServerStatsStore = types
 
       let res = yield backendSrv.get('/api/admin/stats');
 
+      self.stats.clear();
       self.stats.push(ServerStat.create({ name: 'Total dashboards', value: res.dashboards }));
       self.stats.push(ServerStat.create({ name: 'Total users', value: res.users }));
       self.stats.push(ServerStat.create({ name: 'Active users (seen last 30 days)', value: res.activeUsers }));