Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ketan committed Nov 20, 2016
1 parent b8d755d commit 5de3e1b
Show file tree
Hide file tree
Showing 68 changed files with 210 additions and 215 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ define(['mithril', 'jquery', 'lodash', 'string-plus', 'models/model_mixins', 'es

var f = {
row: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
var collapse = deleteKeyAndReturnValue(args, 'collapse') ? 'collapse' : null;
return (
<div
Expand All @@ -50,7 +50,7 @@ define(['mithril', 'jquery', 'lodash', 'string-plus', 'models/model_mixins', 'es
},

column: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
var end = deleteKeyAndReturnValue(args, 'end') ? 'end' : null,
size = deleteKeyAndReturnValue(args, 'size', 6),
largeSize = deleteKeyAndReturnValue(args, 'largeSize', size);
Expand Down Expand Up @@ -250,7 +250,7 @@ define(['mithril', 'jquery', 'lodash', 'string-plus', 'models/model_mixins', 'es
},

checkBox: {
view: function (ctrl, args) {
view: function (_ctrl, args) {
var model = deleteKeyAndReturnValue(args, 'model'),
attrName = deleteKeyAndReturnValue(args, 'attrName'),
labelText = deleteKeyAndReturnValue(args, 'label'),
Expand Down Expand Up @@ -443,7 +443,7 @@ define(['mithril', 'jquery', 'lodash', 'string-plus', 'models/model_mixins', 'es
this.value = s.coerceToMprop(args.value, '');
},

view: function (ctrl, args) {
view: function (_ctrl, args) {
var items = deleteKeyAndReturnValue(args, 'items', {}),
label = deleteKeyAndReturnValue(args, 'label'),
value = s.coerceToMprop(deleteKeyAndReturnValue(args, 'value'), ''),
Expand Down Expand Up @@ -527,7 +527,7 @@ define(['mithril', 'jquery', 'lodash', 'string-plus', 'models/model_mixins', 'es
},

removeButton: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
return (
<button type={deleteKeyAndReturnValue(args, 'type', 'button')} class={compactClasses(args, 'remove')}
title='Remove' {...args}>{children}</button>
Expand All @@ -537,7 +537,7 @@ define(['mithril', 'jquery', 'lodash', 'string-plus', 'models/model_mixins', 'es
},

editButton: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
return (
<button type={deleteKeyAndReturnValue(args, 'type', 'button')} class={compactClasses(args, 'edit')}
title='Edit' {...args}>{children}</button>
Expand All @@ -546,7 +546,7 @@ define(['mithril', 'jquery', 'lodash', 'string-plus', 'models/model_mixins', 'es
},

resetButton: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
return (
<button type={deleteKeyAndReturnValue(args, 'type', 'button')} class={compactClasses(args, 'reset')}
title='Reset' {...args}>{children}</button>
Expand All @@ -555,21 +555,21 @@ define(['mithril', 'jquery', 'lodash', 'string-plus', 'models/model_mixins', 'es
},

button: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
return (
<button type="button" class={compactClasses(args, 'button')} {...args}>{children}</button>
);
}
},

link: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
return (<a href="javascript:void(0)" class={compactClasses(args)} {...args}>{children}</a>);
}
},

tooltip: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
if (!args.tooltip && _.isEmpty(children)) {
return <noscript/>;
}
Expand Down Expand Up @@ -605,32 +605,32 @@ define(['mithril', 'jquery', 'lodash', 'string-plus', 'models/model_mixins', 'es
},

callout: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
var type = deleteKeyAndReturnValue(args, 'type');
return (<div class={'callout ' + type} {...args}>{children}</div>);
}
},

alert: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
return (<f.callout type="alert" {...args}>{children}</f.callout>);
}
},

warning: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
return (<f.callout type="warning" {...args}>{children}</f.callout>);
}
},

info: {
view: function (ctrl, args, children) {
view: function (_ctrl, args, children) {
return (<f.callout type="info" {...args}>{children}</f.callout>);
}
},

infoToolTip: {
view: function (ctrl, args) {
view: function (_ctrl, args) {
var content = deleteKeyAndReturnValue(args, 'content'),
tooltipId = 'info-tooltip-' + s.uuid();
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
define(['mithril', 'lodash', 'helpers/form_helper'], function (m, _, f) {

var UseThis = {
view: function (ctrl, args) {
view: function (_ctrl, args) {
return (<a title='Use this' onclick={_.wrap(args.toShow, args.callback)}>{args.toShow}</a>);
}
};

var ExampleTable = {
view: function (ctrl, args) {
view: function (_ctrl, args) {
return (
<table>
<caption>{args.tableTitle || 'Some Examples'}</caption>
Expand All @@ -46,7 +46,7 @@ define(['mithril', 'lodash', 'helpers/form_helper'], function (m, _, f) {
};

var pipelineLabelTemplate = {
view: function (ctrl, args) {
view: function (_ctrl, args) {
return (
<div>
<p>
Expand Down Expand Up @@ -109,7 +109,7 @@ define(['mithril', 'lodash', 'helpers/form_helper'], function (m, _, f) {


var trackingToolGenericRegex = {
view: function (ctrl, args) {
view: function (_ctrl, args) {
return (
<div>
<p>
Expand Down Expand Up @@ -141,7 +141,7 @@ define(['mithril', 'lodash', 'helpers/form_helper'], function (m, _, f) {


var trackingToolGenericUrlPattern = {
view: function (ctrl, args) {
view: function (_ctrl, args) {
return (
<div>
<p>
Expand All @@ -163,7 +163,7 @@ define(['mithril', 'lodash', 'helpers/form_helper'], function (m, _, f) {
};

var trackingToolMingleBaseUrl = {
view: function (ctrl, args) {
view: function (_ctrl, args) {
return (
<div>
<p>
Expand Down Expand Up @@ -194,7 +194,7 @@ define(['mithril', 'lodash', 'helpers/form_helper'], function (m, _, f) {
};

var trackingToolMingleGroupingConditions = {
view: function (ctrl, args) {
view: function (_ctrl, args) {
return (
<div>
<p>
Expand Down Expand Up @@ -260,7 +260,7 @@ define(['mithril', 'lodash', 'helpers/form_helper'], function (m, _, f) {
};

var pipelineTimerSpec = {
view: function (ctrl, args) {
view: function (_ctrl, args) {
return (
<div class='cron-tooltip'>
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

define([
'mithril', 'lodash', 'string-plus', 'models/model_mixins', 'models/shared/plugin_configurations', 'helpers/mrequest', 'js-routes', 'models/validatable_mixin'
], function (m, _, s, Mixins, PluginConfigurations, mrequest, Routes, Validatable) {
'mithril', 'string-plus', 'models/model_mixins', 'models/shared/plugin_configurations', 'helpers/mrequest', 'js-routes', 'models/validatable_mixin'
], function (m, s, Mixins, PluginConfigurations, mrequest, Routes, Validatable) {

var unwrapMessageOrProfile = function (data, xhr) {
if (xhr.status === 422) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

define(['mithril', 'lodash', 'string-plus'], function (m, _, s) {
define(['lodash', 'string-plus'], function (_, s) {
var Errors = function (errors) {
errors = errors || {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

define(['mithril', 'lodash', 'string-plus', 'models/model_mixins'], function (m, _, s, Mixins) {
define(['mithril', 'string-plus', 'models/model_mixins'], function (m, s, Mixins) {

var Approval = function (data) {
this.constructor.modelType = 'approval';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

define(['mithril', 'lodash', 'string-plus', 'models/model_mixins', 'models/pipeline_configs/encrypted_value', 'models/validatable_mixin'],
function (m, _, s, Mixins, EncryptedValue, Validatable) {
define(['mithril', 'string-plus', 'models/model_mixins', 'models/pipeline_configs/encrypted_value', 'models/validatable_mixin'],
function (m, s, Mixins, EncryptedValue, Validatable) {

var EnvironmentVariables = function (data) {
Mixins.HasMany.call(this, {
Expand Down Expand Up @@ -85,7 +85,11 @@ define(['mithril', 'lodash', 'string-plus', 'models/model_mixins', 'models/pipel
return s.isBlank(this.name()) && s.isBlank(this.value());
};

this.validatePresenceOf('name', {condition: function(property) {return (!s.isBlank(property.value()));}});
this.validatePresenceOf('name', {
condition: function (property) {
return (!s.isBlank(property.value()));
}
});
this.validateUniquenessOf('name');
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

define([
'mithril', 'lodash', 'string-plus', 'models/model_mixins', 'models/pipeline_configs/environment_variables', 'models/pipeline_configs/parameters',
'models/pipeline_configs/materials', 'models/pipeline_configs/tracking_tool', 'models/pipeline_configs/stages', 'models/pipeline_configs/approval',
'models/pipeline_configs/materials', 'models/pipeline_configs/tracking_tool', 'models/pipeline_configs/stages',
'helpers/mrequest', 'models/validatable_mixin', 'js-routes'
], function (m, _, s, Mixins, EnvironmentVariables, Parameters, Materials, TrackingTool, Stages, Approval, mrequest, Validatable, Routes) {
], function (m, _, s, Mixins, EnvironmentVariables, Parameters, Materials, TrackingTool, Stages, mrequest, Validatable, Routes) {
var Pipeline = function (data) {
this.constructor.modelType = 'pipeline';
Mixins.HasUUID.call(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
* limitations under the License.
*/


define(['mithril', 'lodash', 'jquery', 'models/pipeline_configs/materials', 'models/pipeline_configs/plugin_infos'],
function (m, _, $, Materials, PluginInfos) {
define(['lodash', 'models/pipeline_configs/materials', 'models/pipeline_configs/plugin_infos'],
function (_, Materials, PluginInfos) {
var PluggableSCMs = {};

PluggableSCMs.init = function () {
_.each(PluginInfos.filterByType('scm'), function (pluginInfo) {
PluggableSCMs.Types[pluginInfo.id()] = {
type: Materials.Material.PluggableMaterial,
type: Materials.Material.PluggableMaterial,
description: pluginInfo.displayName()
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
* limitations under the License.
*/


define(['mithril', 'lodash', 'jquery', 'models/pipeline_configs/tasks', 'models/pipeline_configs/plugin_infos'],
function (m, _, $, Tasks, PluginInfos) {
define(['lodash', 'models/pipeline_configs/tasks', 'models/pipeline_configs/plugin_infos'],
function (_, Tasks, PluginInfos) {
var PluggableTasks = {};

PluggableTasks.init = function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

define(['mithril', 'lodash', 'string-plus', 'models/model_mixins', 'models/pipeline_configs/jobs',
define(['mithril', 'string-plus', 'models/model_mixins', 'models/pipeline_configs/jobs',
'models/pipeline_configs/environment_variables', 'models/pipeline_configs/approval', 'models/validatable_mixin'
], function (m, _, s, Mixins, Jobs, EnvironmentVariables, Approval, Validatable) {
], function (m, s, Mixins, Jobs, EnvironmentVariables, Approval, Validatable) {

var Stages = function (data) {
Mixins.HasMany.call(this, {factory: Stages.Stage.create, as: 'Stage', collection: data, uniqueOn: 'name'});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

define([
'mithril', 'lodash', 'string-plus', 'models/model_mixins', 'models/validatable_mixin'
], function (m, _, s, Mixins, Validatable) {
'mithril', 'string-plus', 'models/model_mixins', 'models/validatable_mixin'
], function (m, s, Mixins, Validatable) {

var PluginConfigurations = function (data) {
Mixins.HasMany.call(this, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

define(['lodash', 'string-plus', 'mithril', 'models/errors', 'models/model_mixins'], function (_, s, m, Errors, Mixins) {
define(['lodash', 'string-plus', 'models/errors', 'models/model_mixins'], function (_, s, Errors, Mixins) {
var PresenceValidator = function (options) {
this.validate = function (entity, attr) {
if (options.condition && (!options.condition(entity))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@

require([
'jquery', 'mithril',
'js-routes',
'models/agents/agents',
'models/agents/resources',
'models/agents/environments',
'views/agents/agents_widget',
'views/agents/models/agents_widget_view_model',
'foundation.util.mediaQuery', 'foundation.dropdownMenu', 'foundation.responsiveToggle', 'foundation.dropdown'
], function ($, m, JsRoutes,
Agents, Resources, Environments, AgentsWidget, AgentsVM) {
], function ($, m, Agents, Resources, Environments, AgentsWidget, AgentsVM) {

$(function () {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@

require([
'jquery', 'mithril',
'js-routes',
'views/elastic_profiles/elastic_profiles_widget',
'models/pipeline_configs/plugin_infos',
'foundation.util.mediaQuery', 'foundation.dropdownMenu', 'foundation.responsiveToggle', 'foundation.dropdown'
], function ($, m, JsRoutes,
ElasticProfilesWidget, PluginInfos) {
], function ($, m, ElasticProfilesWidget, PluginInfos) {

$(function () {
$(document).foundation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

define(['mithril'], function (m) {
var AgentStateCountWidget = {
view: function (ctrl, args) {
view: function (_ctrl, args) {
return (

<ul class="search-summary">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

define(['mithril', 'lodash', 'string-plus'], function (m, _, s) {
define(['mithril', 'string-plus'], function (m, s) {

var SortHeaderWidget = {
view: function (ctrl, args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/

define(['mithril', 'lodash',
define(['mithril',
'helpers/form_helper',
'views/agents/resources_list_widget',
'views/agents/environments_list_widget',
'models/agents/resources', 'models/agents/environments'
], function (m, _, f,
], function (m, f,
ResourcesListWidget,
EnvironmentsListWidget,
Resources, Environments) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

define(['mithril', 'lodash', 'string-plus', 'helpers/form_helper',
define(['mithril', 'lodash', 'helpers/form_helper',
'views/agents/tri_state_checkbox_widget', 'models/agents/resources', 'models/agents/tri_state_checkbox'
], function (m, _, s, f, TriStateCheckboxWidget, Resources, TriStateCheckbox) {
], function (m, _, f, TriStateCheckboxWidget, Resources, TriStateCheckbox) {

var NewResourceVM = {
newResource: m.prop(''),
Expand Down
Loading

0 comments on commit 5de3e1b

Please sign in to comment.