Make it possible to show a message for a specific machine
This commit is contained in:
Родитель
dfe8d79fbc
Коммит
82aa1fecb0
|
@ -205,9 +205,11 @@ CREATE TABLE `awfy_machine` (
|
|||
`description` varchar(255) NOT NULL,
|
||||
`active` tinyint(1) NOT NULL,
|
||||
`frontpage` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`pushed_separate` tinyint(1) NOT NULL,
|
||||
`last_checked` int(10) unsigned NOT NULL,
|
||||
`timeout` int(11) unsigned NOT NULL,
|
||||
`contact` mediumtext NOT NULL,
|
||||
`message` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class Vendor(object):
|
|||
self.rangeURL = rangeURL
|
||||
|
||||
class Machine(object):
|
||||
def __init__(self, id, os, cpu, description, active, frontpage, pushed_separate):
|
||||
def __init__(self, id, os, cpu, description, active, frontpage, pushed_separate, message):
|
||||
self.id = id
|
||||
self.os = os
|
||||
self.cpu = cpu
|
||||
|
@ -53,6 +53,7 @@ class Machine(object):
|
|||
self.active = active
|
||||
self.frontpage = frontpage
|
||||
self.pushed_separate = pushed_separate
|
||||
self.message = message
|
||||
|
||||
self.suites = []
|
||||
c = awfy.db.cursor()
|
||||
|
@ -75,6 +76,7 @@ class Machine(object):
|
|||
"description": self.description,
|
||||
"frontpage": self.frontpage,
|
||||
"pushed_separate": self.pushed_separate,
|
||||
"message": self.message,
|
||||
"suites": self.suites
|
||||
}
|
||||
|
||||
|
@ -160,9 +162,9 @@ class Context(object):
|
|||
|
||||
# Get a list of machines.
|
||||
self.machines = []
|
||||
c.execute("SELECT id, os, cpu, description, active, frontpage, pushed_separate FROM awfy_machine WHERE active >= 1")
|
||||
c.execute("SELECT id, os, cpu, description, active, frontpage, pushed_separate, message FROM awfy_machine WHERE active >= 1")
|
||||
for row in c.fetchall():
|
||||
m = Machine(row[0], row[1], row[2], row[3], row[4], row[5], row[6])
|
||||
m = Machine(row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7])
|
||||
self.machines.append(m)
|
||||
|
||||
def exportModes(self):
|
||||
|
|
|
@ -840,6 +840,7 @@ AWFY.updateMachineList = function (machineId) {
|
|||
a.appendTo(li);
|
||||
li.appendTo(menu);
|
||||
}
|
||||
$('#message').html(AWFYMaster.machines[machineId].message+"<br /> ");
|
||||
}
|
||||
|
||||
AWFY.updateSuiteList = function (machineId) {
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
});
|
||||
</script>
|
||||
<div class="graph-row">
|
||||
<div id="message"></div>
|
||||
<div id="navcontainer">
|
||||
<ul id="legend"></ul>
|
||||
<br><br>
|
||||
|
|
|
@ -121,6 +121,9 @@ h1 {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
#message {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.axisLabel {
|
||||
position: absolute;
|
||||
|
|
Загрузка…
Ссылка в новой задаче