This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../code-mirror/code-mirror.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function renderSection(section, index) { | |
const content = [( | |
<div className={`fcol fg bullet-info ${(index % 2) ? '' : 'bullet-info-reversed'}`}> | |
<div className="bullet-point-title"> | |
{section.title} | |
</div> | |
<div className="bullet-point-text"> | |
{section.text} | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should report component containing invalid styles', () => { | |
class Animal extends React.Component { | |
render() { | |
return <div style={1} />; | |
} | |
} | |
expect(function() { | |
ReactDOM.render(<Animal />, container); | |
}).toThrowError( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
class SiteSettingsFormGeneral extends Component { | |
blogAddress() { | |
translate( | |
'Buy a custom domain, ' + | |
'map a domain you already own, ' + | |
'or redirect this site.', | |
{ | |
components: { | |
domainSearchLink: ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should prevent non-function listeners, at dispatch', () => { | |
var node = ReactTestUtils.renderIntoDocument( | |
<div onClick="not a function" />, | |
); | |
expect(function() { | |
ReactTestUtils.SimulateNative.click(node); | |
}).toThrowError( | |
'Expected onClick listener to be a function, instead got type string', | |
); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
class Hello extends React.Component { | |
handleClick() { | |
console.log('clicked'); | |
} | |
render() { | |
return ( | |
<div onClick={this.handleClick}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updateZkConfigs: function (configs) { | |
var zks = this.getZkServerHosts(); | |
var portValue = configs['zoo.cfg'] && Em.get(configs['zoo.cfg'], 'clientPort'); | |
var zkPort = typeof portValue === 'udefined' ? '2181' : portValue; | |
var zksWithPort = this.concatZkNames(zks, zkPort); | |
this.setZKConfigs(configs, zksWithPort, zks); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['isSVG'], function(isSVG) { | |
/** | |
* @optionName html5shiv | |
* @optionProp html5shiv | |
*/ | |
// Take the html5 variable out of the html5shiv scope so we can return it. | |
var html5; | |
if (!isSVG) { | |
/** | |
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validateInteger : function(str, min, max) { | |
if (str==null || str==undefined || (str + "").trim().length < 1) { | |
return Em.I18n.t('number.validate.empty'); | |
} else { | |
... | |
} | |
return null; | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_getComponentsFromServerForHostComponentsDecommissionCallBack: function (operationData, data) { | |
... | |
if (components.length) { | |
... | |
if (turn_off) { | |
// For recommession | |
if (svcName === "YARN" || svcName === "HBASE" || svcName === "HDFS") { | |
App.router.get('mainHostDetailsController').doRecommissionAndStart(hostNames, svcName, masterName, slaveName); | |
} | |
} else { |
OlderNewer