Commit 5887406a authored by a001188's avatar a001188
Browse files

Improvement

parent e8d6e69f
......@@ -8,7 +8,6 @@ $(document).ready(function () {
}
if(ref.includes('/ec-system-ci/')){
ciTable('IT-Tjänst','Drift av System', false);
// ec_ciTable();
}
if(ref.includes('/ec-file-ci/')){
ciTable('IT-Tjänst','Filtjänst', false);
......@@ -24,8 +23,7 @@ $(document).ready(function () {
if(ref.includes('/tfo-technical-area-client-ci/')){
ciTable('Teknikområde', 'Klient', false);
}
// tfo_ciTable();
if(ref.includes('/organisation/')){
orgTable();
orgGraph(1);
......
......@@ -29,6 +29,8 @@ router.get('/view/:id/:i', function(req, res, next) {
return res.render('index_2', { title: id, index: i});
if(i==='3')
return res.render('index_3', { title: id, index: i});
if(i==='4')
return res.render('about', { title: id, index: i});
else
return res.render('index', { title: id, index: i});
});
......
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.6
-- Dumped by pg_dump version 9.6.1
-- Started on 2018-02-07 12:59:05
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- TOC entry 6 (class 2615 OID 209783536)
-- Name: cmdb; Type: SCHEMA; Schema: -; Owner: jasper.u
--
CREATE SCHEMA cmdb;
ALTER SCHEMA cmdb OWNER TO "jasper.u";
SET search_path = cmdb, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- TOC entry 193 (class 1259 OID 210262695)
-- Name: ci; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci (
id integer NOT NULL,
parent_id integer,
family_type_id integer NOT NULL,
family_id integer NOT NULL,
value double precision,
display_name character varying(50) NOT NULL,
description character varying(255),
class_information character varying(2048),
attribute_information character varying(2048),
contact_information character varying(2048),
kst character varying(15),
product character varying(15)
);
ALTER TABLE ci OWNER TO "jasper.u";
--
-- TOC entry 206 (class 1259 OID 211390708)
-- Name: ci_family_account; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_account (
account_type_id integer DEFAULT 0 NOT NULL
)
INHERITS (ci);
ALTER TABLE ci_family_account OWNER TO "jasper.u";
--
-- TOC entry 205 (class 1259 OID 211010183)
-- Name: ci_family_application; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_application (
package character varying(255),
manufacturer character varying(255),
version character varying(50)
)
INHERITS (ci);
ALTER TABLE ci_family_application OWNER TO "jasper.u";
--
-- TOC entry 208 (class 1259 OID 213360589)
-- Name: ci_family_employee; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_employee (
employee_role character varying(50),
mobile_number character varying(50),
email character varying(50)
)
INHERITS (ci);
ALTER TABLE ci_family_employee OWNER TO "jasper.u";
--
-- TOC entry 210 (class 1259 OID 213653428)
-- Name: ci_family_environment; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_environment (
environment_id integer
)
INHERITS (ci);
ALTER TABLE ci_family_environment OWNER TO "jasper.u";
--
-- TOC entry 212 (class 1259 OID 213669152)
-- Name: ci_family_es_fileservice; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_es_fileservice (
)
INHERITS (ci);
ALTER TABLE ci_family_es_fileservice OWNER TO "jasper.u";
--
-- TOC entry 211 (class 1259 OID 213669145)
-- Name: ci_family_es_office; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_es_office (
)
INHERITS (ci);
ALTER TABLE ci_family_es_office OWNER TO "jasper.u";
--
-- TOC entry 203 (class 1259 OID 210882101)
-- Name: ci_family_es_system; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_es_system (
max_service_level integer DEFAULT 0 NOT NULL,
sla character varying(2048),
service_degree_id integer NOT NULL,
service_level_id integer,
sys_overview_ref character varying(255),
sys_overview_date date,
sys_operating_manual_ref character varying(255),
sys_operating_manual_date date
)
INHERITS (ci);
ALTER TABLE ci_family_es_system OWNER TO "jasper.u";
--
-- TOC entry 196 (class 1259 OID 210269294)
-- Name: ci_family_fileservice; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_fileservice (
fileservice_type_id integer NOT NULL,
global_environment_id integer NOT NULL,
network_zon_id integer DEFAULT 0 NOT NULL,
backup_id integer DEFAULT 0 NOT NULL,
used_amount_of_memory integer,
ordered_amount_of_memory integer
)
INHERITS (ci);
ALTER TABLE ci_family_fileservice OWNER TO "jasper.u";
--
-- TOC entry 204 (class 1259 OID 210882875)
-- Name: ci_family_fo; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_fo (
)
INHERITS (ci);
ALTER TABLE ci_family_fo OWNER TO "jasper.u";
--
-- TOC entry 207 (class 1259 OID 211390721)
-- Name: ci_family_group; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_group (
group_type_id integer DEFAULT 0 NOT NULL
)
INHERITS (ci);
ALTER TABLE ci_family_group OWNER TO "jasper.u";
--
-- TOC entry 194 (class 1259 OID 210262786)
-- Name: ci_family_organisation; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_organisation (
display_name character varying(50),
description character varying(255),
level_id integer NOT NULL
)
INHERITS (ci);
ALTER TABLE ONLY ci_family_organisation ALTER COLUMN value SET NOT NULL;
ALTER TABLE ci_family_organisation OWNER TO "jasper.u";
--
-- TOC entry 197 (class 1259 OID 210352657)
-- Name: ci_family_project; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_project (
)
INHERITS (ci);
ALTER TABLE ci_family_project OWNER TO "jasper.u";
--
-- TOC entry 200 (class 1259 OID 210432146)
-- Name: ci_family_server; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_server (
operating_system_id integer NOT NULL,
hardware_id integer NOT NULL,
no_of_cpu integer NOT NULL,
amount_of_memory integer NOT NULL
)
INHERITS (ci);
ALTER TABLE ci_family_server OWNER TO "jasper.u";
--
-- TOC entry 213 (class 1259 OID 213893582)
-- Name: ci_family_technical_area; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_technical_area (
)
INHERITS (ci);
ALTER TABLE ci_family_technical_area OWNER TO "jasper.u";
--
-- TOC entry 214 (class 1259 OID 213978350)
-- Name: ci_family_technical_plattform; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_technical_plattform (
)
INHERITS (ci);
ALTER TABLE ci_family_technical_plattform OWNER TO "jasper.u";
--
-- TOC entry 195 (class 1259 OID 210269152)
-- Name: ci_family_tfo; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE ci_family_tfo (
tech_area_id integer NOT NULL
)
INHERITS (ci);
ALTER TABLE ci_family_tfo OWNER TO "jasper.u";
--
-- TOC entry 198 (class 1259 OID 210418227)
-- Name: class; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE class (
id integer NOT NULL,
class_type_id integer NOT NULL,
display_name character varying(50) NOT NULL,
description character varying(255) NOT NULL,
sort_order integer DEFAULT 0 NOT NULL
);
ALTER TABLE class OWNER TO "jasper.u";
--
-- TOC entry 199 (class 1259 OID 210418246)
-- Name: class_type; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE class_type (
id integer NOT NULL,
family_id integer NOT NULL,
display_name character varying(50) NOT NULL,
description character varying(255) NOT NULL,
class_type integer DEFAULT 0 NOT NULL,
sort_order integer DEFAULT 0 NOT NULL
);
ALTER TABLE class_type OWNER TO "jasper.u";
--
-- TOC entry 192 (class 1259 OID 210262510)
-- Name: family; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE family (
id integer NOT NULL,
family_type_id integer NOT NULL,
display_name character varying(50) NOT NULL,
description character varying(255) NOT NULL,
sort_order integer DEFAULT 0 NOT NULL
);
ALTER TABLE family OWNER TO "jasper.u";
--
-- TOC entry 191 (class 1259 OID 210079827)
-- Name: family_type; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE family_type (
id integer NOT NULL,
display_name character varying(50) NOT NULL,
description character varying(255) NOT NULL,
sort_order integer DEFAULT 0 NOT NULL
);
ALTER TABLE family_type OWNER TO "jasper.u";
--
-- TOC entry 202 (class 1259 OID 210700583)
-- Name: relation; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE relation (
relation_type_id integer NOT NULL,
from_ci_id integer NOT NULL,
to_ci_id integer NOT NULL
);
ALTER TABLE relation OWNER TO "jasper.u";
--
-- TOC entry 209 (class 1259 OID 213466103)
-- Name: relation_type; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE relation_type (
id integer NOT NULL,
relation_type_group_id integer NOT NULL,
display_name character varying(50) NOT NULL,
description character varying(255) NOT NULL,
sort_order integer DEFAULT 0 NOT NULL
);
ALTER TABLE relation_type OWNER TO "jasper.u";
--
-- TOC entry 201 (class 1259 OID 210700576)
-- Name: relation_type_group; Type: TABLE; Schema: cmdb; Owner: jasper.u
--
CREATE TABLE relation_type_group (
id integer NOT NULL,
display_name character varying(50) NOT NULL,
description character varying(255),
sort_order integer DEFAULT 0 NOT NULL
);
ALTER TABLE relation_type_group OWNER TO "jasper.u";
--
-- TOC entry 3045 (class 2604 OID 210265867)
-- Name: ci_family_organisation value; Type: DEFAULT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY ci_family_organisation ALTER COLUMN value SET DEFAULT 0;
--
-- TOC entry 3065 (class 2606 OID 210262699)
-- Name: ci ci_pkey; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY ci
ADD CONSTRAINT ci_pkey PRIMARY KEY (id);
--
-- TOC entry 3067 (class 2606 OID 210418231)
-- Name: class class_pk; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY class
ADD CONSTRAINT class_pk PRIMARY KEY (id);
--
-- TOC entry 3071 (class 2606 OID 210418250)
-- Name: class_type class_type_pk; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY class_type
ADD CONSTRAINT class_type_pk PRIMARY KEY (id);
--
-- TOC entry 3073 (class 2606 OID 210418252)
-- Name: class_type class_type_unique_display_name; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY class_type
ADD CONSTRAINT class_type_unique_display_name UNIQUE (display_name, family_id);
--
-- TOC entry 3069 (class 2606 OID 210418233)
-- Name: class class_unique_display_name; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY class
ADD CONSTRAINT class_unique_display_name UNIQUE (display_name, class_type_id);
--
-- TOC entry 3061 (class 2606 OID 210262514)
-- Name: family family_pk; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY family
ADD CONSTRAINT family_pk PRIMARY KEY (id);
--
-- TOC entry 3063 (class 2606 OID 214076341)
-- Name: family family_type_id_and_display_name; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY family
ADD CONSTRAINT family_type_id_and_display_name UNIQUE (family_type_id, display_name);
--
-- TOC entry 3057 (class 2606 OID 210079831)
-- Name: family_type family_type_pk; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY family_type
ADD CONSTRAINT family_type_pk PRIMARY KEY (id);
--
-- TOC entry 3059 (class 2606 OID 210079833)
-- Name: family_type family_type_unique_display_name; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY family_type
ADD CONSTRAINT family_type_unique_display_name UNIQUE (display_name);
--
-- TOC entry 3079 (class 2606 OID 210700587)
-- Name: relation relation_pkey; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY relation
ADD CONSTRAINT relation_pkey PRIMARY KEY (relation_type_id, from_ci_id, to_ci_id);
--
-- TOC entry 3081 (class 2606 OID 213466110)
-- Name: relation_type relation_type_display_name; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY relation_type
ADD CONSTRAINT relation_type_display_name UNIQUE (display_name, relation_type_group_id);
--
-- TOC entry 3083 (class 2606 OID 213466108)
-- Name: relation_type relation_type_pk; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY relation_type
ADD CONSTRAINT relation_type_pk PRIMARY KEY (id);
--
-- TOC entry 3075 (class 2606 OID 210700580)
-- Name: relation_type_group relation_type_pkey; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY relation_type_group
ADD CONSTRAINT relation_type_pkey PRIMARY KEY (id);
--
-- TOC entry 3077 (class 2606 OID 210700582)
-- Name: relation_type_group relation_type_unique_name; Type: CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY relation_type_group
ADD CONSTRAINT relation_type_unique_name UNIQUE (display_name);
--
-- TOC entry 3085 (class 2606 OID 210262731)
-- Name: ci ci_family_fkey; Type: FK CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY ci
ADD CONSTRAINT ci_family_fkey FOREIGN KEY (id) REFERENCES family(id);
--
-- TOC entry 3086 (class 2606 OID 210262736)
-- Name: ci ci_family_type_fkey; Type: FK CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY ci
ADD CONSTRAINT ci_family_type_fkey FOREIGN KEY (id) REFERENCES family_type(id);
--
-- TOC entry 3087 (class 2606 OID 210882728)
-- Name: class class_class_type_fkey; Type: FK CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY class
ADD CONSTRAINT class_class_type_fkey FOREIGN KEY (class_type_id) REFERENCES class_type(id);
--
-- TOC entry 3088 (class 2606 OID 210418253)
-- Name: class_type class_type_famely_fkey; Type: FK CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY class_type
ADD CONSTRAINT class_type_famely_fkey FOREIGN KEY (family_id) REFERENCES family(id);
--
-- TOC entry 3084 (class 2606 OID 210262517)
-- Name: family family_famely_type_fkey; Type: FK CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY family
ADD CONSTRAINT family_famely_type_fkey FOREIGN KEY (family_type_id) REFERENCES family_type(id);
--
-- TOC entry 3089 (class 2606 OID 213669163)
-- Name: relation relation_relation_type_fk; Type: FK CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY relation
ADD CONSTRAINT relation_relation_type_fk FOREIGN KEY (relation_type_id) REFERENCES relation_type(id);
--
-- TOC entry 3090 (class 2606 OID 213466111)
-- Name: relation_type relation_type_group_fkey; Type: FK CONSTRAINT; Schema: cmdb; Owner: jasper.u
--
ALTER TABLE ONLY relation_type
ADD CONSTRAINT relation_type_group_fkey FOREIGN KEY (relation_type_group_id) REFERENCES class_type(id);
-- Completed on 2018-02-07 12:59:06
--
-- PostgreSQL database dump complete
--
extends menu
block content
p(class='cmdbguiSmallText') #{title}
h1 Några ord på vägen
p Nedan beskrivs grundläggande begrepp som den här CMDB: n bygger på. Innehållet är testdata och har endast till syfte att illsutrera funktionen i CMDB.
p CMDB bygger på Konfigurations element [CI] som delas in i Familjetyper och Familjer. Till en Familj tillhör noll till många Klasstyper och noll tllmånga Attribut
h2 Familjetyp
p Familjetyp används för att gruppera familjer. En Familjetyp är tänkt att omfatta en grupp av tekniks komponenter organisation, ekonomi.
h2 Familj
p En Familj beskriver en typ element inom familjen. Exempelvis beskriver familjen Servrar alla servrar inom Familjetypen IT-Tjänstekomponenter.
p En familj har en uppsättning klasstyper och Attribut kopplat till sig
h2 Familje Hierarki
p Familjer inordnas i en hierarkisk strukur. Hierarkin utrycker "ägande" eller "tillhörighet"
p I många av tabellerna kan du klicka på [upp] för att komma till föäldern till aktuell CI
h3 Förälder
p En förälder äger sina barn
h3 Barn
p Barnen tillhör sina föräldrar.