diff --git a/go/cmd/vtctld/explorer.go b/go/cmd/vtctld/explorer.go
index 91c7044cd5..0e4e7280db 100644
--- a/go/cmd/vtctld/explorer.go
+++ b/go/cmd/vtctld/explorer.go
@@ -73,7 +73,7 @@ func HandleExplorer(name, url, templateName string, exp Explorer) {
explorer = exp
explorerName = name
-
+ indexContent.ToplevelLinks[name+" Explorer"] = url
http.HandleFunc(url, func(w http.ResponseWriter, r *http.Request) {
if err := r.ParseForm(); err != nil {
httpError(w, "cannot parse form: %s", err)
diff --git a/go/cmd/vtctld/template.go b/go/cmd/vtctld/template.go
index 48ea4e5fe6..8a862de533 100644
--- a/go/cmd/vtctld/template.go
+++ b/go/cmd/vtctld/template.go
@@ -143,7 +143,7 @@ type TemplateLoader struct {
}
func (loader *TemplateLoader) compile() (*template.Template, error) {
- return template.New("main").Funcs(FuncMap).ParseGlob(path.Join(loader.Directory, "[a-z]*"))
+ return template.New("main").Funcs(FuncMap).ParseGlob(path.Join(loader.Directory, "[a-z]*.html"))
}
func (loader *TemplateLoader) makeErrorTemplate(errorMessage string) *template.Template {
diff --git a/go/cmd/vtctld/schema_editor/app.js b/go/cmd/vtctld/templates/app.js
similarity index 78%
rename from go/cmd/vtctld/schema_editor/app.js
rename to go/cmd/vtctld/templates/app.js
index 8fddb838db..266b3587e9 100644
--- a/go/cmd/vtctld/schema_editor/app.js
+++ b/go/cmd/vtctld/templates/app.js
@@ -15,24 +15,24 @@ angular.module('app', ['ngRoute'])
.controller('SubmitController', SubmitController)
.config(['$routeProvider', function($routeProvider) {
$routeProvider
- .when('/',{
- templateUrl: "editor/keyspace.html",
+ .when('/editor',{
+ templateUrl: "/content/editor/keyspace.html",
controller: "KeyspaceController"
})
.when('/editor/:keyspaceName',{
- templateUrl: "editor/keyspace.html",
+ templateUrl: "/content/editor/keyspace.html",
controller: "KeyspaceController"
})
.when('/editor/:keyspaceName/class/:className',{
- templateUrl: "editor/class/class.html",
+ templateUrl: "/content/editor/class/class.html",
controller: "ClassController"
})
.when('/load',{
- templateUrl: "load/load.html",
+ templateUrl: "/content/load/load.html",
controller: "LoadController"
})
.when('/submit',{
- templateUrl: "submit/submit.html",
+ templateUrl: "/content/submit/submit.html",
controller: "SubmitController"
})
.otherwise({redirectTo: '/'});
diff --git a/go/cmd/vtctld/schema_editor/curschema.js b/go/cmd/vtctld/templates/curschema.js
similarity index 100%
rename from go/cmd/vtctld/schema_editor/curschema.js
rename to go/cmd/vtctld/templates/curschema.js
diff --git a/go/cmd/vtctld/schema_editor/editor/class/class.html b/go/cmd/vtctld/templates/editor/class/class.html
similarity index 97%
rename from go/cmd/vtctld/schema_editor/editor/class/class.html
rename to go/cmd/vtctld/templates/editor/class/class.html
index 2d797ba4fe..17ac52a351 100644
--- a/go/cmd/vtctld/schema_editor/editor/class/class.html
+++ b/go/cmd/vtctld/templates/editor/class/class.html
@@ -1,6 +1,6 @@
-
+
Class:
diff --git a/go/cmd/vtctld/schema_editor/editor/class/class.js b/go/cmd/vtctld/templates/editor/class/class.js
similarity index 100%
rename from go/cmd/vtctld/schema_editor/editor/class/class.js
rename to go/cmd/vtctld/templates/editor/class/class.js
diff --git a/go/cmd/vtctld/schema_editor/editor/classes.html b/go/cmd/vtctld/templates/editor/classes.html
similarity index 99%
rename from go/cmd/vtctld/schema_editor/editor/classes.html
rename to go/cmd/vtctld/templates/editor/classes.html
index c67758c130..cb2bad8c37 100644
--- a/go/cmd/vtctld/schema_editor/editor/classes.html
+++ b/go/cmd/vtctld/templates/editor/classes.html
@@ -57,4 +57,4 @@
-
\ No newline at end of file
+
diff --git a/go/cmd/vtctld/schema_editor/editor/keyspace.html b/go/cmd/vtctld/templates/editor/keyspace.html
similarity index 72%
rename from go/cmd/vtctld/schema_editor/editor/keyspace.html
rename to go/cmd/vtctld/templates/editor/keyspace.html
index 363167025e..fb9d990c3f 100644
--- a/go/cmd/vtctld/schema_editor/editor/keyspace.html
+++ b/go/cmd/vtctld/templates/editor/keyspace.html
@@ -1,7 +1,7 @@
-
-
+
+
Keyspace: {{keyspaceName}}
-
\ No newline at end of file
+
diff --git a/go/cmd/vtctld/schema_editor/editor/keyspace.js b/go/cmd/vtctld/templates/editor/keyspace.js
similarity index 100%
rename from go/cmd/vtctld/schema_editor/editor/keyspace.js
rename to go/cmd/vtctld/templates/editor/keyspace.js
diff --git a/go/cmd/vtctld/schema_editor/editor/sidebar.html b/go/cmd/vtctld/templates/editor/sidebar.html
similarity index 89%
rename from go/cmd/vtctld/schema_editor/editor/sidebar.html
rename to go/cmd/vtctld/templates/editor/sidebar.html
index b9a215fc20..8f9cd36be4 100644
--- a/go/cmd/vtctld/schema_editor/editor/sidebar.html
+++ b/go/cmd/vtctld/templates/editor/sidebar.html
@@ -3,9 +3,9 @@
Commands
diff --git a/go/cmd/vtctld/schema_editor/editor/sidebar.js b/go/cmd/vtctld/templates/editor/sidebar.js
similarity index 100%
rename from go/cmd/vtctld/schema_editor/editor/sidebar.js
rename to go/cmd/vtctld/templates/editor/sidebar.js
diff --git a/go/cmd/vtctld/schema_editor/editor/tables.html b/go/cmd/vtctld/templates/editor/tables.html
similarity index 100%
rename from go/cmd/vtctld/schema_editor/editor/tables.html
rename to go/cmd/vtctld/templates/editor/tables.html
diff --git a/go/cmd/vtctld/schema_editor/editor/unsharded_tables.html b/go/cmd/vtctld/templates/editor/unsharded_tables.html
similarity index 100%
rename from go/cmd/vtctld/schema_editor/editor/unsharded_tables.html
rename to go/cmd/vtctld/templates/editor/unsharded_tables.html
diff --git a/go/cmd/vtctld/schema_editor/editor/vindexes.html b/go/cmd/vtctld/templates/editor/vindexes.html
similarity index 100%
rename from go/cmd/vtctld/schema_editor/editor/vindexes.html
rename to go/cmd/vtctld/templates/editor/vindexes.html
diff --git a/go/cmd/vtctld/schema_editor/index.html b/go/cmd/vtctld/templates/index.html
similarity index 67%
rename from go/cmd/vtctld/schema_editor/index.html
rename to go/cmd/vtctld/templates/index.html
index 25c53c47e8..24a8a06ce4 100644
--- a/go/cmd/vtctld/schema_editor/index.html
+++ b/go/cmd/vtctld/templates/index.html
@@ -9,7 +9,7 @@ license that can be found in the LICENSE file.
-
+
VTGate schema editor
@@ -23,10 +23,13 @@ license that can be found in the LICENSE file.
@@ -51,28 +54,28 @@ license that can be found in the LICENSE file.
type="text/javascript">
-
-
-
-
-
-
-
-