Merge branch 'v2.0' master
authorAfaq Tariq <afaq.tariq@inmar.com>
Mon, 13 Nov 2017 00:38:07 +0000 (19:38 -0500)
committerAfaq Tariq <afaq.tariq@inmar.com>
Mon, 13 Nov 2017 00:38:07 +0000 (19:38 -0500)
1  2 
app/linuxDash.min.js

@@@ -2392,6 -2396,6 +2396,35 @@@ angular.module('linuxDash').directive('
    }
  })
  
++angular.module('linuxDash').directive('topBar', ['$rootScope', function($rootScope) {
++  return {
++    scope: {
++      heading: '=',
++      refresh: '&',
++      lastUpdated: '=',
++      toggleVisibility: '&',
++      isHidden: '=',
++      toggleWidth: '&',
++      isChart: '=',
++      info: '=', // not being used; needs a good ui solution
++    },
++    template: '\
++      <div class="top-bar"> \
++        <span class="heading"> &#9776; {{ heading }}</span> \
++        \
++        <button \
++          class="ld-top-bar-btn minimize-btn" \
++          ng-click="toggleVisibility()" \
++          ng-class="{ active: isHidden }">-</button> \
++        \
++        \
++        <button class="ld-top-bar-btn width-toggle-btn" ng-if="toggleWidth && !isChart" ng-click="toggleWidth()">&harr;</button> \
++        <button ng-if="!isChart && !isHidden" class="ld-top-bar-btn refresh-btn" ng-click="refresh()">↺</button> \
++      </div> \
++    ',
++  }
++}])
++
  angular.module('linuxDash').directive('tableData', ['server', '$rootScope', function (server, $rootScope) {
    return {
      scope: {
    }
  }])
  
--angular.module('linuxDash').directive('topBar', ['$rootScope', function($rootScope) {
--  return {
--    scope: {
--      heading: '=',
--      refresh: '&',
--      lastUpdated: '=',
--      toggleVisibility: '&',
--      isHidden: '=',
--      toggleWidth: '&',
--      isChart: '=',
--      info: '=', // not being used; needs a good ui solution
--    },
--    template: '\
--      <div class="top-bar"> \
--        <span class="heading"> &#9776; {{ heading }}</span> \
--        \
--        <button \
--          class="ld-top-bar-btn minimize-btn" \
--          ng-click="toggleVisibility()" \
--          ng-class="{ active: isHidden }">-</button> \
--        \
--        \
--        <button class="ld-top-bar-btn width-toggle-btn" ng-if="toggleWidth && !isChart" ng-click="toggleWidth()">&harr;</button> \
--        <button ng-if="!isChart && !isHidden" class="ld-top-bar-btn refresh-btn" ng-click="refresh()">↺</button> \
--      </div> \
--    ',
--  }
--}])
--
  angular.module("linuxDash").run(["$templateCache", function($templateCache) {$templateCache.put("src/js/plugins/disk-space/disk-space.html","<plugin\n  heading=\"Disk Partitions\"\n  last-updated=\"lastGet\"\n  on-refresh=\"getData()\">\n\n  <loader ng-hide=\"diskSpaceData\"></loader>\n\n  <table ng-show=\"diskSpaceData\">\n    <thead>\n      <tr>\n        <th>Name</th>\n        <th></th>\n        <th>Stats</th>\n        <th>Used</th>\n        <th>Mount</th>\n      </tr>\n    </thead>\n    <tbody>\n      <tr  ng-repeat=\"partition in diskSpaceData\">\n        <td>{{partition[\'file_system\']}}</td>\n        <td>\n          <progress-bar-plugin\n              width=\"70px\"\n              value=\"{{ getKB(partition[\'used\']) }}\"\n              max=\"{{ getKB(partition[\'size\']) }}\">\n          </progress-bar-plugin>\n        </td>\n        <td>\n          {{ partition[\'used\'] }} / {{ partition[\'size\'] }}\n        </td>\n        <td>\n          {{ partition[\'used%\'] }}\n        </td>\n        <td>{{ partition[\'mounted\'] }}</td>\n      </tr>\n    </tbody>\n  </table>\n\n</plugin>\n");
  $templateCache.put("src/js/core/features/key-value-list/key-value-list.html","<plugin\n  heading=\"{{ heading }}\"\n  last-updated=\"lastGet\"\n  on-refresh=\"getData()\"\n  info=\"{{ info }}\">\n\n  <loader ng-if=\"!tableRows\"></loader>\n\n  <div ng-show=\"tableRows\">\n    <table class=\"key-value-list\">\n      <tbody>\n        <tr ng-repeat=\"(name, value) in tableRows\">\n          <td><strong>{{ name }}</strong></td>\n          <td>{{ value }}</td>\n        </tr>\n      </tbody>\n    </table>\n\n  </div>\n\n  <span ng-show=\"emptyResult\">No data</span>\n</plugin>\n");
  $templateCache.put("src/js/core/features/line-chart/line-chart-plugin.html","<plugin chart-plugin>\n\n  <loader ng-if=\"!maxValue || initializing\"></loader>\n\n  <canvas\n    ng-show=\"!initializing && !emptyResult\"\n    class=\"canvas\"\n    width=\"400\"\n    height=\"150\">\n  </canvas>\n\n  <table ng-show=\"!initializing && !emptyResult\" border=\"0\" class=\"metrics-table\">\n    <tbody>\n      <tr ng-repeat=\"metric in metrics\">\n        <td><strong>{{ metric.name }}</strong></td>\n        <td>{{ metric.data }}</td>\n      </tr>\n    </tbody>\n  </table>\n\n  <span ng-show=\"emptyResult\">No data</span>\n\n</plugin>\n");