Huge cleanup and rework pass, postgres now usable too

This commit is contained in:
2018-02-19 23:57:14 -05:00
parent d996f7a2cb
commit a3a3c3a780
18 changed files with 472 additions and 110 deletions

View File

@ -59,7 +59,7 @@ var addchanel0 = new Vue({
submit: function (event) {
// Send the channel to our API and request tables be updated.
var d = this.entry;
axios.post('/api/Channels', d)
axios.post('/api/Channels/' + this.entry.yTChannelID)
.then(function (response) {
this.entry.title = "";
this.entry.description = "";
@ -132,13 +132,13 @@ var tbody0 = new Vue({
</thead>
<tbody>
<tr v-cloak v-for="entry in entries">
<td class="tinytext12px">{{entry.ytChannelID}}</td>
<td class="tinytext12px">{{entry.youtubeID}}</td>
<td class="tinytext12px">{{entry.title}}</td>
<td class="tinytext12px">{{entry.description}}</td>
<td class="tinytext12px">{{entry.channelId}}</td>
<td class="tinytext12px">{{entry.primaryKey}}</td>
<td>
<a href="#"><i class="fa fa-refresh" aria-hidden="true" :id="entry.ytChannelID" @click="forcerefresh"/></a>
<a href="#"><i class="fa fa-trash-o" aria-hidden="true" :id="entry.ytChannelID" @click="deletechannel"/></a>
<a href="#"><i class="fa fa-refresh" aria-hidden="true" :id="entry.youtubeID" @click="forcerefresh"/></a>
<a href="#"><i class="fa fa-trash-o" aria-hidden="true" :id="entry.youtubeID" @click="deletechannel"/></a>
</td>
</tr>
</tbody>
@ -165,7 +165,7 @@ var tbody0 = new Vue({
},
forcerefresh: function (event) {
axios
.post('/api/Admin/job_update/' + event.target.id)
.post('/api/Admin/Update/' + event.target.id)
.catch(function (error) { console.log(error); });
},
deletechannel: function (event) {
@ -200,7 +200,7 @@ var apistatus = new Vue({
`,
methods: {
update: function (event) {
axios.get('/api/Admin/job_periodicupdate')
axios.get('/api/Admin/Update')
.then(function (response) {
this.apiaccessible = (response.status == 200);
this.updatingjobactive = (response.data != "false")
@ -213,7 +213,7 @@ var apistatus = new Vue({
}
});
// Grid if images.
// Grid of images.
var videostb = new Vue({
el: '#videosindbtable-0',
data: {
@ -234,9 +234,9 @@ var videostb = new Vue({
<tr v-cloak v-for="video in Videos">
<td class="tinytext12px">{{video.title}}</td>
<td class="tinytext12px">{{video.description}}</td>
<td class="tinytext12px">{{video.ytVideoID}}</td>
<td class="tinytext12px">{{video.youtubeID}}</td>
<td class="tinytext12px">{{video.uploaded}}</td>
<td class="tinytext12px">{{video.videoId}}</td>
<td class="tinytext12px">{{video.primaryKey}}</td>
</tr>
</tbody>
</table>

View File

@ -5,10 +5,12 @@
font-size: 18px;
color: #003636;
background-color: #F8F8F8;
max-width: 1024px;
margin: auto;
}
.pageheader {
max-width: 1280px;
max-width: 960px;
margin: auto;
}

View File

@ -15,7 +15,7 @@
</div>
<hr />
<h2>Most Recent Videos</h2>
<div v-cloak id="vidholder-0"></div>
<!-- Compressed JavaScript -->

View File

@ -40,7 +40,7 @@ var vidholder = new Vue({
}
// Generate a new URL by adding the YT ID.
x.url = "https://www.youtube.com/watch?v=" + x.ytVideoID
x.url = "https://www.youtube.com/watch?v=" + x.youtubeID;
// Add it to our array
this.Videos.push(x);