Skip to content

Instantly share code, notes, and snippets.

View gregturn's full-sized avatar

Greg L. Turnquist gregturn

View GitHub Profile
@gregturn
gregturn / DevnexusApplication.java
Created February 9, 2016 18:04
DevNexus example
package com.greglturnquist.devnexus;
import lombok.Data;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@gregturn
gregturn / CloudFoundryTaskLauncherIntegrationTests output
Created March 19, 2016 15:30
Latest snapshot of cf-java-client
/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:56642,suspend=y,server=n -ea -javaagent:/Users/gturnquist/Library/Caches/IntelliJIdea15/groovyHotSwap/gragent.jar -Didea.junit.sm_runner -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA 15.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA 15.app/Contents/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines
/*
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
'use strict';
const React = require('react')
class TextInput extends React.Component {
constructor(props) {
super(props)
}
return (
<div>
<ul className="layout">
<TextInput label="Target API"
placeHolder="API to install Spinnaker, e.g. https://api.run.pivotal.io"
name={this.props.settings.api}
handleChange={this.handleChange}
optional={pwsButton}
inputLayout="layout__item u-7/16-lap-and-up u-11/16-desk"
settings={this.props.settings} />
const React = require('react')
class CheckboxInput extends React.Component {
constructor(props) {
super(props)
}
render() {
let labelLayout = 'layout__item u-1/2-lap-and-up u-1/4-desk'
<CheckboxInput label="OAuth?"
name={this.props.settings.oauthEnabled}
handleChange={this.handleChange}
settings={this.props.settings} />
return (<li className='control-group'>
{this.props.settings.required.includes(this.props.name) && !this.props.settings[this.props.name] ?
<label className={labelLayout}>{this.props.label} <span className='required'>(*required)</span></label>
:
<label className={labelLayout}>{this.props.label}</label>
}
{optional}
<input className={inputLayout} type="text"
placeholder={this.props.placeHolder}
name={this.props.name}
// Fixed constant stuffed inside the state
this.state['required'] = [
this.state.api,
this.state.email,
this.state.password,
this.state.services,
this.state.primaryAccount,
this.state.domain,
'all.namespace'
]
{this.requiredFieldsFilledOut() ?
<li className={this.tabStatus('status')} onClick={this.handleStatus}>
<a id="status-link" className="tabs__link">Install</a>
</li>
:
<li className={this.tabStatus('status')}>
<a className="tabs__link">Install</a>
</li>
}