-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrated the OpenEO JS Web Editor to vue.js and into its own repository.
- Loading branch information
Showing
23 changed files
with
13,050 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": [ | ||
"@vue/app" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": [ | ||
"plugin:vue/essential", | ||
"eslint:recommended" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": { | ||
"autoprefixer": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "openeo-web-editor", | ||
"version": "0.0.2", | ||
"author": "OpenEO Team", | ||
"contributors": [ | ||
{ | ||
"name": "Matthias Mohr" | ||
}, | ||
{ | ||
"name": "Gustav Jv Rensburg" | ||
}, | ||
{ | ||
"name": "Miha Kadunc" | ||
} | ||
], | ||
"description": "A web-based editor for interactive usage of the OpenEO API (proof-of-concept).", | ||
"license": "Apache-2.0", | ||
"homepage": "https://github.com/Open-EO/openeo-web-editor", | ||
"bugs": { | ||
"url": "https://github.com/Open-EO/openeo-web-editor/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Open-EO/openeo-web-editor.git" | ||
}, | ||
"scripts": { | ||
"serve": "vue-cli-service serve", | ||
"build": "vue-cli-service build", | ||
"test": "vue-cli-service test" | ||
}, | ||
"dependencies": { | ||
"vue": "^2.5.13", | ||
"openeo-js-client": "git+https://github.com/Open-EO/openeo-js-client.git", | ||
"bulma": "^0.6.2", | ||
"leaflet": "^1.2.0", | ||
"codemirror": "^5.33.0" | ||
}, | ||
"devDependencies": { | ||
"@vue/cli-plugin-babel": "^3.0.0-alpha.10", | ||
"@vue/cli-service": "^3.0.0-alpha.10", | ||
"vue-template-compiler": "^2.5.13" | ||
}, | ||
"browserslist": [ | ||
"> 1%", | ||
"last 2 versions", | ||
"not ie <= 8" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<title>OpenEO Web Editor</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<noscript>Sorry, the <a href="http://www.openeo.org">OpenEO</a> Web Editor requires JavaScript to be enabled!</noscript> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
<template> | ||
<div id="container"> | ||
<div id="ide"> | ||
<BackendPanel :serverUrl="serverUrl" /> | ||
<SourceEnvironment /> | ||
<div class="userTabs"> | ||
<div class="tabsHeader"> | ||
<button class="tabItem tabActive" name="accountTab" @click="changeTab">Account</button> | ||
<button class="tabItem" name="filesTab" @click="changeTab">Files</button> | ||
<button class="tabItem" name="processGraphsTab" @click="changeTab">Process Graphs</button> | ||
<button class="tabItem" name="jobsTab" @click="changeTab">Jobs</button> | ||
<button class="tabItem" name="servicesTab" @click="changeTab">Services</button> | ||
</div> | ||
<div class="tabContent tabActive" id="accountTab"> | ||
<AccountPanel /> | ||
</div> | ||
<div class="tabContent" id="filesTab"> | ||
<FilePanel /> | ||
</div> | ||
<div class="tabContent" id="processGraphsTab"> | ||
<ProcessGraphPanel /> | ||
</div> | ||
<div class="tabContent" id="jobsTab"> | ||
<JobPanel /> | ||
</div> | ||
<div class="tabContent" id="servicesTab"> | ||
<ServicePanel /> | ||
</div> | ||
</div> | ||
<footer> | ||
<a href="http://www.openeo.org" target="_blank"><img src="./assets/logo.png" id="openeoLogo" /></a> | ||
</footer> | ||
</div> | ||
<div id="map"> | ||
<Map /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import EventBus from './eventbus.js'; | ||
import AccountPanel from './components/AccountPanel.vue' | ||
import BackendPanel from './components/BackendPanel.vue' | ||
import FilePanel from './components/FilePanel.vue' | ||
import JobPanel from './components/JobPanel.vue' | ||
import Map from './components/Map.vue' | ||
import ProcessGraphPanel from './components/ProcessGraphPanel.vue' | ||
import ServicePanel from './components/ServicePanel.vue' | ||
import SourceEnvironment from './components/SourceEnvironment.vue' | ||
export default { | ||
name: 'openeo-web-editor', | ||
components: { | ||
AccountPanel, | ||
BackendPanel, | ||
FilePanel, | ||
JobPanel, | ||
Map, | ||
ProcessGraphPanel, | ||
ServicePanel, | ||
SourceEnvironment | ||
}, | ||
data() { | ||
return {} | ||
}, | ||
computed: { | ||
serverUrl: { | ||
get: function () { | ||
return this.$OpenEO.API.baseUrl; | ||
}, | ||
set: function(value) { | ||
this.$OpenEO.API.baseUrl = value; | ||
} | ||
} | ||
}, | ||
created() { | ||
this.setServerUrl(this.$config.serverUrl); | ||
EventBus.$on('changeServerUrl', this.setServerUrl); | ||
}, | ||
mounted() { | ||
}, | ||
methods: { | ||
setServerUrl(url) { | ||
this.$OpenEO.API.driver = 'openeo-sentinelhub-driver'; // ToDo: Remove this after proof-of-concept | ||
this.serverUrl = url; | ||
}, | ||
changeTab: function(evt) { | ||
var i, x, tablinks; | ||
var tabName = evt.currentTarget.name; | ||
x = document.getElementsByClassName("tabContent"); | ||
for (i = 0; i < x.length; i++) { | ||
x[i].style.display = "none"; | ||
} | ||
tablinks = document.getElementsByClassName("tabItem"); | ||
for (i = 0; i < x.length; i++) { | ||
tablinks[i].className = tablinks[i].className.replace(" tabActive", ""); | ||
} | ||
document.getElementById(tabName).style.display = "block"; | ||
evt.currentTarget.className += " tabActive"; | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
body { | ||
margin: 0; | ||
overflow: hidden; | ||
font-family: sans-serif; | ||
font-size: 90%; | ||
} | ||
ul, ol { | ||
margin-bottom: 0; | ||
margin-top: 0; | ||
padding-bottom: 0; | ||
padding-top: 0; | ||
} | ||
#map { | ||
position: absolute; | ||
top: 0px; | ||
left: 50%; | ||
width: 50%; | ||
height: 100vh; | ||
} | ||
#ide { | ||
position: absolute; | ||
top: 0px; | ||
left: 0px; | ||
width: 50%; | ||
height: 100vh; | ||
overflow-y: auto; | ||
} | ||
.toolbar { | ||
border: solid 1px #676767; | ||
background-color: #f7f7f7; | ||
margin: 1%; | ||
padding: 5px; | ||
vertical-align: middle; | ||
} | ||
.data-toolbar, .processes-toolbar, .server-toolbar, .vis-toolbar, .auth-toolbar { | ||
display: inline-block; | ||
margin-right: 3%; | ||
} | ||
#SourceEnvironment, .userTabs { | ||
border: solid 1px #676767; | ||
margin: 1%; | ||
background-color: #f7f7f7; | ||
} | ||
.tabContent { | ||
display: none; | ||
padding: 5px; | ||
background-color: white; | ||
border-top: 1px solid #ddd; | ||
min-height: 200px; | ||
max-height: 350px; | ||
overflow: auto; | ||
} | ||
.tabContent table { | ||
width: 100%; | ||
border-collapse: collapse; | ||
} | ||
.tabContent table td, .tabContent table th { | ||
border: 1px solid #ddd; | ||
padding: 3px; | ||
} | ||
.tabItem { | ||
background-color: transparent; | ||
border: 0; | ||
margin: 5px 0 -1px 5px; | ||
padding: 5px; | ||
border: 1px solid #ddd; | ||
border-bottom: 0; | ||
border-radius: 5px 5px 0 0; | ||
width: 10%; | ||
min-width: 130px; | ||
} | ||
div.tabActive { | ||
display: block; | ||
} | ||
button.tabActive { | ||
font-weight: bold; | ||
background-color: white; | ||
} | ||
h3 { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.running, .active { | ||
color: green; | ||
} | ||
footer { | ||
text-align: center; | ||
} | ||
#openeoLogo { | ||
height: 60px; | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<div id="filePanel"> | ||
<h3>Account</h3> | ||
<ul> | ||
<li>User Name: Guest</li> | ||
<li>Credits: 0 <button id="topUpCredits">Top up</button></li> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import EventBus from '../eventbus.js'; | ||
export default { | ||
name: 'FilePanel', | ||
data() { | ||
return {} | ||
}, | ||
mounted() { | ||
}, | ||
methods: { | ||
} | ||
} | ||
</script> |
Oops, something went wrong.