mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-23 09:32:04 +00:00
Merge pull request #1079 from theseyi/misc
removes some unused legacy sources
This commit is contained in:
commit
8b94e3ee9c
@ -1,32 +0,0 @@
|
||||
import Component from '@ember/component';
|
||||
import $ from 'jquery';
|
||||
|
||||
export default Component.extend({
|
||||
actions: {
|
||||
favorites: function(dataset) {
|
||||
var url = '/api/v1/datasets/' + dataset.id + '/favorite';
|
||||
var method = !dataset.isFavorite ? 'POST' : 'DELETE';
|
||||
var token = $('#csrfToken')
|
||||
.val()
|
||||
.replace('/', '');
|
||||
var _this = this;
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: method,
|
||||
headers: {
|
||||
'Csrf-Token': token
|
||||
},
|
||||
dataType: 'json',
|
||||
data: {
|
||||
csrfToken: token
|
||||
}
|
||||
})
|
||||
.done(function(data, txt, xhr) {
|
||||
_this.set('dataset.isFavorite', !dataset.isFavorite);
|
||||
})
|
||||
.fail(function(xhr, txt, err) {
|
||||
console.log('Error: Could not update dataset favorite.');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
@ -1,2 +0,0 @@
|
||||
import Component from '@ember/component';
|
||||
export default Component.extend({});
|
@ -1,15 +0,0 @@
|
||||
import Component from '@ember/component';
|
||||
import { computed } from '@ember/object';
|
||||
|
||||
export default Component.extend({
|
||||
tagName: 'section',
|
||||
classNames: ['dataset-owner-list'],
|
||||
|
||||
ownersEmailList: computed('owners', function() {
|
||||
// Reduce owner email to a string containing emails, each separated by comma
|
||||
return this.get('owners')
|
||||
.mapBy('email')
|
||||
.filter(email => email)
|
||||
.join(', ');
|
||||
})
|
||||
});
|
@ -1,35 +0,0 @@
|
||||
import Component from '@ember/component';
|
||||
import $ from 'jquery';
|
||||
|
||||
export default Component.extend({
|
||||
actions: {
|
||||
owned: function(dataset) {
|
||||
var url = '/api/v1/datasets/' + dataset.id + '/own';
|
||||
var method = !dataset.isOwned ? 'POST' : 'DELETE';
|
||||
var token = $('#csrfToken')
|
||||
.val()
|
||||
.replace('/', '');
|
||||
var _this = this;
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: method,
|
||||
headers: {
|
||||
'Csrf-Token': token
|
||||
},
|
||||
dataType: 'json',
|
||||
data: {
|
||||
csrfToken: token
|
||||
}
|
||||
})
|
||||
.done(function(data, txt, xhr) {
|
||||
if (data.status == 'success') {
|
||||
_this.set('dataset.isOwned', !dataset.isOwned);
|
||||
_this.set('dataset.owners', data.owners);
|
||||
}
|
||||
})
|
||||
.fail(function(xhr, txt, err) {
|
||||
console.log('Error: Could not update dataset owner.');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
@ -1,2 +0,0 @@
|
||||
import Component from '@ember/component';
|
||||
export default Component.extend({});
|
@ -1,2 +0,0 @@
|
||||
import Component from '@ember/component';
|
||||
export default Component.extend({});
|
@ -1,36 +0,0 @@
|
||||
import Component from '@ember/component';
|
||||
import $ from 'jquery';
|
||||
|
||||
export default Component.extend({
|
||||
actions: {
|
||||
watch: function(dataset) {
|
||||
var url = '/api/v1/datasets/' + dataset.id + '/watch';
|
||||
var method = !dataset.watchId ? 'POST' : 'DELETE';
|
||||
if (method.toLowerCase() === 'delete') url += '/' + dataset.watchId;
|
||||
var token = $('#csrfToken')
|
||||
.val()
|
||||
.replace('/', '');
|
||||
var _this = this;
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: method,
|
||||
headers: {
|
||||
'Csrf-Token': token
|
||||
},
|
||||
dataType: 'json',
|
||||
data: {
|
||||
csrfToken: token,
|
||||
item_type: 'dataset',
|
||||
notification_type: 'weekly'
|
||||
}
|
||||
})
|
||||
.done(function(data, txt, xhr) {
|
||||
_this.set('dataset.isWatched', !dataset.isWatched);
|
||||
_this.sendAction('getDatasets');
|
||||
})
|
||||
.fail(function(xhr, txt, err) {
|
||||
console.log('Error: Could not watch dataset.');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
@ -1,2 +0,0 @@
|
||||
import Component from '@ember/component';
|
||||
export default Component.extend({});
|
@ -5,7 +5,6 @@
|
||||
@import 'dataset-compliance/all';
|
||||
@import 'browse-nav/all';
|
||||
@import 'feature-card/all';
|
||||
@import 'dataset-owner-list/all';
|
||||
@import 'entity-list/all';
|
||||
@import 'notifications/all';
|
||||
@import 'dataset-comments/all';
|
||||
|
@ -1 +0,0 @@
|
||||
@import "dataset-owner-list";
|
@ -1,35 +0,0 @@
|
||||
.dataset-owner-list {
|
||||
padding: 10px 0;
|
||||
width: 100%;
|
||||
|
||||
&__list {
|
||||
display: inline-block;
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
&__item {
|
||||
display: inline-block;
|
||||
padding: 0 2px;
|
||||
margin: 0 5px 5px 0;
|
||||
line-height: 1.5;
|
||||
border: 1px solid set-color(grey, mid);
|
||||
background-color: set-color(white, earlydawn);
|
||||
border-radius: 2px;
|
||||
font-weight: fw(normal, 4);
|
||||
|
||||
// Displays the @ symbol for owner components with with-email modifier
|
||||
&--with-email {
|
||||
&::before {
|
||||
content: "@";
|
||||
font-size: 14px;
|
||||
color: set-color(grey, mid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__email-owners {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
{{#if owners}}
|
||||
Owners:
|
||||
<ul class="dataset-owner-list__list">
|
||||
{{#each owners as |owner|}}
|
||||
<li class="dataset-owner-list__item {{if owner.email "dataset-owner-list__item--with-email"}}">
|
||||
{{#if owner.email}}
|
||||
<a title="Email {{owner.name}} about {{datasetName}}"
|
||||
href="mailto:{{owner.email}}?subject=RE: Dataset {{datasetName}}"
|
||||
target="_blank">
|
||||
{{owner.name}}
|
||||
</a>
|
||||
{{else}}
|
||||
{{owner.name}}
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{#if ownersEmailList}}
|
||||
<span class="dataset-owner-list__email-owners">
|
||||
<a title="Email all dataset owners"
|
||||
href="mailto: {{ownersEmailList}}?subject=RE: Dataset {{datasetName}}"
|
||||
target="_blank">
|
||||
Ask a question?
|
||||
</a>
|
||||
</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
@ -1,60 +0,0 @@
|
||||
{{#if hasDepends}}
|
||||
<table id="depends-table" class="columntreegrid tree table table-bordered dataset-detail-table">
|
||||
<thead>
|
||||
<tr class="results-header">
|
||||
<th class="span2">Depends on</th>
|
||||
<th class="span1">Object Type</th>
|
||||
<th class="span1">Object Sub Type</th>
|
||||
<th class="span2">Level</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each depends as |depend|}}
|
||||
<tr class="{{depend.treeGridClass}}">
|
||||
<td>
|
||||
{{#if depend.isValidDataset}}
|
||||
<a href={{depend.datasetLink}}>
|
||||
{{depend.objectName}}
|
||||
</a>
|
||||
{{else}}
|
||||
{{depend.objectName}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>{{depend.objectType}}</td>
|
||||
<td>{{depend.objectSubType}}</td>
|
||||
<td>{{depend.level}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/if}}
|
||||
{{#if hasReferences}}
|
||||
<table id="references-table" class="columntreegrid tree table table-bordered dataset-detail-table">
|
||||
<thead>
|
||||
<tr class="results-header">
|
||||
<th class="span2">Referred By</th>
|
||||
<th class="span1">Object Type</th>
|
||||
<th class="span1">Object Sub Type</th>
|
||||
<th class="span2">Level</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each references as |reference|}}
|
||||
<tr class="{{reference.treeGridClass}}">
|
||||
<td>
|
||||
{{#if reference.isValidDataset}}
|
||||
<a href={{reference.datasetLink}}>
|
||||
{{reference.objectName}}
|
||||
</a>
|
||||
{{else}}
|
||||
{{reference.objectName}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>{{reference.objectType}}</td>
|
||||
<td>{{reference.objectSubType}}</td>
|
||||
<td>{{reference.level}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/if}}
|
@ -1,26 +0,0 @@
|
||||
{{#if hasSamples}}
|
||||
{{#if isPinot}}
|
||||
<table id="pinotsampletreegrid" class="tree table table-bordered dataset-detail-table">
|
||||
<thead>
|
||||
<tr class="results-header">
|
||||
{{#each columns as |column|}}
|
||||
<th class="col-xs-2">{{column}}</th>
|
||||
{{/each}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each samples as |sample|}}
|
||||
<tr>
|
||||
{{#each sample as |r|}}
|
||||
<td class="wrap-all-word">{{r}}</td>
|
||||
{{/each}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<div id="datasetSampleData-json-human" class="table-responsive"></div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<p>Sample data is not available</p>
|
||||
{{/if}}
|
@ -1,10 +0,0 @@
|
||||
<i class="wh-clickable-icon fa {{if dataset.watchId 'fa-eye-slash'}} {{unless dataset.watchId 'fa-eye'}}"
|
||||
{{action "watch" dataset}}>
|
||||
</i>
|
||||
{{#if showText}}
|
||||
{{#if dataset.watchId}}
|
||||
Unwatch
|
||||
{{else}}
|
||||
Watch
|
||||
{{/if}}
|
||||
{{/if}}
|
@ -1 +0,0 @@
|
||||
{{datasets/datasets-list datasets=datasets}}
|
@ -1,25 +0,0 @@
|
||||
{{#dataset-table
|
||||
fields=datasets as |table|}}
|
||||
{{#table.body as |body|}}
|
||||
{{#each
|
||||
table.data as |dataset|}}
|
||||
{{#body.row as |row|}}
|
||||
{{#row.cell}}
|
||||
{{#link-to 'datasets.dataset' dataset}}
|
||||
{{ dataset.name }}
|
||||
{{/link-to}}
|
||||
|
||||
{{dataset-owner-list owners=owners datasetName=model.name}}
|
||||
|
||||
{{#if dataset.formatedModified}}
|
||||
<span>Last Modified:</span>
|
||||
{{ dataset.formatedModified }}
|
||||
{{/if}}
|
||||
{{/row.cell}}
|
||||
{{#row.cell}}
|
||||
{{datasets/dataset-actions actionItems=actionItems}}
|
||||
{{/row.cell}}
|
||||
{{/body.row}}
|
||||
{{/each}}
|
||||
{{/table.body}}
|
||||
{{/dataset-table}}
|
Loading…
x
Reference in New Issue
Block a user