Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
Added pull count to images - Fixes #1175
Browse files Browse the repository at this point in the history
Signed-off-by: French Ben <me+git@frenchben.com>
  • Loading branch information
FrenchBen committed Nov 5, 2015
1 parent e533ed3 commit 16fa660
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 71 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -20,7 +20,8 @@ Before you file an issue or a pull request, read the following tips on how to ke
### Prerequisites for developing Kitematic on Mac
You will need to install:
- The [Docker Toolbox](https://docker.com/toolbox)
- [Node.js](https://nodejs.org/)
- [Node.js](https://nodejs.org/)
- Wine `brew install wine` (only if you want to generate a Windows release on OS X)
- The latest Xcode from the Apple App Store.

### Prerequisites for developing Kitematic on Windows
Expand All @@ -30,7 +31,6 @@ You will need to install:
- Open a command prompt (`cmd`) and run the command `mkdir ~/AppData/Roaming/npm`
- [Visual Studio 2013 Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx) (or similar) - You do not need to install any optional packages during install.
- [Python](https://www.python.org/downloads/release/python-2710/)
- [Temporary] Set the `DOCKER_TOOLBOX_INSTALL_PATH` environment variable as follows:

![Toolbox Env Var](https://cloud.githubusercontent.com/assets/251292/10656552/adaedb20-7834-11e5-8881-d5402d3fee37.png)

Expand Down
47 changes: 8 additions & 39 deletions Gruntfile.js
Expand Up @@ -20,25 +20,14 @@ module.exports = function (grunt) {
};

var BASENAME = 'Kitematic';
var APPNAME = BASENAME;

if (alpha) {
APPNAME += ' (Alpha)';
} else if (beta) {
APPNAME += ' (Beta)';
}

var OSX_APPNAME = BASENAME + ' (Beta)';
var WINDOWS_APPNAME = BASENAME + ' (Alpha)';
var OSX_OUT = './dist';
var OSX_OUT_X64 = OSX_OUT + '/' + APPNAME + '-darwin-x64';
var OSX_FILENAME = OSX_OUT_X64 + '/' + APPNAME + '.app';
var OSX_OUT_X64 = OSX_OUT + '/' + OSX_APPNAME + '-darwin-x64';
var OSX_FILENAME = OSX_OUT_X64 + '/' + OSX_APPNAME + '.app';

grunt.initConfig({
IDENTITY: 'Developer ID Application: Docker Inc',
APPNAME: APPNAME,
APPNAME_ESCAPED: APPNAME.replace(/ /g, '\\ ').replace(/\(/g,'\\(').replace(/\)/g,'\\)'),
OSX_OUT: OSX_OUT,
OSX_OUT_ESCAPED: OSX_OUT.replace(/ /g, '\\ ').replace(/\(/g,'\\(').replace(/\)/g,'\\)'),
OSX_OUT_X64: OSX_OUT_X64,
OSX_FILENAME: OSX_FILENAME,
OSX_FILENAME_ESCAPED: OSX_FILENAME.replace(/ /g, '\\ ').replace(/\(/g,'\\(').replace(/\)/g,'\\)'),

Expand All @@ -58,7 +47,7 @@ module.exports = function (grunt) {
},
osx: {
options: {
name: APPNAME,
name: OSX_APPNAME,
dir: 'build/',
out: 'dist',
version: packagejson['electron-version'],
Expand All @@ -85,8 +74,8 @@ module.exports = function (grunt) {
'version-string': {
'CompanyName': 'Docker',
'ProductVersion': packagejson.version,
'ProductName': APPNAME,
'FileDescription': APPNAME,
'ProductName': WINDOWS_APPNAME,
'FileDescription': WINDOWS_APPNAME,
'InternalName': BASENAME + '.exe',
'OriginalFilename': BASENAME + '.exe',
'LegalCopyright': 'Copyright 2015 Docker Inc. All rights reserved.'
Expand All @@ -95,21 +84,6 @@ module.exports = function (grunt) {
}
},

'create-windows-installer': {
config: {
appDirectory: path.join(__dirname, 'dist/' + BASENAME + '-win32-x64'),
outputDirectory: path.join(__dirname, 'dist'),
authors: 'Docker Inc.',
loadingGif: 'util/loading.gif',
setupIcon: 'util/setup.ico',
iconUrl: 'https://raw.githubusercontent.com/kitematic/kitematic/master/util/kitematic.ico',
description: APPNAME,
title: APPNAME,
exe: BASENAME + '.exe',
version: packagejson.version
}
},

// images
copy: {
dev: {
Expand Down Expand Up @@ -269,12 +243,7 @@ module.exports = function (grunt) {
});

grunt.registerTask('default', ['newer:babel', 'less', 'newer:copy:dev', 'shell:electron', 'watchChokidar']);

if (process.platform === 'win32') {
grunt.registerTask('release', ['clean:release', 'babel', 'less', 'copy:dev', 'electron:windows', 'copy:windows', 'rcedit:exes', 'compress']);
} else {
grunt.registerTask('release', ['clean:release', 'babel', 'less', 'copy:dev', 'electron:osx', 'copy:osx', 'shell:sign', 'shell:zip']);
}
grunt.registerTask('release', ['clean:release', 'babel', 'less', 'copy:dev', 'electron', 'copy:osx', 'shell:sign', 'shell:zip', 'copy:windows', 'rcedit:exes', 'compress']);

process.on('SIGINT', function () {
grunt.task.run(['shell:electron:kill']);
Expand Down
Binary file modified fonts/kitematic.eot
Binary file not shown.
43 changes: 22 additions & 21 deletions fonts/kitematic.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fonts/kitematic.ttf
Binary file not shown.
Binary file modified fonts/kitematic.woff
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -35,6 +35,7 @@
"mixpanel": "kitematic/mixpanel-node",
"mkdirp": "^0.5.0",
"node-uuid": "^1.4.3",
"numeral": "^1.5.3",
"object-assign": "^4.0.1",
"osx-release": "^1.1.0",
"parseUri": "^1.2.3-2",
Expand Down
7 changes: 6 additions & 1 deletion src/components/ImageCard.react.js
Expand Up @@ -8,6 +8,7 @@ import containerActions from '../actions/ContainerActions';
import containerStore from '../stores/ContainerStore';
import tagStore from '../stores/TagStore';
import tagActions from '../actions/TagActions';
import numeral from 'numeral';

var ImageCard = React.createClass({
mixins: [Router.Navigation],
Expand Down Expand Up @@ -147,6 +148,8 @@ var ImageCard = React.createClass({
<span className="icon icon-badge-private"></span>
);
}
let favCount = (this.props.image.star_count < 1000) ? numeral(this.props.image.star_count).value() : numeral(this.props.image.star_count).format('0.0a').toUpperCase();
let pullCount = (this.props.image.pull_count < 1000) ? numeral(this.props.image.pull_count).value() : numeral(this.props.image.pull_count).format('0a').toUpperCase();
return (
<div className="image-item">
<div className="overlay menu-overlay">
Expand Down Expand Up @@ -185,7 +188,9 @@ var ImageCard = React.createClass({
<div className="actions">
<div className="favorites">
<span className="icon icon-favorite"></span>
<span className="text">{this.props.image.star_count}</span>
<span className="text">{favCount}</span>
<span className="icon icon-download"></span>
<span className="text">{pullCount}</span>
</div>
<div className="more-menu" onClick={self.handleMenuOverlayClick}>
<span className="icon icon-more"></span>
Expand Down
5 changes: 3 additions & 2 deletions src/utils/RegHubUtil.js
Expand Up @@ -137,7 +137,7 @@ module.exports = {
// Get Orgs for user
hubUtil.request({
url: `${REGHUB2_ENDPOINT}/user/orgs/`,
qs: { page_size: 50 }
qs: { page_size: 1000 }
}, (orgError, orgResponse, orgBody) => {
if (orgError) {
repositoryServerActions.error({orgError});
Expand Down Expand Up @@ -178,7 +178,8 @@ module.exports = {

async.map(namespaces, (namespace, cb) => {
hubUtil.request({
url: `${REGHUB2_ENDPOINT}/repositories/${namespace}`
url: `${REGHUB2_ENDPOINT}/repositories/${namespace}`,
qs: { page_size: 1000 }
}, (error, response, body) => {
if (error) {
repositoryServerActions.error({error});
Expand Down
7 changes: 5 additions & 2 deletions styles/icons.less
Expand Up @@ -35,8 +35,8 @@
text-transform: none !important;
speak: none;
line-height: 1;
//-webkit-font-smoothing: subpixel-antialiased;
-webkit-font-smoothing: antialiased;
-webkit-font-smoothing: subpixel-antialiased;
//-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

Expand Down Expand Up @@ -103,3 +103,6 @@
.icon-edit:before {
content: "o";
}
.icon-download:before {
content: "p";
}
18 changes: 14 additions & 4 deletions styles/new-container.less
Expand Up @@ -366,16 +366,20 @@
font-size: 11px;
color: @gray-normal;
border-right: 1px solid @color-divider;
padding: 1.1rem 1.2rem;
padding: 1.1rem 1rem;
.icon {
position: relative;
font-size: 11px;
margin-right: 0.5rem;
margin-right: 0.3rem;
color: @gray-normal;
}
.icon-download {
margin-left: 0.5rem;
}
.text {
position: relative;
top: -0.2rem;
margin-right: 0.3rem;
}
}
.tags {
Expand All @@ -400,10 +404,16 @@
}
.more-menu {
flex: 0 auto;
width: 39px;
padding: 0.4rem 1rem;
width: 30px;
padding: 0.4rem 0.5rem;
font-size: 20px;
.box-button();
.box-button {
.icon {
font-size: 1.5rem;
margin-left: 0.2rem;
}
}
}
.action {
flex: 0 auto;
Expand Down

0 comments on commit 16fa660

Please sign in to comment.