mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 23:30:20 +01:00
2017-10-14 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in RDStation that caused Livewire node parameters to fail to be copied as part of the profile of a new host.
This commit is contained in:
@@ -16108,3 +16108,6 @@
|
|||||||
2017-10-14 Fred Gleason <fredg@paravelsystems.com>
|
2017-10-14 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a bug in RDStation that caused RDCartSlot parameters to
|
* Fixed a bug in RDStation that caused RDCartSlot parameters to
|
||||||
fail to be copied as part of the profile of a new host.
|
fail to be copied as part of the profile of a new host.
|
||||||
|
2017-10-14 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a bug in RDStation that caused Livewire node parameters to
|
||||||
|
fail to be copied as part of the profile of a new host.
|
||||||
|
|||||||
@@ -1592,6 +1592,33 @@ bool RDStation::create(const QString &name,QString *err_msg,
|
|||||||
delete q1;
|
delete q1;
|
||||||
}
|
}
|
||||||
delete q;
|
delete q;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Clone Livewire Nodes
|
||||||
|
//
|
||||||
|
sql=QString("select ")+
|
||||||
|
"MATRIX,"+ // 00
|
||||||
|
"BASE_OUTPUT,"+ // 01
|
||||||
|
"HOSTNAME,"+ // 02
|
||||||
|
"PASSWORD,"+ // 03
|
||||||
|
"TCP_PORT,"+ // 04
|
||||||
|
"DESCRIPTION "+ // 05
|
||||||
|
"from SWITCHER_NODES where "+
|
||||||
|
"STATION_NAME=\""+RDEscapeString(exemplar)+"\"";
|
||||||
|
q=new RDSqlQuery(sql);
|
||||||
|
while(q->next()) {
|
||||||
|
sql=QString("insert into SWITCHER_NODES set ")+
|
||||||
|
"STATION_NAME=\""+RDEscapeString(name)+"\","+
|
||||||
|
QString().sprintf("MATRIX=%d,",q->value(0).toInt())+
|
||||||
|
QString().sprintf("BASE_OUTPUT=%d,",q->value(1).toInt())+
|
||||||
|
"HOSTNAME=\""+RDEscapeString(q->value(2).toString())+"\","+
|
||||||
|
"PASSWORD=\""+RDEscapeString(q->value(3).toString())+"\","+
|
||||||
|
QString().sprintf("TCP_PORT=%d,",q->value(4).toInt())+
|
||||||
|
"DESCRIPTION=\""+RDEscapeString(q->value(5).toString())+"\"";
|
||||||
|
q1=new RDSqlQuery(sql);
|
||||||
|
delete q1;
|
||||||
|
}
|
||||||
|
delete q;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1738,8 +1765,14 @@ void RDStation::remove(const QString &name)
|
|||||||
"STATION_NAME=\""+RDEscapeString(name)+"\"";
|
"STATION_NAME=\""+RDEscapeString(name)+"\"";
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
delete q;
|
delete q;
|
||||||
|
|
||||||
|
sql=QString("delete from SWITCHER_NODES where ")+
|
||||||
|
"STATION_NAME=\""+RDEscapeString(name)+"\"";
|
||||||
|
q=new RDSqlQuery(sql);
|
||||||
|
delete q;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RDStation::SetRow(const QString ¶m,const QString &value) const
|
void RDStation::SetRow(const QString ¶m,const QString &value) const
|
||||||
{
|
{
|
||||||
RDSqlQuery *q;
|
RDSqlQuery *q;
|
||||||
|
|||||||
Reference in New Issue
Block a user