Index: dashboard/dashboard/pinpoint/elements/new-page.html |
diff --git a/dashboard/dashboard/pinpoint/elements/new-page.html b/dashboard/dashboard/pinpoint/elements/new-page.html |
index de082373db9d473bb73b5a2f231b68848a872f58..fa9793ac3f16647b72e2ba17a262512c92078208 100644 |
--- a/dashboard/dashboard/pinpoint/elements/new-page.html |
+++ b/dashboard/dashboard/pinpoint/elements/new-page.html |
@@ -7,50 +7,30 @@ found in the LICENSE file. |
<link type="text/css" rel="stylesheet" href="/dashboard/static/base.css"> |
-<link rel="import" href="/components/app-route/app-route.html"> |
-<link rel="import" href="/components/iron-form/iron-form.html"> |
-<link rel="import" href="/components/paper-button/paper-button.html"> |
-<link rel="import" href="/components/paper-checkbox/paper-checkbox.html"> |
-<link rel="import" href="/components/paper-input/paper-input.html"> |
<link rel="import" href="/components/polymer/polymer.html"> |
+<link rel="import" href="/dashboard/pinpoint/elements/new-job-dialog.html"> |
+<link rel="import" href="/dashboard/static/simple_xhr.html"> |
+ |
<dom-module id="new-page"> |
<template> |
- <style> |
- form > paper-button { |
- margin-top: 20px; |
- } |
- form > paper-button:not([disabled]) { |
- background: var(--paper-green-700); |
- color: white; |
- } |
- </style> |
- |
- <app-route route="{{route}}" pattern=":configuration" query-params="{{queryParams}}"></app-route> |
- |
- <form is="iron-form" id="form" method="post" action="/api/new"> |
- <paper-input name="configuration" label="configuration" value="{{queryParams.configuration}}" required auto-validate></paper-input> |
- <paper-input name="test_suite" label="test_suite"></paper-input> |
- <paper-input name="test" label="test"></paper-input> |
- <paper-input name="metric" label="metric"></paper-input> |
- <paper-input name="start_repository" label="start_repository"></paper-input><paper-input name="start_git_hash" label="start_git_hash"></paper-input> |
- <paper-input name="end_repository" label="end_repository"></paper-input><paper-input name="end_git_hash" label="end_git_hash"></paper-input> |
- <paper-checkbox name="auto_explore" checked required>Automatically explore</paper-checkbox><br> |
- <paper-button id="submit" raised disabled onclick="_submit(event)">Create</paper-button> |
- </form> |
+ <new-job-dialog id="dialog"></new-job-dialog> |
</template> |
<script> |
'use strict'; |
Polymer({ |
- is: 'new-page' |
- }); |
+ is: 'new-page', |
- form.addEventListener('change', function(event) { |
- submit.disabled = !form.validate(); |
- }); |
+ ready() { |
+ }, |
- function _submit(event) { |
- Polymer.dom(event).localTarget.parentElement.submit(); |
- } |
+ deselected() { |
+ }, |
+ |
+ selected() { |
+ this.$.dialog.show(); |
+ } |
+ |
+ }); |
</script> |
</dom-module> |