mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-22 08:08:01 +00:00
DSS-5869 Adds schemahistory routes and templates
This commit is contained in:
parent
ebcf5ef288
commit
ce1b6503d8
16
wherehows-web/app/routes/schemahistory.js
Normal file
16
wherehows-web/app/routes/schemahistory.js
Normal file
@ -0,0 +1,16 @@
|
||||
import Ember from 'ember';
|
||||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||
|
||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
Ember.run.scheduleOnce('afterRender', this, 'bindKeyEvent');
|
||||
},
|
||||
|
||||
bindKeyEvent() {
|
||||
Ember.$('#name').bind('paste keyup', () => {
|
||||
this.controller.set('schemaName', Ember.$("#name").val());
|
||||
this.controller.updateSchemas(1, 0);
|
||||
});
|
||||
}
|
||||
});
|
7
wherehows-web/app/routes/schemahistory/index.js
Normal file
7
wherehows-web/app/routes/schemahistory/index.js
Normal file
@ -0,0 +1,7 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
redirect() {
|
||||
this.transitionTo('schemahistory.page', 1);
|
||||
}
|
||||
});
|
9
wherehows-web/app/routes/schemahistory/page.js
Normal file
9
wherehows-web/app/routes/schemahistory/page.js
Normal file
@ -0,0 +1,9 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
controllerName: 'schemahistory',
|
||||
|
||||
setupController(controller, model) {
|
||||
controller.updateSchemas(model.page, 0);
|
||||
}
|
||||
});
|
7
wherehows-web/app/routes/schemahistory/schema.js
Normal file
7
wherehows-web/app/routes/schemahistory/schema.js
Normal file
@ -0,0 +1,7 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
setupController(controller, model) {
|
||||
this.controllerFor('schemahistory').schemahistory.updateSchemas(1, model.id);
|
||||
}
|
||||
});
|
99
wherehows-web/app/templates/schemahistory.hbs
Normal file
99
wherehows-web/app/templates/schemahistory.hbs
Normal file
@ -0,0 +1,99 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<input id="name" type="text" class="form-control" placeholder="Filter by Name"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="schemaView" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span9">
|
||||
<div class="search-pagination">
|
||||
<ul class="pager">
|
||||
{{#unless first}}
|
||||
<li class="previous">
|
||||
{{#link-to 'schemahistory.page' previousPage}}
|
||||
← Prev
|
||||
{{/link-to}}
|
||||
</li>
|
||||
{{/unless}}
|
||||
<li>
|
||||
{{ model.data.count }} scripts - page {{ model.data.page }} of {{ model.data.totalPages }}
|
||||
</li>
|
||||
{{#unless last}}
|
||||
<li class="next">
|
||||
{{#link-to 'schemahistory.page' nextPage}}
|
||||
Next →
|
||||
{{/link-to}}
|
||||
</li>
|
||||
{{/unless}}
|
||||
</ul>
|
||||
</div>
|
||||
<table id="schematable" class="table table-bordered table-hover search-results">
|
||||
<thead>
|
||||
<tr class="results-header">
|
||||
<th class="span3">Dataset Name</th>
|
||||
<th class="span6">Dataset URN</th>
|
||||
<th class="span3">Last Modified Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model.data.datasets as |dataset| }}
|
||||
<tr {{action 'onSelect' dataset model}} class="schema-row">
|
||||
<td class="dataset-info">
|
||||
{{dataset.name}}
|
||||
</td>
|
||||
<td>{{ dataset.urn }}</td>
|
||||
<td>{{ dataset.lastModified }}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="span9">
|
||||
{{outlet}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<ul id="historytabs" class="nav nav-tabs">
|
||||
<li id="timelinepage"><a id="timelinetablink" data-toggle="tab" href="#timelinetab">Timeline</a></li>
|
||||
<li id="diffviewpage"><a id="diffviewtablink" data-toggle="tab" href="#diffviewtab">Schema</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="timelinetab" class="tab-pane">
|
||||
<div id="timeline"></div>
|
||||
</div>
|
||||
<div id="diffviewtab" class="tab-pane">
|
||||
<div class="col-xs-10">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="row">
|
||||
<div class="col-xs-1 text-right">
|
||||
<label>Source</label>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<select id="leftSchemaSelector" class="col-xs-8 form-control">
|
||||
<option value="na">-- choose a date --</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-1 text-right">
|
||||
<label>Target</label>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<select id="rightSchemaSelector" class="col-xs-8 form-control">
|
||||
<option value="na">-- choose a date --</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="schemaContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
1
wherehows-web/app/templates/schemahistory/index.hbs
Normal file
1
wherehows-web/app/templates/schemahistory/index.hbs
Normal file
@ -0,0 +1 @@
|
||||
{{outlet}}
|
1
wherehows-web/app/templates/schemahistory/page.hbs
Normal file
1
wherehows-web/app/templates/schemahistory/page.hbs
Normal file
@ -0,0 +1 @@
|
||||
{{outlet}}
|
89
wherehows-web/app/templates/schemahistory/schema.hbs
Normal file
89
wherehows-web/app/templates/schemahistory/schema.hbs
Normal file
@ -0,0 +1,89 @@
|
||||
<div id="schemaView" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span9">
|
||||
<div class="search-pagination">
|
||||
<ul class="pager">
|
||||
{{#unless first}}
|
||||
<li class="previous">
|
||||
{{#link-to 'schemahistory.page' previousPage}}
|
||||
← Prev
|
||||
{{/link-to}}
|
||||
</li>
|
||||
{{/unless}}
|
||||
<li>
|
||||
{{ model.data.count }} scripts - page {{ model.data.page }} of {{ model.data.totalPages }}
|
||||
</li>
|
||||
{{#unless last}}
|
||||
<li class="next">
|
||||
{{#link-to 'schemahistory.page' nextPage}}
|
||||
Next →
|
||||
{{/link-to}}
|
||||
</li>
|
||||
{{/unless}}
|
||||
</ul>
|
||||
</div>
|
||||
<table id="schematable" class="table table-bordered table-hover search-results">
|
||||
<thead>
|
||||
<tr class="results-header">
|
||||
<th class="span3">Dataset Name</th>
|
||||
<th class="span6">Dataset URN</th>
|
||||
<th class="span3">Last Modified Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each model.data.datasets as |dataset| }}
|
||||
<tr {{action 'onSelect' dataset this}} class="schema-row">
|
||||
<td class="dataset-info">
|
||||
{{dataset.name}}
|
||||
</td>
|
||||
<td>{{ dataset.urn }}</td>
|
||||
<td>{{ dataset.lastModified }}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="span9">
|
||||
{{outlet}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<ul id="historytabs" class="nav nav-tabs">
|
||||
<li id="timelinepage"><a id="timelinetablink" data-toggle="tab" href="#timelinetab">Timeline</a></li>
|
||||
<li id="diffviewpage"><a id="diffviewtablink" data-toggle="tab" href="#diffviewtab">Schema</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="timelinetab" class="tab-pane">
|
||||
<div id="timeline"></div>
|
||||
</div>
|
||||
<div id="diffviewtab" class="tab-pane">
|
||||
<div class="col-xs-10">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="row">
|
||||
<div class="col-xs-1 text-right">
|
||||
<label>Source</label>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<select id="leftSchemaSelector" class="col-xs-8 form-control">
|
||||
<option value="na">-- choose a date --</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-1 text-right">
|
||||
<label>Target</label>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<select id="rightSchemaSelector" class="col-xs-8 form-control">
|
||||
<option value="na">-- choose a date --</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="schemaContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user