You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/11/20 19:01:32 UTC
[airavata-django-portal] 04/06: AIRAVATA-2597 Add simple dashboard
entrypoint
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit c4f56b5a887446e49f106fcbed629551bb03ead4
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Mon Nov 20 10:34:43 2017 -0500
AIRAVATA-2597 Add simple dashboard entrypoint
---
.../django_airavata_workspace/js/entry-dashboard.js | 19 +++++++++++++++++++
.../js/views/DashboardContainer.vue | 20 ++++++++++++++++++++
.../js/views/ProjectButtonNew.vue | 6 ------
.../django_airavata_workspace/dashboard.html | 11 ++++++++++-
.../django_airavata_workspace/projects_list.html | 6 +++++-
django_airavata/apps/workspace/webpack.config.js | 9 +++++++--
6 files changed, 61 insertions(+), 10 deletions(-)
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/entry-dashboard.js b/django_airavata/apps/workspace/static/django_airavata_workspace/js/entry-dashboard.js
new file mode 100644
index 0000000..9edf0c0
--- /dev/null
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/entry-dashboard.js
@@ -0,0 +1,19 @@
+import Vue from 'vue'
+import BootstrapVue from 'bootstrap-vue'
+import DashboardContainer from './views/DashboardContainer.vue'
+
+// This is imported globally on the website so no need to include it again in this view
+// import 'bootstrap/dist/css/bootstrap.css'
+import 'bootstrap-vue/dist/bootstrap-vue.css'
+
+Vue.use(BootstrapVue);
+
+new Vue({
+ el: '#dashboard',
+ template: '<dashboard-container></dashboard-container>',
+ data: {
+ },
+ components: {
+ DashboardContainer
+ }
+})
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/views/DashboardContainer.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/views/DashboardContainer.vue
new file mode 100644
index 0000000..7985307
--- /dev/null
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/views/DashboardContainer.vue
@@ -0,0 +1,20 @@
+<template>
+ <div>
+ <div class="row">
+ <div class="col">
+ <h1 class="h4 mb-4">Dashboard</h1>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+
+export default {
+ name: 'dashboard-container',
+ data () {
+ return {
+ }
+ },
+}
+</script>
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/views/ProjectButtonNew.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/views/ProjectButtonNew.vue
index 3db2710..6a2fb18 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/views/ProjectButtonNew.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/views/ProjectButtonNew.vue
@@ -101,9 +101,3 @@ export default {
},
}
</script>
-
-<style>
-/*#modal-new-project {
- text-align: left;
-}*/
-</style>
diff --git a/django_airavata/apps/workspace/templates/django_airavata_workspace/dashboard.html b/django_airavata/apps/workspace/templates/django_airavata_workspace/dashboard.html
index ecc8e45..2825ce1 100644
--- a/django_airavata/apps/workspace/templates/django_airavata_workspace/dashboard.html
+++ b/django_airavata/apps/workspace/templates/django_airavata_workspace/dashboard.html
@@ -1,8 +1,17 @@
{% extends './base.html' %}
+{% load static %}
+
+{% block css %}
+<link rel=stylesheet type=text/css href="{% static 'django_airavata_workspace/dist/dashboard.css' %}">
+{% endblock %}
{% block content %}
-<h1>Dashboard</h1>
+<div id="dashboard"></div>
{% endblock content %}
+
+{% block scripts %}
+<script src="{% static "django_airavata_workspace/dist/dashboard.js" %}"></script>
+{% endblock %}
diff --git a/django_airavata/apps/workspace/templates/django_airavata_workspace/projects_list.html b/django_airavata/apps/workspace/templates/django_airavata_workspace/projects_list.html
index 451af69..41b2aae 100644
--- a/django_airavata/apps/workspace/templates/django_airavata_workspace/projects_list.html
+++ b/django_airavata/apps/workspace/templates/django_airavata_workspace/projects_list.html
@@ -3,6 +3,10 @@
{% load static %}
+{% block css %}
+<link rel=stylesheet type=text/css href="{% static 'django_airavata_workspace/dist/project-list.css' %}">
+{% endblock %}
+
{% block content %}
<div id="project-list" data-projects-data="{{ projects_data }}"></div>
@@ -11,5 +15,5 @@
{% block scripts %}
-<script src="{% static "django_airavata_workspace/dist/main.js" %}"></script>
+<script src="{% static "django_airavata_workspace/dist/project-list.js" %}"></script>
{% endblock %}
\ No newline at end of file
diff --git a/django_airavata/apps/workspace/webpack.config.js b/django_airavata/apps/workspace/webpack.config.js
index 7734129..f3e5314 100644
--- a/django_airavata/apps/workspace/webpack.config.js
+++ b/django_airavata/apps/workspace/webpack.config.js
@@ -1,9 +1,13 @@
var path = require('path')
var webpack = require('webpack')
const ExtractTextPlugin = require("extract-text-webpack-plugin");
+const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = {
- entry: './static/django_airavata_workspace/js/entry-project-list.js',
+ entry: {
+ 'project-list': './static/django_airavata_workspace/js/entry-project-list',
+ 'dashboard': './static/django_airavata_workspace/js/entry-dashboard',
+ },
output: {
path: path.resolve(__dirname, './static/django_airavata_workspace/dist/'),
publicPath: '/static/django_airavata_workspace/dist/',
@@ -58,7 +62,8 @@ module.exports = {
plugins: [
// Exclude all but the 'en' locale from moment's locales
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /^en$/),
- new ExtractTextPlugin("main.css"),
+ new ExtractTextPlugin("[name].css"),
+ new CleanWebpackPlugin(['./static/django_airavata_workspace/dist']),
]
}
--
To stop receiving notification emails like this one, please contact
"commits@airavata.apache.org" <co...@airavata.apache.org>.