Просмотр исходного кода

Merge pull request #13 from george-vrancianu/corweb-44

Fixes lint errors and warnings
Alessandro Pilotti 8 лет назад
Родитель
Сommit
59ad00e425

+ 1 - 0
src/components/AddCloudConnection/AddCloudConnection.js

@@ -14,6 +14,7 @@
  You should have received a copy of the GNU Affero General Public License
  You should have received a copy of the GNU Affero General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
  */
+/* eslint-disable dot-notation */
 
 
 import React, { PropTypes } from 'react';
 import React, { PropTypes } from 'react';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';
 import withStyles from 'isomorphic-style-loader/lib/withStyles';

+ 3 - 3
src/components/Helper/Helper.js

@@ -22,22 +22,22 @@ class Helper extends Component {
   static getRandomArbitrary(min, max) {
   static getRandomArbitrary(min, max) {
     return Math.round(Math.random() * (max - min) + min);
     return Math.round(Math.random() * (max - min) + min);
   }
   }
+
   static generateMigrationName(type) {
   static generateMigrationName(type) {
     return type + "_" + moment().format("MMDDYY-HHmmss")
     return type + "_" + moment().format("MMDDYY-HHmmss")
   }
   }
+
   static getTimeObject(rawDate) {
   static getTimeObject(rawDate) {
     let offset = (new Date().getTimezoneOffset()) / 60 * -1;
     let offset = (new Date().getTimezoneOffset()) / 60 * -1;
 
 
     return moment(rawDate).add(offset, 'hours')
     return moment(rawDate).add(offset, 'hours')
   }
   }
+
   static toAsterisk(password) {
   static toAsterisk(password) {
-    console.log(password, password.length)
     let hiddenPass = ""
     let hiddenPass = ""
     for (let i = 0; i++; i < password.length) {
     for (let i = 0; i++; i < password.length) {
-      console.log(i)
       hiddenPass = hiddenPass + "*"
       hiddenPass = hiddenPass + "*"
     }
     }
-    console.log(hiddenPass)
     return hiddenPass
     return hiddenPass
   }
   }
 }
 }

+ 0 - 2
src/components/MigrationList/MigrationList.js

@@ -215,9 +215,7 @@ class MigrationList extends Reflux.Component {
         </div>
         </div>
       );
       );
     }
     }
-
   }
   }
-
 }
 }
 
 
 export default withStyles(MigrationList, s);
 export default withStyles(MigrationList, s);

+ 2 - 3
src/components/ReplicaList/ReplicaList.js

@@ -122,7 +122,7 @@ class ReplicaList extends Reflux.Component {
         <span className="cell cell-icon" onClick={(e) => this.replicaDetail(e, item)}>
         <span className="cell cell-icon" onClick={(e) => this.replicaDetail(e, item)}>
           <div className={"icon " + item.type}></div>
           <div className={"icon " + item.type}></div>
           <span className="details">
           <span className="details">
-            <TextTruncate line={1} truncateText="..." text={item.name}/>
+            <TextTruncate line={1} truncateText="..." text={item.name} />
             <span className={s.migrationStatus + " status-pill " + item.status}>{item.status}</span>
             <span className={s.migrationStatus + " status-pill " + item.status}>{item.status}</span>
           </span>
           </span>
         </span>
         </span>
@@ -134,7 +134,7 @@ class ReplicaList extends Reflux.Component {
         <span className={"cell " + s.composite} onClick={(e) => this.replicaDetail(e, item)}>
         <span className={"cell " + s.composite} onClick={(e) => this.replicaDetail(e, item)}>
           <span className={s.label}>Last execution</span>
           <span className={s.label}>Last execution</span>
           <span className={s.value}>
           <span className={s.value}>
-            {lastExecution ? <Moment format="MMM Do YYYY HH:mm" date={lastExecution}/> : "-"}
+            {lastExecution ? <Moment format="MMM Do YYYY HH:mm" date={lastExecution} /> : "-"}
           </span>
           </span>
         </span>
         </span>
         <span className={"cell " + s.composite} onClick={(e) => this.replicaDetail(e, item)}>
         <span className={"cell " + s.composite} onClick={(e) => this.replicaDetail(e, item)}>
@@ -209,7 +209,6 @@ class ReplicaList extends Reflux.Component {
       );
       );
     }
     }
   }
   }
-
 }
 }
 
 
 export default withStyles(ReplicaList, s);
 export default withStyles(ReplicaList, s);

+ 6 - 2
src/components/WizardVms/WizardVms.js

@@ -280,10 +280,14 @@ class WizardVms extends Component {
           <div className="items-list instances">
           <div className="items-list instances">
             {this.renderSearch()}
             {this.renderSearch()}
           </div>
           </div>
-          <div className={s.selectionCount + (!(this.state.filteredData && this.state.filteredData.length) ? " hidden" : " ")}>
+          <div className={s.selectionCount +
+            (!(this.state.filteredData && this.state.filteredData.length) ? " hidden" : " ")}
+          >
             {this.instancesSelected()} instances selected
             {this.instancesSelected()} instances selected
           </div>
           </div>
-          <div className={s.pagination + (!(this.state.filteredData && this.state.filteredData.length) ? " hidden" : " ")}>
+          <div className={s.pagination +
+            (!(this.state.filteredData && this.state.filteredData.length) ? " hidden" : " ")}
+          >
             <span
             <span
               className={(this.state.page == 0 ? "disabled " : "") + s.prev}
               className={(this.state.page == 0 ? "disabled " : "") + s.prev}
               onClick={(e) => this.previousPage(e)}
               onClick={(e) => this.previousPage(e)}