Commit 2a67e235 authored by Peter Lundin's avatar Peter Lundin
Browse files

Some functions work

parent 9a3daada
<html>
<head>
<meta charset="UTF-8">
<link href="/stylesheets/cmdbgui.css" rel="stylesheet" type="text/css" />
<link href="/javascripts/jtable/themes/lightcolor/blue/jtable.min.css" rel="stylesheet" type="text/css" />
<link href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" rel="stylesheet" >
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.1.47/jquery.form-validator.min.js"></script>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<title>CMDB-Viewer</title>
</head>
<body onhashchange="logoutcmdbgui(event)">
<script type="text/javascript" src="/javascripts/menu.js"></script>
<script type="text/javascript" src="/javascripts/dashlets/structure-table.js"></script>
<script type="text/javascript" src="/javascripts/dashlets/structure-graph.js"></script>
<script type="text/javascript" src="/javascripts/jtable/jquery.jtable.min.js"></script>
<script type="text/javascript" src="/javascripts/jtable/jquery.jtable.js"></script>
<script type="text/javascript" src="/javascripts/jtable/localization/jquery.jtable.se.js"></script>
<Table class='cmdbguiSmallText'>
<Tr>
<td style='text-align: left'>SMHI</td><td id="demo"></td>
<td style='text-align: right'>User: A001188 - Peter Lundin</td>
</Tr>
</Table>
<!-- Use this navigation div as your menu bar div -->
<div class="navigation">
<ul class="nav">
<li>
<a href="/">Hem</a>
</li>
<li>
<a href="#">Organisation</a>
<ul>
<li><a href="/index.html?view=0">Linjeorganisation</a></li>
<li><a href="/index.html?view=1">Förvaltningsorganisation</a></li>
<li><a href="/index.html?view=2">Teknisk Förvaltningsorganisation</a></li>
</ul>
</li>
<li>
<a href="#">Person</a>
<ul>
<li><a href="/">Linjeorganisation</a></li>
</ul>
</li>
<li>
<a href="#">IT-Tjänster</a>
<ul>
<li><a href="/">Organisation</a></li>
</ul>
</li>
<li>
<a href="#">Tjänsteobjekt</a>
<ul>
<li><a href="/">FO-relaterade</a></li>
<li><a href="/">TFO-relaterade</a></li>
</ul>
</li>
</ul>
</div>
<form class='cmdbguiSearchForm'>Sök:<input type="text" name="searchString" id="searchString"/></form>
<p class='cmdbguiSmallText'>Innehåll</p>
<div id="cmdb-structure-table"></div>
</body>
</html>
\ No newline at end of file
......@@ -14,13 +14,14 @@
<title>CMDB-Viewer</title>
</head>
<body onhashchange="logoutcmdbgui(event)">
<script type="text/javascript" src="/javascripts/menu.js"></script>
<script type="text/javascript" src="/javascripts/vis/dist/vis.js"></script>
<script type="text/javascript" src="/javascripts/menu.js"></script>
<!--
<script type="text/javascript" src="/javascripts/vis/dist/vis.js"></script>
<script type="text/javascript" src="/javascripts/dashlets/organisation-table.js"></script>
<script type="text/javascript" src="/javascripts/dashlets/organisation-table.js"></script>
<script type="text/javascript" src="/javascripts/dashlets/organisation-graph.js"></script>
-->
<!-- <script type="text/javascript" src="/javascripts/dashlets/structure-table.js"></script>
<script type="text/javascript" src="/javascripts/dashlets/structure-table.js"></script>
<script type="text/javascript" src="/javascripts/dashlets/structure-graph.js"></script>
-->
<script type="text/javascript" src="/javascripts/jtable/jquery.jtable.min.js"></script>
......@@ -36,7 +37,7 @@
<!-- Use this navigation div as your menu bar div -->
<div class="navigation">
<ul class="nav">
<li>
<li>
<a href="/">Hem</a>
</li>
<li>
......@@ -71,9 +72,9 @@
<form class='cmdbguiSearchForm'>Sök:<input type="text" name="searchString" id="searchString"/></form>
<p class='cmdbguiSmallText'>Innehåll</p>
<div id="cmdb-table"></div>
<!--
<p class='cmdbguiSmallText'>Relationer</p>
<div id="mynetwork"></div>
-->
</body>
</html>
\ No newline at end of file
......@@ -10,5 +10,5 @@
<div id="mynetwork"></div>
<script type="text/javascript" src="/javascripts/dashlets/organisation-graph.js"></script>
</body>
</body>
</html>
\ No newline at end of file
$(document).ready(function () {
$('#cmdb-table').jtable({
$('#cmdb-structure-table').jtable({
title: "Typer av CI-familjer",
paging: false, //Enable paging
pageSize: 10, //Set page size (default: 10)
......@@ -9,26 +9,7 @@ $(document).ready(function () {
multiSorting: false,
defaultSorting: 'display_name ASC', //Set default sorting
actions: {
listAction: '/cmdb/api/v1/structure/family_type',
createAction: '/cmdb/api/v1/structure/create',
updateAction: function(postData) {
return $.Deferred(function ($dfd) {
$.ajax({
url: '/cmdb/api/v1/structure/update',
type: 'POST',
dataType: 'json',
data: postData,
success: function (data) {
$dfd.resolve(data);
var records = data['Records'];
},
error: function () {
$dfd.reject();
}
});
});
},
deleteAction: '/cmdb/api/v1/structure/delete'
listAction: '/cmdb/api/v1/structure/family_type'
},
fields: { //family_type
id: {
......@@ -48,6 +29,6 @@ $(document).ready(function () {
}
});
$('#cmdb-table').jtable('load');
$('#cmdb-structure-table').jtable('load');
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment