Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

San 3912 dockerfile mirroing #1553

Merged
merged 100 commits into from
Apr 26, 2016
Merged

San 3912 dockerfile mirroing #1553

merged 100 commits into from
Apr 26, 2016

Conversation

thejsj
Copy link
Member

@thejsj thejsj commented Apr 9, 2016

Changes

  • Adds dockerfile mirroring option in SetupServerModalController
  • Adds dockerfile mirroring option in EditServerModalController
  • Adds SetupMirrorServerModalController

screen shot 2016-04-19 at 1 09 11 pm
screen shot 2016-04-19 at 1 08 19 pm

Flags

  • dockerFilMirroring

Dependencies

Reviewers

thejsj added 8 commits April 6, 2016 14:53
…al-setup' into SAN-3912-dockerfile-mirroing

* SAN-3925-refactor-container-creation-code-allow-new-modal-setup:
  Fetch template servers on load. Change addRepoTab to tabName
  fix scrolling in new container modal
…ockerfile-mirroing

* edit-and-setup-modal-use-same-template:
  Add number of open tabs for animation
  Fix tests
  Delete unnecesary template
  Adding formm bound to controller. Fixing command loaing. Removing unnecesary ng-if
  Add default state for setupServerModalController
  Fix header for setupServerModalController
  Add setupServerModalController tabs/buttons
  Change editServerModal to use  new serverModalView
  Add tests
  4.4.1
  Fixed overzealous validation cleanup.
  Fixed tests.
  Removed dockerfile validation entirely.
  This should fix the browser crashing when the maxLineLength is above 2000.
  4.4.0
  remove pseudo element
  override intercom previews
@thejsj thejsj added the hold label Apr 9, 2016
@thejsj thejsj deployed to runnable April 9, 2016 00:06 Active
@thejsj thejsj force-pushed the SAN-3912-dockerfile-mirroing branch from 53882a9 to 0259200 Compare April 9, 2016 00:10
@thejsj thejsj force-pushed the SAN-3912-dockerfile-mirroing branch from 0259200 to 4a5f7d4 Compare April 9, 2016 00:10
@thejsj thejsj deployed to runnable April 9, 2016 00:14 Active
@thejsj thejsj deployed to runnable April 9, 2016 00:40 Active
@thejsj thejsj deployed to runnable April 9, 2016 01:22 Active
@thejsj thejsj force-pushed the SAN-3912-dockerfile-mirroing branch from ceecd18 to c1ed103 Compare April 11, 2016 20:54
@thejsj thejsj deployed to runnable April 11, 2016 20:57 Active
@thejsj thejsj deployed to runnable April 11, 2016 23:28 Active
@thejsj thejsj deployed to runnable April 12, 2016 01:11 Active
@thejsj thejsj deployed to runnable April 12, 2016 19:24 Active
buildDockerfilePath: dockerfile.path
}))
.then(function () {
state.advanced = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm starting to think that having these properties being separate, but having isMirroringDockerfile dependent on advanced, may lead to issues. Can we make state.advanced === 'isMirroringDockerfile' or something, so we have 1 variable, instead of a bunch of flags? Like, I want to prevent ever having to worry about state.advanced = false && state.isMirroringDockerfile = true

@thejsj thejsj force-pushed the SAN-3912-dockerfile-mirroing branch from 57ba88a to f7da8e9 Compare April 25, 2016 20:16
@thejsj thejsj force-pushed the SAN-3912-dockerfile-mirroing branch from 521c42c to 904d02c Compare April 25, 2016 20:31
ng-disabled = ""
placeholder = "Search"
ng-keyup = "$digest"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um, is this going to trigger a digest on key-up?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because the modal needs to get re-rendered when you type something. If not, you get weird heights on the modal.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fuck..... so we definitely need to figure out a real fix for this. Sounds like it's an issue with our animatedPanel

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this is probably the best way to do it, but I don't think we'll get away with not running a digest cycle every time someone types something, right?

@@ -3,24 +3,87 @@
require('app')
.controller('ServerModalController', ServerModalController);

var TAB_VISIBILITY = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have this and the check that's in this controller as it's own service?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@@ -127,24 +133,47 @@ function NewContainerModalController(
.catch(errs.handler);
};

NCMC.setRepo = function (repo) {
NCMC.setRepo = function (repo, cb, cbParam) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cb and cbParam? Ew, gross. Why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because you can't use .bind in a template. Will rename to make more clear.

if (buildDockerfilePath && repoFullName) {
var branchName = keypather.get(acv, 'attrs.branch');
// Get everything before the last '/' and add a '/' at the end
var path = buildDockerfilePath.replace(/^(.*)\/.*$/, '$1') + '/';
Copy link
Member

@Nathan219 Nathan219 Apr 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does changing the capture group effect this replace? Do you want to just do

var result = /^([^\/]+)\/([^\/]+)$/.exec()
var path = result[1]
var name = result[2]

That's a lot easier, imo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, you should use [^\/]+, not .*

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that makes more sense.

@Nathan219
Copy link
Member

Just tried on Epsilon:
Scrolling still does not work on the repo-list

@@ -41,9 +41,10 @@ function fetchDockerfileForContextVersion (
if (buildDockerfilePath && repoFullName) {
var branchName = keypather.get(acv, 'attrs.branch');
// Get everything before the last '/' and add a '/' at the end
var path = buildDockerfilePath.replace(/^(.*)\/.*$/, '$1') + '/';
var result = /^([^\/]*)\/([^\/]*)$/.exec(buildDockerfilePath);
var path = result && result[1] || '';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do a full

if (result.length < 2) {
  error
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@runnabro
Copy link
Member

@thejsj I fixed the disabled items still having an active state. Sorry about that. I messaged Kahn to get more info about the width issue he saw.

thejsj added 2 commits April 25, 2016 18:55
…nable-angular into SAN-3912-dockerfile-mirroing

* 'SAN-3912-dockerfile-mirroing' of github.com:CodeNow/runnable-angular:
  fix active state on disabled list items
@thejsj thejsj merged commit 18b0efc into master Apr 26, 2016
@runnabro runnabro deleted the SAN-3912-dockerfile-mirroing branch May 2, 2016 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants