Skip to content

Commit

Permalink
Update dashboard breadcrumbs
Browse files Browse the repository at this point in the history
- Update back buttons
- Ignore duplicated README.md
- Rename /minions to /nodes
- Deactivate more buttons
- Updates to list selection and node detail page
  • Loading branch information
satoshi75nakamoto committed May 16, 2015
1 parent 75d062b commit 4c4e7b2
Show file tree
Hide file tree
Showing 40 changed files with 478 additions and 532 deletions.
435 changes: 180 additions & 255 deletions pkg/ui/datafile.go

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion www/app/assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
.nav-back {
/* :before */
/* content: ""; */
background: url('../img/arrow-back.png');
background-size: 14px 14px;
background-repeat: no-repeat;
display: block;
Expand Down
130 changes: 72 additions & 58 deletions www/app/assets/js/app.js

Large diffs are not rendered by default.

128 changes: 0 additions & 128 deletions www/app/components/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions www/app/components/dashboard/README.md

This file was deleted.

7 changes: 6 additions & 1 deletion www/app/components/dashboard/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
{
"description": "Nodes",
"url": "/minions",
"url": "/nodes",
"templateUrl": "components/dashboard/views/listMinions.html"
},
{
Expand All @@ -46,6 +46,11 @@
"url": "/services/:serviceId",
"templateUrl": "components/dashboard/views/service.html"
},
{
"description": "Node",
"url": "/nodes/:nodeId",
"templateUrl": "components/dashboard/views/node.html"
},
{
"description": "Explore",
"url": "/groups/:grouping*?/selector/:selector*?",
Expand Down
2 changes: 1 addition & 1 deletion www/app/components/dashboard/views/listMinions.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div dashboard-header></div>
<div class="dashboard">
<div ng-controller="ListMinionsCtrl" style="padding:25px;" class="list-pods">
<md-table headers="headers" content="content" sortable="sortable" filters="search" custom-class="custom" thumbs="thumbs" count="count"></md-table>
<md-table headers="headers" content="content" sortable="sortable" filters="search" custom-class="custom" thumbs="thumbs" count="count" on-select="go(data)"></md-table>
</div>
</div>
<div dashboard-footer></div>
2 changes: 1 addition & 1 deletion www/app/components/dashboard/views/listPods.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div dashboard-header></div>
<div class="dashboard">
<div ng-controller="ListPodsCtrl" style="padding:25px;" class="list-pods">
<md-table headers="headers" content="content" sortable="sortable" filters="search" custom-class="custom" thumbs="thumbs" count="count"></md-table>
<md-table headers="headers" content="content" sortable="sortable" filters="search" custom-class="custom" thumbs="thumbs" count="count" on-select="go(data)"></md-table>
</div>
</div>
<div dashboard-footer></div>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div dashboard-header></div>
<div class="dashboard">
<div ng-controller="ListReplicationControllersCtrl" style="padding:25px;" class="list-pods">
<md-table headers="headers" content="content" sortable="sortable" filters="search" custom-class="custom" thumbs="thumbs" count="count"></md-table>
<md-table headers="headers" content="content" sortable="sortable" filters="search" custom-class="custom" thumbs="thumbs" count="count" on-select="go(data)"></md-table>
</div>
</div>
<div dashboard-footer></div>
2 changes: 1 addition & 1 deletion www/app/components/dashboard/views/listServices.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div dashboard-header></div>
<div class="dashboard">
<div ng-controller="ListServicesCtrl" style="padding:25px;" class="list-pods">
<md-table headers="headers" content="content" sortable="sortable" filters="search" custom-class="custom" thumbs="thumbs" count="count"></md-table>
<md-table headers="headers" content="content" sortable="sortable" filters="search" custom-class="custom" thumbs="thumbs" count="count" on-select="go(data)"></md-table>
</div>
</div>
<div dashboard-footer></div>
61 changes: 61 additions & 0 deletions www/app/components/dashboard/views/node.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<div dashboard-header></div>
<div class="dashboard">
<div ng-controller="NodeCtrl" layout="column" class="body-wrapper node">
<div class="detail">

<div class="back">
<md-button class="md-default-theme" ng-click="doTheBack()">‹ BACK</md-button>
</div>


<div class="heading">
<span class="label">Name:</span>
<span>{{node.id}}</span>
</div>


<table>
<tbody>
<tr>
<td class="name">Labels</td>
<td class="value">
<div ng-repeat="(label, value) in node.labels">
{{label}}: {{value}}
</div>
</td>
</tr>

<tr>
<td class="name">Created</td>
<td class="value">
{{node.creationTimestamp | date:'medium'}}
</td>
</tr>

<tr>
<td class="name">Host IP</td>
<td class="value">
{{node.hostIP}}
</td>
</tr>

<tr>
<td class="name">System Info</td>
<td class="value">
<div ng-repeat="(label, value) in node.status.nodeInfo">
{{label}}: {{value}}
</div>
</td>
</tr>


</tbody>
</table>



</div>
</div>
</div>
<div dashboard-footer></div>

5 changes: 1 addition & 4 deletions www/app/components/dashboard/views/pod.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
<div class="detail">

<div class="back">
<div class="nav-back">
<a ng-click="doTheBack()">BACK</a>
</div>
<!-- <md-button class="md-default-theme" ng-click="doTheBack">BACK</md-button> -->
<md-button class="md-default-theme" ng-click="doTheBack()">‹ BACK</md-button>
</div>

<div class="heading">
Expand Down
2 changes: 1 addition & 1 deletion www/app/components/dashboard/views/replication.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="detail">

<div class="back">
<md-button class="md-default-theme" ng-href="#/dashboard/replicationcontrollers">‹ BACK</md-button>
<md-button class="md-default-theme" ng-click="doTheBack()">‹ BACK</md-button>
</div>

<div class="heading">
Expand Down
2 changes: 1 addition & 1 deletion www/app/components/dashboard/views/service.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="detail">

<div class="back">
<md-button class="md-default-theme" ng-href="#/dashboard/services">‹ BACK</md-button>
<md-button class="md-default-theme" ng-click="doTheBack()">‹ BACK</md-button>
</div>

<div class="heading">
Expand Down
8 changes: 4 additions & 4 deletions www/app/views/partials/md-table.tmpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
<a href ng-if="handleSort(h.field)" ng-click="reverse=!reverse;order(h.field,reverse)">{{h.name}} <span class="md-table-caret" ng-show="reverse && h.field == predicate"><img src="assets/img/ic_arrow_drop_up_24px.svg"></span><span class="md-table-caret" ng-show="!reverse && h.field == predicate"><img src="assets/img/ic_arrow_drop_down_24px.svg"></span></a>
<span ng-if="!handleSort(h.field)">{{h.name}}</span>
</th>
<th class="md-table-header"></th>
<th class="md-table-header" ng-show="showMore()"></th>
</tr>
</thead>
<tbody>
<tr class="md-table-content-row" ng-repeat="c in content | filter:filters | startFrom:currentPage*count | limitTo: count">
<td ng-repeat="h in headers" ng-if="h.field == thumbs" class="md-table-thumbs">
<div ng-if="h.field == thumbs" style="background-image:url({{c.thumb}})"></div>
</td>
<td class="md-table-content" ng-click="go(c)" ng-repeat="h in headers" ng-class="customClass[h.field]" ng-if="h.field != thumbs">
<td class="md-table-content" ng-click="doSelect({data:c})" ng-repeat="h in headers" ng-class="customClass[h.field]" ng-if="h.field != thumbs">
{{c[h.field]}}
</td>
<td class="md-table-td-more">
<md-button aria-label="More">
<td class="md-table-td-more" ng-show="showMore()">
<md-button aria-label="More" ng-click="moreClick(c, $event)">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>
</svg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ angular.module('kubernetesApp.components.dashboard', [])
$scope.subPages = [
{category: 'dashboard', name: 'Explore', value: '/dashboard/groups/type/selector/'},
{category: 'dashboard', name: 'Pods', value: '/dashboard/pods'},
{category: 'dashboard', name: 'Minions', value: '/dashboard/minions'},
{category: 'dashboard', name: 'Nodes', value: '/dashboard/nodes'},
{category: 'dashboard', name: 'Replication Controllers', value: '/dashboard/replicationcontrollers'},
{category: 'dashboard', name: 'Services', value: '/dashboard/services'},
{category: 'dashboard', name: 'Events', value: '/dashboard/events'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,14 @@ app.controller('ListEventsCtrl', [

$scope.go = function(d) { $location.path('/dashboard/pods/' + d.id); };

$scope.moreClick = function(d, e) {
$location.path('/dashboard/pods/' + d.id);
e.stopPropagation();
};

function handleError(data, status, headers, config) {
console.log("Error (" + status + "): " + data);
$scope.loading = false;
}

$scope.content = [];

function getData(dataId) {
function getData() {
$scope.loading = true;
k8sApi.getEvents().success(function(data) {
$scope.loading = false;
Expand Down Expand Up @@ -79,7 +74,7 @@ app.controller('ListEventsCtrl', [
}).error($scope.handleError);
}

getData($routeParams.serviceId);
getData();

}
]);
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ app.controller('ListMinionsCtrl', [
$scope.thumbs = 'thumb';
$scope.count = 10;

$scope.go = function(d) { $location.path('/dashboard/pods/' + d.id); };

$scope.moreClick = function(d, e) {
$location.path('/dashboard/pods/' + d.id);
e.stopPropagation();
};
$scope.go = function(data) { $location.path('/dashboard/nodes/' + data.name); };

function handleError(data, status, headers, config) {
console.log("Error (" + status + "): " + data);
Expand All @@ -42,7 +37,7 @@ app.controller('ListMinionsCtrl', [

$scope.content = [];

function getData(dataId) {
function getData() {
$scope.loading = true;
k8sApi.getMinions().success(function(data) {
$scope.loading = false;
Expand Down Expand Up @@ -70,7 +65,7 @@ app.controller('ListMinionsCtrl', [
}).error($scope.handleError);
}

getData($routeParams.serviceId);
getData();

}
]);
Loading

0 comments on commit 4c4e7b2

Please sign in to comment.