Skip to content

Instantly share code, notes, and snippets.

😎
Hubbin it up @ Esri

Dave Bouwman dbouwman

😎
Hubbin it up @ Esri
Block or report user

Report or block dbouwman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dbouwman
dbouwman / e2e-requirements.md
Last active Jun 22, 2019
End to End Test System
View e2e-requirements.md

Requirements

Replacement e2e test system that is easy for all devs to debug/extend/maintain.

Functional

  • ES6
  • run against local, qa and prod
  • able to run multiple browsers
    • ff/ch/edge
  • report test status to same end-point the ember ones use
View Site-Boot-Flow.md

Site Boot Flow

Injection Parsing

  • __SITE Injected? Y: use as model, store in appSettings
    • N: __DOMAININFO injected? : Y: use siteId to fetch Site
      • N: use window.location to determine siteId

Determine domainInfo model from Window.location

At this stage we do not actually fetch the full item. We are constructing a hash that is roughly the shape of a domain record:

@dbouwman
dbouwman / pen.js
Created Feb 8, 2019
CodePen Hacking of /updateInfo
View pen.js
const token = 'FbIWugy4eCsS-hq2ZV42MJR7EYH9ID_AXY2SAeNmCZvi5NVjSNuUysrCr1cgesIZHP_ti31IaGWLZDJFX1U21Z3aQ3B6A8Xcny9kZc-i_IdUzY-kBYXyV2gn_euATqpfr8zw9TemIODV4ORAB0gxDPTwc884PpR_qVwa4Ud-nc47JoN_v53_n1xzSqSX6bg_OSy7VDcevFyiA8hOpWdekg..';
const data = {
name: 'Dave Bouwman',
email: 'dbouwman@esri.com'
};
const body = {
file: new Blob([JSON.stringify(data)], {type: 'application/json'}),
f: 'json',
token: token,
@dbouwman
dbouwman / Tech.md
Created Aug 31, 2017
Theme Blog Tech
View Tech.md

Static Generated Css

For the last year, when a Hub Site was saved, we had been taking your theme colors, and sending them to a server which would generate a complete stylesheet, based on those colors. The resulting css was then stored as a "resource" with the Hub Site item, and would remain static until the site owner edited the theme in the Layout Editor.

In general, this processed worked pretty well, however over time we noticed a number of issues.

The first issue, which caused the most problems, was due to the css being generated and persisted. When Esri updated the underlying application code, all sites would be running that code immediately - however, they would load with the old css. Although we went to great lengths to ensure no catastrophic changes, with tens of thousands of sites, many highly customized, inevitably issues would arise, and customers would have to edit and re-save the site.

The second reason for making a change is that Hub Sites With be included with the ArcGIS Enterprise 10.6 re

View gist:a077bcd28522a1b195629b8f359d7622
/**
* Given a username and password, make a https request for a token
*/
getToken (username, password, portalBaseUrl) {
const url = `${portalBaseUrl}/sharing/rest/generateToken?f=json`;
let options = {
method: 'POST',
form: {
username: username,
password: password,
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
rejectMe () {
return Ember.RSVP.reject('I rejected');
},
resolveMe () {
return Ember.RSVP.resolve('I resolved');
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
toggleValue() {
this.toggleProperty('value');
},
inputChanged(value) {
if (typeof this.onchange === 'function') {
@dbouwman
dbouwman / panel-card.html
Created Sep 11, 2016
Gist w/ Bootstrap Responsive Card
View panel-card.html
<div class="panel panel-default panel-card ">
<div class="panel-heading">
<h3 class="panel-title">Panel title</h3>
</div>
<div class="panel-body">
<img src="http://pipsum.com/280x320.jpg" class="img-responsive center-block">
<div class="overlay">
<ul>
<li><span class="glyphicon glyphicon-trash"></span></li>
<li><span class="glyphicon glyphicon-cog"></span></li>
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
attr: {
"type":{
"label":"Type",
"fieldType":"esriFieldTypeString"
},
"date":{
@dbouwman
dbouwman / 500.json
Last active Jun 30, 2016
Page Payloads
View 500.json
{
"data": {
"type": "page",
"id": "67",
"attributes": {
"description": "The Powerpuff Girls is an American animated television series created by animator Craig McCracken for Cartoon Network. The show centers on Blossom, Bubbles, and Buttercup, three girls with superpowers, as well as their father, the brainy scientist Professor Utonium, who all live in the fictional city of Townsville, USA. The girls are frequently called upon by the town's childlike and naive mayor to help fight nearby criminals using their powers.\n\nMcCracken originally developed the show in 1992 as a cartoon short entitled Whoopass Stew! while in his second year at CalArts. Following a name change, Cartoon Network featured the first Powerpuff Girls pilots in its animation showcase program What a Cartoon! in 1995 and 1996. The series made its official debut as a Cartoon Cartoon on November 18, 1998,[2] with the final episode airing on March 25, 2005.[3] A total of 78 episodes were aired in addition to two pilot shorts,
You can’t perform that action at this time.