Created
July 17, 2013 22:47
-
-
Save sandrinodimattia/6025231 to your computer and use it in GitHub Desktop.
Windows Azure Portal - Custom Javascript bookmarklet
This file contains hidden or 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
$.post('/MonetaryCredit', function(data) { | |
var table = $('<table />') | |
.attr('style', 'border: 1px solid black; border-collapse: collapse; width: 100%') | |
.append($('<thead />').attr('style', 'font-weight: bold') | |
.append($('<td>Subscription</td><td>TotalCredit</td><td>Remaining Credit</td><td>Burn Rate</td><td>Might Run Out</td>'))); | |
$.each(data, function(idx, sub) { | |
if (sub.MonetaryCreditInfo != null) { | |
table.append($('<tr />') | |
.attr('style', 'border: 1px solid black;') | |
.append($('<td />').text(sub.SubscriptionName)) | |
.append($('<td />').text(sub.MonetaryCreditInfo.RemainingCreditDisplay)) | |
.append($('<td />').text(sub.MonetaryCreditInfo.TotalCreditDisplay)) | |
.append($('<td />').text(sub.MonetaryCreditInfo.BurnRateDisplay)) | |
.append($('<td />').text(sub.MightRunOut))); | |
} | |
}); | |
$('<div title="My Subscriptions - Credit" />') | |
.append(table) | |
.dialog({width: 600,height:250}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment