http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/controls_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js index 599071c..9050002 100644 --- a/ambari-web/app/views/common/controls_view.js +++ b/ambari-web/app/views/common/controls_view.js @@ -71,7 +71,8 @@ App.ServiceConfigPopoverSupport = Ember.Mixin.create({ ), content: this.get('serviceConfig.description'), placement: this.get('popoverPlacement'), - trigger: 'hover' + trigger: 'hover', + html: true }); }, @@ -101,7 +102,7 @@ App.SupportsDependentConfigs = Ember.Mixin.create({ var type = App.config.getConfigTagFromFileName(config.get('filename')); var p = App.configsCollection.getConfig(App.config.configId(name, type)); controller.removeCurrentFromDependentList(config, saveRecommended); - if ((p && Em.get(p, 'propertyDependedBy.length') > 0) + if ((p && Em.get(p, 'propertyDependedBy.length') > 0) || (config.get('displayType') === 'user' && config.get('oldValue') !== config.get('value'))) { var old = config.get('oldValue'); config.set('oldValue', config.get('value')); @@ -213,7 +214,7 @@ App.ServiceConfigCalculateId = Ember.Mixin.create({ * @type {*} */ App.ServiceConfigTextField = Ember.TextField.extend(App.ServiceConfigPopoverSupport, App.ServiceConfigCalculateId, App.ValueObserver, { - + classNames: ['form-control'], valueBinding: 'serviceConfig.value', classNameBindings: 'textFieldClassName', placeholderBinding: 'serviceConfig.placeholder', @@ -235,11 +236,11 @@ App.ServiceConfigTextField = Ember.TextField.extend(App.ServiceConfigPopoverSupp textFieldClassName: function () { if (this.get('serviceConfig.unit')) { - return ['input-small']; + return ['input-sm']; } else if (this.get('serviceConfig.displayType') === 'principal') { - return ['span12']; + return ['col-md-12']; } else { - return ['span9']; + return ['col-md-9 long-input']; } }.property('serviceConfig.displayType', 'serviceConfig.unit') @@ -251,7 +252,7 @@ App.ServiceConfigTextField = Ember.TextField.extend(App.ServiceConfigPopoverSupp */ App.ServiceConfigTextFieldWithUnit = Ember.View.extend(App.ServiceConfigPopoverSupport, App.ValueObserver, { valueBinding: 'serviceConfig.value', - classNames: ['input-append', 'with-unit'], + classNames: ['input-group', 'with-unit', 'col-md-4'], placeholderBinding: 'serviceConfig.savedValue', templateName: require('templates/wizard/controls_service_config_textfield_with_unit') @@ -261,38 +262,21 @@ App.ServiceConfigTextFieldWithUnit = Ember.View.extend(App.ServiceConfigPopoverS * Password control * @type {*} */ -App.ServiceConfigPasswordField = Ember.TextField.extend(App.ServiceConfigPopoverSupport, { +App.ServiceConfigPasswordField = Ember.View.extend(App.ServiceConfigPopoverSupport, { serviceConfig: null, - type: 'password', - attributeBindings:['readOnly'], - valueBinding: 'serviceConfig.value', - classNames: [ 'span4' ], + placeholder: Em.I18n.t('form.item.placeholders.typePassword'), - template: Ember.Handlebars.compile('{{view view.retypePasswordView}}'), + templateName: require('templates/common/configs/widgets/service_config_password_field'), + + readOnly: Em.computed.not('serviceConfig.isEditable'), keyPress: function (event) { if (event.keyCode == 13) { return false; } - }, - - retypePasswordView: Ember.TextField.extend({ - placeholder: Em.I18n.t('form.passwordRetype'), - attributeBindings:['readOnly'], - type: 'password', - classNames: [ 'span4', 'retyped-password' ], - keyPress: function (event) { - if (event.keyCode == 13) { - return false; - } - }, - valueBinding: 'parentView.serviceConfig.retypedPassword', - readOnly: Em.computed.not('parentView.serviceConfig.isEditable') - }), - - readOnly: Em.computed.not('serviceConfig.isEditable') + } }); @@ -304,9 +288,9 @@ App.ServiceConfigTextArea = Ember.TextArea.extend(App.ServiceConfigPopoverSuppor valueBinding: 'serviceConfig.value', rows: 4, - classNames: ['directories'], + classNames: ['directories', 'form-control'], classNameBindings: ['widthClass'], - widthClass: 'span9' + widthClass: 'col-md-9' }); @@ -350,7 +334,7 @@ App.ServiceConfigTextAreaContent = Ember.TextArea.extend(App.ServiceConfigPopove valueBinding: 'serviceConfig.value', rows: 20, - classNames: ['span10'] + classNames: ['col-md-10', 'form-control'] }); /** @@ -378,6 +362,7 @@ App.ServiceConfigCheckbox = Ember.Checkbox.extend(App.ServiceConfigPopoverSuppor falseValue: false, checked: false, + checkboxInstance: null, elementForPopover: function () { return this.$().parent('.control-group').find('.bootstrap-checkbox'); @@ -403,12 +388,12 @@ App.ServiceConfigCheckbox = Ember.Checkbox.extend(App.ServiceConfigPopoverSuppor this.propertyDidChange('checked'); Em.run.next(function () { if (self.$()) { - self.$().checkbox({ + self.set('checkboxInstance', self.$().checkbox({ defaultState: self.get('serviceConfig.value'), - buttonStyle: 'btn-link btn-large', - checkedClass: 'icon-check', - uncheckedClass: 'icon-check-empty' - }); + buttonStyle: 'btn-link', + checkedClass: 'glyphicon glyphicon-check', + uncheckedClass: 'glyphicon glyphicon-unchecked' + })); self.propertyDidChange('elementForPopover'); self.addPopover(); } @@ -417,6 +402,7 @@ App.ServiceConfigCheckbox = Ember.Checkbox.extend(App.ServiceConfigPopoverSuppor willDestroyElement: function() { this.removeObserver('serviceConfig.value', this, 'checkedBinding'); + this.set('checkboxInstance', null); }, /*** @@ -451,6 +437,11 @@ App.ServiceConfigCheckbox = Ember.Checkbox.extend(App.ServiceConfigPopoverSuppor disabled: Em.computed.not('serviceConfig.isEditable'), + disabledDidChange: function() { + if (!this.get('checkboxInstance')) return; + this.get('checkboxInstance').checkbox('refresh'); + }.observes('disabled'), + //Set editDone false for all current category config text field parameter focusIn: function (event) { if (!this.get('serviceConfig.isOverridden') && !this.get('serviceConfig.isComparison')) { @@ -720,7 +711,7 @@ App.ServiceConfigRadioButtons = Ember.View.extend(App.ServiceConfigCalculateId, dbType = this.getDefaultPropertyValue('db_type'), additionalView1 = shouldAdditionalViewsBeSet ? App.CheckDBConnectionView.extend({databaseName: dbType}) : null, additionalView2 = shouldAdditionalViewsBeSet ? Ember.View.extend({ - template: Ember.Handlebars.compile('<div class="alert">{{{view.message}}}</div>'), + template: Ember.Handlebars.compile('<div class="alert alert-warning">{{{view.message}}}</div>'), message: function() { return Em.I18n.t('services.service.config.database.msg.jdbcSetup').format(dbType, driver); }.property() @@ -816,7 +807,7 @@ App.ServiceConfigComboBox = Ember.Select.extend(App.ServiceConfigPopoverSupport, contentBinding: 'serviceConfig.options', selectionBinding: 'serviceConfig.value', placeholderBinding: 'serviceConfig.savedValue', - classNames: [ 'span3' ] + classNames: [ 'col-md-3' ] }); @@ -847,7 +838,7 @@ App.ServiceConfigHostPopoverSupport = Ember.Mixin.create({ */ App.ServiceConfigMasterHostView = Ember.View.extend(App.ServiceConfigHostPopoverSupport, App.ServiceConfigCalculateId, { - classNames: ['master-host', 'span6'], + classNames: ['master-host', 'col-md-6'], valueBinding: 'serviceConfig.value', template: Ember.Handlebars.compile('{{value}}') @@ -883,7 +874,7 @@ App.checkConnectionView = App.ServiceConfigTextField.extend({ */ App.ServiceConfigLabelView = Ember.View.extend(App.ServiceConfigHostPopoverSupport, App.ServiceConfigCalculateId, { - classNames: ['master-host', 'span6'], + classNames: ['master-host', 'col-md-6'], valueBinding: 'serviceConfig.value', unitBinding: 'serviceConfig.unit', @@ -936,7 +927,7 @@ App.ServiceConfigComponentHostsView = Ember.View.extend(App.ServiceConfigMultipl viewName: 'serviceConfigSlaveHostsView', - classNames: ['component-hosts', 'span6'], + classNames: ['component-hosts'], valueBinding: 'serviceConfig.value', @@ -1469,7 +1460,7 @@ App.SwitchToGroupView = Em.View.extend({ */ App.BaseUrlTextField = Ember.TextField.extend({ - layout: Ember.Handlebars.compile('<div class="pull-left">{{yield}}</div> {{#if view.valueWasChanged}}<div class="pull-right"><a class="btn-small" {{action "restoreValue" target="view"}}><i class="icon-undo"></i></a></div>{{/if}}'), + layout: Ember.Handlebars.compile('<div class="pull-left">{{yield}}</div> {{#if view.valueWasChanged}}<div class="pull-right"><a class="btn-sm" {{action "restoreValue" target="view"}}><i class="icon-undo"></i></a></div>{{/if}}'), /** * Binding in the template
http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/filter_combo_cleanable.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/filter_combo_cleanable.js b/ambari-web/app/views/common/filter_combo_cleanable.js index b686000..f26fc51 100644 --- a/ambari-web/app/views/common/filter_combo_cleanable.js +++ b/ambari-web/app/views/common/filter_combo_cleanable.js @@ -26,7 +26,7 @@ var App = require('app'); App.FilterComboCleanableView = Ember.View.extend({ templateName: require('templates/common/filter_combo_cleanable'), - classNames: ['filter-combobox', 'input-append'], + classNames: ['filter-combobox', 'input-group'], didInsertElement: function() { App.popover(this.$("input[type=text]"), { http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/filter_combobox.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/filter_combobox.js b/ambari-web/app/views/common/filter_combobox.js index 897d65b..b65fde6 100644 --- a/ambari-web/app/views/common/filter_combobox.js +++ b/ambari-web/app/views/common/filter_combobox.js @@ -26,7 +26,7 @@ var App = require('app'); App.FilterComboboxView = Ember.View.extend({ templateName: require('templates/common/filter_combobox'), - classNames: ['filter-combobox', 'input-append'], + classNames: ['filter-combobox', 'input-group'], //filter: '', binding outside //columns: [], binding outside http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/filter_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/filter_view.js b/ambari-web/app/views/common/filter_view.js index 6f3a7bd..a7cd050 100644 --- a/ambari-web/app/views/common/filter_view.js +++ b/ambari-web/app/views/common/filter_view.js @@ -36,7 +36,7 @@ var wrapperView = Ember.View.extend({ template: Ember.Handlebars.compile( '{{#if view.fieldId}}<input type="hidden" id="{{unbound view.fieldId}}" value="" />{{/if}}' + '{{view view.filterView}}' + - '{{#if view.showApply}}<button {{action "setValueOnApply" target="view"}} class="apply-btn btn"><span>{{t common.apply}}</span></button>{{/if}} ' + '{{#if view.showApply}}<button {{action "setValueOnApply" target="view"}} class="apply-btn btn btn-default"><span>{{t common.apply}}</span></button>{{/if}} ' ), value: null, @@ -224,6 +224,7 @@ var wrapperView = Ember.View.extend({ * Simple input control for wrapperView */ var textFieldView = Ember.TextField.extend({ + classNames: ['input-sm', 'form-control'], type: 'text', placeholder: Em.I18n.t('any'), valueBinding: "parentView.value" @@ -296,6 +297,7 @@ var componentFieldView = Ember.View.extend({ * Simple select control for wrapperView */ var selectFieldView = Ember.Select.extend({ + classNames: ['input-sm', 'form-control'], selectionBinding: 'parentView.selected', contentBinding: 'parentView.content', optionValuePath: "content.value", http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/helpers/status_icon_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/helpers/status_icon_view.js b/ambari-web/app/views/common/helpers/status_icon_view.js index 70f56a9..7f94e60 100644 --- a/ambari-web/app/views/common/helpers/status_icon_view.js +++ b/ambari-web/app/views/common/helpers/status_icon_view.js @@ -26,20 +26,20 @@ App.StatusIconView = Em.View.extend({ * @type {object} */ statusIconMap: { - 'COMPLETED': 'icon-ok completed', - 'WARNING': 'icon-warning-sign', - 'FAILED': 'icon-exclamation-sign failed', - 'HOLDING_FAILED': 'icon-exclamation-sign failed', - 'SKIPPED_FAILED': 'icon-share-alt failed', - 'PENDING': 'icon-cog pending', - 'QUEUED': 'icon-cog queued', - 'IN_PROGRESS': 'icon-cogs in_progress', - 'HOLDING': 'icon-pause', - 'SUSPENDED': 'icon-pause', - 'ABORTED': 'icon-minus aborted', - 'TIMEDOUT': 'icon-time timedout', - 'HOLDING_TIMEDOUT': 'icon-time timedout', - 'SUBITEM_FAILED': 'icon-remove failed' + 'COMPLETED': 'glyphicon glyphicon-ok completed', + 'WARNING': 'glyphicon glyphicon-warning-sign', + 'FAILED': 'glyphicon glyphicon-exclamation-sign failed', + 'HOLDING_FAILED': 'glyphicon glyphicon-exclamation-sign failed', + 'SKIPPED_FAILED': 'glyphicon glyphicon-share-alt failed', + 'PENDING': 'glyphicon glyphicon-cog pending', + 'QUEUED': 'glyphicon glyphicon-cog queued', + 'IN_PROGRESS': 'glyphicon glyphicon-cogs in_progress', + 'HOLDING': 'glyphicon glyphicon-pause', + 'SUSPENDED': 'glyphicon glyphicon-pause', + 'ABORTED': 'glyphicon glyphicon-minus aborted', + 'TIMEDOUT': 'glyphicon glyphicon-time timedout', + 'HOLDING_TIMEDOUT': 'glyphicon glyphicon-time timedout', + 'SUBITEM_FAILED': 'glyphicon glyphicon-remove failed' }, classNameBindings: ['iconClass'], @@ -57,6 +57,6 @@ App.StatusIconView = Em.View.extend({ * @type {string} */ iconClass: function () { - return this.get('statusIconMap')[this.get('content')] || 'icon-question-sign'; + return this.get('statusIconMap')[this.get('content')] || 'glyphicon glyphicon-question-sign'; }.property('content') }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/modal_popup.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/modal_popup.js b/ambari-web/app/views/common/modal_popup.js index 252604e..f9ee2ae 100644 --- a/ambari-web/app/views/common/modal_popup.js +++ b/ambari-web/app/views/common/modal_popup.js @@ -21,6 +21,7 @@ var App = require('app'); App.ModalPopup = Ember.View.extend({ viewName: 'modalPopup', + modalDialogClasses: [], templateName: require('templates/common/modal_popup'), header: ' ', body: ' ', @@ -37,6 +38,13 @@ App.ModalPopup = Ember.View.extend({ primaryClass: 'btn-success', secondaryClass: '', thirdClass: '', + modalDialogClassesStr: function () { + var modalDialogClasses = this.get('modalDialogClasses'); + if (!Em.isArray(modalDialogClasses)) { + return ''; + } + return modalDialogClasses.join(' '); + }.property('modalDialogClasses.[]'), onPrimary: function () { this.hide(); }, @@ -54,6 +62,9 @@ App.ModalPopup = Ember.View.extend({ }, hide: function () { + if (!$.mocho) { + this.$('#modal').modal('hide'); + } this.destroy(); }, @@ -70,6 +81,11 @@ App.ModalPopup = Ember.View.extend({ .on('escape-key-pressed', this.escapeKeyPressed.bind(this)); this.fitZIndex(); var firstInputElement = this.$('#modal').find(':input').not(':disabled, .no-autofocus').first(); + if (!$.mocho) { + this.$('#modal').modal({ + backdrop: false + }); + } this.focusElement(firstInputElement); this.subscribeResize(); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/modal_popups/config_validation/config_validation_popup.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/modal_popups/config_validation/config_validation_popup.js b/ambari-web/app/views/common/modal_popups/config_validation/config_validation_popup.js index 98e1ce5..2fe7b62 100644 --- a/ambari-web/app/views/common/modal_popups/config_validation/config_validation_popup.js +++ b/ambari-web/app/views/common/modal_popups/config_validation/config_validation_popup.js @@ -26,7 +26,8 @@ var App = require('app'); App.showConfigValidationPopup = function (configErrors, primary, secondary) { return App.ModalPopup.show({ header: Em.I18n.t('installer.step7.popup.validation.warning.header'), - classNames: ['sixty-percent-width-modal','modal-full-width'], + classNames: ['common-modal-wrapper','modal-full-width'], + modalDialogClasses: ['modal-lg'], primary: Em.I18n.t('common.proceedAnyway'), primaryClass: 'btn-danger', marginBottom: 200, http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/modal_popups/dependent_configs_list_popup.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/modal_popups/dependent_configs_list_popup.js b/ambari-web/app/views/common/modal_popups/dependent_configs_list_popup.js index bcd8b86..4c4d4cf 100644 --- a/ambari-web/app/views/common/modal_popups/dependent_configs_list_popup.js +++ b/ambari-web/app/views/common/modal_popups/dependent_configs_list_popup.js @@ -30,7 +30,8 @@ App.showDependentConfigsPopup = function (recommendations, primary, secondary) { return App.ModalPopup.show({ encodeBody: false, header: Em.I18n.t('popup.dependent.configs.header'), - classNames: ['sixty-percent-width-modal','modal-full-width'], + classNames: ['common-modal-wrapper','modal-full-width'], + modalDialogClasses: ['modal-lg'], recommendations: recommendations, secondaryClass: 'cancel-button', bodyClass: Em.View.extend({ http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/modal_popups/log_file_search_popup.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/modal_popups/log_file_search_popup.js b/ambari-web/app/views/common/modal_popups/log_file_search_popup.js index 4e2032b..af40367 100644 --- a/ambari-web/app/views/common/modal_popups/log_file_search_popup.js +++ b/ambari-web/app/views/common/modal_popups/log_file_search_popup.js @@ -20,7 +20,8 @@ var App = require('app'); App.LogFileSearchPopup = function(header) { return App.ModalPopup.show({ - classNames: ['modal-full-width', 'sixty-percent-width-modal', 'log-file-search-popup'], + classNames: ['modal-full-width', 'common-modal-wrapper', 'log-file-search-popup'], + modalDialogClasses: ['modal-lg'], header: header, bodyView: null, bodyClass: App.LogFileSearchView.extend({ http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/modal_popups/log_tail_popup.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/modal_popups/log_tail_popup.js b/ambari-web/app/views/common/modal_popups/log_tail_popup.js index 4dae7a4..28609e8 100644 --- a/ambari-web/app/views/common/modal_popups/log_tail_popup.js +++ b/ambari-web/app/views/common/modal_popups/log_tail_popup.js @@ -23,7 +23,8 @@ var fileUtils = require('utils/file_utils'); App.showLogTailPopup = function(content) { return App.ModalPopup.show({ - classNames: ['log-tail-popup', 'full-width-modal', 'full-height-modal'], + classNames: ['log-tail-popup', 'wizard-modal-wrapper', 'full-height-modal'], + modalDialogClasses: ['modal-xlg'], header: fileUtils.fileNameFromPath(content.get('filePath')), primary: false, secondary: Em.I18n.t('common.dismiss'), http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/progress_bar_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/progress_bar_view.js b/ambari-web/app/views/common/progress_bar_view.js index 146dfd5..885289f 100644 --- a/ambari-web/app/views/common/progress_bar_view.js +++ b/ambari-web/app/views/common/progress_bar_view.js @@ -19,8 +19,8 @@ var App = require('app'); App.ProgressBarView = Em.View.extend({ - template: Ember.Handlebars.compile('<div class="bar" {{bindAttr style="view.progressWidth"}}></div>'), - classNameBindings: ['generalClass', 'barClass'], + template: Ember.Handlebars.compile('<div {{bindAttr class="barClass :progress-bar" style="view.progressWidth"}}></div>'), + classNameBindings: ['generalClass'], /** * @type {number} @@ -51,20 +51,20 @@ App.ProgressBarView = Em.View.extend({ barClass: function () { switch (this.get('status')) { case 'FAILED': - return 'progress-danger'; + return 'progress-bar-danger'; case 'ABORTED': case 'TIMED_OUT': - return 'progress-warning'; + return 'progress-bar-warning'; case 'COMPLETED': - return 'progress-success'; + return 'progress-bar-success'; case 'SUSPENDED': - return 'progress-info'; + return 'progress-bar-info'; case 'QUEUED': case 'PENDING': case 'IN_PROGRESS': - return 'progress-info active progress-striped'; + return 'progress-bar-info active progress-bar-striped'; default: - return 'progress-info' + return 'progress-bar-info' } }.property('status') }); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/common/table_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/table_view.js b/ambari-web/app/views/common/table_view.js index acd6bac..abdd4ed 100644 --- a/ambari-web/app/views/common/table_view.js +++ b/ambari-web/app/views/common/table_view.js @@ -19,6 +19,22 @@ var App = require('app'); var filters = require('views/common/filter_view'); +App.PaginationBtnsView = Ember.View.extend({ + tag: 'div', + previousBtnClass: function () { + if (this.get("parentView.startIndex") > 1) { + return "paginate_previous"; + } + return "paginate_disabled_previous"; + }.property("parentView.startIndex", 'parentView.filteredCount'), + nextBtnClass: function () { + if ((this.get("parentView.endIndex")) < this.get("parentView.filteredCount")) { + return "paginate_next"; + } + return "paginate_disabled_next"; + }.property("parentView.endIndex", 'parentView.filteredCount') +}); + App.TableView = Em.View.extend(App.UserPref, { init: function() { @@ -182,74 +198,64 @@ App.TableView = Em.View.extend(App.UserPref, { */ paginationInfo: Em.computed.i18nFormat('tableView.filters.paginationInfo', 'startIndex', 'endIndex', 'filteredCount'), - paginationLeft: Ember.View.extend({ - tagName: 'a', - template: Ember.Handlebars.compile('<i class="icon-arrow-left"></i>'), - classNameBindings: ['class'], - class: function () { - if (this.get("parentView.startIndex") > 1) { - return "paginate_previous"; - } - return "paginate_disabled_previous"; - }.property("parentView.startIndex", 'parentView.filteredCount'), - - click: function () { - if (this.get('class') === "paginate_previous") { - this.get('parentView').previousPage(); - } - } + pagination2Btns: App.PaginationBtnsView.extend({ + classNames: ['paging_two_button'], + template: Em.Handlebars.compile('<ul class="pagination">' + + '<li {{action previousPage target="view.parentView"}} {{bindAttr class="view.previousBtnClass"}}>' + + '<i class="glyphicon glyphicon-arrow-left"></i>' + + '</li>' + + '<li {{action nextPage target="view.parentView"}} {{bindAttr class="view.nextBtnClass"}}>' + + '<i class="glyphicon glyphicon-arrow-right"></i>' + + '</li>' + + '</ul>') }), - paginationRight: Ember.View.extend({ - tagName: 'a', - template: Ember.Handlebars.compile('<i class="icon-arrow-right"></i>'), - classNameBindings: ['class'], - class: function () { - if ((this.get("parentView.endIndex")) < this.get("parentView.filteredCount")) { - return "paginate_next"; - } - return "paginate_disabled_next"; - }.property("parentView.endIndex", 'parentView.filteredCount'), - - click: function () { - if (this.get('class') === "paginate_next") { - this.get('parentView').nextPage(); - } - } + pagination4Btns: App.PaginationBtnsView.extend({ + classNames: ['paging_two_button'], + template: Em.Handlebars.compile('<ul class="pagination">' + + '{{view view.parentView.paginationFirst}}' + + '<li {{action previousPage target="view.parentView"}} {{bindAttr class="view.previousBtnClass"}}>' + + '<i class="glyphicon glyphicon-arrow-left"></i>' + + '</li>' + + '<li {{action nextPage target="view.parentView"}} {{bindAttr class="view.nextBtnClass"}}>' + + '<i class="glyphicon glyphicon-arrow-right"></i>' + + '</li>' + + '{{view view.parentView.paginationLast}}' + + '</ul>') }), paginationFirst: Ember.View.extend({ - tagName: 'a', - template: Ember.Handlebars.compile('<i class="icon-step-backward"></i>'), + tagName: 'li', + template: Ember.Handlebars.compile('<i class="glyphicon glyphicon-step-backward"></i>'), classNameBindings: ['class'], class: function () { - if ((this.get("parentView.endIndex")) > parseInt(this.get("parentView.displayLength"))) { + if ((this.get("parentView.parentView.endIndex")) > parseInt(this.get("parentView.parentView.displayLength"))) { return "paginate_previous"; } return "paginate_disabled_previous"; - }.property("parentView.endIndex", 'parentView.filteredCount'), + }.property("parentView.parentView.endIndex", 'parentView.parentView.filteredCount'), click: function () { if (this.get('class') === "paginate_previous") { - this.get('parentView').firstPage(); + this.get('parentView.parentView').firstPage(); } } }), paginationLast: Ember.View.extend({ - tagName: 'a', - template: Ember.Handlebars.compile('<i class="icon-step-forward"></i>'), + tagName: 'li', + template: Ember.Handlebars.compile('<i class="glyphicon glyphicon-step-forward"></i>'), classNameBindings: ['class'], class: function () { - if (this.get("parentView.endIndex") !== this.get("parentView.filteredCount")) { + if (this.get("parentView.parentView.endIndex") !== this.get("parentView.parentView.filteredCount")) { return "paginate_next"; } return "paginate_disabled_next"; - }.property("parentView.endIndex", 'parentView.filteredCount'), + }.property("parentView.parentView.endIndex", 'parentView.parentView.filteredCount'), click: function () { if (this.get('class') === "paginate_next") { - this.get('parentView').lastPage(); + this.get('pparentView.arentView').lastPage(); } } }), @@ -259,6 +265,7 @@ App.TableView = Em.View.extend(App.UserPref, { * @type {Ember.View} */ rowsPerPageSelectView: Em.Select.extend({ + classNames: ['form-control'], content: ['10', '25', '50', '100'], change: function () { this.get('parentView').saveDisplayLength(); @@ -519,4 +526,4 @@ App.TableView = Em.View.extend(App.UserPref, { }); } -}); +}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/highAvailability/hawq/activateStandby/step3_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/highAvailability/hawq/activateStandby/step3_view.js b/ambari-web/app/views/main/admin/highAvailability/hawq/activateStandby/step3_view.js index 184e4b9..c425286 100644 --- a/ambari-web/app/views/main/admin/highAvailability/hawq/activateStandby/step3_view.js +++ b/ambari-web/app/views/main/admin/highAvailability/hawq/activateStandby/step3_view.js @@ -31,6 +31,6 @@ App.ActivateHawqStandbyWizardStep3View = App.HighAvailabilityProgressPageView.ex submitButtonText: Em.I18n.t('common.complete'), - labelWidth: 'span5' + labelWidth: 'col-md-5' }); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/highAvailability/hawq/addStandby/step4_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/highAvailability/hawq/addStandby/step4_view.js b/ambari-web/app/views/main/admin/highAvailability/hawq/addStandby/step4_view.js index d57f7cb..80e67e1 100644 --- a/ambari-web/app/views/main/admin/highAvailability/hawq/addStandby/step4_view.js +++ b/ambari-web/app/views/main/admin/highAvailability/hawq/addStandby/step4_view.js @@ -31,6 +31,6 @@ App.AddHawqStandbyWizardStep4View = App.HighAvailabilityProgressPageView.extend( submitButtonText: Em.I18n.t('common.complete'), - labelWidth: 'span5' + labelWidth: 'col-md-5' }); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step3_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step3_view.js b/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step3_view.js index 8c21beb..aa0daf6 100644 --- a/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step3_view.js +++ b/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step3_view.js @@ -31,6 +31,6 @@ App.RemoveHawqStandbyWizardStep3View = App.HighAvailabilityProgressPageView.exte submitButtonText: Em.I18n.t('common.complete'), - labelWidth: 'span5' + labelWidth: 'col-md-5' }); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/highAvailability/nameNode/step1_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/highAvailability/nameNode/step1_view.js b/ambari-web/app/views/main/admin/highAvailability/nameNode/step1_view.js index 000fb7c..76c37b8 100644 --- a/ambari-web/app/views/main/admin/highAvailability/nameNode/step1_view.js +++ b/ambari-web/app/views/main/admin/highAvailability/nameNode/step1_view.js @@ -24,7 +24,7 @@ App.HighAvailabilityWizardStep1View = Em.View.extend({ templateName: require('templates/main/admin/highAvailability/nameNode/step1'), didInsertElement: function() { - App.popover($("div.controls input[type=text]"), {'placement': 'right', 'trigger': 'hover', 'title': this.t('admin.highAvailability.wizard.step1.nameserviceid.tooltip.title'), 'content': this.t('admin.highAvailability.wizard.step1.nameserviceid.tooltip.content')}); + App.popover($("input[type=text]"), {'placement': 'right', 'trigger': 'hover', 'title': this.t('admin.highAvailability.wizard.step1.nameserviceid.tooltip.title'), 'content': this.t('admin.highAvailability.wizard.step1.nameserviceid.tooltip.content')}); }, showInputError: Em.computed.and('!controller.isNameServiceIdValid', 'controller.content.nameServiceId.length') http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/highAvailability/progress_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/highAvailability/progress_view.js b/ambari-web/app/views/main/admin/highAvailability/progress_view.js index fb793e2..6f7f410 100644 --- a/ambari-web/app/views/main/admin/highAvailability/progress_view.js +++ b/ambari-web/app/views/main/admin/highAvailability/progress_view.js @@ -66,7 +66,7 @@ App.HighAvailabilityProgressPageView = Em.View.extend(App.wizardProgressPageView this.set('noticeClass', 'alert alert-success'); } else if (status === 'FAILED') { this.set('notice', this.get('noticeFailed')); - this.set('noticeClass', 'alert alert-error'); + this.set('noticeClass', 'alert alert-danger'); } else { this.set('notice', this.get('noticeInProgress')); this.set('noticeClass', 'alert alert-info'); @@ -93,16 +93,16 @@ App.HighAvailabilityProgressPageView = Em.View.extend(App.wizardProgressPageView onStatus: function () { this.set('linkClass', Boolean(this.get('content.requestIds.length')) ? 'active-link' : 'active-text'); if (this.get('content.status') === 'IN_PROGRESS') { - this.set('icon', 'icon-cog'); + this.set('icon', 'glyphicon glyphicon-cog'); this.set('iconColor', 'text-info'); } else if (this.get('content.status') === 'FAILED') { - this.set('icon', 'icon-exclamation-sign'); - this.set('iconColor', 'text-error'); + this.set('icon', 'glyphicon glyphicon-exclamation-sign'); + this.set('iconColor', 'text-danger'); } else if (this.get('content.status') === 'COMPLETED') { - this.set('icon', 'icon-ok'); + this.set('icon', 'glyphicon glyphicon-ok'); this.set('iconColor', 'text-success'); } else { - this.set('icon', 'icon-cog'); + this.set('icon', 'glyphicon glyphicon-cog'); this.set('iconColor', ''); this.set('linkClass', 'not-active-link'); } http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/highAvailability/resourceManager/step4_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/highAvailability/resourceManager/step4_view.js b/ambari-web/app/views/main/admin/highAvailability/resourceManager/step4_view.js index a257d1a..ffc12ba 100644 --- a/ambari-web/app/views/main/admin/highAvailability/resourceManager/step4_view.js +++ b/ambari-web/app/views/main/admin/highAvailability/resourceManager/step4_view.js @@ -31,6 +31,6 @@ App.RMHighAvailabilityWizardStep4View = App.HighAvailabilityProgressPageView.ext submitButtonText: Em.I18n.t('common.complete'), - labelWidth: 'span5' + labelWidth: 'col-md-5' }); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/stack_and_upgrade_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/stack_and_upgrade_view.js b/ambari-web/app/views/main/admin/stack_and_upgrade_view.js index ffa41c8..801dda8 100644 --- a/ambari-web/app/views/main/admin/stack_and_upgrade_view.js +++ b/ambari-web/app/views/main/admin/stack_and_upgrade_view.js @@ -20,6 +20,7 @@ var App = require('app'); var stringUtils = require('utils/string_utils'); App.MainAdminStackAndUpgradeView = Em.View.extend({ - templateName: require('templates/main/admin/stack_and_upgrade') + templateName: require('templates/main/admin/stack_and_upgrade'), + classNames: ['col-md-12'] }); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/stack_upgrade/failed_hosts_modal_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/stack_upgrade/failed_hosts_modal_view.js b/ambari-web/app/views/main/admin/stack_upgrade/failed_hosts_modal_view.js index 083a8f4..354a352 100644 --- a/ambari-web/app/views/main/admin/stack_upgrade/failed_hosts_modal_view.js +++ b/ambari-web/app/views/main/admin/stack_upgrade/failed_hosts_modal_view.js @@ -36,8 +36,8 @@ App.FailedHostsPopupBodyView = Em.View.extend({ didInsertElement: function () { App.tooltip(this.$("[rel='UsageTooltip']")); - this.$(".accordion").on("show hide", function (e) { - $(e.target).siblings(".accordion-heading").find("i.accordion-toggle").toggleClass('icon-caret-right icon-caret-down') + this.$(".panel").on("show hide", function (e) { + $(e.target).siblings(".panel-heading").find("i.panel-toggle").toggleClass('icon-caret-right icon-caret-down') }); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/stack_upgrade/upgrade_group_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_group_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_group_view.js index 1dd6b0d..c5ab97a 100644 --- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_group_view.js +++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_group_view.js @@ -28,7 +28,7 @@ App.upgradeGroupView = Em.View.extend({ */ progressBarView: App.ProgressBarView.extend({ classNames: ['progress-counter'], - template: Ember.Handlebars.compile('<div class="bar" {{bindAttr style="view.progressWidth"}}></div>' + + template: Ember.Handlebars.compile('<div class="progress-bar" {{bindAttr style="view.progressWidth"}}></div>' + '<div class="counters-label">{{view.completedTasks}}/{{view.totalTasks}}</div>') }), http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js index 1e3296b..fda0c7e 100644 --- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js +++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js @@ -292,7 +292,8 @@ App.MainAdminStackUpgradeHistoryView = App.TableView.extend(App.TableServerViewM this.get('controller').set('currentUpgradeRecord', record) App.ModalPopup.show({ - classNames: ['full-width-modal'], + classNames: ['wizard-modal-wrapper'], + modalDialogClasses: ['modal-xlg'], header: title, bodyClass: App.MainAdminStackUpgradeHistoryDetailsView, primary: Em.I18n.t('common.dismiss'), http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js index bf15f33..83950e6 100644 --- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js +++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js @@ -125,13 +125,13 @@ App.UpgradeVersionBoxView = Em.View.extend({ class: 'spinner' }, 'INSTALLING': { - iconClass: 'icon-cog', + iconClass: 'glyphicon glyphicon-cog', isLink: true, text: Em.I18n.t('hosts.host.stackVersions.status.installing'), action: 'showProgressPopup' }, 'INSTALLED': { - iconClass: 'icon-ok', + iconClass: 'glyphicon glyphicon-ok', isLink: true, text: Em.I18n.t('common.installed'), action: null @@ -202,7 +202,7 @@ App.UpgradeVersionBoxView = Em.View.extend({ element.set('isLink', true); element.set('action', 'openUpgradeDialog'); if (['HOLDING', 'HOLDING_FAILED', 'HOLDING_TIMEDOUT', 'ABORTED'].contains(App.get('upgradeState'))) { - element.set('iconClass', 'icon-pause'); + element.set('iconClass', 'glyphicon glyphicon-pause'); if (this.get('controller.isDowngrade')) { element.set('text', Em.I18n.t('admin.stackVersions.version.downgrade.pause')); } @@ -211,7 +211,7 @@ App.UpgradeVersionBoxView = Em.View.extend({ } } else { - element.set('iconClass', 'icon-cog'); + element.set('iconClass', 'glyphicon glyphicon-cog'); if (this.get('controller.isDowngrade')) { element.set('text', Em.I18n.t('admin.stackVersions.version.downgrade.running')); } @@ -350,7 +350,8 @@ App.UpgradeVersionBoxView = Em.View.extend({ }); return this.get('isRepoUrlsEditDisabled') ? null : App.ModalPopup.show({ - classNames: ['repository-list', 'sixty-percent-width-modal'], + classNames: ['repository-list', 'common-modal-wrapper'], + modalDialogClasses: ['modal-lg'], skipValidation: false, autoHeight: false, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js index f6f86db..15d9701 100644 --- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js +++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js @@ -22,7 +22,7 @@ var stringUtils = require('utils/string_utils'); App.UpgradeVersionColumnView = App.UpgradeVersionBoxView.extend({ templateName: require('templates/main/admin/stack_upgrade/upgrade_version_column'), isVersionColumnView: true, - classNames: ['version-column', 'span4'], + classNames: ['version-column', 'col-md-4'], didInsertElement: function () { App.tooltip($('.out-of-sync-badge'), {title: Em.I18n.t('hosts.host.stackVersions.status.out_of_sync')}); @@ -83,13 +83,13 @@ App.UpgradeVersionColumnView = App.UpgradeVersionBoxView.extend({ class: 'spinner' }, 'INSTALLING': { - iconClass: 'icon-cog', + iconClass: 'glyphicon glyphicon-cog', isLink: true, text: Em.I18n.t('hosts.host.stackVersions.status.installing'), action: 'showProgressPopup' }, 'INSTALLED': { - iconClass: 'icon-ok', + iconClass: 'glyphicon glyphicon-ok', isLink: true, text: Em.I18n.t('common.installed'), action: null http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/alert_definitions_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/alert_definitions_view.js b/ambari-web/app/views/main/alert_definitions_view.js index 36ee036..f2b5f56 100644 --- a/ambari-web/app/views/main/alert_definitions_view.js +++ b/ambari-web/app/views/main/alert_definitions_view.js @@ -350,7 +350,7 @@ App.MainAlertDefinitionsView = App.TableView.extend({ fieldType: 'filter-input-width', template: Ember.Handlebars.compile( '<div class="btn-group display-inline-block">' + - '<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">' + + '<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">' + '<span class="filters-label">{{t common.groups}}: </span>' + '<span>{{view.selected.label}} <span class="caret"></span></span>' + '</a>' + http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/alerts/definition_configs_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/alerts/definition_configs_view.js b/ambari-web/app/views/main/alerts/definition_configs_view.js index 27296f6..72b2dde 100644 --- a/ambari-web/app/views/main/alerts/definition_configs_view.js +++ b/ambari-web/app/views/main/alerts/definition_configs_view.js @@ -36,11 +36,7 @@ App.AlertDefinitionConfigsView = Em.View.extend({ */ alertDefinitionType: '', - /** - * List of classes applied to all inputs - * @type {String} - */ - basicClass: 'span11', + formControlClass: 'form-control', init: function () { this.set('controller.canEdit', this.get('canEdit')); @@ -57,13 +53,17 @@ App.AlertDefinitionConfigsView = Em.View.extend({ App.AlertConfigTextFieldView = Em.View.extend({ templateName: require('templates/main/alerts/configs/alert_config_text_field'), - classNameBindings: ['property.classNames', 'parentView.basicClass'] + classNameBindings: ['property.classNames'], + classNames: ['row'], + colWidth: function () { + return this.get('property.colWidth') || 'col-md-12'; + }.property('property.colWidth') }); -App.AlertConfigTextAreaView = Em.TextArea.extend({ - valueBinding: 'property.value', - disabledBinding: 'property.isDisabled', - classNameBindings: ['property.classNames', 'parentView.basicClass'] +App.AlertConfigTextAreaView = Em.View.extend({ + templateName: require('templates/main/alerts/configs/alert_config_text_area'), + classNameBindings: ['property.classNames'], + classNames: ['row'] }); App.AlertConfigSelectView = Em.Select.extend({ @@ -71,12 +71,13 @@ App.AlertConfigSelectView = Em.Select.extend({ selectionBinding: 'property.value', disabledBinding: 'property.isDisabled', contentBinding: 'property.options', - classNameBindings: ['property.classNames', 'parentView.basicClass'] + classNameBindings: ['property.classNames'] }); App.AlertConfigThresholdView = Em.View.extend({ templateName: require('templates/main/alerts/configs/alert_config_threshold'), - classNameBindings: ['property.classNames', 'parentView.basicClass'] + classNameBindings: ['property.classNames'], + classNames: ['row'] }); App.AlertConfigRadioButtonView = Em.Checkbox.extend({ @@ -100,7 +101,8 @@ App.AlertConfigParameterView = Em.View.extend({ bigInput: Em.computed.equal('property.type', 'STRING'), - classNameBindings: ['property.classNames', 'parentView.basicClass'], + classNameBindings: ['property.classNames'], + classNames: ['row'], didInsertElement: function () { App.tooltip($("[rel='parameter-tooltip']")); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/alerts/definition_details_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/alerts/definition_details_view.js b/ambari-web/app/views/main/alerts/definition_details_view.js index 4b09a2f..fc80c89 100644 --- a/ambari-web/app/views/main/alerts/definition_details_view.js +++ b/ambari-web/app/views/main/alerts/definition_details_view.js @@ -163,7 +163,7 @@ App.MainAlertDefinitionDetailsView = App.TableView.extend({ */ serviceFilterView: filters.createSelectView({ column: 0, - fieldType: 'input-small', + fieldType: 'input-sm', content: filters.getComputedServicesList(), onChangeValue: function () { this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'select'); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/dashboard/widget.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widget.js b/ambari-web/app/views/main/dashboard/widget.js index a66e0b2..cc5be28 100644 --- a/ambari-web/app/views/main/dashboard/widget.js +++ b/ambari-web/app/views/main/dashboard/widget.js @@ -228,7 +228,8 @@ App.DashboardWidgetView = Em.View.extend({ return App.ModalPopup.show({ header: Em.I18n.t('dashboard.widgets.popupHeader'), - classNames: ['sixty-percent-width-modal-edit-widget'], + classNames: ['modal-edit-widget'], + modalDialogClasses: ['modal-lg'], bodyClass: Ember.View.extend({ templateName: require('templates/main/dashboard/edit_widget_popup'), configPropertyObj: configObj http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/dashboard/widgets/cluster_metrics_widget.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widgets/cluster_metrics_widget.js b/ambari-web/app/views/main/dashboard/widgets/cluster_metrics_widget.js index b158509..384a898 100644 --- a/ambari-web/app/views/main/dashboard/widgets/cluster_metrics_widget.js +++ b/ambari-web/app/views/main/dashboard/widgets/cluster_metrics_widget.js @@ -31,13 +31,13 @@ App.ClusterMetricsDashboardWidgetView = App.DashboardWidgetView.extend(App.Expor this.$().on('mouseleave', function () { self.set('isExportMenuHidden', true); }); - App.tooltip(this.$('.corner-icon > .icon-save'), { + App.tooltip(this.$('.corner-icon > .glyphicon-save'), { title: Em.I18n.t('common.export') }); }, willDestroyElement: function () { - this.$('.corner-icon > .icon-save').tooltip('destroy'); + this.$('.corner-icon > .glyphicon-save').tooltip('destroy'); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/host.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host.js b/ambari-web/app/views/main/host.js index fd4e085..39b45b0 100644 --- a/ambari-web/app/views/main/host.js +++ b/ambari-web/app/views/main/host.js @@ -132,6 +132,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, { * @type {Ember.View} */ rowsPerPageSelectView: Em.Select.extend({ + classNames: ['form-control'], content: ['10', '25', '50', '100'], attributeBindings: ['disabled'], disabled: true, http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/host/details.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/details.js b/ambari-web/app/views/main/host/details.js index 784e63c..ee9c085 100644 --- a/ambari-web/app/views/main/host/details.js +++ b/ambari-web/app/views/main/host/details.js @@ -46,19 +46,19 @@ App.MainHostDetailsView = Em.View.extend({ { action: 'startAllComponents', liClass: this.get('controller.content.isNotHeartBeating') ? 'disabled' : 'enabled', - cssClass: 'icon-play', + cssClass: 'glyphicon glyphicon-play', label: this.t('hosts.host.details.startAllComponents') }, { action: 'stopAllComponents', liClass: this.get('controller.content.isNotHeartBeating') ? 'disabled' : 'enabled', - cssClass: 'icon-stop', + cssClass: 'glyphicon glyphicon-stop', label: this.t('hosts.host.details.stopAllComponents') }, { action: 'restartAllComponents', liClass: this.get('controller.content.isNotHeartBeating') ? 'disabled' : 'enabled', - cssClass: 'icon-repeat', + cssClass: 'glyphicon glyphicon-repeat', label: this.t('hosts.host.details.restartAllComponents') } ]); @@ -67,7 +67,7 @@ App.MainHostDetailsView = Em.View.extend({ result.push({ action: 'setRackId', liClass: '', - cssClass: 'icon-gear', + cssClass: 'glyphicon glyphicon-cog', label: this.t('hosts.host.details.setRackId') }); result.push({ @@ -82,7 +82,7 @@ App.MainHostDetailsView = Em.View.extend({ result.push({ action: 'deleteHost', liClass: '', - cssClass: 'icon-remove', + cssClass: 'glyphicon glyphicon-remove', label: this.t('hosts.host.details.deleteHost') }); } http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/host/details/host_component_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/details/host_component_view.js b/ambari-web/app/views/main/host/details/host_component_view.js index 16071eb..b61f8d4 100644 --- a/ambari-web/app/views/main/host/details/host_component_view.js +++ b/ambari-web/app/views/main/host/details/host_component_view.js @@ -58,12 +58,12 @@ App.HostComponentView = Em.View.extend({ statusClass: function () { //Class when install failed if (this.get('workStatus') === App.HostComponentStatus.install_failed) { - return 'health-status-color-red icon-cog'; + return 'health-status-color-red glyphicon glyphicon-cog'; } //Class when installing if (this.get('workStatus') === App.HostComponentStatus.installing) { - return 'health-status-color-blue icon-cog'; + return 'health-status-color-blue glyphicon glyphicon-cog'; } //For all other cases http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/host/hosts_table_menu_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/hosts_table_menu_view.js b/ambari-web/app/views/main/host/hosts_table_menu_view.js index f820c70..c06f7b3 100644 --- a/ambari-web/app/views/main/host/hosts_table_menu_view.js +++ b/ambari-web/app/views/main/host/hosts_table_menu_view.js @@ -68,7 +68,6 @@ App.HostTableMenuView = Em.View.extend({ slaveItemView: Em.View.extend({ tagName: 'li', - classNames: ['dropdown-submenu'], /** @@ -239,7 +238,6 @@ App.HostTableMenuView = Em.View.extend({ hostItemView: Em.View.extend({ tagName: 'li', - classNames: ['dropdown-submenu'], label: Em.I18n.t('common.hosts'), http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/host/stack_versions_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/stack_versions_view.js b/ambari-web/app/views/main/host/stack_versions_view.js index 5e745a4..cebe8c7 100644 --- a/ambari-web/app/views/main/host/stack_versions_view.js +++ b/ambari-web/app/views/main/host/stack_versions_view.js @@ -161,7 +161,7 @@ App.MainHostStackVersionsView = App.TableView.extend({ outOfSyncInfo: Em.View.extend({ tagName: 'i', - classNames: ['icon-question-sign'], + classNames: ['glyphicon glyphicon-question-sign'], didInsertElement: function() { App.tooltip($(this.get('element')), { placement: "top", http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/menu.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/menu.js b/ambari-web/app/views/main/menu.js index f60ae8a..f15e48a 100644 --- a/ambari-web/app/views/main/menu.js +++ b/ambari-web/app/views/main/menu.js @@ -24,7 +24,7 @@ var App = require('app'); */ App.MainMenuView = Em.CollectionView.extend({ tagName: 'ul', - classNames: ['nav', 'top-nav-menu'], + classNames: ['nav', 'top-nav-menu', 'navbar-nav'], views: function () { return App.router.get('mainViewsController.ambariViews'); @@ -61,20 +61,22 @@ App.MainMenuView = Em.CollectionView.extend({ itemViewClass: Em.View.extend({ - classNameBindings: ['active', ':top-nav-dropdown'], + classNameBindings: ['active', 'dropdownMenu:dropdown'], + + classNames: ['top-nav-dropdown'], active: function () { if (App.get('clusterName') && App.router.get('clusterController.isLoaded')) { - var last_url = App.router.location.lastSetURL || location.href.replace(/^[^#]*#/, ''); - if (last_url.substr(1, 4) !== 'main' || !this._childViews) { - return; + var lastUrl = App.router.location.lastSetURL || location.href.replace(/^[^#]*#/, ''); + if (lastUrl.substr(1, 4) !== 'main' || !this._childViews) { + return ''; } var reg = /^\/main\/([a-z]+)/g; - var sub_url = reg.exec(last_url); - var chunk = (null != sub_url) ? sub_url[1] : 'dashboard'; + var subUrl = reg.exec(lastUrl); + var chunk = null !== subUrl ? subUrl[1] : 'dashboard'; return this.get('content.routing').indexOf(chunk) === 0 ? "active" : ""; } - return ""; + return ''; }.property('App.router.location.lastSetURL', 'App.router.clusterController.isLoaded'), templateName: require('templates/main/menu_item'), @@ -100,19 +102,19 @@ App.MainMenuView = Em.CollectionView.extend({ selectedAdminItemBinding: 'App.router.mainAdminController.category', dropdownCategories: function () { - var itemName = this.get('content').routing; + var itemName = this.get('content.routing'); var categories = []; + var upg = App.get('upgradeInProgress') || App.get('upgradeHolding'); // create dropdown categories for each menu item - if (itemName == 'admin') { - categories = []; - if(App.isAuthorized('CLUSTER.VIEW_STACK_DETAILS, CLUSTER.UPGRADE_DOWNGRADE_STACK') || (App.get('upgradeInProgress') || App.get('upgradeHolding'))) { + if (itemName === 'admin') { + if(App.isAuthorized('CLUSTER.VIEW_STACK_DETAILS, CLUSTER.UPGRADE_DOWNGRADE_STACK') || upg) { categories.push({ name: 'stackAndUpgrade', url: 'stack', label: Em.I18n.t('admin.stackUpgrade.title') }); } - if(App.isAuthorized('SERVICE.SET_SERVICE_USERS_GROUPS') || (App.get('upgradeInProgress') || App.get('upgradeHolding'))) { + if(App.isAuthorized('SERVICE.SET_SERVICE_USERS_GROUPS') || upg) { categories.push({ name: 'adminServiceAccounts', url: 'serviceAccounts', @@ -120,7 +122,7 @@ App.MainMenuView = Em.CollectionView.extend({ disabled: App.get('upgradeInProgress') || App.get('upgradeHolding') }); } - if (!App.get('isHadoopWindowsStack') && App.isAuthorized('CLUSTER.TOGGLE_KERBEROS') || (App.get('upgradeInProgress') || App.get('upgradeHolding'))) { + if (!App.get('isHadoopWindowsStack') && App.isAuthorized('CLUSTER.TOGGLE_KERBEROS') || upg) { categories.push({ name: 'kerberos', url: 'kerberos/', @@ -128,7 +130,7 @@ App.MainMenuView = Em.CollectionView.extend({ disabled: App.get('upgradeInProgress') || App.get('upgradeHolding') }); } - if (App.isAuthorized('SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS') || (App.get('upgradeInProgress') || App.get('upgradeHolding'))) { + if (App.isAuthorized('SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS') || upg) { if (App.supports.serviceAutoStart) { categories.push({ name: 'serviceAutoStart', @@ -139,14 +141,14 @@ App.MainMenuView = Em.CollectionView.extend({ } } return categories; - }.property(''), + }.property('content.routing'), AdminDropdownItemView: Ember.View.extend({ tagName: 'li', - classNameBindings: 'isActive:active isDisabled:disabled'.w(), + classNameBindings: ['isActive:active', 'isDisabled:disabled'], isActive: Em.computed.equalProperties('item', 'parentView.selectedAdminItem'), isDisabled: function () { - return !!this.get('parentView.dropdownCategories').findProperty('name', this.get('item'))['disabled']; + return !!this.get('parentView.dropdownCategories').findProperty('name', this.get('item')).disabled; }.property('item', 'parentView.dropdownCategories.@each.disabled'), goToCategory: function (event) { var itemName = this.get('parentView').get('content').routing; http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/service/info/summary.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js index e9d12e6..05cc92f 100644 --- a/ambari-web/app/views/main/service/info/summary.js +++ b/ambari-web/app/views/main/service/info/summary.js @@ -417,7 +417,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin staticGeneralWidgetActions: [ Em.Object.create({ label: Em.I18n.t('dashboard.widgets.actions.browse'), - class: 'icon-th', + class: 'glyphicon glyphicon-th', action: 'goToWidgetsBrowser', isAction: true }) @@ -431,7 +431,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin staticAdminPrivelegeWidgetActions: [ Em.Object.create({ label: Em.I18n.t('dashboard.widgets.create'), - class: 'icon-plus', + class: 'glyphicon glyphicon-plus', action: 'createWidget', isAction: true }) @@ -443,13 +443,13 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin staticWidgetLayoutActions: [ Em.Object.create({ label: Em.I18n.t('dashboard.widgets.layout.save'), - class: 'icon-download-alt', + class: 'glyphicon glyphicon-download-alt', action: 'saveLayout', isAction: true }), Em.Object.create({ label: Em.I18n.t('dashboard.widgets.layout.import'), - class: 'icon-file', + class: 'glyphicon glyphicon-file', isAction: true, layouts: App.WidgetLayout.find() }) @@ -559,8 +559,8 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin Em.run.later(this, function () { App.tooltip($("[rel='add-widget-tooltip']")); // enable description show up on hover - $('.thumbnail').hoverIntent(function() { - if ($(this).is(':hover')) { + $('.img-thumbnail').hoverIntent(function() { + if ($(this).is('hover')) { $(this).find('.hidden-description').delay(1000).fadeIn(200).end(); } }, function() { @@ -590,7 +590,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin willDestroyElement: function() { $("[rel='add-widget-tooltip']").tooltip('destroy'); - $('.thumbnail').off(); + $('.img-thumbnail').off(); $('#widget_layout').sortable('destroy'); $('.widget.span2p4').detach().remove(); this.get('serviceMetricGraphs').clear(); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/service/item.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js index fc9c4f3..0c50f91 100644 --- a/ambari-web/app/views/main/service/item.js +++ b/ambari-web/app/views/main/service/item.js @@ -46,49 +46,49 @@ App.MainServiceItemView = Em.View.extend({ addActionMap: function() { return [ { - cssClass: 'icon-plus', + cssClass: 'glyphicon glyphicon-plus', 'label': '{0} {1}'.format(Em.I18n.t('add'), Em.I18n.t('dashboard.services.hbase.masterServer')), service: 'HBASE', component: 'HBASE_MASTER' }, { - cssClass: 'icon-plus', + cssClass: 'glyphicon glyphicon-plus', 'label': '{0} {1}'.format(Em.I18n.t('add'), Em.I18n.t('dashboard.services.hive.metastore')), service: 'HIVE', component: 'HIVE_METASTORE' }, { - cssClass: 'icon-plus', + cssClass: 'glyphicon glyphicon-plus', 'label': '{0} {1}'.format(Em.I18n.t('add'), Em.I18n.t('dashboard.services.hive.server2')), service: 'HIVE', component: 'HIVE_SERVER' }, { - cssClass: 'icon-plus', + cssClass: 'glyphicon glyphicon-plus', 'label': '{0} {1}'.format(Em.I18n.t('add'), Em.I18n.t('dashboard.services.zookeeper.server')), service: 'ZOOKEEPER', component: 'ZOOKEEPER_SERVER' }, { - cssClass: 'icon-plus', + cssClass: 'glyphicon glyphicon-plus', 'label': '{0} {1}'.format(Em.I18n.t('add'), Em.I18n.t('dashboard.services.flume.agentLabel')), service: 'FLUME', component: 'FLUME_HANDLER' }, { - cssClass: 'icon-plus', + cssClass: 'glyphicon glyphicon-plus', 'label': '{0} {1}'.format(Em.I18n.t('add'), App.format.role('RANGER_KMS_SERVER', false)), service: 'RANGER_KMS', component: 'RANGER_KMS_SERVER' }, { - cssClass: 'icon-plus', + cssClass: 'glyphicon glyphicon-plus', 'label': '{0} {1}'.format(Em.I18n.t('add'), App.format.role('NIMBUS', false)), service: 'STORM', component: 'NIMBUS' }, { - cssClass: 'icon-plus', + cssClass: 'glyphicon glyphicon-plus', 'label': '{0} {1}'.format(Em.I18n.t('add'), App.format.role('OOZIE_SERVER', false)), service: 'OOZIE', component: 'OOZIE_SERVER' http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/service/reassign/step4_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/reassign/step4_view.js b/ambari-web/app/views/main/service/reassign/step4_view.js index 4e1282a..0c2aa72 100644 --- a/ambari-web/app/views/main/service/reassign/step4_view.js +++ b/ambari-web/app/views/main/service/reassign/step4_view.js @@ -41,5 +41,5 @@ App.ReassignMasterWizardStep4View = App.HighAvailabilityProgressPageView.extend( templateName: require('templates/main/service/reassign/step4'), - labelWidth: 'span5' + labelWidth: 'col-md-5' }); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/service/reassign/step6_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/reassign/step6_view.js b/ambari-web/app/views/main/service/reassign/step6_view.js index 33f8851..fca308c 100644 --- a/ambari-web/app/views/main/service/reassign/step6_view.js +++ b/ambari-web/app/views/main/service/reassign/step6_view.js @@ -35,5 +35,5 @@ App.ReassignMasterWizardStep6View = App.HighAvailabilityProgressPageView.extend( templateName: require('templates/main/service/reassign/step6'), - labelWidth: 'span5' + labelWidth: 'col-md-5' }); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/service/reassign/step7_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/reassign/step7_view.js b/ambari-web/app/views/main/service/reassign/step7_view.js index 60b357a..f6a7ac7 100644 --- a/ambari-web/app/views/main/service/reassign/step7_view.js +++ b/ambari-web/app/views/main/service/reassign/step7_view.js @@ -33,5 +33,5 @@ App.ReassignMasterWizardStep7View = App.HighAvailabilityProgressPageView.extend( templateName: require('templates/main/service/reassign/step7'), - labelWidth: 'span5' + labelWidth: 'col-md-5' }); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/service/reconfigure.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/reconfigure.js b/ambari-web/app/views/main/service/reconfigure.js index 8838545..894b77f 100644 --- a/ambari-web/app/views/main/service/reconfigure.js +++ b/ambari-web/app/views/main/service/reconfigure.js @@ -61,17 +61,17 @@ App.StageLabelView = Em.View.extend({ }); App.StageSuccessView = Em.View.extend({ - layout: Ember.Handlebars.compile('<i class="icon-ok icon-large"></i> {{t common.done}}') + layout: Ember.Handlebars.compile('<i class="glyphicon glyphicon-ok glyphicon-large"></i> {{t common.done}}') }); App.StageFailureView = Em.View.extend({ - layout: Ember.Handlebars.compile('<i class="icon-remove icon-large"></i> {{t common.failed}}') + layout: Ember.Handlebars.compile('<i class="glyphicon glyphicon-remove iglyphicon-large"></i> {{t common.failed}}') }); App.StageInProgressView = Em.View.extend({ command: null, - classNames: ['progress-striped', 'active', 'progress'], - template: Ember.Handlebars.compile('<div class="bar" {{bindAttr style="command.barWidth"}}></div>'), + classNames: ['progress'], + template: Ember.Handlebars.compile('<div class="progress-bar progress-bar-striped active" {{bindAttr style="command.barWidth"}}></div>'), isStageCompleted: function () { return this.get('obj.progress') == 100 || this.get('controller.isStepCompleted'); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/service/service.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/service.js b/ambari-web/app/views/main/service/service.js index dc88f0b..76fad19 100644 --- a/ambari-web/app/views/main/service/service.js +++ b/ambari-web/app/views/main/service/service.js @@ -53,7 +53,7 @@ App.MainDashboardServiceHealthView = Em.View.extend({ healthStatus: function () { var isClientOnlyService = App.get('services.clientOnly').contains(this.get('service.serviceName')); if (isClientOnlyService) { - return 'icon-laptop'; + return 'glyphicon glyphicon-blackboard'; } if (this.get('service.passiveState') != 'OFF') { return 'icon-medkit'; http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/main/service/widgets/create/expression_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/widgets/create/expression_view.js b/ambari-web/app/views/main/service/widgets/create/expression_view.js index 7afe287..436e3e9 100644 --- a/ambari-web/app/views/main/service/widgets/create/expression_view.js +++ b/ambari-web/app/views/main/service/widgets/create/expression_view.js @@ -387,7 +387,7 @@ App.AddMetricExpressionView = Em.View.extend({ } result.push(Em.Object.create({ serviceName: serviceName, - //in order to support accordion lists + //in order to support panel lists href: '#' + serviceName, displayName: App.StackService.find(serviceName).get('displayName'), count: servicesMap[serviceName].count, http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/wizard/step1_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step1_view.js b/ambari-web/app/views/wizard/step1_view.js index bfabc02..04cd28f 100644 --- a/ambari-web/app/views/wizard/step1_view.js +++ b/ambari-web/app/views/wizard/step1_view.js @@ -220,7 +220,6 @@ App.WizardStep1View = Em.View.extend({ redhatCheckBoxView: Em.Checkbox.extend({ attributeBindings: [ 'type', 'checked' ], checkedBinding: 'controller.selectedStack.useRedhatSatellite', - classNames: ['checkbox'], disabledBinding: 'controller.selectedStack.usePublicRepo', click: function () { // click triggered before value is toggled, so if-statement is inverted @@ -257,4 +256,4 @@ App.WizardStep1View = Em.View.extend({ }, this); }.observes('allRepositories.@each.baseUrl') -}); \ No newline at end of file +}); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/wizard/step3/hostWarningPopupFooter_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step3/hostWarningPopupFooter_view.js b/ambari-web/app/views/wizard/step3/hostWarningPopupFooter_view.js index b309a5e..fb2019c 100644 --- a/ambari-web/app/views/wizard/step3/hostWarningPopupFooter_view.js +++ b/ambari-web/app/views/wizard/step3/hostWarningPopupFooter_view.js @@ -40,7 +40,7 @@ App.WizardStep3HostWarningPopupFooter = Em.View.extend({ } else { if (status === 'FAILED') { - return 'text-error'; + return 'text-danger'; } else { return null; http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/wizard/step3_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step3_view.js b/ambari-web/app/views/wizard/step3_view.js index 710d136..4173065 100644 --- a/ambari-web/app/views/wizard/step3_view.js +++ b/ambari-web/app/views/wizard/step3_view.js @@ -260,7 +260,7 @@ App.WizardStep3View = App.TableView.extend({ var failedHosts = hosts.filterProperty('bootStatus', 'FAILED').length; if (hosts.length === 0) { - this.set('status', 'alert-warn'); + this.set('status', 'alert-warning'); this.set('linkText', ''); this.set('message', Em.I18n.t('installer.step3.warnings.missingHosts')); } @@ -273,7 +273,7 @@ App.WizardStep3View = App.TableView.extend({ else { if (this.get('controller.isHostHaveWarnings') || this.get('controller.repoCategoryWarnings.length') || this.get('controller.diskCategoryWarnings.length') || this.get('controller.jdkCategoryWarnings.length') || this.get('controller.hostCheckWarnings.length') || this.get('controller.thpCategoryWarnings.length')) { - this.set('status', 'alert-warn'); + this.set('status', 'alert-warning'); this.set('linkText', Em.I18n.t('installer.step3.warnings.linkText')); this.set('message', Em.I18n.t('installer.step3.warnings.fails').format(hosts.length - failedHosts)); } @@ -287,7 +287,7 @@ App.WizardStep3View = App.TableView.extend({ else { if (failedHosts == hosts.length) { // all failed - this.set('status', 'alert-warn'); + this.set('status', 'alert-warning'); this.set('linkText', ''); this.set('message', Em.I18n.t('installer.step3.warnings.allFailed').format(failedHosts)); } http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js b/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js index b353ea7..6374ef6 100644 --- a/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js +++ b/ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js @@ -147,17 +147,17 @@ App.WizardStep9HostLogPopupBodyView = Em.View.extend({ taskInfo.set('icon', ''); taskInfo.set('hostName', _task.Tasks.host_name); if (taskInfo.get('status') == 'pending' || taskInfo.get('status') == 'queued') { - taskInfo.set('icon', 'icon-cog'); + taskInfo.set('icon', 'glyphicon glyphicon-cog'); } else if (taskInfo.get('status') == 'in_progress') { - taskInfo.set('icon', 'icon-cogs'); + taskInfo.set('icon', 'glyphicon glyphicon-cogs'); } else if (taskInfo.get('status') == 'completed') { - taskInfo.set('icon', 'icon-ok'); + taskInfo.set('icon', 'glyphicon glyphicon-ok'); } else if (taskInfo.get('status') == 'failed') { - taskInfo.set('icon', 'icon-exclamation-sign'); + taskInfo.set('icon', 'glyphicon glyphicon-exclamation-sign'); } else if (taskInfo.get('status') == 'aborted') { - taskInfo.set('icon', 'icon-minus'); + taskInfo.set('icon', 'glyphicon glyphicon-minus'); } else if (taskInfo.get('status') == 'timedout') { - taskInfo.set('icon', 'icon-time'); + taskInfo.set('icon', 'glyphicon glyphicon-time'); } tasksArr.push(taskInfo); }, this); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/app/views/wizard/step9_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step9_view.js b/ambari-web/app/views/wizard/step9_view.js index 63dca38..e7cd9f5 100644 --- a/ambari-web/app/views/wizard/step9_view.js +++ b/ambari-web/app/views/wizard/step9_view.js @@ -232,14 +232,14 @@ App.WizardStep9View = App.TableView.extend({ onStatus: function () { if (this.get('controller.status') === 'info') { this.set('resultMsg', ''); - this.set('barColor', 'progress-info'); + this.set('barColor', 'progress-bar-info'); } else if (this.get('controller.status') === 'warning') { - this.set('barColor', 'progress-warning'); + this.set('barColor', 'progress-bar-warning'); this.set('resultMsg', Em.I18n.t('installer.step9.status.warning')); this.set('resultMsgColor', 'alert-warning'); } else if (this.get('controller.status') === 'failed') { - this.set('barColor', 'progress-danger'); - this.set('resultMsgColor', 'alert-error'); + this.set('barColor', 'progress-bar-danger'); + this.set('resultMsgColor', 'alert-danger'); if (this.get('isHostHeartbeatLost')) { // When present requests succeeds but some host components are in UNKNOWN or INSTALL_FAILED state and // hosts are in HEARTBEAT_LOST state @@ -250,7 +250,7 @@ App.WizardStep9View = App.TableView.extend({ this.set('resultMsg', Em.I18n.t('installer.step9.status.failed')); } } else if (this.get('controller.status') === 'success') { - this.set('barColor', 'progress-success'); + this.set('barColor', 'progress-bar-success'); this.set('resultMsg', this.get('controller.content.cluster.status') === 'START_SKIPPED' ? Em.I18n.t('installer.step9.status.skipStartSuccess') : Em.I18n.t('installer.step9.status.success')); this.set('resultMsgColor', 'alert-success'); } @@ -265,7 +265,8 @@ App.WizardStep9View = App.TableView.extend({ var controller = this.get('controller'); return App.ModalPopup.show({ header: Em.I18n.t('installer.step9.host.heartbeat_lost.header'), - classNames: ['sixty-percent-width-modal'], + classNames: ['common-modal-wrapper'], + modalDialogClasses: ['modal-lg'], autoHeight: false, secondary: null, @@ -353,24 +354,24 @@ App.HostStatusView = Em.View.extend({ */ onStatus: function () { if (this.get('obj.status') === 'info') { - this.set('barColor', 'progress-info'); + this.set('barColor', 'progress-bar-info'); } else if (this.get('obj.status') === 'warning') { - this.set('barColor', 'progress-warning'); + this.set('barColor', 'progress-bar-warning'); if (this.get('obj.progress') === '100') { this.set('obj.message', Em.I18n.t('installer.step9.host.status.warning')); } } else if (this.get('obj.status') === 'failed') { - this.set('barColor', 'progress-danger'); + this.set('barColor', 'progress-bar-danger'); if (this.get('obj.progress') === '100') { this.set('obj.message', Em.I18n.t('installer.step9.host.status.failed')); } } else if (this.get('obj.status') === 'heartbeat_lost') { - this.set('barColor', 'progress-danger'); + this.set('barColor', 'progress-bar-danger'); if (this.get('obj.progress') === '100') { this.set('obj.message', Em.I18n.t('installer.step9.host.heartbeat_lost')); } } else if (this.get('obj.status') === 'success' && this.get('isHostCompleted') && parseInt(this.get('controller.progress')) > 34) { - this.set('barColor', 'progress-success'); + this.set('barColor', 'progress-bar-success'); this.set('obj.message', Em.I18n.t('installer.step9.host.status.success')); } }.observes('obj.status', 'obj.progress', 'controller.progress'), @@ -388,7 +389,8 @@ App.HostStatusView = Em.View.extend({ header: host.get('name'), - classNames: ['sixty-percent-width-modal'], + classNames: ['common-modal-wrapper'], + modalDialogClasses: ['modal-lg'], autoHeight: false, http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/brunch-config.js ---------------------------------------------------------------------- diff --git a/ambari-web/brunch-config.js b/ambari-web/brunch-config.js index d71f8da..feb4828 100644 --- a/ambari-web/brunch-config.js +++ b/ambari-web/brunch-config.js @@ -24,6 +24,11 @@ module.exports.config = { /^(vendor|app\/data|app\/assets|test)/ ], pattern: /\.(js)$/ + }, + assetsmanager: { + copyTo: { + 'stylesheets/fonts' : ['vendor/theme/fonts/*'] + } } }, files: { @@ -37,7 +42,8 @@ module.exports.config = { order: { before: [ 'vendor/scripts/console-helper.js', - 'vendor/scripts/jquery-1.7.2.min.js', + 'vendor/scripts/jquery-1.9.1.js', + 'vendor/scripts/jquery-migrate.js', 'vendor/scripts/handlebars-1.0.0.beta.6.js', 'vendor/scripts/ember-latest.js', 'vendor/scripts/ember-data-latest.js', @@ -87,6 +93,7 @@ module.exports.config = { }, order: { before: [ + 'app/styles/theme/bootstrap-ambari.css', 'vendor/styles/bootstrap.css', 'vendor/styles/font-awesome.css', 'vendor/styles/font-awesome-ie7.css', @@ -99,7 +106,9 @@ module.exports.config = { 'vendor/styles/diffview.css', 'vendor/styles/visualsearch-datauri.css' ], - after: ['app/styles/custom-ui.css'] + after: [ + 'app/styles/custom-ui.css' + ] } }, @@ -109,7 +118,7 @@ module.exports.config = { defaultExtensions: ['hbs'], joinTo: {'javascripts/app.js': /^app/}, paths: { - jquery: 'vendor/scripts/jquery-1.7.2.min.js', + jquery: 'vendor/scripts/jquery-1.9.1.js', handlebars: 'vendor/scripts/handlebars-1.0.0.beta.6.js', ember: 'vendor/scripts/ember-latest.js' } @@ -123,4 +132,4 @@ module.exports.config = { }, sourceMaps: false -}; +}; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/karma.conf.js ---------------------------------------------------------------------- diff --git a/ambari-web/karma.conf.js b/ambari-web/karma.conf.js index 3dd6be1..7442b95 100644 --- a/ambari-web/karma.conf.js +++ b/ambari-web/karma.conf.js @@ -47,7 +47,7 @@ module.exports = function(config) { 'node_modules/karma-commonjs-require/node_modules/commonjs-require-definition/require.js', 'vendor/scripts/console-helper.js', - 'vendor/scripts/jquery-1.7.2.min.js', + 'vendor/scripts/jquery-1.9.1.js', 'vendor/scripts/handlebars-1.0.0.beta.6.js', 'vendor/scripts/ember-latest.js', 'vendor/scripts/ember-data-latest.js', @@ -97,7 +97,7 @@ module.exports = function(config) { ], emberPrecompilerBrunchPreprocessor: { - jqueryPath: 'vendor/scripts/jquery-1.7.2.min.js', + jqueryPath: 'vendor/scripts/jquery-1.9.1.js', emberPath: 'vendor/scripts/ember-latest.js', handlebarsPath: 'vendor/scripts/handlebars-1.0.0.beta.6.js' }, http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/package.json ---------------------------------------------------------------------- diff --git a/ambari-web/package.json b/ambari-web/package.json index 6702471..94ded60 100644 --- a/ambari-web/package.json +++ b/ambari-web/package.json @@ -16,7 +16,8 @@ "ember-precompiler-brunch": ">= 1.0 < 1.5", "ember-radio-button": "0.1.2", "less-brunch": ">= 1.0 < 1.5", - "cssstyle": "0.2.3" + "cssstyle": "0.2.3", + "assetsmanager-brunch": "~1.8.1" }, "devDependencies": { "phantomjs": "^1.9.2", http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/test/controllers/application_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/application_test.js b/ambari-web/test/controllers/application_test.js index 248853e..2333e5e 100644 --- a/ambari-web/test/controllers/application_test.js +++ b/ambari-web/test/controllers/application_test.js @@ -57,18 +57,6 @@ describe('App.ApplicationController', function () { }); }); - describe('#clusterName', function() { - beforeEach(function () { - sinon.stub(App.router, 'get').returns('cl1'); - }); - afterEach(function () { - App.router.get.restore(); - }); - it ('Should return cluster name', function() { - expect(applicationController.get('clusterName')).to.equal('cl1'); - }); - }); - describe('#startKeepAlivePoller', function() { it ('Should change run poller state', function() { applicationController.set('isPollerRunning', false); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/test/controllers/installer_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/installer_test.js b/ambari-web/test/controllers/installer_test.js index 5b78cbc..3b77b9a 100644 --- a/ambari-web/test/controllers/installer_test.js +++ b/ambari-web/test/controllers/installer_test.js @@ -131,7 +131,7 @@ describe('App.InstallerController', function () { "isEmpty": false, "errorTitle": "", "errorContent": "", - "validation": "icon-repeat" + "validation": "glyphicon glyphicon-repeat" } ] } @@ -220,7 +220,7 @@ describe('App.InstallerController', function () { "isEmpty": false, "errorTitle": "1", "errorContent": "1", - "validation": "icon-ok" + "validation": "glyphicon glyphicon-ok" } ] } @@ -307,7 +307,7 @@ describe('App.InstallerController', function () { "repoId": 11, "errorTitle": "500:error", "errorContent": "", - "validation": "icon-exclamation-sign" + "validation": "glyphicon glyphicon-exclamation-sign" } ] } http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js index be4a3b0..ecf861d 100644 --- a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js +++ b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js @@ -2767,7 +2767,7 @@ describe('App.MainAdminStackAndUpgradeController', function() { precheckResultsMessage: '', recheckResultsMessageClass: 'GREEN', isPrecheckFailed: false, - precheckResultsMessageIconClass: 'icon-ok', + precheckResultsMessageIconClass: 'glyphicon glyphicon-ok', bypassedFailures: false }; controller.runPreUpgradeCheckOnlySuccess(data, {}, {type: 'ROLLING'}); @@ -2816,7 +2816,7 @@ describe('App.MainAdminStackAndUpgradeController', function() { "precheckResultsMessage": "1 Required pre", "precheckResultsMessageClass": "RED", "isPrecheckFailed": true, - "precheckResultsMessageIconClass": "icon-remove" + "precheckResultsMessageIconClass": "glyphicon glyphicon-remove" }); }); }); @@ -2854,7 +2854,7 @@ describe('App.MainAdminStackAndUpgradeController', function() { "precheckResultsTitle": Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.preCheck.msg.failed.title'), "precheckResultsMessageClass": "RED", "isPrecheckFailed": true, - "precheckResultsMessageIconClass": "icon-warning-sign", + "precheckResultsMessageIconClass": "glyphicon glyphicon-warning-sign", "action": "rerunCheck" })); }); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a77e39c/ambari-web/test/controllers/main/charts/heatmap_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/charts/heatmap_test.js b/ambari-web/test/controllers/main/charts/heatmap_test.js index a8ece22..df3dd74 100644 --- a/ambari-web/test/controllers/main/charts/heatmap_test.js +++ b/ambari-web/test/controllers/main/charts/heatmap_test.js @@ -93,16 +93,16 @@ describe('MainChartsHeatmapController', function () { }); }); - it('should return "span12" for 1 cluster rack', function () { - expect(controller.get('rackClass')).to.equal('span12'); + it('should return "col-md-12" for 1 cluster rack', function () { + expect(controller.get('rackClass')).to.equal('col-md-12'); }); - it('should return "span6" for 2 cluster racks', function () { + it('should return "col-md-6" for 2 cluster racks', function () { controller.set('racks', [1, 2]); - expect(controller.get('rackClass')).to.equal('span6'); + expect(controller.get('rackClass')).to.equal('col-md-6'); }); - it('should return "span4" for 3 cluster racks', function () { + it('should return "col-md-4" for 3 cluster racks', function () { controller.set('racks', [1, 2, 3]); - expect(controller.get('rackClass')).to.equal('span4'); + expect(controller.get('rackClass')).to.equal('col-md-4'); }); });