Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rxFeedback): Build out rxFeedback component
- Loading branch information
Showing
27 changed files
with
622 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
angular.module('encore.ui.rxDiskSize', []) | ||
.filter('rxDiskSize', function () { | ||
return function (size) { | ||
return function (size, unit) { | ||
var units = ['GB', 'TB', 'PB']; | ||
var unit = Math.floor(Math.log(size) / Math.log(1000)); | ||
var index = _.indexOf(units, unit); | ||
|
||
return size / Math.pow(1000, Math.floor(unit)).toFixed(1) + ' ' + units[unit]; | ||
if (index === -1) { | ||
index = Math.floor(Math.log(size) / Math.log(1000)); | ||
} | ||
|
||
return size / Math.pow(1000, Math.floor(index)).toFixed(1) + ' ' + units[index]; | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges) | ||
|
||
Component built to gather and send user feedback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!-- Sample HTML goes here as a live example of how to the component can be used --> | ||
<div ng-controller="rxFeedbackCtrl"> | ||
<rx-feedback id="rxFeedback"></rx-feedback> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/*jshint unused:false*/ | ||
function rxFeedbackCtrl ($scope) { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var demoPage = require('../../../utils/demo.page.js'); | ||
var rxFeedbackPage = require('../rxFeedback.page.js').rxFeedback; | ||
var expect = require('chai').use(require('chai-as-promised')).expect; | ||
|
||
// Add midway tests to run | ||
describe('rxFeedback', function () { | ||
var rxFeedback; | ||
|
||
before(function () { | ||
demoPage.go('#/component/rxFeedback'); | ||
rxFeedback = rxFeedbackPage.initialize($('#rxFeedback')); | ||
}); | ||
|
||
it('should show element', function () { | ||
expect(rxFeedback.isDisplayed()).to.eventually.be.true; | ||
}); | ||
}); |
Oops, something went wrong.