Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

area: ui #1443

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
627f30d
added empty node js package
sergeyglazyrindev-samsung Nov 5, 2018
f185183
added layouts selector
sergeyglazyrindev-samsung Nov 5, 2018
ac9865e
added basic classes for layouts
sergeyglazyrindev-samsung Nov 5, 2018
0753b48
add data sources
sergeyglazyrindev-samsung Nov 5, 2018
9484576
some basic parser implementation for skydive data format
sergeyglazyrindev-samsung Nov 5, 2018
44ca39f
basic data structures and entities
sergeyglazyrindev-samsung Nov 5, 2018
29a959b
added layout context for easier communication between modules
sergeyglazyrindev-samsung Nov 5, 2018
3aba826
added link labels strategies
sergeyglazyrindev-samsung Nov 5, 2018
366b145
introduce general layout ui view
sergeyglazyrindev-samsung Nov 5, 2018
2ac7a03
added node ui view
sergeyglazyrindev-samsung Nov 5, 2018
393ee82
introduce ui view
sergeyglazyrindev-samsung Nov 5, 2018
d332d94
added group ui
sergeyglazyrindev-samsung Nov 5, 2018
01ae7d6
cleanup topology_new_approach file
sergeyglazyrindev-samsung Nov 5, 2018
35c9260
fixed a bug in convexhull function
sergeyglazyrindev Nov 7, 2018
5a873a6
handled all external ways to control graph
sergeyglazyrindev-samsung Nov 7, 2018
066f551
removed app layout as its not ready yet
sergeyglazyrindev-samsung Nov 7, 2018
7821024
some draft changes to handle realtime updates
sergeyglazyrindev-samsung Nov 7, 2018
e9d1ef7
some fixes to rule detail component
sergeyglazyrindev-samsung Nov 7, 2018
c7c4fac
introduced a gremlin layout
sergeyglazyrindev-samsung Nov 8, 2018
bddf17f
fixes for realtime updates
sergeyglazyrindev-samsung Nov 8, 2018
7318651
fixed a possiblity to highlight and emphasize nodes on store events
sergeyglazyrindev-samsung Nov 8, 2018
b4e1198
removed old javascript files
sergeyglazyrindev-samsung Nov 8, 2018
0196539
minor fixes
sergeyglazyrindev-samsung Nov 8, 2018
b4b85fd
fixed workflows component
sergeyglazyrindev-samsung Nov 8, 2018
6314ff1
removed layout.js
sergeyglazyrindev-samsung Nov 8, 2018
746e7c4
fixed link latencies/bandwidth information
sergeyglazyrindev-samsung Nov 8, 2018
36a1aa5
fixed cdd tests
sergeyglazyrindev-samsung Nov 8, 2018
5839c0c
added a bridge between old layout and new approach
sergeyglazyrindev-samsung Nov 20, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 41 additions & 0 deletions statics/css/skydive.css
Expand Up @@ -123,6 +123,14 @@ label {
height: 100%;
}

.topology-d3-infra, .topology-d3-full-host, .topology-d3-gremlin {
width: 100%;
/* text-align: center; */
/* outline: none; */
background-color: #292e34;
border-radius: 4px;
}

.topology-d3 {
width: 100%;
text-align: center;
Expand All @@ -131,6 +139,10 @@ label {
border-radius: 4px;
}

.topology-d3-infra, .topology-d3-full-host, .topology-d3-gremlin {
height: 99%;
}

.topology-d3 {
height: 99%;
overflow: hidden;
Expand Down Expand Up @@ -987,3 +999,32 @@ input[type=number] {
appearance: none;

}

.impossible-to-build-hierarchy-topology {
justify-content: center;
font-weight: bold;
font-size: 20px;
min-height: 100%;
min-height: 100vh;
display: flex;
align-items: center;
color: white;
}

.back-to-infrastructure-topology {
margin: 10px 0 0 10px;
}
.back-to-hosts-topology {
margin: 10px 0;
font-size: 24px;
cursor: pointer;
color: white;
}
.layout-switcher {
margin-bottom: 10px;
}

.layout-switcher .nav-pills li:not(.active) a {
background-color: black;
color: white;
}
30 changes: 28 additions & 2 deletions statics/css/themes/light/skydive.css
Expand Up @@ -10,8 +10,12 @@ label {
color: #337ab7;
}

.topology-d3-full-host, .topology-d3-infra, .topology-d3-gremlin {
background-color: #eee;
}

.topology-d3 {
background-color: #eee;
background-color: #eee;
}

.panel {
Expand Down Expand Up @@ -191,4 +195,26 @@ hr {

.input-group-addon {
color: black;
}
}

.impossible-to-build-hierarchy-topology {
justify-content: center;
font-weight: bold;
font-size: 20px;
min-height: 100%;
min-height: 100vh;
display: flex;
align-items: center;
}

.back-to-infrastructure-topology {
margin: 10px 0 0 10px;
}
.back-to-hosts-topology {
margin: 10px 0;
font-size: 24px;
cursor: pointer;
}
.layout-switcher {
margin-bottom: 10px;
}
6 changes: 3 additions & 3 deletions statics/index.html
Expand Up @@ -32,6 +32,7 @@
<script src="/statics/js/vendor/vue.min-2.5.16.js"></script>
<script src="/statics/js/vendor/vue-router.min-2.2.1.js"></script>
<script src="/statics/js/vendor/vuex.min-2.1.2.js"></script>
<script src="/statics/js/vendor/vue-select.js"></script>
<script src="/statics/js/vendor/bootstrap.min.3.3.5.js"></script>

<script src="/statics/js/vendor/bootstrap-3.3.7.min.js"></script>
Expand All @@ -46,9 +47,9 @@

<script src="/statics/js/utils.js"></script>

<script src="/statics/js/components/topologypackage.js"></script>
<script src="/statics/js/bundle.js"></script>
<script src="/statics/js/api.js"></script>
<script src="/statics/js/websocket.js"></script>

<!-- components -->
<script src="/statics/js/components/collapse.js"></script>
Expand Down Expand Up @@ -84,9 +85,8 @@

<!-- views -->
<script src="/statics/js/components/login.js"></script>
<script src="/statics/js/components/layout.js"></script>
<script src="/statics/js/components/graph-layout.js"></script>
<script src="/statics/js/components/topology.js"></script>
<script src="/statics/js/components/old_topology_approach.js"></script>

<!-- UI config -->
<script>
Expand Down
27 changes: 14 additions & 13 deletions statics/js/app.js
@@ -1,5 +1,3 @@
var websocket = new WSHandler();

var store = new Vuex.Store({

state: {
Expand Down Expand Up @@ -141,12 +139,12 @@ var routes = [
created: function() {
setCookie("authtok", "", -1);
setCookie("permissions", "", -1);
websocket.disconnect();
globalEventHandler.websocket().disconnect();
this.$store.commit('logout');
}
}
},
{ path: '/topology', component: TopologyComponent, props: (route) => ({ query: route.query }) },
{ path: '/topology', component: window.layoutConfig.getValue('useNewUi') ? TopologyComponentNewApproach : TopologyComponentOldApproach, props: (route) => ({ query: route.query }) },
{ path: '/preference', component: PreferenceComponent },
{ path: '/status', component: StatusComponent },
{ path: '*', redirect: '/topology' }
Expand Down Expand Up @@ -181,10 +179,18 @@ var app = new Vue({

this.setThemeFromConfig();

websocket.addConnectHandler(self.onConnected.bind(self));
websocket.addDisconnectHandler(self.onDisconnected.bind(self));
websocket.addErrorHandler(self.onError.bind(self));

globalEventHandler.onWebsocketEvent('websocket.connected', self.onConnected.bind(self));
globalEventHandler.onWebsocketEvent('websocket.disconnected', self.onDisconnected.bind(self));
globalEventHandler.onWebsocketEvent('websocket.error', self.onError.bind(self));
this.$store.subscribe(function(mutation) {
if (mutation.type === "login") {
globalEventHandler.websocket().toggleReconnectMode(true);
globalEventHandler.websocket().connect();
} else if (mutation.type === 'logout'){
globalEventHandler.websocket().toggleReconnectMode(false);
globalEventHandler.websocket().disconnect();
}
});
this.checkAPI();

this.interval = null;
Expand All @@ -211,7 +217,6 @@ var app = new Vue({
if (newVal === true) {
this.checkAPI();
router.push('/topology');
websocket.connect();

if (!this.interval)
this.interval = setInterval(this.checkAPI, 5000);
Expand Down Expand Up @@ -262,15 +267,11 @@ var app = new Vue({
this.$store.commit('disconnected');
this.$error({message: 'Disconnected'});

if (this.$store.state.logged)
setTimeout(function(){websocket.connect();}, 1000);
},

onError: function() {
if (this.$store.state.connected)
this.$store.commit('disconnected');

setTimeout(function(){websocket.connect();}, 1000);
},

camelize: function(input) {
Expand Down
6 changes: 3 additions & 3 deletions statics/js/components/capture-form.js
Expand Up @@ -208,8 +208,8 @@ Vue.component('capture-form', {
if (newValue === true &&
this.$store.state.currentNode &&
this.$store.state.currentNode.isCaptureAllowed() &&
this.$store.state.currentNode.metadata.TID) {
this.node1 = this.$store.state.currentNode.metadata.TID;
this.$store.state.currentNode.Metadata.TID) {
this.node1 = this.$store.state.currentNode.Metadata.TID;
}
},

Expand Down Expand Up @@ -239,7 +239,7 @@ Vue.component('capture-form', {

node1: function(newNode) {
var node = this.$store.state.currentNode;
this.nodeType = node.metadata.Type;
this.nodeType = node.Metadata.Type;
},

node2: function(newNode) {
Expand Down
6 changes: 3 additions & 3 deletions statics/js/components/capture-list.js
Expand Up @@ -178,12 +178,12 @@ Vue.component('capture-list', {
},

created: function() {
websocket.addMsgHandler('OnDemandNotification', this.onMsg.bind(this));
websocket.addConnectHandler(this.init.bind(this));
globalEventHandler.onWebsocketEvent('websocket.messageOnDemandNotification', this.onMsg.bind(this))
globalEventHandler.onWebsocketEvent('websocket.connected', this.init.bind(this))
},

beforeDestroy: function() {
websocket.delConnectHandler(this.init.bind(this));
globalEventHandler.removeWebsocketHandler('websocket.connected', this.init.bind(this))
},

computed: {
Expand Down