From 9199f2678c299a6eeac379c0ac814e9fb9068c89 Mon Sep 17 00:00:00 2001 From: KeyboardTsundoku Date: Sat, 10 Dec 2016 10:55:06 +1100 Subject: [PATCH 1/2] removed legacy instance properties code --- src/app/home/instance-properties.jade | 18 ------ src/app/home/instance-properties.js | 90 --------------------------- 2 files changed, 108 deletions(-) delete mode 100644 src/app/home/instance-properties.jade delete mode 100644 src/app/home/instance-properties.js diff --git a/src/app/home/instance-properties.jade b/src/app/home/instance-properties.jade deleted file mode 100644 index 34b759e8f0b..00000000000 --- a/src/app/home/instance-properties.jade +++ /dev/null @@ -1,18 +0,0 @@ -div.instance-properties - span.hostname - span.hostname-hostname(data-hook='hostname') - span.hostname-colon : - span.hostname-port(data-hook='port') - span.version - span(data-hook='module') - |  version  - span(data-hook='version') - div.db-stats - span.num-databases - strong(data-hook='num-databases') - |  DBs - span.num-collections - strong(data-hook='num-collections') - |  Collections - button.refresh-collections(data-hook='refresh-button') - i.fa(data-hook='refresh-icon') diff --git a/src/app/home/instance-properties.js b/src/app/home/instance-properties.js deleted file mode 100644 index 2d159897ded..00000000000 --- a/src/app/home/instance-properties.js +++ /dev/null @@ -1,90 +0,0 @@ -var View = require('ampersand-view'); -var app = require('ampersand-app'); -// var debug = require('debug')('mongodb-compass:home:instance-properties'); -var _ = require('lodash'); - -var instancePropertiesTemplate = require('./instance-properties.jade'); - -var InstancePropertiesView = module.exports = View.extend({ - template: instancePropertiesTemplate, - session: { - numDatabases: 'number', - numCollections: 'number', - instance: 'state', - is_fetching: { - type: 'boolean', - default: true - } - }, - derived: { - module: { - deps: ['instance.build.enterprise_module'], - fn: function() { - return app.instance.build.enterprise_module ? 'Enterprise' : 'Community'; - } - } - }, - bindings: { - 'instance.hostname': [ - { - type: 'text', - hook: 'hostname' - }, - { - type: 'attribute', - name: 'title', - hook: 'hostname' - } - ], - 'instance.port': { - type: 'text', - hook: 'port' - }, - 'instance.build.version': { - type: 'text', - hook: 'version' - }, - numCollections: { - type: 'text', - hook: 'num-collections' - }, - numDatabases: { - type: 'text', - hook: 'num-databases' - }, - module: { - type: 'text', - hook: 'module' - }, - is_fetching: { - type: 'booleanClass', - hook: 'refresh-icon', - yes: ['fa-refresh', 'fa-spin'], - no: 'fa-repeat' - } - }, - events: { - 'click button[data-hook=refresh-button]': 'onRefreshButtonClicked', - 'click span.hostname': 'onHostnameClicked' - }, - initialize: function() { - this.listenTo(app.instance, 'sync', this.onInstanceFetched); - }, - onInstanceFetched: function() { - // delay switching the spinner back to static for 500ms, otherwise the reload is not noticable - _.delay(function() { - this.is_fetching = false; - }.bind(this), 500); - this.numDatabases = app.instance.databases.length; - this.numCollections = app.instance.collections.length; - }, - onHostnameClicked: function() { - app.navigate('/'); - }, - onRefreshButtonClicked: function() { - app.instance.fetch(); - this.is_fetching = true; - } -}); - -module.exports = InstancePropertiesView; From 52e041c80759a6727b9fff876f7f39bff9497aa1 Mon Sep 17 00:00:00 2001 From: Peter Schmidt Date: Tue, 13 Dec 2016 11:49:30 +1100 Subject: [PATCH 2/2] Remove ul.nav-tabs styles The nav-tabs CSS class does not appear to be applied anywhere in Compass by a string search of the codebase. (there is one of the same class name in 10strap.less that appears unrelated) --- src/app/home/index.less | 43 +---------------------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/src/app/home/index.less b/src/app/home/index.less index 752fe54dd3a..b967dfea782 100644 --- a/src/app/home/index.less +++ b/src/app/home/index.less @@ -244,47 +244,6 @@ } } -ul.nav-tabs { - border-bottom: 1px solid @gray7; - li { - user-select: none; - -webkit-user-select: none; - a { - user-select: none; - -webkit-user-select: none; - font-size: 12px; - font-weight: bold; - border: 1px solid @pw; - border-bottom: none; - color: @chart1; - cursor: pointer; - text-transform: uppercase; - margin-right: 3px; - padding: 6px 32px 8px; - position: relative; - border-top-left-radius: 3px; - border-top-right-radius: 3px; - top: 1px; - transition: all 250ms ease; - &:hover { - background-color: @pw; - color: @gray0; - border-color: @gray7; - } - } - &:first-child { - margin-left: 15px; - } - &.active a, - &.active a:hover { - color: @gray0; - padding-bottom: 9px; - border: 1px solid @gray7; - border-bottom: none; - } - } -} - ::-webkit-scrollbar { display: none; -} \ No newline at end of file +}